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

Error: Unable to test the build using WSL #3212

Closed
idontknowjs opened this issue Mar 12, 2021 · 3 comments
Closed

Error: Unable to test the build using WSL #3212

idontknowjs opened this issue Mar 12, 2021 · 3 comments
Labels
status: archived Archived and locked; will not be updated

Comments

@idontknowjs
Copy link
Contributor

Have you read the FAQ and checked for duplicate open issues?
Yes

What version of Shaka Player are you using?
Not applicable

Can you reproduce the issue with our latest release version?
Yes

Can you reproduce the issue with the latest code from master?
Yes

Are you using the demo app or your own custom app?
No

If custom app, can you reproduce the issue using our demo app?
Not applicable

What browser and OS are you using?
Chrome, using Debian in Windows Subsystem for Linux

For embedded devices (smart TVs, etc.), what model and firmware version are you using?
Not applicable

What did you do?

  1. Cloned the repository

  2. Compiled the repository: python build/all.py

  3. Got these outputs successfully:

    • dist/shaka-player.compiled.js (compiled bundle)
    • dist/shaka-player.compiled.debug.js (debug bundle)
    • dist/shaka-player.compiled.externs.js (generated externs, for Closure-based projects)
    • docs/api/index.html (generated documentation)
  4. Ran the tests: python build/test.py

  5. Recieved these errors:

    • [karma-server]: Error during file loading or preprocessing
    • [launcher]: Cannot load browser "Chrome"!
    • [launcher]: Cannot load browser "Firefox"!

What did you expect to happen?
All the test cases to be passed successfully

What actually happened?
I think the error is generating because a dependency karma-chrome-launcher is not able to load the browser in WSL
Found a relatable issue here reported by someone.
Is there any way possible to test the build using WSL?

@michellezhuogg
Copy link
Contributor

Hello @CovalentBond ,

Sorry that none of the team members use Windows Subsystem for Linux, so we don't have a straight answer. It looks like that Karma cannot find Chrome. Does your linux have Chrome installed?

@TheModMaker
Copy link
Contributor

The default builds for WSL don't have any graphics support in them. So you can't use graphical apps like Chrome. You'll need to manually setup X Window and either use a virtual X Window to run tests and Chrome in, or link it to the Windows display so the windows can be shown.

You can try adding --use-xvfb to test.py, but you may need to install xvfb-run to get a virtual X window. You'll also need to install Chrome within the WSL so Linux can run Chrome. WSL can't access or run the Windows version of Chrome.

Another option would be to pass --no-browsers to test.py, then manually connect your Chrome (or Firefox, Edge, etc) to the tests. It should run on localhost:9876 by default.

@idontknowjs
Copy link
Contributor Author

Thanks @TheModMaker! I was later able to setup on Windows itself after the changes done in #3211.
And will no longer need to setup on WSL for now. Thus closing this issue :)

@shaka-bot shaka-bot added the status: archived Archived and locked; will not be updated label May 11, 2021
@shaka-project shaka-project locked and limited conversation to collaborators May 11, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
status: archived Archived and locked; will not be updated
Projects
None yet
Development

No branches or pull requests

4 participants