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

Java Development

Reply
Developer
Posts: 136
Registered: ‎03-04-2009
My Device: Not Specified

Bold 9900 redirects google.com to google.ca

Hi all,

 

It seems that Bold 9900 on Rogers mobile network redirects google.com to google.ca, which messes my app .. I tried to contact Rogers but they referred me to RIM customer support :smileyhappy:  

 

So for example, HTTP request to http://www.google.com/accounts/.. is redirected to http://www.google.ca/accounts/SetSID..

 

Appreciate any idea

 

Thanks,

Udi

Developer
Posts: 19,624
Registered: ‎07-14-2008
My Device: Not Specified

Re: Bold 9900 redirects google.com to google.ca

Interesting one.  Sorry I have no immediate ideas and I think this is going to be a pain to debug as well. 

 

Just to confirm, I presume this is an issue with 9900 only (so far) and has been tested on other devices correctly.  Also I presume Rogers have not been very forthcoming. 

 

The one thing I would say is this problem is most likely occurring in the gateway.  So I suspect rather than this being a OS 7.0 or 9900 problem this is a problem that is related to the device's choice of gateway.  I suspect if you used the same gateway in other devices, then you would see the same problem.

 

But the above assumes that your program is issuing the http connection calls yourself and that you know what headers are being set.  If you are using one of the later Network API enhancements, like ConnectionFactory, then there is a possibility that RIM have added some code in these classes that does some clever things.  So it might be useful to see your connection code to verify this. 

 

Assuming you have control, then we need to find out what gateway your OS 7.0 device is actually using and compare this with the gateway your other devices are using.  Reviewing you code will help us figure this out, but if your code actually logs the suffix or transport type that was actually used, that would be useful as well.  Or you can dump out the Event Log around the time of the network call, sometimes there is entries that identify the method being used. 

 

Anyway the first round of investigation is to try to determine the gateway your 9900 is using.

 

There are some other things we can do. 

 

When you try the same URL in the Browser, does it get redirected?

 

Is this device BIS or BES connected? 

 

You might like to download and install the Network Diagnostics package, and try this with the URL you are having problems with.  See here:

http://supportforums.blackberry.com/t5/Java-Development/What-Is-Network-API-alternative-for-legacy-O...

Developer
Posts: 136
Registered: ‎03-04-2009
My Device: Not Specified

Re: Bold 9900 redirects google.com to google.ca

Hi Pater,

 

Thanks for the prompt response! Yes I did try to ask Rogers but they "redirected"  me to RIM :smileyhappy:

 

I know it's a hard one .. So far I have user complains only about Rogers and only for 9900, but as you mentioned it might just be coincidence .. But there are some other Rogers users of my app that did not complain, so.. And you are probably right its a gateway thing, not sure what I can do to trick it not to redirect. I think I forgot to mention that this happens when I call the browser:

 

String myURL = "https://www.google.com/ ..";
net.rim.blackberry.api.browser.Browser.getDefaultSession().displayPage(myURL);

 

AND it happens when I am using HTTPS request to similar URLm using plain old Connector.open(myUrl).. I did try all the tricks in the book such as playing with deviceside, setting EndToEndRequired parameter etc..

 

As I mentioned, it works perfectly on WIFI (no redirection), it's just when you (well  the user ..) try it on his mobile network. I did sort of got the event log, I asked the user to click alt-LGLG and he was kind enough to provide it, this is how I found about the redirection to begin with :smileyhappy:

 

Appreciate the help!

 

Udi

 

Developer
Posts: 136
Registered: ‎03-04-2009
My Device: Not Specified

Re: Bold 9900 redirects google.com to google.ca

Another piece of on info,

 

Here is the excerpt from the event log with the offending (death) sentence to my app, when launching the BB browser using "https://www.google.com/accounts/...":

 

a net.rim.browser - WPTCP-GTCP BIBS:auto-__n_-w_AI:bb,js,em,http://www.google.ca/accounts/SetSID?ssdc=1&sidt=...

 

Thanks,

Udi

 

a net.rim.browser - WPTCP-GTCP BIBS:auto-__n_-w_AI:bb,js,em,http://www.google.ca/accounts/SetSID?ssdc=1&sidt=ALWU2ctBxXmzQS2on5EY66zdTESYC0au7DqiRmbxlv3iEiJTyKd...
Developer
Posts: 16,647
Registered: ‎07-29-2008
My Device: Z10 LE, Z30, Passport
My Carrier: O2 Germany

Re: Bold 9900 redirects google.com to google.ca

it really seems rim is doing some obscure thing there.
not very nice!

maybe you can use another connection type, like direct tcp, direct wifi etc?
----------------------------------------------------------
feel free to press the like button on the right side to thank the user that helped you.
please mark posts as solved if you found a solution.
@SimonHain on twitter
Developer
Posts: 136
Registered: ‎03-04-2009
My Device: Not Specified

Re: Bold 9900 redirects google.com to google.ca

Hi,

 

Direct WIFI works perfectly,

 

It's only when you jump on the Rogers mobile network that thinges are mssed up :smileyhappy: either direct or non-direct TCP.. my guess is that when you are on WIFI you don't go throguh BIS (?) .. so BIS messes it up...

 

Thanks,

Udi

BlackBerry Development Advisor
Posts: 15,084
Registered: ‎07-09-2008
My Device: BlackBerry Passport
My Carrier: Bell

Re: Bold 9900 redirects google.com to google.ca

Can you confirm if the user is on BIS or BES?  

 

Since you are opening the browser, it would redirect to the location specified by the web site.  Google commonly redirects to the site for the country you are located in.  For example, being in Canada if I browse on my desktop computer to www.google.com it will automatically redirect to www.google.ca.  This happens in most other countries (that I've been too anyway).

 

If you were opening the connection directly from within your application (using Connector.open) you should see the redirect requests.

 

Are they located in Canada?  If they are on a WiFi network in the US I doubt they would see the redirect.

Mark Sohm
BlackBerry Development Advisor

Please refrain from posting new questions in solved threads.
Problem solved? Click the Accept As Solution button.
Found a bug? Report it using Issue Tracker
Developer
Posts: 19,624
Registered: ‎07-14-2008
My Device: Not Specified

Re: Bold 9900 redirects google.com to google.ca

[ Edited ]

OK, I think it is time to see if we can some RIM involvement.  But can you do a couple of things:

 

a) Tell us exactly what OS level you have on the 9900

b) Harder I know, but try to get the Network Diagnostic Tool loaded onto the 9900 and try out the google URL with various connection types (other than WiFi, we know WiFi works OK). 

 

Given that you see this with the Browser, you would think that the gateway would be the BlackBerry infrastructure, but the log says WPTCP, which I think is WAP.  So this would make me think it is the Rogers WAP Gateway.  If you have another BlackBerry running OS 5.0 on Rogers, then you can force the Browser to use WAP (see Options --> Advanced --> Browser) and see if that also has a problem. 

 

Edit: Ignore this post, I did not know that Mark had already stepped in....

Developer
Posts: 136
Registered: ‎03-04-2009
My Device: Not Specified

Re: Bold 9900 redirects google.com to google.ca

Hi Mark,

 

Thanks for the response. The user is located in Canada. When his Blackberry is on WIFI, still in Canada, it works fine without any redirection, the problem is when he goes out of the WIFI range and thus jumps on the Rogers mobile network. 

 

You are right that Google sometimes redirects requests to the current locale  - CA, UK etc, but this is not true for all requests - specifically not for HTTPS requests -  and in my case, the specific request to https://www.google.com/accounts/.., Google server knows that this request should not be redirected. I have users at two dozen countries around the glob and this is the only one with issues :smileyhappy: 

 

In addition to that, as you can see from the redirected URL in the event log -

 

a net.rim.browser - WPTCP-GTCP BIBS:auto-__n_-w_AI:bb,js,em,http://www.google.ca/accounts/SetSID?ssdc=1&sidt=ALWU2ctBxXm...

 

It seems that some gateway in the middle is "helping" by 1) removing https, replacing with http and redirecting to http://www.google.ca/accounts, and 2) inserting SetSID?ssdc=.... 

 

So what can be doing this ...

 

Appreciate any help

 

Bye,

Udi

 

 

Developer
Posts: 136
Registered: ‎03-04-2009
My Device: Not Specified

Re: Bold 9900 redirects google.com to google.ca

Also, yeah this is BIS, not a BES . it's not a corporate Blackberry, just a private Bold 9900 from Roger