Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Web and WebWorks Development

Reply
Developer
Posts: 124
Registered: ‎07-11-2011
My Device: 8900
My Carrier: Airtel

Re: Pdf File is not getting downloaded with HTTPS url in bb10 webworks: filetransfer.download

Please help me in getting over throug this.It''s very urgent.

I think it''s realted to HTTPS.I am having the same problem in below thraed link.

 

http://supportforums.blackberry.com/t5/Web-and-WebWorks-Development/Issue-opening-files-in-web-Link-...

 

As it was not loading webworks.js oven an HTTPS url.

So, i have tried to include webworks-1.0.4.11.js from Webworks SDK.

BlackBerry 10 WebWorks SDK 1.0.4.11\Framework\clientFiles

 

However it is working fine on HTTP local url.But seems to be have an issue with HTTPS.Below are the logs for same:

[blocked] The page at https://test.com/testing/html/bb10_attachments.html displayed insecure content from http://localhost:1121/extensions/get/?hash=deddddd&version=1.0.4.11.

 

We are testing it on to 10.2 Device.

 

Retired
Posts: 1,561
Registered: ‎04-12-2010
My Device: BlackBerry Z10
My Carrier: Bell

Re: Pdf File is not getting downloaded with HTTPS url in bb10 webworks: filetransfer.download

Hi there,

 

Is/was your WebWorks application <content> element being hosted externally at this URL?

https://dl.dropboxusercontent.com/assets/html/sample_attachments.html

 

In that case, the issue is likely stemming from the difference in protocols (https vs. local) - local being where webworks.js is being hosted, which is not secure (i.e. not an HTTPS protocol.)

 

It's the same in the second case; making HTTPS load HTTP content goes against the security model. If your content is hosted on HTTPS, then it's best that the resources it is accessing are as well. Mixing local/remote and http/https/local is going to cause issues.

 

With the failing (https) PDF file, is it very small in size when it gets to your device? It could be that the response is actually an error message (similar to what you've shown) and that error message is being written to a file with extension PDF, thus when you try to open it, it is seen as invalid.

 

You *may* be able to get around this temporarily by disabling web security.

https://developer.blackberry.com/html5/documentation/v2_0/preference_element.html

 

But even that may not suffice. The best practices approach would be to ensure your content isn't jumping between protocols when using HTTPS (HTTP does not have this same security model.)


Erik Oros | @WaterlooErik | eoros@blackberry.com | Developer Issue Tracker

If a reply has answered your question, please click Accept as Solution to help other visitors in the future.
Developer
Posts: 116
Registered: ‎03-15-2011
My Device: Blackberry 9800
My Carrier: developer

Re: Pdf File is not getting downloaded with HTTPS url in bb10 webworks: filetransfer.download

I am also facing the same problem while trying to access my web application using HTTPS url. 

 

Webworks.js is getting blocked.

 

Does it mean that we can't include webworks.js in a secure application that is hosted on HTTPS url?

Retired
Posts: 1,561
Registered: ‎04-12-2010
My Device: BlackBerry Z10
My Carrier: Bell

Re: Pdf File is not getting downloaded with HTTPS url in bb10 webworks: filetransfer.download

If you also host webworks.js at an HTTPS URL, I believe that should get you around the issue. Have you had a chance to try it that way?

Erik Oros | @WaterlooErik | eoros@blackberry.com | Developer Issue Tracker

If a reply has answered your question, please click Accept as Solution to help other visitors in the future.
Developer
Posts: 116
Registered: ‎03-15-2011
My Device: Blackberry 9800
My Carrier: developer

Re: Pdf File is not getting downloaded with HTTPS url in bb10 webworks: filetransfer.download

[ Edited ]

Yes. I tried to put webworks.js in js folder of application hosted on HTTPS url and gave the path of js folder but It didn't work. We are still getting the blocked content error for webworks.js.

 

Copied webworks.js from webworks sdk folder.

 

Facing this issue in 10.2 OS. In 10.0 it is giving warning for blocked content  but app works. However in 10.2 it is blocking the content and app doesn't work.

Highlighted
Retired
Posts: 1,561
Registered: ‎04-12-2010
My Device: BlackBerry Z10
My Carrier: Bell

Re: Pdf File is not getting downloaded with HTTPS url in bb10 webworks: filetransfer.download

Can you please share the full error message when webworks.js is hosted at an HTTPS URL and is attempting to be loaded?

 

Can you also please share the full URL that you are using in your <script> element to access the webworks.js file?

 

If you prefer to not share those values publicly, feel free to email me directly (eoros@blackberry.com) or mask the sensitive components of the URL. If you mask the content, please do not change the structure of the URL, keeping all components intact.


Erik Oros | @WaterlooErik | eoros@blackberry.com | Developer Issue Tracker

If a reply has answered your question, please click Accept as Solution to help other visitors in the future.