Unfortunately NativeScript has stopped

3 posts, 0 answers
  1. Tim
    Tim avatar
    20 posts
    Member since:
    Apr 2016

    Posted 03 Jul Link to this post

    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. 










  2. Tina Stancheva
    Tina Stancheva avatar
    3298 posts

    Posted 06 Jul Link to this post

    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.

    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.

  3. Tim
    Tim avatar
    20 posts
    Member since:
    Apr 2016

    Posted 07 Jul in reply to Tina Stancheva Link to this post

    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.



Back to Top