nativescript-cli: ECONNRESET with android emulator
I’m using Atom with the atom-typescript package to edit the sample-Groceries folder. I’m on a Windows 10 machine and I’m trying to run tns livesync android --emulator --watch, which works fine. Emulator comes up and running, displays the front page of the app. I’m even able to change change the files a few times and see the emulator reload the page.
Here is what my command line looks like, with a successful change, then error:
JS: Angular 2 is running in the development mode. Call enableProdMode() to enable the production mode.
10:41:03 AM - File change detected. Starting incremental compilation...
10:41:04 AM - Compilation complete. Watching for file changes.
Executing before-prepare hook from C:\Users\gibry\Documents\Sandbox\NativeScript\sample-Groceries\hooks\before-prepare\nativescript-dev-typescript.js
Project successfully prepared (android)
Transferring project files...
Successfully transferred all files.
Applying changes...
Successfully synced application org.nativescript.groceries on device emulator-5554.
JS: Angular 2 is running in the development mode. Call enableProdMode() to enable the production mode.
10:41:12 AM - File change detected. Starting incremental compilation...
Error: read ECONNRESET
at exports._errnoException (util.js:1036:11)
at TCP.onread (net.js:564:26)
Sending exception report (press Ctrl+C to stop)...
Any ideas to what can cause a connection reset, after several successful cycles of livesyncing? Also, where can I find the exception report mentioned in the last line?
Update: I ran tns doctor and got no errors. I turned on usage-reporting and error-reporting and the instance I ran after that lasted a long time without interruption. When I ended that and started up a new one, the new instance ended within a few minutes. I’m thinking this may be an issue with running commands too quickly after each other, but I’ll keep updating this as I work.
About this issue
- Original URL
- State: closed
- Created 8 years ago
- Comments: 27 (9 by maintainers)
Update: It seems if I launch the emulator from
android avdand then connect withtns livesync android --watchafter it’s fully loaded, I don’t have any connection issues.Same error here and same solution.
Start android emulator with
android avdselecting the one created by the NativeScript install (I have more emulators) and start the project withtns run android --watch.Still having the issue after updating and restarting my cmd with nativescript@2.5.0-2016-11-30-7269
Update: This happened to me again OUTSIDE livesync. I ran
tns run android --emulatorand I received the same ECONNRESET error after about 2 minutes of using it. I was working on Chapter 3 of the tutorial. I’m using the default emulator in the avd.