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
Trusted Contributor
Posts: 118
Registered: ‎03-06-2013
My Device: Blackberry Z10
My Carrier: Airtel
Accepted Solution

Add Exception pop up on first time access of an URL

Hello ,

 

I am working on BB10 application which is built based on HTML5 and jquery.

i need to load a url under my applications iframe, but when i try to load the url for the first time, then it shows add exception pop up first time. subsequent access of url is fine.

i have whitelisted the url under my config.xml file, then also this pop up is shown at first time access of url in my applciation, why is this issue? and am i missing something other than added <access> tag for that url?

 

let me know.

--------
- If a post contains the solution to the problem, please click "Accept as Solution"
- If a post contains helpful content, please give it a "Thumbs Up"

developer.blackberry.com
@BlackBerryDev
Trusted Contributor
Posts: 118
Registered: ‎03-06-2013
My Device: Blackberry Z10
My Carrier: Airtel

Re: Add Exception pop up on first time access of an URL

if anyone faced above problem, please let me know what is the solution for the same?
--------
- If a post contains the solution to the problem, please click "Accept as Solution"
- If a post contains helpful content, please give it a "Thumbs Up"

developer.blackberry.com
@BlackBerryDev
Trusted Contributor
Posts: 118
Registered: ‎03-06-2013
My Device: Blackberry Z10
My Carrier: Airtel

Re: Add Exception pop up on first time access of an URL

there was a problem of SSL certificate on server side of the URL which is being loaded as iframe, after certificate is installed, it started working fine.
--------
- If a post contains the solution to the problem, please click "Accept as Solution"
- If a post contains helpful content, please give it a "Thumbs Up"

developer.blackberry.com
@BlackBerryDev
New Developer
Posts: 10
Registered: ‎02-26-2012
My Device: Z10, Bold 9700, Playbook 32 Gb
My Carrier: Telcel

Re: Add Exception pop up on first time access of an URL

Hi,

 

How did you manage to install the certificate?. I'm having a similar problem with an invalid ssl certificate, mine is also a jquery app which connects to an https server with an untrusted certificate, so every time a new user installs the app it gets a message to add an exception for the site. Was your problem related to this?

 

Cheers,

 

Juan J. Pérez

Developer
Posts: 68
Registered: ‎01-23-2012
My Device: Z10, Q10 & Playbook 64Gb

Re: Add Exception pop up on first time access of an URL

[ Edited ]

i had similar situation. my app talks through https server, and webview reject to connect because it can not trust the server cert, and this is the error i got:

 

SSL Cert error

 

with OS10 browser, we simply add an exception in this situation, but there is no kind of thing with WebWork/Cordova/webview., been looking around for few days, and and at last i have workaround, inspired by Juan J. Pérez post ini this thread.

 

although my server is not hosted in domain.com nor my ssl cert issued by them (mine is self signed cert), i manage to use his method. this is how i did it:

  • launch the application (for sure it will not be connected)
  • go to chrome desktop and run inspector
  • and from the console run command: 
    document.location.assign('https://myowndomain.dot.com')

     

  • this URL is served by the same server, same SSL Cert, only different url, one that i use in my app is 
    https://myowndomain.dot.com/myapp/

     


  • and i got the dialog box on my Z10 like this:

 

WebWorks/Cordova/webview finally gave me an exception

  • and i just pressed "Add Exception", then after that, relaunch the app, also with document.location.assign, but this time assigned it to my index.html, and finally it's done.

for development process this is ok with me, but when the app is installed by users, i can not expect the did this kind of thing, and this will be a problem and need to be addressed by BlackBerry.

 

no matter the SSL Cert is issued by CA or just a self signed one like mine, WebWorks/Cordova/webview application need to be able to make an exception so the HTML5 app that requires HTTPS/SSL connection can use it.