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

Debian not supported by playwright #283

Closed
jrson83 opened this issue Mar 18, 2022 · 2 comments · Fixed by #284
Closed

Debian not supported by playwright #283

jrson83 opened this issue Mar 18, 2022 · 2 comments · Fixed by #284

Comments

@jrson83
Copy link
Contributor

jrson83 commented Mar 18, 2022

It should really be mentioned in the CONTRIBUTING.md, that playwright, which needs to be installed in order to run the tests, only supports Ubuntu and not Debian.

Since the guide has the note (Windows may work but there are no guarantees.), I setup a completely new VM with Debian 11 just to make sure everything is working. After finishing all the code and wanted to run the tests and get the error:

> @ test:jest /var/www/html/vite-plugin-ssr/libframe/test
> jest --config=./jest.config.ts --runInBand --bail "examples/nano-jsx-client-routing/"

Error: 
╔════════════════════════════════════════════════════════════╗
║ Host system is missing a few dependencies to run browsers. ║
║ Please install them with the following command:            ║
║                                                            ║
║     sudo npx playwright install-deps                       ║
║                                                            ║
║ <3 Playwright Team                                         ║
╚════════════════════════════════════════════════════════════╝
    at validateDependenciesLinux (/var/www/html/vite-plugin-ssr/node_modules/.pnpm/[email protected]/node_modules/playwright-core/lib/utils/dependencies.js:204:11)
    at Registry._validateHostRequirements (/var/www/html/vite-plugin-ssr/node_modules/.pnpm/[email protected]/node_modules/playwright-core/lib/utils/registry.js:484:43)
    at Chromium._launchProcess (/var/www/html/vite-plugin-ssr/node_modules/.pnpm/[email protected]/node_modules/playwright-core/lib/server/browserType.js:200:7)
    at Chromium._innerLaunch (/var/www/html/vite-plugin-ssr/node_modules/.pnpm/[email protected]/node_modules/playwright-core/lib/server/browserType.js:127:9)
    at ProgressController.run (/var/www/html/vite-plugin-ssr/node_modules/.pnpm/[email protected]/node_modules/playwright-core/lib/server/progress.js:101:22)
    at Chromium.launch (/var/www/html/vite-plugin-ssr/node_modules/.pnpm/[email protected]/node_modules/playwright-core/lib/server/browserType.js:81:21)
    at BrowserServerLauncherImpl.launchServer (/var/www/html/vite-plugin-ssr/node_modules/.pnpm/[email protected]/node_modules/playwright-core/lib/browserServerImpl.js:60:21)
    at PlaywrightRunner.launchServer (/var/www/html/vite-plugin-ssr/node_modules/.pnpm/[email protected][email protected]/node_modules/jest-playwright-preset/lib/PlaywrightRunner.js:69:44)
    at PlaywrightRunner.getTests (/var/www/html/vite-plugin-ssr/node_modules/.pnpm/[email protected][email protected]/node_modules/jest-playwright-preset/lib/PlaywrightRunner.js:90:36)
    at PlaywrightRunner.runTests (/var/www/html/vite-plugin-ssr/node_modules/.pnpm/[email protected][email protected]/node_modules/jest-playwright-preset/lib/PlaywrightRunner.js:123:30)

 ELIFECYCLE  Command failed with exit code 1.
Error: Command failed: pnpm run test:jest examples/nano-jsx-client-routing/
    at checkExecSyncError (node:child_process:828:11)
    at execSync (node:child_process:899:15)
    at runScript (/var/www/html/vite-plugin-ssr/libframe/test/runAll.ts:19:3)
    at Object.<anonymous> (/var/www/html/vite-plugin-ssr/libframe/test/runAll.ts:16:1)
    at Module._compile (node:internal/modules/cjs/loader:1099:14)
    at Module.m._compile (/var/www/html/vite-plugin-ssr/node_modules/.pnpm/[email protected][email protected]/node_modules/ts-node/src/index.ts:1056:23)
    at Module._extensions..js (node:internal/modules/cjs/loader:1153:10)
    at Object.require.extensions.<computed> [as .ts] (/var/www/html/vite-plugin-ssr/node_modules/.pnpm/[email protected][email protected]/node_modules/ts-node/src/index.ts:1059:12)
    at Module.load (node:internal/modules/cjs/loader:975:32)
 ELIFECYCLE  Test failed. See above for more details.
 ELIFECYCLE  Test failed. See above for more details.

I tried to find some alternative packages but gave up now. Gonna try to run the tests tomorrow with windows again.

@brillout
Copy link
Member

PR welcome to add a note about this in CONTRIBUTING.md

Closing in the meantime.

brillout pushed a commit that referenced this issue Mar 19, 2022
## Reference Issues/PRs

resolve #283

## What does this implement/fix?

- Added missing information (guide) on how to resolve dependencies which are required, in order to install `playwright` (which is required to run tests) on debian
@brillout
Copy link
Member

Testing on Debian

To run the test suite on Debian, additional dependencies are needed to install playwright.

Installing playwright

When running the test suite on Debian, playwright prompts to install its dependencies using:

npx playwright install-deps

According to the playwright's system requirements, only Ubuntu is officially supported, so when running the command, it tries to install the required packages libjpeg-turbo8 and libicu66 with apt-get, which does not exist in the Debian sources list.

Resolve missing dependencies

To resolve the missing dependencies, you can:

  1. either follow the error messages and install all dependencies manually
  2. add non-free sources to sources.list and install libjpeg-turbo8 and libicu66 manually

To add the non-free sources to deb and deb-src:

sudo nano /etc/apt/sources.list

# add the sources

deb http://deb.debian.org/debian/ bullseye main non-free
deb-src http://deb.debian.org/debian/ bullseye main non-free

# update package information

sudo apt-get update

Download the official Ubuntu libjpeg-turbo8 and libicu66 packages from pkgs.org using wget:

You should be able to install both packages, since the required dependencies will be resolved automatically through the non-free sources:

wget <url-topackage>.deb
dpkg -i <package>.deb

With all packages successfully installed, you can finally install playwright:

npx playwright install-deps

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants