[Preview App] iOS endless crash.
Environment N/A. The bug comes from working with the official iOS Preview App, and the Playground.
Describe the bug In the iOS Preview App there's a bug. If you do anything in the Playground to cause the app to crash, it does, as expected. But if you fix the issue in Playground before re-opening the Preview App, all subsequent attempts to open the app will crash. Even if you create a whole new Playground and scan it in.
:warning: The only way to get the Preview App back up and running is to delete and re-download it from the app store.
To Reproduce
- Go to Playground and create a new project.
- Successfully launch the project on the iOS Preview App.
- Then change something in the Playground that will cause an app crash (anything).
- As soon as the Preview App crashes fix the Playground issue and save to run the live sync.
- Now tap on the Preview App to re-open it. The app will open at the crash page.
Expected behavior The app should open to the updated, fixed version, like it does on Android.
Sample project Playground.
Same here, as described by OP. Also if I re-download the preview and simply start it, it works (showing list of components). Reopen the project and the preview crashes again, but: it gives an old crash report, there is no script at all what the report is reffering to (triple checked).
(CLI) Webpack build done!
(CLI) Project successfully prepared (ios)
(CLI) Start sending initial files for platform ios.
(CLI) Successfully sent initial files for platform ios.
(CLI) The Preview app has terminated unexpectedly. Please run it again to get a detailed crash report.
However, looks the current build not sent and try to preview the old build.
This won't work as you have described it. When the app has crashed the steps to fix it are:
- open the preview (so you are able to see the error)
- fix the error while the app is opened(there is a message on the crash screen saying "No need to close the app. Just fix the following error and the app will sync automatically...") Make sure that the device is shown in the devices tab If you scan the QR code twice the app should work too. The opening of the app when it has crashed is always showing the error. After that you can fix it.
@vhristov5555 it not working is the bug.
I understand those are the prescribed steps for dealing with a crash. But sometimes when you're working away you forget to open the app before fixing the bug.
@vhristov5555 from what I've seen in a similar instance reopening the preview doesn't cause the app to reconnect at all. Meaning no new updates get pushed. The only way I managed to get the error page to go away was to reinstall the preview app and rescan the QR code.
@vhristov5555 from what I've seen in a similar instance reopening the preview doesn't cause the app to reconnect at all. Meaning no new updates get pushed. The only way I managed to get the error page to go away was to reinstall the preview app and rescan the QR code.
That's kind of interesting, because probably half the time I find myself closing preview and reopening it before any updates are displayed.
To the end of debugging issues like this, my CLI is constantly filled with stuff like:
`CreateElement(gridlayout)\''
LOG from device iPhone de Eduardo3: CONSOLE LOG file:///app/tns_modules/nativescript-vue/dist/index.js:10140:14: '\'{NSVue (Vue: 2.6.10 | NSVue: 2.4.0)} -> CreateElement(nativecardview)\''
LOG from device iPhone de Eduardo3: CONSOLE LOG file:///app/tns_modules/nativescript-vue/dist/index.js:10140:14: '\'{NSVue (Vue: 2.6.10 | NSVue: 2.4.0)} -> CreateElement(nativelabel)\''
LOG from device iPhone de Eduardo3: CONSOLE LOG file:///app/tns_modules/nativescript-vue/dist/index.js:10140:14: '\'{NSVue (Vue: 2.6.10 | NSVue: 2.4.0)} -> CreateElement(nativestacklayout)\''
LOG from device iPhone de Eduardo3: CONSOLE LOG file:///app/tns_modules/nativescript-vue/dist/index.js:10140:14: '\'{NSVue (Vue: 2.6.10 | NSVue: 2.4.0)} -> AppendChild(ElementNode(nativegridlayout), ElementNode(nativelabel))\''`
Which is less helpful than all the things I might really care about, like my own log messages, status of the build/preview status, etc.
Same here. IPhone Xs, iOS 13.3.1. Application is just unusable due to this bug.
+1
Same here, It's happening on all iOS versions
+1