[BUG] Missing dependencies in Ubuntu 18.04 ( Bionic )
See original GitHub issueMissing dependencies in Ubuntu 18.04 ( Bionic )
Running playwright tests ( both local and remote ) on Ubuntu Bionic ( 18.04 ), fails due to dependency issues. Even on using the command sudo npx playwright install-deps
, the issue remains. However the same code below will work for Ubuntu 20 ( Focal ).
- Playwright Version: [1.19.2, 1.20.0-alpha-mar-8-2022]
- Operating System: [Linux]
- Node.js version: [16.14]
- Browser: [Firefox]
System:
- OS: Linux 5.4 Ubuntu 18.04.6 LTS (Bionic Beaver)
- Memory: 578.48 MB / 912.27 MB
- Container: Yes
Binaries:
- Node: 16.14.0 - /usr/bin/node
- npm: 8.3.1 - /usr/bin/npm
Languages:
- Bash: 4.4.20 - /bin/bash
Code Snippet
npm i playwright@1.19.2
- Run a firefox server
// index.js
const { firefox } = require("playwright");
(async () => {
const browserServer = await firefox.launchServer({ port: 8000, wsPath: "ws" });
console.log(browserServer.wsEndpoint());
})();
Run the above server using node index.js
, we get the following error
/home/azureuser/node_modules/playwright-core/lib/utils/dependencies.js:206
throw new Error('\n' + utils.wrapInASCIIBox([`Host system is missing a few dependencies to run browsers.`, `Please install them with the following command:`, ``, ` ${maybeSudo}${(0, _registry.buildPlaywrightCLICommand)(sdkLanguage, 'install-deps')}`, ``, `<3 Playwright Team`].join('\n'), 1));
^
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 (/home/azureuser/node_modules/playwright-core/lib/utils/dependencies.js:206:11)
at processTicksAndRejections (node:internal/process/task_queues:96:5)
at async Registry._validateHostRequirements (/home/azureuser/node_modules/playwright-core/lib/utils/registry.js:485:43)
at async Firefox._launchProcess (/home/azureuser/node_modules/playwright-core/lib/server/browserType.js:198:7)
at async Firefox._innerLaunch (/home/azureuser/node_modules/playwright-core/lib/server/browserType.js:125:9)
at async ProgressController.run (/home/azureuser/node_modules/playwright-core/lib/server/progress.js:101:22)
at async Firefox.launch (/home/azureuser/node_modules/playwright-core/lib/server/browserType.js:79:21)
at async BrowserServerLauncherImpl.launchServer (/home/azureuser/node_modules/playwright-core/lib/browserServerImpl.js:60:21)
at async /home/azureuser/index.js:4:25
Even on running sudo npx playwright install-deps
, the issue remains.
- Running playwright tests on firefox
// sample.spec.ts
import { test, expect } from '@playwright/test';
test('basic test', async ({ page }) => {
await page.goto('https://playwright.dev/');
const title = page.locator('.navbar__inner .navbar__title');
await expect(title).toHaveText('Playwright');
});
// playwright.config.ts
import { PlaywrightTestConfig, devices } from '@playwright/test';
const config: PlaywrightTestConfig = {
projects: [
{
name: 'firefox',
use: { ...devices['Desktop Firefox'] },
},
],
};
export default config;
Run the test using npx playwright test
, we get the following error
Running 1 test using 1 worker
β [firefox] βΊ sample.spec.ts:3:1 βΊ basic test (227ms)
1) [firefox] βΊ sample.spec.ts:3:1 βΊ basic test ===================================================
browserType.launch:
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β 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 β
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
1 failed
[firefox] βΊ sample.spec.ts:3:1 βΊ basic test ====================================================
Issue Analytics
- State:
- Created 2 years ago
- Comments:7 (6 by maintainers)
Top Results From Across the Web
Ubuntu 18.04 upgrade fails; error "package dependencies ...
Try this. Just a suggestion. Go to Software and Updates. Select Other Software. Uncheck all PPAs. click close. click reload.
Read more >How to Fix Unmet Dependencies Error on Ubuntu - Appuals.com
Method 1: Use the -f parameter Β· Open a Terminal by pressing Ctrl, Alt and T simultaneously on your keyboard. Β· Type in...
Read more >How to Install and Correct Dependencies Issues in Ubuntu
It is possible that a system's dependency structure can be so corrupt as to require manual intervention (which usually means using dselect(1) orΒ ......
Read more >Missing Package for Referencer in Ubuntu 18.04 Bionic beaver
Hello, Referencer is not in the Ubuntu 18.04 Bionic-Berver repository. Will Referencer be soon packaged for Ubuntu 18.04 ? Thank you.
Read more >Bug #37513: install-deps.sh fails on Bionic (18.04) due to ...
Done Building dependency tree Reading state information... Done Some packages could not be installed. This may mean that you have requested an impossibleΒ ......
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Installing libxtst6 fixes the issue
I managed to reproduce it in Docker, the problem is that libxtst6 is missing. Can you run
apt install libxtst6
and see if it helps?I will prepare a fix.