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

GitPod Environment Not Set Up for Tests #39728

Closed
ShaunSHamilton opened this issue Sep 29, 2020 · 1 comment · Fixed by #40569 or #40862
Closed

GitPod Environment Not Set Up for Tests #39728

ShaunSHamilton opened this issue Sep 29, 2020 · 1 comment · Fixed by #40569 or #40862
Labels
help wanted Open for all. You do not need permission to work on these. scope: tools/scripts Scripts for supporting dev work, generating config and build artifacts, etc. type: bug Issues that need priority attention. Platform, Curriculum tests (if broken completely), etc.

Comments

@ShaunSHamilton
Copy link
Member

ShaunSHamilton commented Sep 29, 2020

When running an instance of the platform in GitPod, npm run test:curriculum throws this error:

> cross-env FULL_OUTPUT=true mocha --delay --reporter progress

Error: Failed to launch the browser process!
/workspace/freeCodeCamp/curriculum/node_modules/puppeteer/.local-chromium/linux-800071/chrome-linux/chrome: error while loading shared libraries: libnss3.so: cannot open shared object file: No such file or directory


TROUBLESHOOTING: https://github.com/puppeteer/puppeteer/blob/main/docs/troubleshooting.md

    at onClose (/workspace/freeCodeCamp/curriculum/node_modules/puppeteer/lib/cjs/puppeteer/node/BrowserRunner.js:193:20)
    at Interface.<anonymous> (/workspace/freeCodeCamp/curriculum/node_modules/puppeteer/lib/cjs/puppeteer/node/BrowserRunner.js:183:68)
    at Interface.emit (events.js:327:22)
    at Interface.close (readline.js:416:8)
    at Socket.onend (readline.js:194:10)
    at Socket.emit (events.js:327:22)
    at endReadableNT (_stream_readable.js:1220:12)
    at processTicksAndRejections (internal/process/task_queues.js:84:21)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! @freecodecamp/curriculum@0.0.0-next.4 test:full-output: `cross-env FULL_OUTPUT=true mocha --delay --reporter progress`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the @freecodecamp/curriculum@0.0.0-next.4 test:full-output script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/gitpod/.npm/_logs/2020-09-29T19_02_52_374Z-debug.log
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! @freecodecamp/freecodecamp@0.0.1 test-curriculum-full-output: `cd ./curriculum && npm run test:full-output`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the @freecodecamp/freecodecamp@0.0.1 test-curriculum-full-output script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/gitpod/.npm/_logs/2020-09-29T19_02_52_393Z-debug.log
gitpod /workspace/freeCodeCamp $ 

Since the update of Puppeteer, I needed to run sudo apt install libgbm1 to update, before the tests work. I assume something similar can be done for GitPod.

Useful resources courtesy of Mrugesh:

Our config:
https://github.com/freeCodeCamp/freeCodeCamp/blob/master/.gitpod.yml

Documentation:
https://www.gitpod.io/docs/config-docker/
https://github.com/puppeteer/puppeteer/blob/main/docs/troubleshooting.md#running-on-alpine

@ShaunSHamilton ShaunSHamilton added status: waiting triage This issue needs help from moderators and users to reproduce and confirm its validity and fix. scope: tools/scripts Scripts for supporting dev work, generating config and build artifacts, etc. labels Sep 29, 2020
@raisedadead raisedadead added help wanted Open for all. You do not need permission to work on these. type: bug Issues that need priority attention. Platform, Curriculum tests (if broken completely), etc. and removed status: waiting triage This issue needs help from moderators and users to reproduce and confirm its validity and fix. labels Sep 29, 2020
@raisedadead
Copy link
Member

I think the way forward is to (create?) use a docker image that has the deps bundled on it. From the pupeeter docs, it seems we can tweak the node:alpine for this and use that on the config as per the docs from GitPod.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Open for all. You do not need permission to work on these. scope: tools/scripts Scripts for supporting dev work, generating config and build artifacts, etc. type: bug Issues that need priority attention. Platform, Curriculum tests (if broken completely), etc.
Projects
None yet
2 participants