question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Publish failing with Travis CI build

See original GitHub issue

Hi guys,

I’m trying to publish to Expo automatically in a CI build using Travis, but it’s consistently failing. I’ve tried a whole range of different things, but it always fails with “socket hang up” when trying to build the iOS bundle.

[exp] Making sure project is set up correctly...                                                                                                           
\[exp] Warning: Not using the Expo fork of react-native. See https://docs.expo.io/.                                                                        
[exp] Your project looks good!                                                                                                                             
[exp] Unable to find an existing exp instance for this directory, starting a new one...                                                                    
[exp] Warning: Not using the Expo fork of react-native. See https://docs.expo.io/.                                                                         
[exp] Starting React Native packager...                                                                                                                    
[exp] Scanning 782 folders for symlinks in /home/travis/build/pharmadata/tonic-app/node_modules (8ms)                                                      
[exp] Loading dependency graph.                                                                                                                            
[exp] Running packager on port 19001.                                                                                                                      
[exp] Publishing...                                                                                                                                        
[exp] Building iOS bundle                                                                                                                                  
[exp] socket hang up                                                                                                                                       
Building JavaScript bundle [                                                                                                    ] 0%Error: socket hang up  
    at createHangUpError (_http_client.js:302:15)                                                                                                          
    at Socket.socketOnEnd (_http_client.js:394:23)                                                                                                         
    at emitNone (events.js:91:20)                                                                                                                          
    at Socket.emit (events.js:188:7)                                                                                                                       
    at endReadableNT (_stream_readable.js:975:12)                                                                                                          
    at _combinedTickCallback (internal/process/next_tick.js:80:11)                                                                                         
    at process._tickCallback (internal/process/next_tick.js:104:9)                                                                                         

Using node v7.10.0 and npm 4.2.0 (but I’ve tried a variety of versions with no difference).

I’m not quite sure how to debug the issue.

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:9 (6 by maintainers)

github_iconTop GitHub Comments

3reactions
enthalcommented, Aug 3, 2017

I’m using CircleCI, not Travis, but I leave this here for the next person… it works, but only if you don’t need docker. 😦


Since inotify limits cannot be raised in the Circle 2.0 docker, I’ve gotten successful builds (and deploys with exp publish) by using a machine build (set machine: true) in config.yml… and (for my project) installing yarn as part of the build. I’ve left these changes only on the deploy branch.

version: 2
jobs:
  build:
    # Allow increase of inotify limit to support watchman for exp publish.
    # This should only be on the deploy branch.
    # See  https://circleci.com/docs/2.0/executor-types/
    machine: true
    steps:
      ...
      - run: |
          curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add -
          echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list
          sudo apt-get update && sudo apt-get install yarn
      - run: yarn install

Good luck. It’s an unfortunate limitation in the environment for docker in CircleCI 2.0. Hope they fix it soon.

0reactions
Avinashkoganti1commented, Apr 10, 2019

Can successfully publish on my local mac but getting this error with Jenkins as well:

[philip@li515-121 cd-expo-md-mobile]$ ./node_modules/.bin/exp -V
43.0.0
[philip@li515-121 cd-expo-md-mobile]$ ./node_modules/.bin/exp whoami
[exp] Logged in as philip_mvpfastlane
[philip@li515-121 cd-expo-md-mobile]$ ./node_modules/.bin/exp p
[exp] Making sure project is set up correctly...
[exp] Your project looks good!
[exp] Unable to find an existing exp instance for this directory, starting a new one...
[exp] EACCES: permission denied, open '/var/lib/jenkins/workspace/cd-expo-md-mobile/.expo/packager-info.json'
[exp] Set EXPO_DEBUG=true in your env to view the stack trace.

Tried but no luck.

sudo sysctl fs.inotify.max_user_watches=524288
sudo sysctl fs.inotify.max_queued_events=524288
sudo sysctl -p

It used to work on Jenkins. Seems it start to fail after updating expo to v19.0.0.

Hi Isps could you post the jenkins file you used for build and publish expo app

Read more comments on GitHub >

github_iconTop Results From Across the Web

Common Build Problems - Travis CI Docs
If your build is failing due to unexpected segmentation faults in the language interpreter, this may be caused by corrupt or invalid caches...
Read more >
Travis reports a build success even though the npm publish ...
It all depends on how the script that Travis is running actually looks like. A short answer is that Travis CI does not...
Read more >
Why does Travis CI report a build success even though the ...
However, the build reported as passing even though the npm publish failed due to the version already existing. Here's the tail end of...
Read more >
Automate Chromatic with Travis CI • Chromatic docs
They will fail if you are not using --exit-zero-on-changes . Once you accept all the changes, re-run the build and the Publish to...
Read more >
Publish NPM package using Travis CI | by Terence Tsang
.travis.yml setup for npm release package · Create a “develop” branch and do development on that branch · When things are done, run...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found