Skip to content

ECONNRESET on phone lock or app closure #23262

Closed
@TrentonAdams

Description

@TrentonAdams

Environment

$ react-native info

  React Native Environment Info:
    System:
      OS: Linux 4.15 Linux Mint 18.2 (Sonya)
      CPU: (4) x64 Intel(R) Core(TM) i7-4790 CPU @ 3.60GHz
      Memory: 889.13 MB / 15.66 GB
      Shell: 4.3.48 - /bin/bash
    Binaries:
      Node: 11.8.0 - ~/.nvm/versions/node/v11.8.0/bin/node
      Yarn: 1.13.0 - ~/.nvm/versions/node/v11.8.0/bin/yarn
      npm: 6.5.0 - ~/.nvm/versions/node/v11.8.0/bin/npm
    npmPackages:
      react: 16.5.0 => 16.5.0 
      react-native: https://github.com/expo/react-native/archive/sdk-32.0.0.tar.gz => 0.57.1 

Description

This consistently happens when the phone is locked or you close the app on the phone. On my machine this takes 3 minutes on the nose. So, I'm guessing there's a 300ms timeout on the socket. The problem is, it never recovers when I start the phone app back up again, which causes lost productivity because I have to restart expo, and then wait about a minute for the javascript build. I have a very small project, I can't imagine how painful this would be with larger projects.

[21:39:36] events.js:173
[21:39:36]       throw er; // Unhandled 'error' event
[21:39:36]       ^
[21:39:36] 
[21:39:36] Error: read ECONNRESET
[21:39:36]     at TCP.onStreamRead (internal/stream_base_commons.js:162:27)
[21:39:36] Emitted 'error' event at:
[21:39:36]     at emitErrorNT (internal/streams/destroy.js:82:8)
[21:39:36]     at emitErrorAndCloseNT (internal/streams/destroy.js:50:3)
[21:39:36]     at processTicksAndRejections (internal/process/next_tick.js:76:17)

Reproducible Demo

This happens with any application, no real need for a demo; it's an expo issue for not being able to recover from a connection reset.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions