Browserless / Railway deployment
aurelius0180
PROOP

a year ago

Hello.

I have tried to deploy my code using the minimal code example provided here:

brody192/playwright-example-python (github.com)

However, I can't get it to work. Can you help?

/opt/venv/lib/python3.11/site-packages/playwright/driver/node: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.36' not found (required by /nix/store/p3ffjixpnfgkqh20nsrc13vrj3yfi0nj-gcc-13.2.0-lib/lib/libstdc++.so.6)

Jun 20 10:07:30

/opt/venv/lib/python3.11/site-packages/playwright/driver/node: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.38' not found (required by /nix/store/p3ffjixpnfgkqh20nsrc13vrj3yfi0nj-gcc-13.2.0-lib/lib/libstdc++.so.6)

Jun 20 10:07:30

playwright = AsyncPlaywright(next(iter(done)).result())

Jun 20 10:07:30

ERROR:webserver:Exception on request GET /scrapebrowserless

Jun 20 10:07:30

^^^^^^^^^^^^^^^^^^^^^^^^^

Jun 20 10:07:30

async with async_playwright() as p:

Jun 20 10:07:30

await browserless_scraper()

Jun 20 10:07:30

File "/app/webserver.py", line 66, in scrape

Jun 20 10:07:30

^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Jun 20 10:07:30

File "/opt/venv/lib/python3.11/site-packages/quart/app.py", line 1535, in dispatch_request

Jun 20 10:07:30

^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Jun 20 10:07:30

result = await self.dispatch_request(request_context)

Jun 20 10:07:30

File "/opt/venv/lib/python3.11/site-packages/quart/app.py", line 1439, in full_dispatch_request

Jun 20 10:07:30

raise error

Jun 20 10:07:30

^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Jun 20 10:07:30

^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Jun 20 10:07:30

Traceback (most recent call last):

Jun 20 10:07:30

Exception: Connection closed while reading from the driver

Jun 20 10:07:30

File "/app/browserless_scraper.py", line 10, in browserless_scraper

Jun 20 10:07:30

File "/app/webserver.py", line 72, in browserless_scraper_job

Jun 20 10:07:30

await browserless_scraper_job()

Jun 20 10:07:30

return await self.ensure_async(handler)(**request_.view_args) # type: ignore

Jun 20 10:07:30

File "/opt/venv/lib/python3.11/site-packages/quart/app.py", line 1029, in handle_user_exception

Jun 20 10:07:30

result = await self.handle_user_exception(error)

Jun 20 10:07:30

File "/opt/venv/lib/python3.11/site-packages/quart/app.py", line 1441, in full_dispatch_request

Jun 20 10:07:30

return await self.full_dispatch_request(request_context)

Jun 20 10:07:30

File "/opt/venv/lib/python3.11/site-packages/quart/app.py", line 1403, in handle_request

Jun 20 10:07:30

File "/opt/venv/lib/python3.11/site-packages/playwright/async_api/_context_manager.py", line 46, in aenter

This is the railway.json:

{
  "$schema": "https://railway.app/railway.schema.json",
  "build": {
    "nixpacksVersion": "1.24.1",
    "builder": "NIXPACKS",
    "buildCommand": "pip install -r requirements.txt"
  },
  "deploy": {
    "region": "europe-west4",
    "runtime": "V2",
    "numReplicas": 1,
    "startCommand": "hypercorn webserver:app --bind 0.0.0.0:$PORT",
    "sleepApplication": false,
    "restartPolicyType": "ON_FAILURE",
    "restartPolicyMaxRetries": 10
  }
}

Requirements:

APScheduler==3.10.3
cryptography==41.0.3
itsdangerous==2.1.2
quart==0.19.6
mysql-connector-python
bcrypt
Requests==2.31.0
hypercorn==0.17.3
quart_cors
playwright==1.44.0
beautifulsoup4==4.12.2

8 Replies

brody
EMPLOYEE

a year ago

I'll attack the low hanging fruit, please remove the redundant pip install from your build command.


aurelius0180
PROOP

a year ago

Yes. Sorry about that. It came from a previous advice to user Docker to build the installation.


brody
EMPLOYEE

a year ago

Please attach your build and deploy logs -

https://bookmarklets.up.railway.app/log-downloader/


unaiarambarri
PRO

a year ago

Hi, we are having exactly the same problem as you. Just the same lines of error. Some days ago this was working correctly. Greetings.


brody
EMPLOYEE

a year ago

I am unable to help without the build and deploy logs, please open your own post and provide them.


unaiarambarri
PRO

a year ago

Thanks for your reply.


jake
EMPLOYEE

a year ago

Closing this thread as we have not heard back from the original poster

Please re-open another thread if needed


Status changed to Solved Railway over 1 year ago


unaiarambarri

Thanks for your reply.

leolmz59
HOBBY

7 months ago

hi unaiarambarri !
Have you been able to solve your issue ? I'm encountering the same one


Status changed to Open Railway 7 months ago


Loading...