Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

E2E test fails in Docker locally due to missing "libelf.so.1" #2670

Closed
dallonf opened this issue Jun 28, 2017 · 11 comments
Closed

E2E test fails in Docker locally due to missing "libelf.so.1" #2670

dallonf opened this issue Jun 28, 2017 · 11 comments

Comments

@dallonf
Copy link
Contributor

dallonf commented Jun 28, 2017

Is this a bug report?

Yes.

Can you also reproduce the problem with npm 4.x?

I can reproduce in v3.10.3 and v4.6.1.

Which terms did you search for in User Guide?

"e2e", "docker", "libelf"

Environment

  1. node -v: v6.3.1
  2. npm -v: 4.6.1
  3. create-react-app version: commit 7796c94

Then, specify:

  1. Operating system: Mac OS X v10.12.5
  2. Docker version: 17.06.0-ce-mac18

Steps to Reproduce

  1. Clone create-react-app from master
  2. Run npm install
  3. Run npm e2e:docker

Expected Behavior

The end-to-end test script should run in Docker and pass.

Actual Behavior

After running for a while, the test script exits with this error message:

> react-error-overlay@1.0.8 test /home/node/create-react-app/packages/react-error-overlay
> flow && jest

/home/node/create-react-app/packages/react-error-overlay/node_modules/flow-bin/flow-linux64-v0.46.0/flow: error while loading shared libraries: libelf.so.1: cannot open shared object file: No such file or directory
npm info lifecycle react-error-overlay@1.0.8~test: Failed to exec test script
npm ERR! Test failed.  See above for more details.
++ set +x
e2e-simple.sh: ERROR! An error was encountered executing line 132.
Cleaning up.
Exiting with error.

✘ Job failes
✨  Done in 119.36s.
@gaearon
Copy link
Contributor

gaearon commented Jun 28, 2017

cc @EnoahNetzach

Just to be clear—you're trying to contribute to CRA, right?

@dallonf
Copy link
Contributor Author

dallonf commented Jun 28, 2017

Specifically I'm trying to fork the repository (I've forked the repo before, but that was before it became a monorepo with lerna and I've fallen way behind since then). But yes, this is from cloning the repo to start working on the tool itself rather than building an app with it.

@EnoahNetzach
Copy link
Contributor

@dallonf do you incur in the same error by simply running a docker container?
E.g. docker run -ti node:7 bash

@EnoahNetzach
Copy link
Contributor

EnoahNetzach commented Jun 28, 2017

Anyway, to be super sure it's a CRA problem, try cleaning docker images, cloning CRA again and reinstalling docker (eventually).

Also, I don't see version 17.06.0-ce-mac18 in the release notes, maybe it has to do with the way you installed it?

I can't check this issue out on my Mac atm, but I'll be back soon.

@EnoahNetzach
Copy link
Contributor

Uh, the problem should be this one flow/flow-bin#26.

It never happened to me 😵
What I don't get is that Travis uses the same docker images as we do..

@dallonf
Copy link
Contributor Author

dallonf commented Jun 28, 2017

docker run -ti node:7 bash does seem to get me into a bash prompt just fine; I can also pull up a Node REPL from within the container and run a couple of console.logs without issue.
Regarding the Docker version, it just ran an auto-update today. Maybe they haven't had a chance to update the release notes yet?

Thanks for looking into this! Do you think I could create a PR to fix this by adding that apt-get bit into the Dockerfile?

@Timer
Copy link
Contributor

Timer commented Jun 28, 2017

FWIW, I run into this too:

> react-error-overlay@1.0.8 test /home/node/create-react-app/packages/react-error-overlay
> flow && jest

/home/node/create-react-app/packages/react-error-overlay/node_modules/flow-bin/flow-linux64-v0.46.0/flow: erro
r while loading shared libraries: libelf.so.1: cannot open shared object file: No such file or directory
npm info lifecycle react-error-overlay@1.0.8~test: Failed to exec test script
npm ERR! Test failed.  See above for more details.
++ set +x
e2e-simple.sh: ERROR! An error was encountered executing line 132.
Cleaning up.
Exiting with error.

✘ Job failes
Done in 176.24s.

@EnoahNetzach
Copy link
Contributor

EnoahNetzach commented Jun 28, 2017

CRA doesn't have a Dockerfile, it uses the official one, but maybe you could try to run docker as before, init an empty npm package and add flow, so to test if that's really what's causing it?

@EnoahNetzach
Copy link
Contributor

EnoahNetzach commented Jun 28, 2017

BTW, I just received the 17.06.0-ce-mac18 update!

@viankakrisna
Copy link
Contributor

This issue is tracked in nodejs/docker-node#363, I believe upgrading flow to 0.48.0 in react-error-overlay will fix this. It's still uses 0.46.0

Timer added a commit to Timer/create-react-app that referenced this issue Jun 29, 2017
@Timer Timer mentioned this issue Jun 29, 2017
Timer added a commit that referenced this issue Jun 29, 2017
@dallonf
Copy link
Contributor Author

dallonf commented Jun 29, 2017

I can confirm this fix works! Thank you 🎉

romaindso pushed a commit to romaindso/create-react-app that referenced this issue Jul 10, 2017
wmonk referenced this issue in wmonk/create-react-app-typescript Aug 7, 2017
Resolves #2670
morgs32 pushed a commit to BrickworkSoftware/create-react-app that referenced this issue Sep 1, 2017
@lock lock bot locked and limited conversation to collaborators Jan 21, 2019
LishuGupta652 pushed a commit to LishuGupta652/create-react-app-1 that referenced this issue Oct 8, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants