RequestError: Error: socket hang up while after using "exp build:android" or "exp publish"

I can’t publish or build my project. I don’t have any problems when using “exp start” no warnings or errors one both devices.

exp publish
10:38:26 [exp] Unable to find an existing exp instance for this directory, starting a new one…
10:38:38 [exp] Scanning folders for symlinks in /root/app2/node_modules (39ms)
10:38:38 [exp] Starting Metro Bundler on port 19001.
10:38:38 [exp] Metro Bundler ready.
10:38:40 [exp] Tunnel connected.
10:38:40 [exp] Publishing to channel ‘default’…
10:38:50 [exp] Building iOS bundle
10:39:54 [exp] Building Android bundle
10:39:54 [exp] Finished building JavaScript bundle in 64688ms.
10:41:27 [exp] Finished building JavaScript bundle in 92327ms.
10:41:27 [exp] Analyzing assets
10:43:26 [exp] Finished building JavaScript bundle in 118662ms.
10:44:29 [exp] Error: socket hang up
10:44:29 [exp] RequestError: Error: socket hang up
at new RequestError (/usr/lib/node_modules/exp/node_modules/request-promise-core/lib/errors.js:14:15)
at (/usr/lib/node_modules/exp/node_modules/request-promise-core/lib/plumbing.js:87:29)
at Request.RP$callback [as _callback] (/usr/lib/node_modules/exp/node_modules/request-promise-core/lib/plumbing.js:46:31)
at self.callback (/usr/lib/node_modules/exp/node_modules/request/request.js:185:22)
at Request.emit (events.js:182:13)
at Request.onRequestError (/usr/lib/node_modules/exp/node_modules/request/request.js:877:8)
at ClientRequest.emit (events.js:182:13)
at Socket.socketOnEnd (_http_client.js:405:9)
at Socket.emit (events.js:187:15)
at endReadableNT (_stream_readable.js:1091:14)

Tried { nonPersistent: true} any ideas?


just to make sure, are you using the most recent version of exp? I think it is 53.1.0.

I had this issue one week ago and then had newest version 53.1.0. Few days ago and new updated came 54.0.0 so i updated… Still same error.

Any ideas?

hi @jkilas - could you try the following:

  1. changing packagerOpts in app.json as described here: Error when running exp publish: socket hang up
  2. make sure there are only ASCII characters in the path to your project:

I Tried changing packagerOpts already, also there is no not ASCII characters in filenames or directories, but there is some in my code as string in quotes or inside tag. I have replaced all of it once but error didn’t get away.

Is there any way to manually take built javaScript bundle and upload it to expo server?

P.S I noticed that it crashes while doing Analyzing assets Building JavaScript bundle for second time


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