Closed navneetyubi closed 1 year ago
Same happens when I try to run codegen command: mvn exec:java -e -D exec.mainClass=com.microsoft.playwright.CLI -D exec.args="codegen wikipedia.org"
Chromium 112.0.5615.29 (playwright build v1055) downloaded to /Users/navneetsingh.patel/Library/Caches/ms-playwright/chromium-1055
navneetsingh.patel@CALTM00678 CollectionsUIAutomation % mvn exec:java -e -D exec.mainClass=com.microsoft.playwright.CLI -D exec.args="codegen wikipedia.org"
[INFO] Error stacktraces are turned on.
[INFO] Scanning for projects...
[INFO]
[INFO] ----------------< org.example:CollectionsUIAutomation >-----------------
[INFO] Building CollectionsUIAutomation 1.0-SNAPSHOT
[INFO] from pom.xml
[INFO] --------------------------------[ jar ]---------------------------------
[INFO]
[INFO] --- exec:3.1.0:java (default-cli) @ CollectionsUIAutomation ---
[Error: Browser closed.
==================== Browser output: ====================
<launching> /Users/navneetsingh.patel/Library/Caches/ms-playwright/chromium-1055/chrome-mac/Chromium.app/Contents/MacOS/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 --enable-use-zoom-for-dsf=false --no-sandbox --user-data-dir=/var/folders/rm/km93m6b52h13w07mrr8q2xx80000gq/T/playwright_chromiumdev_profile-kWqDx8 --remote-debugging-pipe --no-startup-window
<launched> pid=26740
[pid=26740] <process did exit: exitCode=null, signal=SIGKILL>
[pid=26740] starting temporary directories cleanup
=========================== logs ===========================
<launching> /Users/navneetsingh.patel/Library/Caches/ms-playwright/chromium-1055/chrome-mac/Chromium.app/Contents/MacOS/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 --enable-use-zoom-for-dsf=false --no-sandbox --user-data-dir=/var/folders/rm/km93m6b52h13w07mrr8q2xx80000gq/T/playwright_chromiumdev_profile-kWqDx8 --remote-debugging-pipe --no-startup-window
<launched> pid=26740
[pid=26740] <process did exit: exitCode=null, signal=SIGKILL>
[pid=26740] starting temporary directories cleanup
============================================================]
and then chromium binary is deleted from it's download location
Playwright does not delete the binary like this. The browser should stay there after download. Most likely you have some antivirus software that removes the browser binaries under your feet while Playwright is running. You'll probably need to add that location to some allow list. See also this page in case you want to change the download location.
and then chromium binary is deleted from it's download location
Playwright does not delete the binary like this. The browser should stay there after download. Most likely you have some antivirus software that removes the browser binaries under your feet while Playwright is running. You'll probably need to add that location to some allow list. See also this page in case you want to change the download location.
Is that's the case I am not sure why it's not happening for other browser binary but only for chromium(All binary are stored in the same path). it Also doesn't happens when I do this by setting the channel to Chrome, it's only when I am using pure Chromium.
Is that's the case I am not sure why it's not happening for other browser binary but only for chromium(All binary are stored in the same path).
That's weird indeed. You can set a breakpoint at this line and check if the browser stays in the cache folder if you don't do anything. You can run with DEBUG=pw:install
environment variable to see a bit more details about the installation progress.
it Also doesn't happens when I do this by setting the channel to Chrome, it's only when I am using pure Chromium.
In case of Chrome channel Playwright uses preinstalled Google Chrome binary and does not install it automatically.
Closing for now since we were not able to reproduce, its probably caused by anti virus and the issue looks stale.
System info
Source code
Test file (self-contained)
POM.XML file (self-contained)
Steps
Expected Chromium browser should launch and code should start running.
Actual Chromium Binary gets downloaded if its not downloaded already then below error is shown in run console and then chromium binary is deleted from it's download location "/Users/navneetsingh.patel/Library/Caches/ms-playwright/chromium-1055/chrome-mac/"