Environment
Provide version numbers for the following components (information can be retrieved by running tns info in your project folder or by inspecting the package.json of the project):
from my package.json:
"dependencies": {
"@angular/animations": "~8.2.0",
"@angular/common": "~8.2.0",
"@angular/compiler": "~8.2.0",
"@angular/core": "~8.2.0",
"@angular/forms": "~8.2.0",
"@angular/platform-browser": "~8.2.0",
"@angular/platform-browser-dynamic": "~8.2.0",
"@angular/router": "~8.2.0",
"@nativescript/theme": "~2.3.0",
"nativescript-angular": "~8.21.0",
"nativescript-ui-sidedrawer": "~8.0.0",
"reflect-metadata": "~0.1.12",
"rxjs": "^6.4.0",
"tns-core-modules": "~6.5.0",
"zone.js": "~0.9.1"
},
"devDependencies": {
"@angular/compiler-cli": "~8.2.0",
"@nativescript/schematics": "^9.0.0",
"@ngtools/webpack": "~8.2.0",
"codelyzer": "~4.5.0",
"nativescript-angular-cli": "^0.1.9",
"nativescript-dev-webpack": "~1.5.0",
"node-sass": "^4.7.1",
"tslint": "~5.19.0",
"typescript": "~3.5.3"
},
Describe the bug
Interesting issue- my project is working fine yesterday. today i run it and all of the sudden I start getting an error when connecting to my app with the nativescript playground previewer. π€
To Reproduce
by running tns preview
Expected behavior
it should compile and work and be the beautiful former self that it was! Β π
Sample project
https://github.com/JimLynchCodes/Study-App/tree/master/study-app
Additional context
any advice on why this is happening and what i should do is appreciated. thanks!
btw I have noticed that many times when testing on a physical ios device via tns preview the thing just crashes with no helpful error message in the console, no line number, etc.
here is the output i am seeing after using the playground to scan the barcode:
**Preparing project...
File change detected. Starting incremental webpack compilation...
webpack is watching the filesβ¦
Hash: cc19848af376aacf6e72
Version: webpack 4.27.1
Time: 4846ms
Built at: 08/13/2020 11:41:27 PM
Asset Size Chunks Chunk Names
0.js 36.6 KiB 0 [emitted]
1.js 36 KiB 1 [emitted]
2.js 13.3 KiB 2 [emitted]
3.js 15.7 KiB 3 [emitted]
4.js 14.8 KiB 4 [emitted]
5.js 11.6 KiB 5 [emitted]
bundle.js 506 KiB bundle [emitted] bundle
fonts/fa-brands-400.ttf 131 KiB [emitted]
fonts/fa-regular-400.ttf 39.1 KiB [emitted]
fonts/fa-solid-900.ttf 204 KiB [emitted]
package.json 112 bytes [emitted]
runtime.js 73 KiB runtime [emitted] runtime
vendor.js 21.2 KiB vendor [emitted] vendor
Entrypoint bundle = runtime.js vendor.js bundle.js
[../$$_lazy_route_resource lazy recursive] ../$$_lazy_route_resource lazy namespace object 160 bytes {bundle} [built]
[./app.scss] 121 KiB {bundle} [built]
[./app/app-routing.module.ts] 1.97 KiB {bundle} [built]
[./app/app.component.html] 2.29 KiB {bundle} [built]
[./app/app.component.ts] 1.99 KiB {bundle} [built]
[./app/app.module.ts] 3.51 KiB {bundle} [built]
[./app/data/question-bank.ts] 41.7 KiB {bundle} [built]
[./app/mock-exam/mock-exam.module.ts] 760 bytes {4} [built]
[./app/utils/question-generator/question-generator.service.ts] 3.26 KiB {bundle} [built]
[./main.ts] 1.57 KiB {bundle} [built]
[@angular/core] external "@angular/core" 42 bytes {bundle} [built]
[nativescript-angular/nativescript.module] external "nativescript-angular/nativescript.module" 42 bytes {bundle} [built]
[nativescript-angular/platform] external "nativescript-angular/platform" 42 bytes {bundle} [built]
[nativescript-ui-sidedrawer/angular] external "nativescript-ui-sidedrawer/angular" 42 bytes {bundle} [built]
[tns-core-modules/bundle-entry-points] external "tns-core-modules/bundle-entry-points" 42 bytes {bundle} [built]
+ 43 hidden modules
Webpack compilation complete. Watching for file changes.
Webpack build done!
Project successfully prepared (ios)
Start sending initial files for device hadxainβs iPhone (4DA00FAE-D90B-4D76-8093-F5AB009E6B54).
Successfully sent initial files for device hadxainβs iPhone (4DA00FAE-D90B-4D76-8093-F5AB009E6B54).
SyntaxError: Unexpected token < in JSON at position 0
at JSON.parse (<anonymous>)
at PreviewSdkService.<anonymous> (/Users/jlynch/.nvm/versions/node/v13.13.0/lib/node_modules/nativescript/lib/services/livesync/playground/preview-sdk-service.js:100:43)
at Generator.next (<anonymous>)
at fulfilled (/Users/jlynch/.nvm/versions/node/v13.13.0/lib/node_modules/nativescript/lib/services/livesync/playground/preview-sdk-service.js:4:58)
at processTicksAndRejections (internal/process/task_queues.js:97:5)
Like I was saying earlier, I have been working on this app for a few weeks now. Everything was fine even yesterday, commited everything to version control, and now today with no git changes I am getting this error. π€
the power in my house went out today while my macbook was plugged in, so perhaps this could have caused some of the fuse-weisers to get shuffled in the process condensers or something like that (idk, I am a software guy not a hardware guy)
Exact same issue. Thought I was going crazy.
Same issue on :
tns doctor output :
β Your ANDROID_HOME environment variable is set and points to correct directory.
β Your adb from the Android SDK is correctly installed.
β The Android SDK is installed.
β A compatible Android SDK for compilation is found.
β Javac is installed and is configured properly.
β The Java Development Kit (JDK) is installed and is configured properly.
β Xcode is installed and is configured properly.
β xcodeproj is installed and is configured properly.
β CocoaPods are installed.
β CocoaPods update is not required.
β CocoaPods are configured properly.
β Your current CocoaPods version is newer than 1.0.0.
β Python installed and configured correctly.
β The Python 'six' package is found.
β Xcode version 11.6.0 satisfies minimum required version 10.
β Getting NativeScript components versions information...
β Component nativescript has 6.8.0 version and is up to date.
β Component @nativescript/core has 7.0.0-rc.51 version and is up to date.
β Component tns-android has 6.5.3 version and is up to date.
β Component tns-ios has 6.5.2 version and is up to date.
/Users/XXXX/.nvm/versions/node/v12.18.3/lib/node_modules/nativescript/lib/services/livesync/playground/preview-sdk-service.js:100
The response body contain HTML...
Can confirm JimLynchCodes is posting
Same here. Can also be reproduced with an absolutely new created project.
I just don't understand how things broke for me without doing an npm install at all. π€
is there a telerik server down or something?
I didn't do a npm install either. Still seeing this issue. tns preview ends abrubtly on this error
Sorry guy and gals, we were updating the Playground and apparently messed something up. We have reverted to the older version of the code base and will try and figure out why the new version breaks here, and hopefully some time next week we can deploy the newer version without this issue. :grinning:
Actually we are working on it right this minute; and the new version will be fixed sometime today. So if it still fails; try a little bit later and we should have it fixed. :grinning:
Thanks @NathanaelA ! π
still not working for me now. I'll try again later
@NathanaelA Will this issue affect building / publishing?
As a workaround I can develop with tns run ios for now.
unfortunately, I dont have AVD setup in my system. I have to wait until this clears.
@JimLynchCodes - This will not effect building / publishing. The only issue is the backend that the preview system used is being changed and so we are working on getting the issues fixed. This only affects Preview and the playground (Preview).
I'm still facing the same error. Documented here on SO: https://stackoverflow.com/questions/63422732/nativescript-vue-using-tns-preview-failing . Thank god it wasn't just me. I get the error when doing a tns preview. Could we get an update on the issue when it's fixed
Waiting for that today! π€π€π€π€π€π€π€
Btw, should we go back to an older version? Which version do you recommend?
I have the same issue. Are there any new information to share when it will be fixed?
This should be working now, please try again!
It's working now! Thank you very much.
Yep, works again for me too. thanks!
Most helpful comment
Yep, works again for me too. thanks!