Error: socket hang up when using exp build:android


#1

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.


#2

Hi! What happens if you run exp publish (that’s where this is failing in your build command)? It looks like your Metro bundler is having some issues. I would also recommend trying to removing node_modules and reinstalling and running exp start with the -c flag to clear your caches. I’d also recommend restarting your machine in case watchman is misbehaving.


#3

I’ve tried all 3 of those things. No change. Reinstalled Node, even made a new project, same socket hangup.


#4

Is this happening on a fresh project, or only on a particular project?


#5

It happens on all projects, exp init and CRNA fresh projects too.


#6

Is it okay to bump posts?


#7

It looks like this possibly could be an issue with your firewall, network, or project size. To reduce the likelihood of the first two causes, I’d recommend publishing a new, small project. There are no known issues in Expo with publishing the default project, for example.

It’s not against the Expo community guidelines but if you are looking for more responsive support, see the response times here: https://expo.io/support. (Support plans aren’t really a way for us to make money but they help us prioritize some issues.)


closed #8

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