Search code examples
nativescriptnativescript-vue

Nativescript: Android app crashing in emulator switching tabs but nothing in console


I have a nativescript iOS app and I just started trying out Android. It loads up successfully but after switching tabs for a while in the TabView , the app just crashes but I see no indication of it in the terminal console. The latest events I see are:

JS: '{NSVue (Vue: 2.6.10 | NSVue: 2.4.0)} -> AppendChild(ElementNode(nativegridlayout), ElementNode(nativelabel))'
JS: '{NSVue (Vue: 2.6.10 | NSVue: 2.4.0)} -> CreateElement(nativebutton)'
JS: '{NSVue (Vue: 2.6.10 | NSVue: 2.4.0)} -> AppendChild(ElementNode(nativegridlayout), ElementNode(nativebutton))'
JS: '{NSVue (Vue: 2.6.10 | NSVue: 2.4.0)} -> AppendChild(ElementNode(nativegridlayout), ElementNode(nativegridlayout))'
JS: '{NSVue (Vue: 2.6.10 | NSVue: 2.4.0)} -> AppendChild(ElementNode(nativepage), ElementNode(nativegridlayout))'
JS: '{NSVue (Vue: 2.6.10 | NSVue: 2.4.0)} -> CreateElement(nativeimage)'
JS: '{NSVue (Vue: 2.6.10 | NSVue: 2.4.0)} -> CreateElement(nativeimage)'

Is there any better way to get an indication of what the issue is while I am developing it?


Solution

  • Yes - wrap the code in a try/catch block. And, of course, run in a debugger where you pause on exceptions.