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. New to the forum? Please visit the ‘Getting Started’ link below.
inside custom component

Web and WebWorks Development

Reply
Regular Contributor
basitj
Posts: 80
Registered: ‎04-08-2011
My Carrier: Mobilink

Re: BB10 local:/// not working after OS update

Please use plain text.
BlackBerry Development Advisor
erikjohnzon
Posts: 235
Registered: ‎09-21-2012
My Carrier: Virgin

Re: BB10 local:/// not working after OS update

Let's focus on the first one to get things sorted out.

 

Yes, Nukul I was able to load a local:/// page havin access uri="*".

 

Basitj: There are a couple things you can check out because nothing happens is not something we can particularily help with.

 

- If you open Web Inspector do you see any errors on the Javascript console?

- If there is no pop-up saying that the access is blocked, then it is *probably* not a whitelisting issue, which would mean it's strange it all of a sudden stopped working.

 

Feel free to send me a zip/bar file I can try out. I'll try and help you work through things. I see that your main page in your config file is a local page, so I'm wondering how this could be an issue, but there are probably some gaps in my understanding.

@erikjohnzon
erjohnson@blackberry.com
Please use plain text.
BlackBerry Development Advisor
Nukul
Posts: 115
Registered: ‎06-06-2011
My Carrier: Rogers

Re: BB10 local:/// not working after OS update

Erik,

 

Different webkit rules apply for loading a page (main load) and loading a resource.

We know we can navigate to a local:/// page but I bet if you made a xhr or resource load it won't work because there was a security bug fix that no longer allows non main loads to file.

 

Test case to try is load a local:/// resource from a remote page.

 

 

@nukulb
Please use plain text.
Regular Contributor
basitj
Posts: 80
Registered: ‎04-08-2011
My Carrier: Mobilink

Re: BB10 local:/// not working after OS update

This is crazy, it is something to do with whitelisting.

 

 

The console says:

 

 

Not allowed to load local resource: local:///youtubelauncher.html?ur=http://www.youtube.com/watch?v=vyxpgMdDSVc

 

 

Is that because of the url parameter?

Please use plain text.
Regular Contributor
basitj
Posts: 80
Registered: ‎04-08-2011
My Carrier: Mobilink

Re: BB10 local:/// not working after OS update

I have only following access tags in config.xml and in exact given format below.

 

   <!-- Expose access to all URIs, including the file and http protocols -->
  <access subdomains="true" uri="*" />
   
  <!-- Cordova API -->
  <access subdomains="true" uri="file:///store/home" />
  <access subdomains="true" uri="file:///SDCard" />

 

Please use plain text.
BlackBerry Development Advisor
jeffheifetz
Posts: 514
Registered: ‎07-18-2011
My Carrier: Rogers

Re: BB10 local:/// not working after OS update

Hi 



1.Please resolve your thread by clicking the "Accept as Solution" button below the post which solved your problem!
2. If any post helps you please click the button below the post(s)
Please use plain text.
Developer
peardox
Posts: 719
Registered: ‎03-20-2011
My Carrier: 3, Orange, Vodafone

Re: BB10 local:/// not working after OS update

This may be a dumb idea but try it

 

Don't use localhost:// - just redirect from where you are

 

I see this happen constantly in 'normal' webdev

 

Typically what occurs is that you reference /<blah>/fred.ext

 

This is an absolute reference

 

Drop the / at the front of <blah> and you're using RELATIVE URLs

 

For example....

 

<script type="text/javascript" src="script/jquery.js"></script>

is completely different to...

 

<script type="text/javascript" src="/script/jquery.js"></script>

It'll fing the first without any issyes - the second can be iffy (to say the least)

 

Take your HTML - dump it all in the root then reference from there

 

There are caveats with CSS




Click the like button if you find my posts useful!
Please use plain text.
Regular Contributor
basitj
Posts: 80
Registered: ‎04-08-2011
My Carrier: Mobilink

Re: BB10 local:/// not working after OS update

Thanks Jeff, Nukul and Erik. Jeff's right. Adding an explicit access tag with my website's root helped. Just to explicitly let every one know, all following scenarios are successfully redirecting back to my local webworks pages when directed from exter pages (hosted on external webserver).

 

window.locat = 'local.///whatever.html'       works

 

clicking on   <a href='local:///whatever.html' >LINK</>  Works

 

Even having content in other tags embedded like images work too. I have this <img src='local:///myimg.jpg' /> works too.

 

Thanks again folks.

 

Now let's get back to my other question in this post: http://supportforums.blackberry.com/t5/Web-and-WebWorks-Development/lt-Select-gt-Drop-down-onSelecte...

 

Please use plain text.
New Contributor
rakesh_katkam2012
Posts: 6
Registered: ‎11-28-2012
My Carrier: Docomo

Re: BB10 local:/// not working after OS update

[ Edited ]

Hi,

 

This is not working from me. :smileysad:

Though i have explicitly whitelisted that domain in config.xml, still it is not redirecting from server page to local page.

i have used this function to redirect

window.location = "local:///index.html";

 

I am using BB10 device

Please use plain text.