Error: socket hang up when publishing

So I’m asking again, because the previous post received no further response. Expo is currently basically unusable for me with this problem.
Command Prompt output:


[exp] Building iOS bundle
[exp] Error: socket hang up
[exp] RequestError: Error: socket hang up
    at new RequestError (C:\Users\Ansis\AppData\Roaming\npm\node_modules\exp\node_modules\request-promise-core\lib\errors.js:14:15)
    at Request.plumbing.callback (C:\Users\Ansis\AppData\Roaming\npm\node_modules\exp\node_modules\request-promise-core\lib\plumbing.js:87:29)
    at Request.RP$callback [as _callback] (C:\Users\Ansis\AppData\Roaming\npm\node_modules\exp\node_modules\request-promise-core\lib\plumbing.js:46:31)
    at self.callback (C:\Users\Ansis\AppData\Roaming\npm\node_modules\exp\node_modules\request\request.js:186:22)
    at emitOne (events.js:116:13)
    at Request.emit (events.js:211:7)
    at Request.onRequestError (C:\Users\Ansis\AppData\Roaming\npm\node_modules\exp\node_modules\request\request.js:878:8)
    at emitOne (events.js:116:13)
    at ClientRequest.emit (events.js:211:7)
    at Socket.socketOnEnd (_http_client.js:423:9)
    at emitNone (events.js:111:20)
    at Socket.emit (events.js:208:7)
    at endReadableNT (_stream_readable.js:1055:12)
    at _combinedTickCallback (internal/process/next_tick.js:138:11)
    at process._tickCallback (internal/process/next_tick.js:180:9)

This changed nothing:

"packagerOpts": {
  "nonPersistent": true,
}

Tested it on 3 very stable networks now, reinstalled Node, reinstalled Expo. I have no idea what to do, been stuck on this for a few days now.
This happens on all projects. CRNA and exp init alike. Same on Expo XDE. AMA, I’ve probably tried it.

Do you have very large assets as part of your project? It could be that they exceed the server’s upload limit, assuming your connection is not timing out.

For assets: A few things that could help are optimizing all your images first with mozjpeg, guetzli, optipng, it pngcrush. Removing unused character ranges from your fonts can help too. Compressing movie files well also helps a lot.

If this isn’t the issue at hand, it could possibly have to do with your computer’s firewall assuming you’ve tried different routers and network connections with reliable upload speeds.

The problem persists with fresh CRNA and exp init projects. What could be the issue with my PC? I’ve opened (or at least attempted to open) ports 19000 and 19001. Any way to test this/the right way to do this?
Edit: I just attempted to turn off Defender Firewall and add Expo XDE to allowed programs. No change.

You could try starting a bare React Native project with:

npm install -g react-native-cli
react-native init TestProject

and seeing if those steps work for you (note that you will need Android Studio to build the test Android app). That would help reveal whether there’s an issue with Expo or if the React Native packager doesn’t work with your computer.

This took a week. I was ready to shoot myself. (Kidding, I don’t need a hotline) Problem was UTF-8 characters in directory names. Can you add this to suggestions/error messages?

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