Skip to content

System.err: java.io.IOException: Broken pipe ("Sync operation is taking too long") #1241

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

Closed
mchallenger88 opened this issue Dec 25, 2018 · 5 comments

Comments

@mchallenger88
Copy link

mchallenger88 commented Dec 25, 2018

Environment
√ Component nativescript has 5.1.0 version and is up to date.
√ Component tns-core-modules has 5.2.0-next-2018-12-20-172434-01 version and is up to date.
√ Component tns-android has 5.2.0-2018-12-20-092429-01 version and is up to date.

Describe the bug
When using "tns run android" after making a change to the project, livesync causes errors both on an emulator and in an android device. Although the errors are different, they appear to be related. After livesync on a device, the ECONNREFUSED error occurs. On the emulator, I receive:

"System.err: java.io.IOException: Broken pipe
System.err: at android.net.LocalSocketImpl.writeba_native(Native Method)
System.err: at android.net.LocalSocketImpl.access$500(LocalSocketImpl.java:36)
System.err: at android.net.LocalSocketImpl$SocketOutputStream.write(LocalSocketImpl.java:144)
System.err: at android.net.LocalSocketImpl$SocketOutputStream.write(LocalSocketImpl.java:131)
System.err: at com.tns.NativeScriptSyncServiceSocketImpl$LiveSyncWorker.closeWithError(NativeScriptSyncServiceSocketImpl.java:424)
System.err: at com.tns.NativeScriptSyncServiceSocketImpl$LiveSyncWorker.run(NativeScriptSyncServiceSocketImpl.java:187)
System.err: at java.lang.Thread.run(Thread.java:764)"

Both cause webpack to stop running.

To Reproduce
I do not know how to reproduce this error.

Expected behavior
Livesync should work to refresh the project.

Sample project
This is a very large project, and would be difficult to post to the playground.

Additional context

@mchallenger88 mchallenger88 changed the title System.err: java.io.IOException: Broken pipe System.err: java.io.IOException: Broken pipe ("Sync operation is taking too long") Dec 26, 2018
@mchallenger88
Copy link
Author

I notice this issue may be similar and/or related to this one: NativeScript/nativescript-cli#4227

@mchallenger88
Copy link
Author

Upon further investigation, I discovered the typescript version I was using was one version too high for the latest release of Angular. I also found that the nativescript version 5.2.0-next-2018-12-20-172434-01 was not compatible with some plugins. I downgraded typescript to 3.1.1 and nativescript to 5.1, and have successfully saved code changes without livesync stopping. Before closing this issue, I'd like to test some more.

@mchallenger88
Copy link
Author

Well. It seems I'm back to losing the connection: After further changes and rebuild I received the following error:

[18-12-26 08:21:47.021] Error detected during LiveSync on J6NPCV0026363FH for D:\FasterTableApp\FasterTable. Error: Socket Error:
Error: write ECONNRESET
[18-12-26 08:21:47.031] Couldn't enable debugging for J6NPCV0026363FH, Error: Couldn't enable debugging for J6NPCV0026363FH
at Errors.fail (C:\Users\Mark\AppData\Roaming\npm\node_modules\nativescript\lib\common\errors.js:125:28)
at Errors.failWithoutHelp (C:\Users\Mark\AppData\Roaming\npm\node_modules\nativescript\lib\common\errors.js:135:21)
at LiveSyncService. (C:\Users\Mark\AppData\Roaming\npm\node_modules\nativescript\lib\services\livesync\livesync-service.js:275:30)
at Generator.next ()
at C:\Users\Mark\AppData\Roaming\npm\node_modules\nativescript\lib\services\livesync\livesync-service.js:13:71
at new Promise ()
at __awaiter (C:\Users\Mark\AppData\Roaming\npm\node_modules\nativescript\lib\services\livesync\livesync-service.js:9:12)
at LiveSyncService.enableDebuggingCoreWithoutWaitingCurrentAction (C:\Users\Mark\AppData\Roaming\npm\node_modules\nativescript\lib\services\livesync\livesync-service.js:272:16)
at LiveSyncService. (C:\Users\Mark\AppData\Roaming\npm\node_modules\nativescript\lib\services\livesync\livesync-service.js:313:25)
at Generator.next ()
at fulfilled (C:\Users\Mark\AppData\Roaming\npm\node_modules\nativescript\lib\services\livesync\livesync-service.js:10:58)
at process._tickCallback (internal/process/next_tick.js:68:7)

@mchallenger88
Copy link
Author

Back on the emulator, livesync appears to work as long code changes are minor. For example, changing code as to how an event is handled caused no error. However, after adding a component or an element, for example, I just added a @ViewChild and ElementRef requiring the imports in the component to change resulted in "Sync operation in progress..." about six times, and then failure "Sync operation is taking too long."

@mchallenger88
Copy link
Author

I have simplified and added this issue to the Nativescript Angular issues repository.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant