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: 134
Registered: ‎05-19-2012
My Device: Torch 9800, PlayBook 64GB, Dev Alpha
My Carrier: VIVO Brazil
Accepted Solution

Not allowed to load local resource: local:///index.html

I've seen that this has been a known issue here in the forums since the release of the Gold SDK, but I ran into this issue for the first time today. I'm using the dropbox.js library to interact with the Dropbox API. The problem is that the OAuth page redirects to local:///index.html#?the_oauth_return_parameters_here, which returns a error in the Remote Web Inspector: "Not allowed to load local resource: local:///index.html#?the_oauth_return_parameters_here". This is part of what I have in my config.xml:

<feature id="blackberry.app" >
    <param name="websecurity" value="disable" />
</feature>

<access uri="*" subdomains="true" />
<access uri="https://dropbox.com" subdomains="true" />

<content src="local:///index.html" />

Everywhere I look in the forums and in the BB10 WebWorks Examples I see that that's the correct way to workaround this issue, but why in my case it isn't working?

If I helped you please click the "Like" button to support my work.
My apps: CherryNotes - Bookmarked - Requests
Social Me: about.me - Twitter
BlackBerry Development Advisor
Posts: 762
Registered: ‎10-01-2009
My Device: All
My Carrier: N/A

Re: Not allowed to load local resource: local:///index.html

Hello,

 

I'm curious, if you add <access uri="local:///" subdomains="true"/> does that fix the error? There might be some weird white-listing things going on.

 

Developer
Posts: 134
Registered: ‎05-19-2012
My Device: Torch 9800, PlayBook 64GB, Dev Alpha
My Carrier: VIVO Brazil

Re: Not allowed to load local resource: local:///index.html

Same issue... Smiley Sad

If I helped you please click the "Like" button to support my work.
My apps: CherryNotes - Bookmarked - Requests
Social Me: about.me - Twitter
Retired
Posts: 1,561
Registered: ‎04-12-2010
My Device: BlackBerry Z10
My Carrier: Bell

Re: Not allowed to load local resource: local:///index.html

Disabling web security should essentially whitelist any URL. If you omit all <access> elements, do you still see the issue? Also, to confirm, is this testing being done on a physical device or within Ripple?


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.
Retired
Posts: 3,708
Registered: ‎10-16-2008
My Device: Z10
My Carrier: Rogers

Re: Not allowed to load local resource: local:///index.html

My guess is that it might have something to do with the parameters that are appended onto the end of the URL.  That it may be trying to find a local file with the full name of the URL that is being provided.

Tim Neil
Director, Application Platform & Tools Product Management
Follow me on Twitter
Developer
Posts: 134
Registered: ‎05-19-2012
My Device: Torch 9800, PlayBook 64GB, Dev Alpha
My Carrier: VIVO Brazil

Re: Not allowed to load local resource: local:///index.html

Disabled all the <access> elements and the problem continues. I'm testing on my LE (since I have the Remote Web Inspector there's just no reason not to).

 

It might be a problem with how WebWorks access the files after the latest BB10 updates. It was working on my Dev Alpha back in February, but when I tested in my LE this month it wasn't. Smiley Sad

 

Any other thoughts?

If I helped you please click the "Like" button to support my work.
My apps: CherryNotes - Bookmarked - Requests
Social Me: about.me - Twitter
BlackBerry Development Advisor
Posts: 137
Registered: ‎01-19-2010
My Device: BlackBerry Z10
My Carrier: AT&T

Re: Not allowed to load local resource: local:///index.html

Hey there.  What happens if you add this to your config.xml?

 

<feature id="blackberry.app">
    <param name="websecurity" value="disable" />
</feature>
Ken Wallis - Senior Product Manager, WebWorks and Android Runtime
@ken_wallis
Developer
Posts: 134
Registered: ‎05-19-2012
My Device: Torch 9800, PlayBook 64GB, Dev Alpha
My Carrier: VIVO Brazil

Re: Not allowed to load local resource: local:///index.html

It's already there, look at the first post.

If I helped you please click the "Like" button to support my work.
My apps: CherryNotes - Bookmarked - Requests
Social Me: about.me - Twitter
New Contributor
Posts: 6
Registered: ‎04-13-2013
My Device: Curve
My Carrier: Verizon

Re: Not allowed to load local resource: local:///index.html

The <param name="websecurity" value="disable" /> is not applicable for BB7 and BB6 devices right.??

Then how can we include a <feature> tag for each and every domain.??

I tried
<access uri="*" subdomains="true">
 <feature id="blackberry.ui.menu" version="1.0.0" required="true"/>
 <feature id="blackberry.widgetcache" required="true" version="1.0.0.0" />
</access>
But It gives an error saying, “This access Tag does not allow feature tag”
Developer
Posts: 134
Registered: ‎05-19-2012
My Device: Torch 9800, PlayBook 64GB, Dev Alpha
My Carrier: VIVO Brazil

Re: Not allowed to load local resource: local:///index.html

Just a little update, someone opened a Issue in the dropbox.js repo: https://github.com/dropbox/dropbox-js/issues/67

 

More people are finding this bug...

If I helped you please click the "Like" button to support my work.
My apps: CherryNotes - Bookmarked - Requests
Social Me: about.me - Twitter