This is a migrated thread and some comments may be shown as answers.

Unfortunately NativeScript has stopped

2 Answers 66 Views
General Discussion
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Tim
Top achievements
Rank 1
Tim asked on 03 Jul 2016, 07:15 AM

I'm building a NativeScript app using Platform and inbrowser client. I livesync down to a device for testing.

Debugging is troublesome, because half the console.log() messages don't seem to appear, and at the moment there is no stacktrace when the app throws an error, NativeScript just exits. 

Is there anything I can do to try to diagnose what is going wrong? Usually I can find my issue, but I have a gnarly one that I can't resolve. If I go from my home page to another then back to home, and repeat this about 5 times, the app then exits. On a Galaxy S2 I get a friendly "Unfortunately NativeScript has stopped". On a Huawei M2 the app just disappears and I am left looking at the Companion app's list of apps.

I have started to put try/catch blocks into my code, and throw up a dialog.alert(). However I'm not sure this is going to help me through this one. Is there anything else I can do? I am beginning to consider installing nativescript locally, as it is getting too hard to test & debug using Platform. 

Cheers,

Tim

 

 

 

 

 

 

 

2 Answers, 1 is accepted

Sort by
0
Tina Stancheva
Telerik team
answered on 06 Jul 2016, 02:58 PM
Hi Tim,

If the companion app logs don't indicate the error then what you can try is using the Android adb tool to diagnose the issue. It should catch the error causing the NativeScript companion app to stop functioning as long as your device is connected and recognized by the tool.

If you deploy the app directly on a device you can debug it through the AppBuilder extension for Visual Studio or the command-line interface, still I have to note that this finctionality is still somewhat limited and will be further improved with our upcoming releases. If this is something you're interested in testing, please head over to the Debugging on Android Device section in our documentation and don't hesitate to let me know in case you have any questions or feedback.

Regards,
Tina Stancheva
Telerik by Progress
 

Visit the Telerik Verified Plugins Marketplace and get the custom Cordova plugin you need, already tweaked to work seamlessly with AppBuilder.

 
0
Tim
Top achievements
Rank 1
answered on 07 Jul 2016, 08:28 AM

Hi Tina,

Thanks for that advice. I will check out the debugger. I have used that in the past for some native Android development, so I should be able to get that going...... and/or read the documentation you pointed me at.

Thanks,

Tim

Tags
General Discussion
Asked by
Tim
Top achievements
Rank 1
Answers by
Tina Stancheva
Telerik team
Tim
Top achievements
Rank 1
Share this question
or