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.
No description
28 Replies
Percy
Percy12mo ago
Project ID: bafb2867-cbd4-451c-889e-68e3cf16f504
ManuelMaccou | Mosaic
bafb2867-cbd4-451c-889e-68e3cf16f504
ManuelMaccou | Mosaic
This is my first time using this. I'm assuming you want the build logs file? Here it is. Thanks for your help!
Brody
Brody12mo ago
theres no issues there? are the issues in the deployment logs? if so, please send the deployment logs instead
ManuelMaccou | Mosaic
Sorry here are the deploy logs. This is one is when I discovered the issue:
ManuelMaccou | Mosaic
And this one is after I changed the nixpacks version
Brody
Brody12mo ago
we need to run playwright install during build do you have a railway.json, or a nixpacks.toml?
ManuelMaccou | Mosaic
No but I can create one if you let me know know what should go in it
Brody
Brody12mo ago
delete your railway.toml file, we will be moving to a railway.json file instead, put this in a railway.json file
{
"$schema": "https://schema.up.railway.app/railway.schema.json",
"build": {
"nixpacksVersion": "1.15.0",
"nixpacksPlan": {
"phases": {
"playwright:install": {
"dependsOn": ["install"],
"cmds": ["playwright install"]
}
}
}
}
}
{
"$schema": "https://schema.up.railway.app/railway.schema.json",
"build": {
"nixpacksVersion": "1.15.0",
"nixpacksPlan": {
"phases": {
"playwright:install": {
"dependsOn": ["install"],
"cmds": ["playwright install"]
}
}
}
}
}
@ManuelMaccou | Mosaic tagging for visibility
ManuelMaccou | Mosaic
Great thank you! I'll test this out and let you know if it works.
ManuelMaccou | Mosaic
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
ManuelMaccou | Mosaic
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?
ManuelMaccou | Mosaic
This is build log from the last build
Brody
Brody12mo ago
simple answer, but one you probably won't like, dont use playwright, find a lighter way to do what you're doing with playwright
ManuelMaccou | Mosaic
Do you have any recommendations for scraping? I've heard of Selenium but not sure if that's lighter.
Brody
Brody12mo ago
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
ManuelMaccou | Mosaic
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?
Brody
Brody12mo ago
if you have permission then there's nothing wrong, you have permission?
ManuelMaccou | Mosaic
It's only being used to build a demo for clients
Brody
Brody12mo ago
do you have permission to scrape what your scraping?
ManuelMaccou | Mosaic
yes
Brody
Brody12mo ago
okay cool does the app work now?
ManuelMaccou | Mosaic
It works. Really appreciate your help
Brody
Brody12mo ago
no problem!
ManuelMaccou | Mosaic
Which alternative to playwright would you recommend?
Brody
Brody12mo ago
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
Want results from more Discord servers?
Add your server