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

'yarn run test' seems to fail on Ubuntu under WSL #7096

Closed
ecerami opened this issue Feb 1, 2020 · 8 comments
Closed

'yarn run test' seems to fail on Ubuntu under WSL #7096

ecerami opened this issue Feb 1, 2020 · 8 comments
Assignees

Comments

@ecerami
Copy link
Contributor

ecerami commented Feb 1, 2020

This is most probably related to my misunderstanding of the documentation, but when I run:

yarn run test

It seems to fail. I currently get:

yarn run v1.21.1
$ yarn run testModules && yarn run testMain
$ lerna run test --ignore=cbioportal-frontend --stream
lerna notice cli v3.19.0
lerna info versioning independent
lerna notice filter excluding "cbioportal-frontend"
lerna info filter [ '!cbioportal-frontend' ]
lerna info Executing command in 2 packages: "yarn run test"
cbioportal-frontend-commons: warning package.json: License should be a valid SPDX license expression
cbioportal-frontend-commons: $ cross-env CI=1 react-scripts-ts test --env=jsdom
cbioportal-frontend-commons: PASS src/lib/StringUtils.spec.ts (7.609s)
cbioportal-frontend-commons: PASS src/lib/ProteinChangeUtils.spec.tsx (7.611s)
cbioportal-frontend-commons: PASS src/lib/ColumnVisibilityResolver.spec.ts (7.655s)
cbioportal-frontend-commons: PASS src/lib/OncoKbUtils.spec.tsx
cbioportal-frontend-commons: PASS src/components/fadeInteraction/FadeInteraction.spec.tsx
cbioportal-frontend-commons: PASS src/lib/PromiseUtils.spec.ts
cbioportal-frontend-commons: PASS src/lib/getCanonicalMutationType.spec.ts
cbioportal-frontend-commons: PASS src/lib/findFirstMostCommonElt.spec.ts
cbioportal-frontend-commons: Test Suites: 8 passed, 8 total
cbioportal-frontend-commons: Tests: 30 passed, 30 total
cbioportal-frontend-commons: Snapshots: 0 total
cbioportal-frontend-commons: Time: 10.821s
cbioportal-frontend-commons: Ran all test suites.
react-mutation-mapper: warning package.json: License should be a valid SPDX license expression
react-mutation-mapper: $ cross-env CI=1 react-scripts-ts test --env=jsdom
react-mutation-mapper: PASS src/util/CancerHotspotsUtils.spec.ts (7.395s)
react-mutation-mapper: PASS src/component/filter/BadgeSelector.spec.tsx (7.646s)
react-mutation-mapper: PASS src/util/MutationUtils.spec.ts
react-mutation-mapper: PASS src/util/OncoKbUtils.spec.tsx
react-mutation-mapper: PASS src/util/MutationAnnotator.spec.ts (8.36s)
react-mutation-mapper: PASS src/util/PtmUtils.spec.ts
react-mutation-mapper: PASS src/util/LollipopPlotUtils.spec.ts
react-mutation-mapper: PASS src/util/PfamUtils.spec.ts
react-mutation-mapper: PASS src/component/oncokb/OncoKB.spec.tsx
react-mutation-mapper: Test Suites: 9 passed, 9 total
react-mutation-mapper: Tests: 41 passed, 41 total
react-mutation-mapper: Snapshots: 0 total
react-mutation-mapper: Time: 13.503s
react-mutation-mapper: Ran all test suites.
lerna success run Ran npm script 'test' in 2 packages in 28.6s:
lerna success - cbioportal-frontend-commons
lerna success - react-mutation-mapper
$ export NODE_OPTIONS=--max-old-space-size=2048; karma start karma.conf.js
Starting type checking service...
Using 1 worker with 2048MB memory limit
build [ ] 0%
START:
(node:1124) DeprecationWarning: Tapable.plugin is deprecated. Use new API on .hooks instead
ℹ 「wdm」: wait until bundle finished: noop
build [== ] 10%Browserslist: caniuse-lite is outdated. Please run next command yarn upgrade
Build completed in 131.537s
ntend/packages/cbioportal-frontend-commons/dist/index.es.js as it exceeds the max of 500KB.
Type checking in progress...
⚠ 「wdm」:
ℹ 「wdm」: Compiled with warnings.

Finished in 0 secs / 0 secs @ 08:54:08 GMT-0500 (EST)

error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

Tagging @alisman

@adamabeshouse
Copy link
Contributor

@ecerami I couldn't reproduce. Did you run yarn install?

@ecerami
Copy link
Contributor Author

ecerami commented Feb 4, 2020

@adamabeshouse yes, I ran:

yarn install --frozen-lockfile

and, that was successful. Any other ideas?

@ecerami
Copy link
Contributor Author

ecerami commented Feb 4, 2020

Also, not sure if this helps, but

yarn run testModules

runs to the end successfully. But,

yarn run testMain

fails with:

yarn run v1.21.1
$ export NODE_OPTIONS=--max-old-space-size=2048; karma start karma.conf.js
Starting type checking service...
Using 1 worker with 2048MB memory limit
build [ ] 0%
START:
(node:9873) DeprecationWarning: Tapable.plugin is deprecated. Use new API on .hooks instead
ℹ 「wdm」: wait until bundle finished: noop
build [== ] 10%Browserslist: caniuse-lite is outdated. Please run next command yarn upgrade
build [============== ] 70%[BABEL] Note: The code generator has deoptimised the styling of /mnt/c/Users/ceram/Desktop/cbioportal-frontend/packages/cbioportal-frontend-commons/dist/index.es.js as it exceeds the max of 500KB.
Build completed in 133.364s

Type checking in progress...
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
Command failed: /home/ecerami/.yvm/versions/v1.21.1/bin/yarn.js run testMain

@ecerami ecerami changed the title 'yarn run test' seems to fail 'yarn run test' seems to fail on Ubuntu under WSL Feb 4, 2020
@ecerami
Copy link
Contributor Author

ecerami commented Feb 4, 2020

Ok, I tried yarn run test on Mac OS X now, and it ran fine.

My guess is that this is probably due to me running this on Ubuntu under Windows.

@inodb
Copy link
Member

inodb commented Feb 4, 2020

@onursumer also runs ubuntu (not under windows tho). Does this work for you? Wondering if it's specific to Ubuntu using WSL or Ubuntu in general

@onursumer
Copy link
Member

@ecerami @inodb yarn run test works fine on my ubuntu instance. It might be failing due to memory limitations, or simply a WSL incompatibility.

@ecerami
Copy link
Contributor Author

ecerami commented Feb 4, 2020

thanks @onursumer and @inodb. Yeah, I think it's something to do with Ubuntu under WSL, with karma not being able to connect to chrome. I will dig in further and write back if I figure anything out.

@ecerami
Copy link
Contributor Author

ecerami commented Feb 6, 2020

Finally figured this out. It's due to the fact that Ubuntu running within WSL does not know where Chrome lives. To fix the issue:

https://stackoverflow.com/questions/54090298/karma-use-windows-chrome-from-wsl

  • export CHROME_BIN=/mnt/c/Program\ Files\ (x86)/Google/Chrome/Application/chrome.exe
  • Within Windows, create c:\tmp

@ecerami ecerami closed this as completed Feb 6, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants