Closed jtibbit closed 7 months ago
@jtibbit Thank you for the issue. It seems like something's wrong on your computer, so that it cannot run Chromium. Perhaps some corporate policies?
I'd recommend running with DEBUG=pw:browser
environment variable - maybe there's something useful in the logs.
DBEUG=pw:browser npx playwright test
That said, the chances that we can fix your environment are very slim.
Thanks for your response - I'll check to see if anything has been updated. Sorry!
Still getting this, but don't have steps for repro. :|
Seeing this issue as well for Playwright Chromium 1097
@dgozman - it is still persist. - https://github.com/microsoft/playwright/issues/29952
Reverting back to playwright version 1.39.0 which uses playwright chromium 1084 fixes the issue for me. I don't know why but would be nice to get this fixed. Not sure why this issue is closed everyone at my company is experiencing this.
Reverting back to playwright version 1.39.0 which uses playwright chromium 1084 fixes the issue for me. I don't know why but would be nice to get this fixed. Not sure why this issue is closed everyone at my company is experiencing this.
Re-opened issue
@kdevcse Would it be possible to:
DEBUG=pw:browser
env var and try to run a Playwright test? This should give some more debug output.This would help us a ton in order to get more debug output and debug this issue further since we have not seen many bug reports around this issue.
@kdevcse Would it be possible to:
- Set the
DEBUG=pw:browser
env var and try to run a Playwright test? This should give some more debug output.- Try to run Chromium manually, the location of the executable is reported when the error happens, alternatively its located around here: /Users/$USER/Library/Caches/ms-playwright/chromium-/chrome-mac/Chromium.app/
This would help us a ton in order to get more debug output and debug this issue further since we have not seen many bug reports around this issue.
Sure thing I've attached a debug log for a test here: debug.txt
I see now this issue is listed for MacOS, but we are currently seeing this issue with Windows (it's all we use here). But here are the logs I have for that I think. Let me know if this isn't the right file: debug.log
Note: This issue/error is seen whenever any of the members on my team update our repo to use the latest version of playwright.
This looks different to the original issue - do you mind uploading a self-contained minimal reproducible to GitHub where we could take a look? / run it locally? Does this happen for any new Playwright project or only in your specific repository?
This looks different to the original issue - do you mind uploading a self-contained minimal reproducible to GitHub where we could take a look? / run it locally? Does this happen for any new Playwright project or only in your specific repository?
I'm not sure what you mean by self-contained minimal reproducible to GitHub
but sure I don't mind at all! 😆Just let me know what you need. Whatever can help us get on the latest version again.
I haven't tried a new repo but it definitely happens on our specific repository. I've tried to hunt it down but the farthest I've been able to get is it's something specific with this version of chromium +playwright and the code.
yeah ideally something which we can git clone
, npm install
and do npx playwright test
to observe the error.
yeah ideally something which we can
git clone
,npm install
and donpx playwright test
to observe the error.
Oh hmm well it's a private repo. Not sure how quick I would be able to spin up something small and isolated. Is there anything I can run to help debug this issue?
Unfortunately not, besides the environment variable.
From what I can tell, it may be related to the APIRequestContext
being included in a wrapper class that is instantiated in the beforeAll()
and then referenced in a test. Is that a valid use case? It fails any time the APIRequestContext
's post
method is referenced within a test.
Sounds like a duplicate of https://github.com/microsoft/playwright/issues/29260
Sounds like a duplicate of https://github.com/microsoft/playwright/issues/29260
Hmmm yeah I think you're right actually
Folding into it
Seems like it's a caching issue. Just delete this directory /Users/myUser/Library/Caches/ms-playwright/
and try to run the test again. Works on my case.
I'm not convinced that this is a cache issue. /Users/myUser/Library/Caches/ms-playwright
seams to be where installed browsers are stored.
If I delete the ms-playwright
folder, then Chrome start when running playwright test --ui
as expected. However, this introduces a different error in the Playwright console:
Following this up by running npx playwright install
, adds the file which is missing in the error message from the Playwright console, but when trying to run playwright test --ui
I once again get this error message:
ProtocolError: Protocol error (Browser.getVersion): Internal server error, session closed.
at /Users/johnpersson/Sites/dotcom-web/node_modules/.pnpm/playwright-core@1.47.2/node_modules/playwright-core/lib/server/chromium/crConnection.js:135:16
at new Promise (<anonymous>)
at CRSession.send (/Users/johnpersson/Sites/dotcom-web/node_modules/.pnpm/playwright-core@1.47.2/node_modules/playwright-core/lib/server/chromium/crConnection.js:131:12)
at CRBrowser.connect (/Users/johnpersson/Sites/dotcom-web/node_modules/.pnpm/playwright-core@1.47.2/node_modules/playwright-core/lib/server/chromium/crBrowser.js:51:35)
at Chromium.connectToTransport (/Users/johnpersson/Sites/dotcom-web/node_modules/.pnpm/playwright-core@1.47.2/node_modules/playwright-core/lib/server/chromium/chromium.js:122:33)
at Chromium._innerLaunch (/Users/johnpersson/Sites/dotcom-web/node_modules/.pnpm/playwright-core@1.47.2/node_modules/playwright-core/lib/server/browserType.js:135:32)
at async Chromium._innerLaunchWithRetries (/Users/johnpersson/Sites/dotcom-web/node_modules/.pnpm/playwright-core@1.47.2/node_modules/playwright-core/lib/server/browserType.js:94:14)
at async /Users/johnpersson/Sites/dotcom-web/node_modules/.pnpm/playwright-core@1.47.2/node_modules/playwright-core/lib/server/browserType.js:84:23
at async ProgressController.run (/Users/johnpersson/Sites/dotcom-web/node_modules/.pnpm/playwright-core@1.47.2/node_modules/playwright-core/lib/server/progress.js:82:22)
at async Chromium.launchPersistentContext (/Users/johnpersson/Sites/dotcom-web/node_modules/.pnpm/playwright-core@1.47.2/node_modules/playwright-core/lib/server/browserType.js:79:21) {
type: 'closed',
method: 'Browser.getVersion',
logs: '\n' +
'<launching> /Users/johnpersson/Library/Caches/ms-playwright/chromium-1134/chrome-mac/Chromium.app/Contents/MacOS/Chromium --disable-field-trial-config --disable-background-networking --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,PlzDedicatedWorker --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 --password-store=basic --use-mock-keychain --no-service-autorun --export-tagged-pdf --disable-search-engine-choice-screen --unsafely-disable-devtools-self-xss-warnings --enable-use-zoom-for-dsf=false --no-sandbox --app=data:text/html, --window-size=1280,800 --test-type= --user-data-dir=/var/folders/sc/mlv705m92lz9m18pfdcwv8q00000gn/T/playwright_chromiumdev_profile-a7bsGa --remote-debugging-pipe about:blank\n' +
'<launched> pid=12824\n' +
'[pid=12824][err] Received signal 10 BUS_ADRALN 00000bad4007\n' +
'[pid=12824][err] [0x000125012b00]\n' +
'[pid=12824][err] [0x000125006474]\n' +
'[pid=12824][err] [0x000125012a50]\n' +
'[pid=12824][err] [0x000190ef8184]\n' +
'[pid=12824][err] [0x00019c64bfbc]\n' +
'[pid=12824][err] [0x00019c6440c8]\n' +
'[pid=12824][err] [0x00019c643e64]\n' +
'[pid=12824][err] [0x00019c6414fc]\n' +
'[pid=12824][err] [0x00019c640dc0]\n' +
'[pid=12824][err] [0x00019c640cdc]\n' +
'[pid=12824][err] [0x00019c640b84]\n' +
'[pid=12824][err] [0x000194bd7438]\n' +
'[pid=12824][err] [0x000194bd72c8]\n' +
'[pid=12824][err] [0x000194ced9f8]\n' +
'[pid=12824][err] [0x000194ced2bc]\n' +
'[pid=12824][err] [0x00012598c8c8]\n' +
'[pid=12824][err] [0x000123dcae80]\n' +
'[pid=12824][err] [0x000124a9a830]\n' +
'[pid=12824][err] [0x000120dbe250]\n' +
'[pid=12824][err] [0x000123145e34]\n' +
'[pid=12824][err] [0x00012313d2c0]\n' +
'[pid=12824][err] [0x0001230da5f8]\n' +
'[pid=12824][err] [0x000123352ac8]\n' +
'[pid=12824][err] [0x00012334790c]\n' +
'[pid=12824][err] [0x00012a0fa150]\n' +
'[pid=12824][err] [0x00012a0f92f8]\n' +
'[pid=12824][err] [0x00012a6f9bdc]\n' +
'[pid=12824][err] [0x00012a6f9fb0]\n' +
'[pid=12824][err] [0x00012a14282c]\n' +
'[pid=12824][err] [0x00012a141bb8]\n' +
'[pid=12824][err] [0x000124a95058]\n' +
'[pid=12824][err] [0x000124a9485c]\n' +
'[pid=12824][err] [0x000122d13a7c]\n' +
'[pid=12824][err] [0x000123305d38]\n' +
'[pid=12824][err] [0x000122d13728]\n' +
'[pid=12824][err] [0x000122d15d4c]\n' +
'[pid=12824][err] [0x000122d11f88]\n' +
'[pid=12824][err] [0x0001244b52e4]\n' +
'[pid=12824][err] [0x0001244b6594]\n' +
'[pid=12824][err] [0x0001244b61b0]\n' +
'[pid=12824][err] [0x0001244b4934]\n' +
'[pid=12824][err] [0x0001244b4d44]\n' +
'[pid=12824][err] [0x000120805430]\n' +
'[pid=12824][err] [0x000104b68a28]\n' +
'[pid=12824][err] [0x000190b40274]\n' +
'[pid=12824][err] [end of stack trace]\n' +
'[pid=12824][err] [1016/151511.984937:WARNING:crash_report_exception_handler.cc(235)] UniversalExceptionRaise: (os/kern) failure (5)\n' +
'[pid=12824][err] [12833:259:1016/151511.986578:ERROR:shared_memory_switch.cc(244)] Mach rendezvous failed, terminating process (parent died?)\n' +
'[pid=12824][err] [12835:259:1016/151511.986551:ERROR:shared_memory_switch.cc(244)] Mach rendezvous failed, terminating process (parent died?)\n' +
'[pid=12824][err] [12832:259:1016/151511.986568:ERROR:shared_memory_switch.cc(244)] Mach rendezvous failed, terminating process (parent died?)\n' +
'[pid=12824][err] [12834:259:1016/151511.986548:ERROR:shared_memory_switch.cc(244)] Mach rendezvous failed, terminating process (parent died?)'
}
ELIFECYCLE Command failed with exit code 1.
This started happening for me after I upgraded to Mac OS Sequoia 15.0.1 - deleting the cache directory as @smartoryu mentioned fixed it for me
@fullstackzach , I'm on Sequoia 15.0.1 as well. I haven't been using the UI command until now, so unfortunately I've got nothing to compare with. It makes me wonder if there's anything wrong with the Chromium binary (~//Library/Caches/ms-playwright/chromium-1134/chrome-mac/Chromium.app/Contents/MacOS/Chromium) under Sequoia, but on the other hand the tests are working when running without the ui flag.
Found the solution to my problem in this thread/comment: https://github.com/microsoft/playwright/issues/31064#issuecomment-2138905093
Version
1.41.2
Steps to reproduce
similar to issue https://github.com/microsoft/playwright/issues/28500
System info Playwright Version: 1.41.2 Operating System: Mac Node.js version: v20.3.0 Browser: Chromium Reproduces: always
Source code Just installed Playwright and I'm using the test files, haven't made any changes (demo-todo-app.spec.ts and example.spec.ts)
Steps When running
npx playwright test --ui
, I'm getting the following: ProtocolError: Protocol error (Browser.getVersion): Internal server error, session closed.When running
npx playwright test
, I'm getting errors on all Chromium test runs. Firefox and Webkit work fine.Expected behavior
Can use UI mode, tests pass in chrome
Actual behavior
`Error: browserType.launch: Target page, context or browser has been closed Browser logs: