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
witmen
Posts: 89
Registered: ‎11-16-2010
My Device: Bold 9650

Weblauncher Unable to open links when packaged with latest SDK

[ Edited ]

Hello,

 

I am working on a weblaunch for my personal site. It is the really simple kind of launcher that doesn't open the brower, instead the app launches and pulls in the website in it's own window.  I've made several of these apps for my own use and using the Tablet SDK, they all function flawlessly. But for some reason, the same exact code causes a error when signed with the BlackBerry 10 webworks SDK.  

 

The app will launch fine and everything looks normal. The only problem is if you click on a link, the new page will launch but then a pop up shows that says:

 

JavaScript Alert

 

Access to "http://static.ak.fbcdn.net/rsrc.php/v2/yD/r/g6A2L74-dDT.js" not allowed

 

and the app crashes.  You can no longer scroll on the page.  This error happens on any link I try. Even links on my own website. Any ideas on what is going on?

 

I have both versions on my Dev Alpha. Both launching the same website. The Tablet SDK version doesn't have this error, just the new version.

 

I would really like to be able to add BlackBerry 10 features to this app.  Is there a new code we should be using for Weblaunchers now?

 

Thanks

 

 

BlackBerry Development Advisor
Nukul
Posts: 115
Registered: ‎06-06-2011
My Device: 9800

Re: Weblauncher Unable to open links when packaged with latest SDK

you need the access element in your config.xml

 

<access uri="*"/>

 

https://developer.blackberry.com/html5/documentation/access_element_834677_11.html

@nukulb
Developer
witmen
Posts: 89
Registered: ‎11-16-2010
My Device: Bold 9650

Re: Weblauncher Unable to open links when packaged with latest SDK

I have this:

 

<access uri="*" subdomains="true"/>

 

The config.xml is exactly the same for both version.  The only modifications that were made is the version numbers and what SDK packaged and signed them.  I just made one for Google adsense. The version that is packaged with the Tablet SDK works. The one that is packaged with BlackBerry 10 SDK gets a error when links are opened.

 

BlackBerry Development Advisor
Nukul
Posts: 115
Registered: ‎06-06-2011
My Device: 9800

Re: Weblauncher Unable to open links when packaged with latest SDK

can you try without the subdomains just to be sure?

 

It might be a bug on BB10

@nukulb
BlackBerry Development Advisor
Nukul
Posts: 115
Registered: ‎06-06-2011
My Device: 9800

Re: Weblauncher Unable to open links when packaged with latest SDK

access uri="*" covers cross site XHR on Playbook but on BB10 the security implies that you specially whitelist an cross site XHR.

 

but since you are clicking on a link I am surprised that you are affected.

@nukulb
Developer
witmen
Posts: 89
Registered: ‎11-16-2010
My Device: Bold 9650

Re: Weblauncher Unable to open links when packaged with latest SDK

I'd be happy to try that. 

 

Just to make sure I have it correct. I will replace the line I posted with:

 

<access uri="*"/>

BlackBerry Development Advisor
Nukul
Posts: 115
Registered: ‎06-06-2011
My Device: 9800

Re: Weblauncher Unable to open links when packaged with latest SDK

yes
@nukulb
Developer
witmen
Posts: 89
Registered: ‎11-16-2010
My Device: Bold 9650

Re: Weblauncher Unable to open links when packaged with latest SDK

That didn't fix it either. Same error at the same spot.

 

JavaScript Alert

 

Access to

"URL" not allowed

 

Could signing it by command prompts effect anything?

BlackBerry Development Advisor
Nukul
Posts: 115
Registered: ‎06-06-2011
My Device: 9800

Re: Weblauncher Unable to open links when packaged with latest SDK

try
<access uri="http://fbcdn.net" subdomains="true"/>


no signing will have no affect on it.
@nukulb
Developer
witmen
Posts: 89
Registered: ‎11-16-2010
My Device: Bold 9650

Re: Weblauncher Unable to open links when packaged with latest SDK

That time it didn't let the home page load at all. And it said I wasn't allowed to access it.

 

Very strange. This is the config.xml:

 

<?xml version="1.0" encoding="UTF-8"?>
<widget xmlns=" http://www.w3.org/ns/widgets" version="1.0.0">  
    
        <name>      </name>
        <author>       </author>
    <content src="http://    .com/"/>    
    <access uri="*" subdomains="true"/>
        <icon src="icon.png"/>
</widget>

 

 

I fill out the blanks and it works everytime with Tablet SDK.