Expo Publish fails with ERROR read ECONNRESET

I have been trying to publish an expo managed app with the expo publish command but the process fails every time with an error ECONNRESET.

The app works well in development and in production mode too.
My expo-cli version is 3.11.3. I am running windows 10 Home, Version 1903, OS build 18362.657

Here are the screenshots of the error I get every time I click publish from the expo local server on my browser and the metro logs.

2 Likes

Hey @frank_ng, could you try running rm -rf .expo in the project’s directory and see if that resolves the issue?

Cheers,
Adam

I have tried it but I still get the same error when I run expo publish again. I also updated my expo cli version to 3.21.5 and it didn’t help with the issue either.

Although the following should not be necessary, if I remember correctly it has helped someone else in the past:

Try opening two terminal windows. In one, run expo start. After it has started, in the other window run expo publish.

Hello,
I have tried that as well several times. I still get the same error: read ECONNRESET Error: read ECONNRESET at TLSWrap.onStreamRead (internal/stream_base_commons.js:205:27)

This error occurs right after building the JavaScript bundle for both Android and iOS as it tried to upload the JavaScript bundles.

In one of my attempts, I also got an error: (node:16412) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 change listeners added to [HasteMap]. Use emitter.setMaxListeners() to increase limit

Got it. Thanks for giving those suggestions a shot. For the sake of getting more clarity, do you know if this happens for a newly create project as well or is this specific to the smartpass-app project you’ve detailed above?

One other thing that came to mind quickly: Is there a chance this project is particularly large in file size compared to a standard project? Such as it has a large amount of dependencies, or that some of the dependencies are extremely large?

Hello, thanks for the feedback.
I tried publishing a newly created project from expo init and I got the same error:

 read ECONNRESET
Error: read ECONNRESET
    at TLSWrap.onStreamRead (internal/stream_base_commons.js:205:27)

So the error doesn’t seem to be specific to this current project.
I last published a project (expo publish) about 5 months ago, at the time, I was running expo-cli version 3.5.0 and the publish went well without any issues.

For the current project, it has the normal expo dependencies and a few additional ones, here’s a list of the dependencies:

"dependencies": {

    "@expo/vector-icons": "^10.0.0",

    "@react-native-community/masked-view": "0.1.6",

    "@react-navigation/native": "^5.4.0",

    "@react-navigation/stack": "^5.3.7",

    "expo": "~37.0.3",

    "expo-asset": "~8.1.5",

    "expo-constants": "~9.0.0",

    "expo-file-system": "~8.1.0",

    "expo-secure-store": "~8.1.0",

    "expo-sqlite": "~8.1.0",

    "react": "~16.9.0",

    "react-dom": "~16.9.0",

    "react-native": "https://github.com/expo/react-native/archive/sdk-37.0.1.tar.gz",

    "react-native-gesture-handler": "~1.6.0",

    "react-native-progress": "^4.1.2",

    "react-native-reanimated": "~1.7.0",

    "react-native-safe-area-context": "0.7.3",

    "react-native-screens": "~2.2.0",

    "react-native-web": "~0.11.7",

    "react-native-webview": "8.1.1",

    "react-redux": "^7.2.0",

    "redux": "^4.0.5",

    "redux-devtools-extension": "^2.13.8",

    "redux-thunk": "^2.3.0",

    "rn-pdf-reader-js": "^3.1.0",

    "sentry-expo": "^2.1.2"

  },

  "devDependencies": {

    "babel-preset-expo": "~8.1.0",

    "@babel/core": "^7.8.6"

  }

The app also has a lot of assets, especially images and icons about 533kb. In the publish process, the assets were being uploaded successfully. I am bundling up this assets to be part of my build

"assetBundlePatterns": [
      "**/*"
    ],

Hi, I am facing the same issue. I have downgraded expo-cli to 3.5.0 and got the same results. Is there a chance that this is a temporary problem with expo servers? Or I should try from a diferent computer or something like that?

I haven’t seen any errors leading to my project so, it might be an issue with the build service, hopefully, the expo team will shed some light on that. I’ll also try publishing on a different computer and see how that goes as well, it’s worth a try

So i tried on a different computer, with the same project and a different one with no success, I guess we could try again in a few days

I am also facing the same problem on Windows 10 Pro, Version 1909

Looks like it’s an issue with the antivirus or the Firewall.
Everything worked just fine after pausing my antivirus :smile:

1 Like

That’s great…
I tried turning off my Firewall and antivirus and running expo publish but the error still persists

After several retries with the firewall and antivirus off, it eventually worked, and I was able to publish and build.
Thanks, @cyberon256

2 Likes

Hey all,

Sorry you had issues publishing and building. We have this section in the docs Common development errors - Expo Documentation that talks about checking firewalls to address these ECONN errors. If you think there’s something we could add that would be more helpful, please let me know!

Cheers,
Adam

1 Like

Thanks for the great help and support.
The docs could also point out about checking other software such as an antivirus that could be blocking the firewall and causing the ECONNRESET problem during publishing.

Same issue, disabling firewall for a second did the trick!

2 Likes

This topic was automatically closed 20 days after the last reply. New replies are no longer allowed.