Error: "version `GLIBC_2.36' not found" with Playwright
I'm running into this error after running a function that uses playwright. I found the recommendation from Brody in another thread related to this error, so I set the version of nixpacks, but now I get a message in my Railway logs to install Playwright again. It's already installed, so I'm kind of lost.
28 Replies
Project ID:
bafb2867-cbd4-451c-889e-68e3cf16f504
bafb2867-cbd4-451c-889e-68e3cf16f504
build logs please https://bookmarklets.up.railway.app/log-downloader/
This is my first time using this. I'm assuming you want the build logs file? Here it is. Thanks for your help!
theres no issues there?
are the issues in the deployment logs? if so, please send the deployment logs instead
Sorry here are the deploy logs. This is one is when I discovered the issue:
And this one is after I changed the nixpacks version
we need to run
playwright install
during build
do you have a railway.json, or a nixpacks.toml?No but I can create one if you let me know know what should go in it
delete your railway.toml file, we will be moving to a railway.json file instead, put this in a railway.json file
@ManuelMaccou | Mosaic tagging for visibility
Great thank you! I'll test this out and let you know if it works.
Ok that kind of worked but I had to make some changes. When I used the JSON you provided, I got this message in the deploy logs
So I changed the file to this:
{
"$schema": "https://schema.up.railway.app/railway.schema.json",
"build": {
"nixpacksVersion": "1.15.0",
"nixpacksPlan": {
"phases": {
"playwright:install": {
"dependsOn": ["install"],
"cmds": ["playwright install"]
},
"playwright_install_deps": {
"dependsOn": ["install"],
"cmds": [
"playwright install-deps"
]
}
}
}
}
}
That worked, but the build and deploy took about 6 minutes. Is there a way that can be sped up?This is build log from the last build
simple answer, but one you probably won't like, dont use playwright, find a lighter way to do what you're doing with playwright
Do you have any recommendations for scraping? I've heard of Selenium but not sure if that's lighter.
I'll be honest scraping isn't really even allowed on railway, it's in their tos
I've just been running on the assumption that what you are scraping has given you permission
Even with permission? That's strange they would put that in their terms. Isnt that up to the website if they want to allow it?
if you have permission then there's nothing wrong, you have permission?
It's only being used to build a demo for clients
do you have permission to scrape what your scraping?
yes
okay cool
does the app work now?
It works. Really appreciate your help
no problem!
Which alternative to playwright would you recommend?
i don't think there is a good alternative, being dependent on any kind of browser is a bad idea in my opinion, personally if there's no api or native way for what I want to do, I would not undertake the project from the very start. I am not saying you drop the project, I'm just saying I can't recommend anything because all the alternatives are equally as bad
this is purely just my opinion on the topic of using a browser via code for this kind of thing