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: 745
Registered: ‎01-04-2009
My Device: 8300, 8800, 8700f, 9000

Critical tunnel failure

hi, i've got such a problem:

 i connect in my app using http and device's apn(TCP). app works fine but on two phones i got strange error:

 

net.rim.device.internal.io.CriticalIOException: Critical tunnel failure

 

i've no idea what does it mean and what is wrong.

 

Does anyone have any idea?

 

   regards

Highlighted
Developer
Posts: 745
Registered: ‎01-04-2009
My Device: 8300, 8800, 8700f, 9000

Re: Critical tunnel failure

i forgot to mention: device-9700, carrier-T-Mobile UK

 

i got this error when for apn "internet".

Actually it is like this-firstly i send a "ping" to server to proper addres and it's ok. then i try to read data from server (still using http, same settings (TCP with apn=internet) and here i got this "Critical tunnel failure"..

so ping is ok but reading data no..

 

then i've checked for "blackberry.net" and "general.t-mobile.uk" - but for these i could not even send a "ping" so these apns are not proper for me.

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

Re: Critical tunnel failure

How do you ping from a BlackBerry?

 

Have you tried any other connection methods?

Developer
Posts: 48
Registered: ‎10-15-2008
My Device: Not Specified

Re: Critical tunnel failure

Try to put your network connection into separate thread, e.g.

 

 

new Thread(){
    public void run(){
         //connection stuff
    }
}.start();

 

 

Developer
Posts: 48
Registered: ‎10-15-2008
My Device: Not Specified

Re: Critical tunnel failure

Recently I solved this weird problem. I had the same exception with connection url postfix like this

 

";deviceside=true;apn=null"

 

The problem is that since 5.0.0 OS you CAN NOT use incorrect APN settings. It really looks like on previous OS  versions OS ignore this issue. 

 

If you will populate your connection string like this:

 

 

String url += ";deviceside=true"
if(apn != null && !apn.trim.equals("")){
    url += ";apn="+apn;
}

everything will be ok. Sorry for the previous post, it was wrong suggestion. 

 

New Developer
Posts: 6
Registered: ‎11-18-2009
My Device: Not Specified

Re: Critical tunnel failure

How do you detect APM settings from your code??

I have searched forums for this but never found a solution that works.

Hardcoding is not an option in my case.

 

Thanks in advance.

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

Re: Critical tunnel failure

APN setting can not be 'detected', there is nothing on the device that will tell you what they should be.

 

However they are specific to the carrier.  If you can determine the carrier and know what the APN settings are for that carrier, then you can set them without needing the user to put them in for you.  . 

New Developer
Posts: 6
Registered: ‎11-18-2009
My Device: Not Specified

Re: Critical tunnel failure

Thank you very much for advice.
New Member
Posts: 1
Registered: ‎10-10-2010
My Device: Blackberry Bold 9700

Re: Critical tunnel failure

How do I populate my connection string? From my home page what do I do? Please help

New Member
Posts: 1
Registered: ‎12-30-2010
My Device: 8520 Curve
My Carrier: Movistar

Re: Critical tunnel failure

Hi,

I have a Curve 8520 with the critical tunnel error, so where does one up this script, can you be more descriptive of the fix.

Thanks

Jhampa