Playwright stops working

ifeoluwaayoHOBBY

9 months ago

good day here, my telegram bot that uses playwright uusually stops working after 1 houur of development and gives the error:

Call log:

Jul 29 18:27:05

legalization-bot

- <launching> /root/.cache/ms-playwright/chromium-1124/chrome-linux/chrome --disable-field-trial-config --disable-background-networking --enable-features=NetworkService,NetworkServiceInProcess --disable-background-timer-throttling --disable-backgrounding-occluded-windows --disable-back-forward-cache --disable-breakpad --disable-client-side-phishing-detection --disable-component-extensions-with-background-pages --disable-component-update --no-default-browser-check --disable-default-apps --disable-dev-shm-usage --disable-extensions --disable-features=ImprovedCookieControls,LazyFrameLoading,GlobalMediaControls,DestroyProfileOnBrowserClose,MediaRouter,DialMediaRouteProvider,AcceptCHFrame,AutoExpandDetailsElement,CertificateTransparencyComponentUpdater,AvoidUnnecessaryBeforeUnloadCheckSync,Translate,HttpsUpgrades,PaintHolding --allow-pre-commit-input --disable-hang-monitor --disable-ipc-flooding-protection --disable-popup-blocking --disable-prompt-on-repost --disable-renderer-backgrounding --force-color-profile=srgb --metrics-recording-only --no-first-run --enable-automation --password-store=basic --use-mock-keychain --no-service-autorun --export-tagged-pdf --disable-search-engine-choice-screen --unsafely-disable-devtools-self-xss-warnings --headless --hide-scrollbars --mute-audio --blink-settings=primaryHoverType=2,availableHoverTypes=2,primaryPointerType=4,availablePointerTypes=4 --no-sandbox --user-data-dir=/tmp/playwright_chromiumdev_profile-SHPia8 --remote-debugging-pipe --no-startup-window

Jul 29 18:27:05

legalization-bot

- <launched> pid=30890

Jul 29 18:27:15

legalization-bot

[pid=30890][err] #16 0x7f4bd9175d90 (/usr/lib/x86_64-linux-gnu/libc.so.6+0x29d8f)

Jul 29 18:27:15

legalization-bot

[pid=30890][err] #17 0x7f4bd9175e40 __libc_start_main

Jul 29 18:27:15

legalization-bot

[pid=30890][err] #18 0x56422383002a _start

Jul 29 18:27:15

legalization-bot

[pid=30890][err]

5 Replies

9 months ago

Hello,

This looks like it's a result of not closing the browser instance.

I would recommend using browserless instead, browserless handles this for you.

Browserless template here - https://railway.app/template/browserless

And here's an example repo that shows you how to use Browserless with playwright - https://github.com/brody192/playwright-example


ifeoluwaayoHOBBY

9 months ago

pretty sure thats not the issue here because the same code is being ran on another service and doesn't give me this issue


9 months ago

Using browserless is going to be far more trouble free, and it removes the need to install a browser into the container! that means faster build and deploy times.


ifeoluwaayoHOBBY

9 months ago

unfortunatly, i dont have $200 to pay for it


9 months ago

Definitely not, check out the link I sent above, you can self host it on Railway!


Playwright stops working - Railway Help Station