Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Target page, context or browser has been closed #68

Open
revmischa opened this issue Mar 9, 2023 · 3 comments
Open

Target page, context or browser has been closed #68

revmischa opened this issue Mar 9, 2023 · 3 comments

Comments

@revmischa
Copy link

I am following the example, creating a browser with await playwright.launchChromium({}) and then creating a context and context.newPage.

I always get this error: "Target page, context or browser has been closed"

@revmischa
Copy link
Author

revmischa commented Mar 9, 2023

I also may get:

Browser closed.\n==================== Browser output: ====================\n<launching> /tmp/chromium --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 --allow-pre-commit-input --disable-hang-monitor --disable-ipc-flooding-protection --disable-popup-blocking --disable-prompt-on-repost --disable-renderer-backgrounding --disable-sync --force-color-profile=srgb --metrics-recording-only --no-first-run --enable-automation --password-store=basic --use-mock-keychain --no-service-autorun --export-tagged-pdf --headless --hide-scrollbars --mute-audio --blink-settings=primaryHoverType=2,availableHoverTypes=2,primaryPointerType=4,availablePointerTypes=4 --no-sandbox --autoplay-policy=user-gesture-required --disable-background-networking --disable-background-timer-throttling --disable-backgrounding-occluded-windows --disable-breakpad --disable-client-side-phishing-detection --disable-component-update --disable-default-apps --disable-dev-shm-usage --disable-domain-reliability --disable-extensions --disable-features=AudioServiceOutOfProcess --disable-hang-monitor --disable-ipc-flooding-protection --disable-notifications --disable-offer-store-unmasked-wallet-cards --disable-popup-blocking --disable-print-preview --disable-prompt-on-repost --disable-renderer-backgrounding --disable-setuid-sandbox --disable-speech-api --disable-sync --disk-cache-size=33554432 --hide-scrollbars --ignore-gpu-blacklist --metrics-recording-only --mute-audio --no-default-browser-check --no-first-run --no-pings --no-sandbox --no-zygote --password-store=basic --use-gl=swiftshader --use-mock-keychain --single-process --user-data-dir=/tmp/playwright_chromiumdev_profile-Q1h8DH --remote-debugging-pipe --no-startup-window\n<launched> pid=23\n[pid=23][err] [0309/042900.036698:WARNING:resource_bundle.cc(435)] locale_file_path.empty() for locale \n[pid=23][err] [0309/042902.056401:FATAL:render_process_host_impl.cc(4397)] Check failed: render_process_host->InSameStoragePartition( BrowserContext::GetStoragePartition(browser_context, site_instance, false )). \n[pid=23][err] #0 0x561935585b29 (/tmp/chromium+0x48e4b28)\n[pid=23][err] #1 0x5619354f5173 (/tmp/chromium+0x4854172)\n[pid=23][err] #2 0x561935505d25 (/tmp/chromium+0x4864d24)\n[pid=23][err] #3 0x5619345afc78 (/tmp/chromium+0x390ec77)\n[pid=23][err] #4 0x56193468508d (/tmp/chromium+0x39e408c)\n[pid=23][err] #5 0x56193441728b (/tmp/chromium+0x377628a)\n[pid=23][err] #6 0x5619344171b6 (/tmp/chromium+0x37761b5)\n[pid=23][err] #7 0x5619346c9d21 (/tmp/chromium+0x3a28d20)\n[pid=23][err] #8 0x5619346beec4 (/tmp/chromium+0x3a1dec3)\n[pid=23][err] #9 0x5619346bebc4 (/tmp/chromium+0x3a1dbc3)\n[pid=23][err] #10 0x561936c39ba9 (/tmp/chromium+0x5f98ba8)\n[pid=23][err] #11 0x56193567f287 (/tmp/chromium+0x49de286)\n[pid=23][err] #12 0x561936c45c8a (/tmp/chromium+0x5fa4c89)\n[pid=23][err] #13 0x561936c45e09 (/tmp/chromium+0x5fa4e08)\n[pid=23][err] #14 0x561933af5b2d (/tmp/chromium+0x2e54b2c)\n[pid=23][err] #15 0x561933af1db8 (/tmp/chromium+0x2e50db7)\n[pid=23][err] #16 0x561934f249b3 (/tmp/chromium+0x42839b2)\n[pid=23][err] #17 0x561936c442f8 (/tmp/chromium+0x5fa32f7)\n[pid=23][err] #18 0x561936c43598 (/tmp/chromium+0x5fa2597)\n[pid=23][err] #19 0x56193431f6ae (/tmp/chromium+0x367e6ad)\n[pid=23][err] #20 0x56193431f2b6 (/tmp/chromium+0x367e2b5)\n[pid=23][err] #21 0x56193431b780 (/tmp/chromium+0x367a77f)\n[pid=23][err] #22 0x561935534eeb (/tmp/chromium+0x4893eea)\n[pid=23][err] #23 0x56193554582e (/tmp/chromium+0x48a482d)\n[pid=23][err] #24 0x5619355455c0 (/tmp/chromium+0x48a45bf)\n[pid=23][err] #25 0x5619355a0629 (/tmp/chromium+0x48ff628)\n[pid=23][err] #26 0x561935545db5 (/tmp/chromium+0x48a4db4)\n[pid=23][err] #27 0x561935522dae (/tmp/chromium+0x4881dad)\n[pid=23][err] #28 0x56193429fdd4 (/tmp/chromium+0x35fedd3)\n[pid=23][err] #29 0x5619342a17d2 (/tmp/chromium+0x36007d1)\n[pid=23][err] #30 0x561936c41fc6 (/tmp/chromium+0x5fa0fc5)\n[pid=23][err] #31 0x561935498794 (/tmp/chromium+0x47f7793)\n[pid=23][err] #32 0x561935498417 (/tmp/chromium+0x47f7416)\n[pid=23][err] #33 0x561936a92641 (/tmp/chromium+0x5df1640)\n[pid=23][err] #34 0x561935491801 (/tmp/chromium+0x47f0800)\n[pid=23][err] #35 0x5619354f149d (/tmp/chromium+0x485049c)\n[pid=23][err] #36 0x5619354f11bc (/tmp/chromium+0x48501bb)\n[pid=23][err] #37 0x7f0e9ca2b13a __libc_start_main\n[pid=23][err] #38 0x56193367ba2a _start\n[pid=23][err] Task trace:\n[pid=23][err] #0 0x56193431b3cc (/tmp/chromium+0x367a3cb)\n[pid=23][err] #1 0x56193431b05c (/tmp/chromium+0x367a05b)\n[pid=23][err] \n[pid=23][err] Received signal 6\n[pid=23][err] #0 0x561935585b29 (/tmp/chromium+0x48e4b28)\n[pid=23][err] #1 0x5619354f5173 (/tmp/chromium+0x4854172)\n[pid=23][err] #2 0x5619355856c5 (/tmp/chromium+0x48e46c4)\n[pid=23][err] #3 0x7f0e9d7638e0 (/usr/lib64/libpthread-2.26.so+0x118df)\n[pid=23][err] #4 0x7f0e9ca3dca0 __GI_raise\n[pid=23][err] #5 0x7f0e9ca3f148 __GI_abort\n[pid=23][err] #6 0x561935584625 (/tmp/chromium+0x48e3624)\n[pid=23][err] #7 0x5619355061c2 (/tmp/chromium+0x48651c1)\n[pid=23][err] #8 0x5619345afc78 (/tmp/chromium+0x390ec77)\n[pid=23][err] #9 0x56193468508d (/tmp/chromium+0x39e408c)\n[pid=23][err] #10 0x56193441728b (/tmp/chromium+0x377628a)\n[pid=23][err] #11 0x5619344171b6 (/tmp/chromium+0x37761b5)\n[pid=23][err] #12 0x5619346c9d21 (/tmp/chromium+0x3a28d20)\n[pid=23][err] #13 0x5619346beec4 (/tmp/chromium+0x3a1dec3)\n[pid=23][err] #14 0x5619346bebc4 (/tmp/chromium+0x3a1dbc3)\n[pid=23][err] #15 0x561936c39ba9 (/tmp/chromium+0x5f98ba8)\n[pid=23][err] #16 0x56193567f287 (/tmp/chromium+0x49de286)\n[pid=23][err] #17 0x561936c45c8a (/tmp/chromium+0x5fa4c89)\n[pid=23][err] #18 0x561936c45e09 (/tmp/chromium+0x5fa4e08)\n[pid=23][err] #19 0x561933af5b2d (/tmp/chromium+0x2e54b2c)\n[pid=23][err] #20 0x561933af1db8 (/tmp/chromium+0x2e50db7)\n[pid=23][err] #21 0x561934f249b3 (/tmp/chromium+0x42839b2)\n[pid=23][err] #22 0x561936c442f8 (/tmp/chromium+0x5fa32f7)\n[pid=23][err] #23 0x561936c43598 (/tmp/chromium+0x5fa2597)\n[pid=23][err] #24 0x56193431f6ae (/tmp/chromium+0x367e6ad)\n[pid=23][err] #25 0x56193431f2b6 (/tmp/chromium+0x367e2b5)\n[pid=23][err] #26 0x56193431b780 (/tmp/chromium+0x367a77f)\n[pid=23][err] #27 0x561935534eeb (/tmp/chromium+0x4893eea)\n[pid=23][err] #28 0x56193554582e (/tmp/chromium+0x48a482d)\n[pid=23][err] #29 0x5619355455c0 (/tmp/chromium+0x48a45bf)\n[pid=23][err] #30 0x5619355a0629 (/tmp/chromium+0x48ff628)\n[pid=23][err] #31 0x561935545db5 (/tmp/chromium+0x48a4db4)\n[pid=23][err] #32 0x561935522dae (/tmp/chromium+0x4881dad)\n[pid=23][err] #33 0x56193429fdd4 (/tmp/chromium+0x35fedd3)\n[pid=23][err] #34 0x5619342a17d2 (/tmp/chromium+0x36007d1)\n[pid=23][err] #35 0x561936c41fc6 (/tmp/chromium+0x5fa0fc5)\n[pid=23][err] #36 0x561935498794 (/tmp/chromium+0x47f7793)\n[pid=23][err] #37 0x561935498417 (/tmp/chromium+0x47f7416)\n[pid=23][err] #38 0x561936a92641 (/tmp/chromium+0x5df1640)\n[pid=23][err] #39 0x561935491801 (/tmp/chromium+0x47f0800)\n[pid=23][err] #40 0x5619354f149d (/tmp/chromium+0x485049c)\n[pid=23][err] #41 0x5619354f11bc (/tmp/chromium+0x48501bb)\n[pid=23][err] #42 0x7f0e9ca2b13a __libc_start_main\n[pid=23][err] #43 0x56193367ba2a _start\n[pid=23][err] r8: 0000000000000000 r9: 00007ffe2ae49400 r10: 0000000000000008 r11: 0000000000000246\n[pid=23][err] r12: 00007ffe2ae4a7e0 r13: 00007ffe2ae496a0 r14: 00007ffe2ae4a7e8 r15: aaaaaaaaaaaaaaaa\n[pid=23][err] di: 0000000000000002 si: 00007ffe2ae49400 bp: 00007ffe2ae49650 bx: 0000000000000006\n[pid=23][err] dx: 0000000000000000 ax: 0000000000000000 cx: 00007f0e9ca3dca0 sp: 00007ffe2ae49400\n[pid=23][err] ip: 00007f0e9ca3dca0 efl: 0000000000000246 cgf: 002b000000000033 erf: 0000000000000000\n[pid=23][err] trp: 0000000000000000 msk: 0000000000000000 cr2: 0000000000000000\n[pid=23][err] [end of stack trace]\n[pid=23][err] Calling _exit(1). Core file will not be generated.

@revmischa
Copy link
Author

Probably related: microsoft/playwright-python#1453

@BenBlack95
Copy link

BenBlack95 commented Dec 15, 2023

I started receiving this error today while running my lambda function locally using sam local invoke (reproduced it using code example found in Readme). Running in AWS still works fine. There must have been a change to the docker image used to run the function locally that started triggering this error...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants