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
New Developer
Posts: 14
Registered: ‎09-27-2013
My Device: Developer
My Carrier: Vodafone

Access denied for mts0 & mts1.googleapis.com in blackberry10 webworks application

[ Edited ]

I am working on a Blackberry 10 application developed using Blackberry10 webworks SDK 1.0.4.11. I am using Google maps in my application. In my config file I have given access to all the sites that I am using in my app lik this

<access uri="https://csi.gstatic.com" subdomains="true">
<feature id="blackberry.app" required="true" version="1.0.0"/>
<feature id="blackberry.invoke" required="true" version="1.0.0"/>
</access>

<access uri="http://www.google.com" subdomains="true">
<feature id="blackberry.app" required="true" version="1.0.0"/>
<feature id="blackberry.invoke" required="true" version="1.0.0"/>
</access>

<access uri="https://maps.googleapis.com" subdomains="true">
<feature id="blackberry.app" required="true" version="1.0.0"/>
<feature id="blackberry.invoke" required="true" version="1.0.0"/>
</access>

<access uri="https://maps.gstatic.com" subdomains="true">
<feature id="blackberry.app" required="true" version="1.0.0"/>
<feature id="blackberry.invoke" required="true" version="1.0.0"/>
</access>

<access uri="https://mts.googleapis.com" subdomains="true">
<feature id="blackberry.app" required="true" version="1.0.0"/>
<feature id="blackberry.invoke" required="true" version="1.0.0"/>
</access>

<access origin="https://mts1.googleapis.com" subdomains="true">
<feature id="blackberry.app" required="true" version="1.0.0"/>
<feature id="blackberry.invoke" required="true" version="1.0.0"/>
</access>

<access origin="https://mts1.googleapis.com/vt" subdomains="true">
<feature id="blackberry.app" required="true" version="1.0.0"/>
<feature id="blackberry.invoke" required="true" version="1.0.0"/>
</access>

<access uri="https://mts0.googleapis.com" subdomains="true">
<feature id="blackberry.app" required="true" version="1.0.0"/>
<feature id="blackberry.invoke" required="true" version="1.0.0"/>
</access>

<access uri="https://mts0.googleapis.com/vt" subdomains="true">
<feature id="blackberry.app" required="true" version="1.0.0"/>
<feature id="blackberry.invoke" required="true" version="1.0.0"/>
</access>

<access uri="https://csi.gstatic.com" subdomains="true">
<feature id="blackberry.app" required="true" version="1.0.0"/>
<feature id="blackberry.invoke" required="true" version="1.0.0"/>
</access>

<access uri="https://fonts.googleapis.com" subdomains="true">
<feature id="blackberry.app" required="true" version="1.0.0"/>
<feature id="blackberry.invoke" required="true" version="1.0.0"/>
</access>

<access uri="https://themes.googleusercontent.com" subdomains="true">
<feature id="blackberry.app" required="true" version="1.0.0"/>
<feature id="blackberry.invoke" required="true" version="1.0.0"/>
</access>
But I am getting

" Access to " https://mts0.googleapis.com/vt?lyrs=...15&z=5&scale=5 " not allowed " alert when I try to load the map.

The same access denial error comes when I access https://mts1.googleapis.com too.

Please help me.

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

Re: Access denied for mts0 & mts1.googleapis.com in blackberry10 webworks application

Hi there,

What if you try the following.
<access uri="https://googleapis.com" subdomains="true" />

* This means that you are opening access to all URLs at the domain googleapis.com via the HTTPS protocol, including all subdomains (i.e. www.googleapis.com, mts0.googleapis.com, etc. over HTTPS.)

Note that you do not need the inner feature elements; those indicate that the external URL makes use of those WebWorks APIs, which they should not be doing in this case.

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.
New Developer
Posts: 14
Registered: ‎09-27-2013
My Device: Developer
My Carrier: Vodafone

Re: Access denied for mts0 & mts1.googleapis.com in blackberry10 webworks application

Have tried the code you suggested. But the issue is not solved yet.

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

Re: Access denied for mts0 & mts1.googleapis.com in blackberry10 webworks application

Hmm, just as a sanity check, what if you disable web security completely (i.e. white-list everything):

 

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

Documentation

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


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: 1,230
Registered: ‎03-20-2011
My Device: Playbook, Z10 LE, Dev Alpha B, 2x Dev Alpha C
My Carrier: 3, Orange, Vodafone

Re: Access denied for mts0 & mts1.googleapis.com in blackberry10 webworks application

[ Edited ]

I've confirmed this on a play-app many months ago

 

Web Security will definitely make the issue vanish but this is not a valid solution

 

As we move increasingly into the cloud high-demand, high availability clusters will inreasingly use redirects to low-cost supply servers of unknown FQDNs - problematic

 

I used this about six months ago and it worked

 

	<access uri="https://googleapis.com" subdomains="true" />
	<access uri="https://gstatic.com" subdomains="true" />

 

This is just a copy I have lying around - basically add any domain that causes an alert

 

Other than the themes + control domains this covers most of them

 

Adapt this formula to suit

 

Basically the lines say anything from googleapis.com and gstatic.com is OK - your mts1 etc is tying you to a specific server, subdomains mean that anything before, e.g. gstatic.com is allowed




Click the like button if you find my posts useful!