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

Adobe AIR Development

Reply
New Developer
Posts: 129
Registered: ‎11-21-2012
My Device: Z10
My Carrier: -
Accepted Solution

App crashes on device but runs fine on simulator

Hello! Last week I got an app approved and it's already up in the BlackBerry App World. Before being approved, it got rejected once, the e-mail reported that "While testing your app on BlackBerry Z10, I found that it failed to launch."

 

I replied back stating that the app worked just fine in the simulator and asked for some guidance in order to solve the issue. It seems the app got retested because the next day was approved.

 

Today I got the chance to test my app on a real device and I found that it crashed right after launch.

 

I'm not sure what could be wrong with my app. I'm guessing the reason of this problem could be something similar to this thread's; but I think I don't mess directly with the device in my code, everything is built on Air.

 

Could you point me in the right direction please?

 

Thank you in advance!

Developer
Posts: 1,269
Registered: ‎12-29-2010
My Device: PlayBook, Z10 LE, Dev Alpha C

Re: App crashes on device but runs fine on simulator

If the device you are testing on is one that you can be allowed to have on your desk for a while, you can ssh into the device and review the AIR logs.  You can SSH in using the Momentics IDE, or with an SSH client such as PuTTY.

New Developer
Posts: 129
Registered: ‎11-21-2012
My Device: Z10
My Carrier: -

Re: App crashes on device but runs fine on simulator

Could you point me out to the logs location? I searched through all of the subfolders and files within the air directory and wasn't able to find them.

 

Thank you!

Developer
Posts: 1,269
Registered: ‎12-29-2010
My Device: PlayBook, Z10 LE, Dev Alpha C

Re: App crashes on device but runs fine on simulator

Once you ssh into your device or simulator, the logs should be found under:

 

/accounts/1000/appdata/<your app's directory>/logs

 

 

New Developer
Posts: 129
Registered: ‎11-21-2012
My Device: Z10
My Carrier: -

Re: App crashes on device but runs fine on simulator

Thank you! I finally managed to review the Air logs but I cannot make much of the error stated:


err: avm: error:Error #2044: Unhandled error:. text=Unknown namespace: http://ns.adobe.com/air/application/3.5 (tid:1)
emerg: UnixRegisterTimeout: not initialised bad app descriptor? (tid:1)

 

It seems that #2044 generalizes a lot of different issues.

 

How can I read this message correctly?

Developer
Posts: 1,269
Registered: ‎12-29-2010
My Device: PlayBook, Z10 LE, Dev Alpha C

Re: App crashes on device but runs fine on simulator

[ Edited ]

What OS version is the device running?

 

AIR 3.5 is not supported until 10.2, which is not available to consumers just yet as best I know.

 

If the device is on 10.0 or 10.1, verify that your application's  <your_app>-app.xml file calls out the AIR 3.1 namespace and not the AIR 3.5 namespace.

New Developer
Posts: 129
Registered: ‎11-21-2012
My Device: Z10
My Carrier: -

Re: App crashes on device but runs fine on simulator

[ Edited ]

Oh, I feel so dumb right now. I was aware of 3.5 being available until 10.2 so I targeted my build as Air 3.1 but I didn't know that I had to declare it in the app.xml file too.

 

Thank you so much!!! It now works perfectly fine!

Regular Contributor
Posts: 76
Registered: ‎04-19-2011
My Device: Bold 9700
My Carrier: Three Mobile

Re: App crashes on device but runs fine on simulator

Incidentally, were you testing on the 10.2 simulator?

New Developer
Posts: 129
Registered: ‎11-21-2012
My Device: Z10
My Carrier: -

Re: App crashes on device but runs fine on simulator

Yes, I believe so. I just downloaded the last version of the simulator and used it, never changed a parameter. Why?

Developer
Posts: 1,269
Registered: ‎12-29-2010
My Device: PlayBook, Z10 LE, Dev Alpha C

Re: App crashes on device but runs fine on simulator

If you were testing on the 10.2 simulator that probably explains why you were able to get away with declaring AIR 3.5 namespace in your app.xml file on the simulator without crashing.  But if the actual device you were testing on did not have an autoloader or leaked 10.2 OS then it would not have AIR 3.5 on it, and it would look at your app.xml and say "I don't know anything about AIR 3.5" and crash.

 

BTW unless you are actually using AIR 3.5 specific features there's no reason to need to specify 3.5 namespace - the namespace should be the lowest version that supports the features your app uses and that you are comfortable supporting users on.