-
-
Notifications
You must be signed in to change notification settings - Fork 197
ECONNRESET with android emulator #2272
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
@gbhojraj thanks for reporting this issue. I can confirm this is an actual problem as it occurred for me as well today. |
Update: This happened to me again OUTSIDE livesync. I ran |
A similar issue regarding the same error was referenced in this Nativescript repo issue and was supposedly fixed in 2.4.0, but that is the version I am running. I also have tns-android at 2.4.1. Here are the results of my log trace:
|
Related to #2181 |
@gbhojraj a fix is now available in the master branch, and should soon be available in npm with the Please let us know if things work as expected after updating the nativescript CLI! |
Still having the issue after updating and restarting my cmd with [email protected] |
Do you see an error activity loaded inside the app before this console error is displayed? |
No. Here is what my cmd looks like:
I'm running the sample groceries app, currently at chapter 3. I don't have to interact with the emulator at all for this error to be thrown. |
This file is in ~/platforms/android/build/outputs/logs, so I think it's a log file from my last run. Don't know if it provides any useful information about the ending. |
Here is my attempt at using |
@gbhojraj thanks for providing logs, but these should be unrelated to the issue at hand. One outputs result of merging assets and the other is, well, android log with runtime debug output. We'll investigate further, thanks for your patience! |
@gbhojraj Thank you for those details. The ECONNRESET message appears when the server side (the app in the android simulator In this case) closes the TCP conversation abruptly. This could happen when it crashes for some reason. We are still trying to reproduce this issue. Please, could you remove the app from the simulator and try to livesync again? If the issue still reproduces, you could help by sending us the broken project (including the platforms folder). |
Thanks @Pip3r4o for the explanation of the files. When the CLI crashes on ECONNRESET, the last line is @tzraikov Do you mean I should run the simulator first from Also, the project I'm using is clones from Nativescript/sample-Groceries. The only difference between my code and theirs is in the /app folder, where I sometimes use es6 syntax. I didn't mess around with any other files. |
Follow those steps:
|
@gbhojraj Please note that if your app contains errors, you will see the error screen on the simulator. However, the CLI should be functional and it will sync all changes in your code. |
Thanks @tzraikov . I'm still getting the error. I've seen errors on the simulator before, but not in connection with ECONNRESET. I've seen no errors regarding that. I'm still getting the error, even if I wipe user data (and the app) from the emulator. I've pushed this project to a new repo: https://github.com/gbhojraj/sample-Groceries |
@gbhojraj I tested the project from your repo. After commenting some lines of code it compiles and the livesync works as expected. It is very strange that you experience this kind of error, our @next version contains the following code which filters such messages: Could you post again the exact message that you get? I want to be sure that we are talking about the same issue. In some scenarios npm on Windows caches its packages and that is why I suggest the following:
|
After following the steps you outlined, I tried running the project again. It seemed like it was working, but after a few trials (stopping tns and running it again), I started seeing the error again. I'll attach a TXT with the full output of my command, but here's the error specifically:
My problem isn't that livesync isn't restarting on malformed code. It's that both I didn't think it would be a problem with the project, because it's just a sample project. I'll try running another sample project. But I don't know what on my system could be interfering with the connection between the CLI and AVD. |
(Sorry, just realizedd I didn't attach the cmd output before) |
Update: It seems if I launch the emulator from |
@gbhojraj Thanks for this information. We observed issues with some versions of the latest android emulators. Please, could you upgrade your Android SDK and emulators to the latest version. If this doesn't help, send us your project in a broken state (including the platforms folder). This will help us to investigate further. |
gbhojraj - thanks! Had exactly the same issue even with the basic HelloWorld project and the workaround you suggested worked for me (launch the emulator from android avd and then connect with tns livesync android --watch). |
Same error here and same solution. Start android emulator with |
also, same error and same solution. thanks |
Thanks @gbhojraj for continuing pursuit to solve this issue. Just need to know one thing though.. Can we make full fledged e-commerce app on this platform or more work needs to be done to make this platform to use on commercial basis for non-stopping development. |
Almost a year later and.. Same problem, same solution described by @gbhojraj |
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:
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 onusage-reporting
anderror-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.The text was updated successfully, but these errors were encountered: