I can't load playwright.
I'm sorry, but I don't understand how I can set
playwright
. I created pyproject.toml
and entered python -m playwright install-deps
but still refuses to work, even after restarting. Project id: 9a367791-75b9-4c5a-9222-9a8097183908
If any additional information is required to solve this problem, I am ready to provide it.Solution:Jump to solution
you'd need to to create a custom build phase that runs that command, the docs for doing so are here
https://nixpacks.com/docs/guides/configuring-builds#new-phase
but to set you off in the right direction, add this as a nixpacks.toml file to your project
```toml
[phases.playwright]...
23 Replies
Project ID:
9a367791-75b9-4c5a-9222-9a8097183908
π π
Solution
you'd need to to create a custom build phase that runs that command, the docs for doing so are here
https://nixpacks.com/docs/guides/configuring-builds#new-phase
but to set you off in the right direction, add this as a nixpacks.toml file to your project
this will run that install command after all the projects dependencies have been installed
thank you very much! I'll go try it
worked?
Yes! I succeeded. Thanks againπ
no problem!
for those who had the same problem. here is my solution:
you need to create a
nixpacks.toml
file and write into it:
the
playwrightdeps
phase might want to run after the playwright
phase so in the playwrightdeps
phases you should do dependsOn = ['playwright']
so they are ran in order
unless the order doesnβt matter of those two commands, if so, ignore that suggestionI've followed the steps above and I'm getting this error during the playwrightdeps phase: Sub-process /usr/bin/dpkg returned an error code (1)
Here is my
nixpacks.toml
file:
[phases.playwright]
dependsOn = ['install']
cmds = ['playwright install']
[phases.playwrightdeps]
dependsOn = ['playwright']
cmds = ['playwright install-deps']
full build logs please
show me the table at the top of the build logs
I also tried to run the install-deps command in a postbuild script in my app's project.json (I am using an NX monorepo), which resulted in a slightly more descriptive error:
ln: failed to create symbolic link '/etc/resolv.conf': Device or resource busy
Created symlink /etc/systemd/system/sysinit.target.wants/systemd-pstore.service β /lib/systemd/system/systemd-pstore.service.
systemd-machine-id-setup: /lib/x86_64-linux-gnu/libc.so.6: version
GLIBC_2.36' not found (required by /nix/store/9lhvbvvm3s7kv7maak5vm7as6fwjgfa7-util-linux-minimal-2.39.2-lib/lib/libmount.so.1)
systemd-machine-id-setup: /lib/x86_64-linux-gnu/libc.so.6: version GLIBC_ABI_DT_RELR' not found (required by /nix/store/aw2fw9ag10wr9pf0qk4nk5sxi0q0bn56-glibc-2.37-8/lib/libdl.so.2)
systemd-machine-id-setup: /lib/x86_64-linux-gnu/libc.so.6: version
GLIBC_ABI_DT_RELR' not found (required by /nix/store/aw2fw9ag10wr9pf0qk4nk5sxi0q0bn56-glibc-2.37-8/lib/libpthread.so.0)
dpkg: error processing package systemd (--configure):
installed systemd package post-installation script subprocess returned error exit status 1
Errors were encountered while processing:
systemd
E: Sub-process /usr/bin/dpkg returned an error code (1)
Failed to install browser dependencies
Error: Installation process exited with code: 100
Warning: run-commands command "npx playwright install-deps" exited with non-zero status code`I'd like to note that crawlers are generally not allowed on railway, do you have permission from the sites you are crawling?
Hi Brody, the app is not a crawler in the traditional sense of the word, I just couldn't think of a better name! It's for internal use for our users, as opposed to being a scraper or bot or something similar π
I will choose to take your word
We use codenames in our codebase as opposed to product names to avoid having to change the name if we change the brandname, hence sillymarch
add a railway.toml file to your project with this in it
@jr - the glibc 2.36 nightmare isn't over yet π
Ok I'm adding the
railway.toml
file along with the existing nixpacks.toml
file, and will report back asapThat has done the trick I think! Thank you. However, I'm now faced with another issue. It is a secondary issue, so I can start a new chat if desired. Essentially, our app needs to run Playwright in headful mode (headless:false). To do this I've placed
xvfb-run
infront of our deploy command as instructed here: https://playwright.dev/docs/ci#running-headed (full command: xvfb-run nx run sillymarch-crawler:serve:production --hostname=0.0.0.0
). However, nothing is being shown in our deploy logs and we're getting the 'Application failed to respond' message when navigating to the app.Continuous Integration | Playwright
Playwright tests can be executed in CI environments. We have created sample configurations for common CI providers.
yes new thread if you dont mind π