playwright icon indicating copy to clipboard operation
playwright copied to clipboard

[BUG] Tests fail when run in Docker, error message "Target Closed"

Open eatonjl opened this issue 3 years ago • 9 comments

Context:

  • Playwright Version: 1.24.2
  • Operating System: Mac OS
  • Node.js version: 16.16.0
  • Browser: Webkit
  • Extra: Using Docker Playwright image

Describe the bug

When I run a certain set of dests with Webkit locally on my machine, they pass just fine. If, however, I run them in the Playwright Docker image, the tests will randomly fail with the error "Target Closed". I ran it with the debugger line, and this was the output. I would love if someone could take a look and see why running in the Docker image causes it to behave differently, or more information about what "target" closed" could mean.

Running 3 tests using 1 worker

  pw:browser <launching> /ms-playwright/chromium-1015/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-default-apps --disable-dev-shm-usage --disable-extensions --disable-features=ImprovedCookieControls,LazyFrameLoading,GlobalMediaControls,DestroyProfileOnBrowserClose,MediaRouter,DialMediaRouteProvider,AcceptCHFrame,AutoExpandDetailsElement,CertificateTransparencyComponentUpdater,AvoidUnnecessaryBeforeUnloadCheckSync --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 --user-data-dir=/tmp/playwright_chromiumdev_profile-1pAMGJ --remote-debugging-pipe --no-startup-window +0ms
  pw:browser <launched> pid=2950 +5ms
  pw:browser [pid=2950][err] [0804/154052.885702:ERROR:bus.cc(398)] Failed to connect to the bus: Failed to connect to socket /var/run/dbus/system_bus_socket: No such file or directory +47ms
  pw:browser [pid=2950][err] [0804/154052.885846:ERROR:bus.cc(398)] Failed to connect to the bus: Failed to connect to socket /var/run/dbus/system_bus_socket: No such file or directory +0ms
  pw:browser [pid=2950][err] [0804/154052.896239:WARNING:bluez_dbus_manager.cc(247)] Floss manager not present, cannot set Floss enable/disable. +10ms
  pw:browser [pid=2950][err] [0804/154052.903427:WARNING:sandbox_linux.cc(376)] InitializeSandbox() called with multiple threads in process gpu-process. +7ms
  pw:browser [pid=2950][err] [0804/154055.339251:ERROR:cert_issuer_source_aia.cc(134)] AiaRequest::OnFetchCompleted got error -301 +2s
  pw:browser [pid=2950][err] [0804/154055.340353:ERROR:cert_issuer_source_aia.cc(134)] AiaRequest::OnFetchCompleted got error -301 +1ms
  pw:browser [pid=2950][err] [0804/154055.340471:ERROR:cert_verify_proc_builtin.cc(690)] CertVerifyProcBuiltin for doorman.qa1.gw.navex-pe.com failed: +1ms
  pw:browser [pid=2950][err] ----- Certificate i=1 (CN=OBIWANDC,0.9.2342.19200300.100.1.25=#796F6461,0.9.2342.19200300.100.1.25=#6C6F63616C) ----- +1ms
  pw:browser [pid=2950][err] ERROR: No matching issuer found +6ms
  pw:browser [pid=2950][err]  +0ms
  pw:browser [pid=2950][err]  +0ms
  pw:browser [pid=2950][err] [0804/154055.343804:ERROR:ssl_client_socket_impl.cc(983)] handshake failed; returned -1, SSL error code 1, net_error -202 +0ms
  pw:browser [pid=2950][err] [0804/154055.425434:ERROR:ssl_client_socket_impl.cc(983)] handshake failed; returned -1, SSL error code 1, net_error -202 +75ms
  pw:browser [pid=2950][err] [0804/154056.429421:ERROR:cert_issuer_source_aia.cc(134)] AiaRequest::OnFetchCompleted got error -301 +1s
  pw:browser [pid=2950][err] [0804/154056.430818:ERROR:cert_issuer_source_aia.cc(134)] AiaRequest::OnFetchCompleted got error -301 +2ms
  pw:browser [pid=2950][err] [0804/154056.430917:ERROR:cert_verify_proc_builtin.cc(690)] CertVerifyProcBuiltin for id1.qa1.gw.navex-pe.com failed: +0ms
  pw:browser [pid=2950][err] ----- Certificate i=1 (CN=OBIWANDC,0.9.2342.19200300.100.1.25=#796F6461,0.9.2342.19200300.100.1.25=#6C6F63616C) ----- +0ms
  pw:browser [pid=2950][err] ERROR: No matching issuer found +7ms
  pw:browser [pid=2950][err]  +0ms
  pw:browser [pid=2950][err]  +0ms
  pw:browser [pid=2950][err] [0804/154056.432131:ERROR:ssl_client_socket_impl.cc(983)] handshake failed; returned -1, SSL error code 1, net_error -202 +4ms
  pw:browser [pid=2950][err] [0804/154056.535670:ERROR:ssl_client_socket_impl.cc(983)] handshake failed; returned -1, SSL error code 1, net_error -202 +99ms
  pw:browser [pid=2950] <gracefully close start> +8s
  pw:browser [pid=2950] <process did exit: exitCode=0, signal=null> +23ms
  pw:browser [pid=2950] starting temporary directories cleanup +0ms
  pw:browser [pid=2950] finished temporary directories cleanup +9ms
  pw:browser [pid=2950] <gracefully close end> +0ms
  ✘  [webkit] › e2etests/draftandcollaborationshould.spec.ts:37:2 › Draft Document › Save New Document (17s)
  pw:browser <launching> /ms-playwright/webkit-1683/pw_run.sh --inspector-pipe --headless --no-startup-window +0ms
  pw:browser <launched> pid=3462 +3ms
  pw:browser [pid=3462] <gracefully close start> +17s
  pw:browser [pid=3462] <process did exit: exitCode=0, signal=null> +11ms
  pw:browser [pid=3462] starting temporary directories cleanup +0ms
  pw:browser [pid=3462] finished temporary directories cleanup +25ms
  pw:browser [pid=3462] <gracefully close end> +0ms
  ✘  [webkit] › e2etests/draftandcollaborationshould.spec.ts:54:2 › Collaboration Document › Send Draft Document To Writers (15s)
  pw:browser <launching> /ms-playwright/webkit-1683/pw_run.sh --inspector-pipe --headless --no-startup-window +0ms
  pw:browser <launched> pid=4024 +2ms
  pw:browser [pid=4024] <gracefully close start> +16s
  pw:browser [pid=4024] <process did exit: exitCode=0, signal=null> +11ms
  pw:browser [pid=4024] starting temporary directories cleanup +0ms
  pw:browser [pid=4024] finished temporary directories cleanup +24ms
  pw:browser [pid=4024] <gracefully close end> +0ms
  ✘  [webkit] › e2etests/reviewandapprovalshould.spec.ts:41:2 › Review Document2 › Send Document To Review (35s)
  pw:browser <launching> /ms-playwright/webkit-1683/pw_run.sh --inspector-pipe --headless --no-startup-window +0ms
  pw:browser <launched> pid=4584 +3ms
  pw:browser [pid=4584] <gracefully close start> +35s
  pw:browser [pid=4584] <process did exit: exitCode=0, signal=null> +13ms
  pw:browser [pid=4584] starting temporary directories cleanup +0ms
  pw:browser [pid=4584] finished temporary directories cleanup +39ms
  pw:browser [pid=4584] <gracefully close end> +1ms


  1) [webkit] › e2etests/draftandcollaborationshould.spec.ts:37:2 › Draft Document › Save New Document 

    locator.click: Target closed
    =========================== logs ===========================
      waiting for frame "iframe[name="Frame_PPMPopupIFrame"]"
      selector resolved to visible <iframe tabindex="0" role="document" id="Frame_PPMPopupI…></iframe>
    waiting for selector "iframe[name="Frame_PPMPopupIFrame"] >> control=enter-frame >> id=DeleteToolbarButton"
    ============================================================

      19 | 	await policyTechDocumentPage.clickContentTopMenuMoreButton();
      20 | 	await policyTechDocumentPage.clickContentTopMenuArchiveButton();
    > 21 | 	await policyTechDocumentPage.clickContentArchiveConfirmationPopupYesButton();
         | 	                             ^
      22 | 	const policyTechSidebar = new PolicyTechSidebar(page);
      23 | 	await policyTechSidebar.clickSettingsAndToolsTab();
      24 | 	await policyTechSidebar.clickToolsSubTab();

        at PolicyTechDocumentPage.clickContentArchiveConfirmationPopupYesButton (/tests/tests/PageObjectModels/PolicyTech/ContentWindows/content.ts:111:55)
        at /tests/tests/e2etests/draftandcollaborationshould.spec.ts:21:31

    attachment #1: trace (application/zip) ---------------------------------------------------------
    test-results/e2etests-draftandcollaborationshould-Draft-Document-Save-New-Document-webkit/trace.zip
    Usage:

        npx playwright show-trace test-results/e2etests-draftandcollaborationshould-Draft-Document-Save-New-Document-webkit/trace.zip

    ------------------------------------------------------------------------------------------------

  2) [webkit] › e2etests/draftandcollaborationshould.spec.ts:54:2 › Collaboration Document › Send Draft Document To Writers 

    locator.check: Target closed
    =========================== logs ===========================
      waiting for frame "iframe[name="WizardPanelPropertiesEdit_Iframe"]"
      selector resolved to visible <iframe width="100%" height="100%" marginwidth="0" frame…></iframe>
      waiting for frame "#UserFinderFrame"
    ============================================================

      66 | 		await policyTechDocumentPage.clickContentPropertyWizardSaveButton();
      67 | 		await policyTechDocumentPage.clickPropertiesWizardWritersStepTab();
    > 68 | 		await policyTechDocumentPage.selectWriterCheckbox('One, Writer');
         | 		                             ^
      69 | 		await policyTechDocumentPage.clickSubmitToWritersButton();
      70 | 		await expect(
      71 | 			policyTechDocumentPage.successPopupText,

        at PolicyTechDocumentPage.selectWriterCheckbox (/tests/tests/PageObjectModels/PolicyTech/ContentWindows/content.ts:119:58)
        at /tests/tests/e2etests/draftandcollaborationshould.spec.ts:68:32

    attachment #1: trace (application/zip) ---------------------------------------------------------
    test-results/e2etests-draftandcollaborationshould-Collaboration-Document-Send-Draft-Document-To-Writers-webkit/trace.zip
    Usage:

        npx playwright show-trace test-results/e2etests-draftandcollaborationshould-Collaboration-Document-Send-Draft-Document-To-Writers-webkit/trace.zip

    ------------------------------------------------------------------------------------------------

  3) [webkit] › e2etests/reviewandapprovalshould.spec.ts:41:2 › Review Document2 › Send Document To Review 

    locator.click: Target closed
    =========================== logs ===========================
      waiting for frame "iframe[name="Frame_PPMPopupIFrame"]"
      selector resolved to visible <iframe tabindex="0" role="document" id="Frame_PPMPopupI…></iframe>
    waiting for selector "iframe[name="Frame_PPMPopupIFrame"] >> control=enter-frame >> id=SendToolbarButton"
      selector resolved to visible <input value="Save" type="button" id="SendToolbarButton…/>
    attempting click action
      waiting for element to be visible, enabled and stable
    ============================================================

      19 | 	await policyTechDocumentPage.clickContentTopMenuMoreButton();
      20 | 	await policyTechDocumentPage.clickSendToDraftButton();
    > 21 | 	await policyTechDocumentPage.clickSendToDraftSaveButton();
         | 	                             ^
      22 | 	await policyTechDocumentPage.clickResultsPopupOkButton();
      23 | 	await policyTechDocumentPage.clickContentTopMenuMoreButton();
      24 | 	await policyTechDocumentPage.clickContentTopMenuArchiveButton();

        at PolicyTechDocumentPage.clickSendToDraftSaveButton (/tests/tests/PageObjectModels/PolicyTech/ContentWindows/content.ts:155:36)
        at /tests/tests/e2etests/reviewandapprovalshould.spec.ts:21:31

    attachment #1: trace (application/zip) ---------------------------------------------------------
    test-results/e2etests-reviewandapprovalshould-Review-Document2-Send-Document-To-Review-webkit/trace.zip
    Usage:

        npx playwright show-trace test-results/e2etests-reviewandapprovalshould-Review-Document2-Send-Document-To-Review-webkit/trace.zip

    ------------------------------------------------------------------------------------------------

  Slow test file: [webkit] › e2etests/reviewandapprovalshould.spec.ts (35s)
  Slow test file: [webkit] › e2etests/draftandcollaborationshould.spec.ts (32s)
  Consider splitting slow test files to speed up parallel execution

  3 failed
    [webkit] › e2etests/draftandcollaborationshould.spec.ts:37:2 › Draft Document › Save New Document 
    [webkit] › e2etests/draftandcollaborationshould.spec.ts:54:2 › Collaboration Document › Send Draft Document To Writers 
    [webkit] › e2etests/reviewandapprovalshould.spec.ts:41:2 › Review Document2 › Send Document To Review 

eatonjl avatar Aug 04 '22 15:08 eatonjl

Could you share a repro with us? Usually this means that you have missing awaits somewhere.

To find out what somewhere is, its usually the first line of the exception, in your case click and check.

mxschmitt avatar Aug 04 '22 16:08 mxschmitt

@mxschmitt I will work on getting you something here shortly. To your guess on the missing awaits, wouldn't that also cause the same issue when running locally? And why would it only occur with Webkit in the Docker image?

eatonjl avatar Aug 04 '22 16:08 eatonjl

I cannot share a repo, but I can send you the test files along with the login and URL you will need. Would that work? I assume I will need to send it through email like I did with this issue, correct?

eatonjl avatar Aug 04 '22 17:08 eatonjl

wouldn't that also cause the same issue when running locally?

not always, could be timing, cpu load etc. depended.

Sure, but I'd recommend to use e.g. this ESLint rule to find out if you have a missing await somewhere. We're not here for finding missing awaits in big codebases.

And take a look what's done inside selectWriterCheckbox etc. to find out the clicks.

mxschmitt avatar Aug 05 '22 10:08 mxschmitt

@mxschmitt I have gone through the code previously to check for missing awaits. I haven't found any. I would be shocked is a missing await would be problematic on in Docker and only when using Webkit. Inside the selectWriterCheckbox is this simple code:

	async selectWriterCheckbox(writersName: string) {
		await this.propertiesWizardWriterCheckbox(writersName).check();
	}

Which references this locator: readonly propertiesWizardWriterCheckbox: (writersName: string) => Locator;

The code I am using is not too big. In fact, some tests are as simple as going to a URL and then checking that it is the same URL (meaning it did not redirect) and that the expected page title is there. It doesn't actually interact with the page at all. Even those are having issues in Docker using Webkit.

I will do another check for missing awaits before I send you anything, just to make sure. I will replay here if I didn't find anything so I can get direction to where you want the code sent.

eatonjl avatar Aug 05 '22 12:08 eatonjl

I installed TypeScript ESLint (TSLint has been deprecated as of 2019) and ran it. I had a few errors and several warnings. edit - I didn't read your comment about the ESLint rule well enough before posting this comment with the line above. Looking into that more now. The errors were mostly with using "array" where I shouldn't and an instance of using mixed tabs and spaces. I fixed all the errors and the warnings that were left related to using non-null assertions and unused variables. I actually tried removing an await to see if it would catch that, but it didn't. I am going to play around with it some more to see if I can get that detection to work. In the meantime, I re-ran the tests with those errors fixed, but received similar results (at times, getting " page.reload: Navigation failed because page crashed!" errors as well).

eatonjl avatar Aug 05 '22 13:08 eatonjl

page.reload: Navigation failed because page crashed!" errors as well).

This sounds like a browser crash which we can fix most likely on our side.

For that we need a repro or DEBUG=pw:browser logs to first find out if its a browser crash.

You can also send it to me over Slack or email: maxschmitt@ M i c r o s o f t..c0m (replace 0 with o and remove the spaces etc)

mxschmitt avatar Aug 08 '22 08:08 mxschmitt

When I ran it this time I got "Target Closed" and "Target Crashed". I am pasting the log below. If I can get it to show "page.reload: Navigation failed because page crashed!" again I will paste that in here as well:

Running 3 tests using 1 worker

  pw:browser <launching> /ms-playwright/chromium-1015/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-default-apps --disable-dev-shm-usage --disable-extensions --disable-features=ImprovedCookieControls,LazyFrameLoading,GlobalMediaControls,DestroyProfileOnBrowserClose,MediaRouter,DialMediaRouteProvider,AcceptCHFrame,AutoExpandDetailsElement,CertificateTransparencyComponentUpdater,AvoidUnnecessaryBeforeUnloadCheckSync --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 --user-data-dir=/tmp/playwright_chromiumdev_profile-iLTAYO --remote-debugging-pipe --no-startup-window +0ms
  pw:browser <launched> pid=121 +4ms
  pw:browser [pid=121][err] [0808/132056.778020:ERROR:bus.cc(398)] Failed to connect to the bus: Failed to connect to socket /var/run/dbus/system_bus_socket: No such file or directory +185ms
  pw:browser [pid=121][err] [0808/132056.778717:ERROR:bus.cc(398)] Failed to connect to the bus: Failed to connect to socket /var/run/dbus/system_bus_socket: No such file or directory +0ms
  pw:browser [pid=121][err] [0808/132056.818353:WARNING:bluez_dbus_manager.cc(247)] Floss manager not present, cannot set Floss enable/disable. +39ms
  pw:browser [pid=121][err] [0808/132056.847698:WARNING:sandbox_linux.cc(376)] InitializeSandbox() called with multiple threads in process gpu-process. +31ms
  pw:browser [pid=121][err] [0808/132101.093158:ERROR:cert_issuer_source_aia.cc(134)] AiaRequest::OnFetchCompleted got error -301 +4s
  pw:browser [pid=121][err] [0808/132101.093276:ERROR:cert_issuer_source_aia.cc(134)] AiaRequest::OnFetchCompleted got error -301 +1ms
  pw:browser [pid=121][err] [0808/132101.093336:ERROR:cert_verify_proc_builtin.cc(690)] CertVerifyProcBuiltin for doorman.qa1.gw.navex-pe.com failed: +2ms
  pw:browser [pid=121][err] ----- Certificate i=1 (CN=OBIWANDC,0.9.2342.19200300.100.1.25=#796F6461,0.9.2342.19200300.100.1.25=#6C6F63616C) ----- +0ms
  pw:browser [pid=121][err] ERROR: No matching issuer found +0ms
  pw:browser [pid=121][err]  +2ms
  pw:browser [pid=121][err]  +0ms
  pw:browser [pid=121][err] [0808/132101.098452:ERROR:ssl_client_socket_impl.cc(983)] handshake failed; returned -1, SSL error code 1, net_error -202 +1ms
  pw:browser [pid=121][err] [0808/132101.901798:ERROR:cert_issuer_source_aia.cc(134)] AiaRequest::OnFetchCompleted got error -301 +804ms
  pw:browser [pid=121][err] [0808/132101.902797:ERROR:cert_issuer_source_aia.cc(134)] AiaRequest::OnFetchCompleted got error -301 +1ms
  pw:browser [pid=121][err] [0808/132101.902889:ERROR:cert_verify_proc_builtin.cc(690)] CertVerifyProcBuiltin for id1.qa1.gw.navex-pe.com failed: +1ms
  pw:browser [pid=121][err] ----- Certificate i=1 (CN=OBIWANDC,0.9.2342.19200300.100.1.25=#796F6461,0.9.2342.19200300.100.1.25=#6C6F63616C) ----- +0ms
  pw:browser [pid=121][err] ERROR: No matching issuer found +0ms
  pw:browser [pid=121][err]  +0ms
  pw:browser [pid=121][err]  +0ms
  pw:browser [pid=121][err] [0808/132101.904354:ERROR:ssl_client_socket_impl.cc(983)] handshake failed; returned -1, SSL error code 1, net_error -202 +0ms
  pw:browser [pid=121] <gracefully close start> +8s
  pw:browser [pid=121] <process did exit: exitCode=0, signal=null> +29ms
  pw:browser [pid=121] starting temporary directories cleanup +0ms
  pw:browser [pid=121] finished temporary directories cleanup +9ms
  pw:browser [pid=121] <gracefully close end> +0ms
     [webkit] › e2etests/draftandcollaborationshould.spec.ts:37:2 › Draft Document › Save New Document
  ✘  [webkit] › e2etests/draftandcollaborationshould.spec.ts:37:2 › Draft Document › Save New Document (22s)
  pw:browser <launched> pid=631 +4ms
  pw:browser [pid=631][err]  +191ms
  pw:browser [pid=631][err] (gst-plugin-scanner:639): GStreamer-WARNING **: 13:21:12.133: Failed to load plugin '/usr/lib/aarch64-linux-gnu/gstreamer-1.0/libgstlibav.so': /lib/aarch64-linux-gnu/libgomp.so.1: cannot allocate memory in static TLS block +0ms
  pw:browser [pid=631][err]  +19s
  pw:browser [pid=631][err] (WPEWebProcess:701): WPE-FDO-WARNING **: 13:21:30.973: Failed to send message 67 to socket: Error sending data: Broken pipe +0ms
  pw:browser [pid=631] <gracefully close start> +4s
  pw:browser [pid=631] <process did exit: exitCode=0, signal=null> +9ms
  pw:browser [pid=631] starting temporary directories cleanup +0ms
  pw:browser [pid=631] finished temporary directories cleanup +31ms
  pw:browser [pid=631] <gracefully close end> +0ms
  ✘  [webkit] › e2etests/draftandcollaborationshould.spec.ts:54:2 › Collaboration Document › Send Draft Document To Writers (25s)
  pw:browser <launching> /ms-playwright/webkit-1683/pw_run.sh --inspector-pipe --headless --no-startup-window +0ms
  pw:browser <launched> pid=1199 +3ms
  pw:browser [pid=1199] <gracefully close start> +25s
  pw:browser [pid=1199] <process did exit: exitCode=0, signal=null> +10ms
  pw:browser [pid=1199] starting temporary directories cleanup +1ms
  pw:browser [pid=1199] finished temporary directories cleanup +31ms
  pw:browser [pid=1199] <gracefully close end> +0ms
  ✘  [webkit] › e2etests/reviewandapprovalshould.spec.ts:41:2 › Review Document2 › Send Document To Review (51s)
  pw:browser <launching> /ms-playwright/webkit-1683/pw_run.sh --inspector-pipe --headless --no-startup-window +0ms
  pw:browser <launched> pid=1767 +3ms
  pw:browser [pid=1767][err]  +47s
  pw:browser [pid=1767][err] (WPEWebProcess:1836): WPE-FDO-WARNING **: 13:22:50.753: Failed to send message 67 to socket: Error sending data: Broken pipe +1ms
  pw:browser [pid=1767] <gracefully close start> +5s
  pw:browser [pid=1767] <process did exit: exitCode=0, signal=null> +13ms
  pw:browser [pid=1767] starting temporary directories cleanup +0ms
  pw:browser [pid=1767] finished temporary directories cleanup +67ms
  pw:browser [pid=1767] <gracefully close end> +0ms


  1) [webkit] › e2etests/draftandcollaborationshould.spec.ts:37:2 › Draft Document › Save New Document 

    locator.click: Target closed
    =========================== logs ===========================
    waiting for selector "id=Archive_Types_Button"
      selector resolved to visible <button type="button" role="button" id="Archive_Types_Bu…>…</button>
    attempting click action
      waiting for element to be visible, enabled and stable
    ============================================================

      25 | 	await policyTechSidebar.clickArchiveSubTab();
      26 | 	const policyTechArchive = new PolicyTechSettingsAndToolsToolsArchive(page);
    > 27 | 	await policyTechArchive.clickChooseArchiveTypeButton();
         | 	                        ^
      28 | 	await policyTechArchive.clickDocumentsUnpublishedButton();
      29 | 	await policyTechArchive.clickArchiveTypeSelectorPopupOkButton();
      30 | 	await policyTechArchive.checkSelectAllCheckbox();

        at PolicyTechSettingsAndToolsToolsArchive.clickChooseArchiveTypeButton (/tests/tests/PageObjectModels/PolicyTech/MainWindow/SettingsAndTools/Tools/archive.ts:33:38)
        at /tests/tests/e2etests/draftandcollaborationshould.spec.ts:27:26

    attachment #1: trace (application/zip) ---------------------------------------------------------
    test-results/e2etests-draftandcollaborationshould-Draft-Document-Save-New-Document-webkit/trace.zip
    Usage:

        npx playwright show-trace test-results/e2etests-draftandcollaborationshould-Draft-Document-Save-New-Document-webkit/trace.zip

    ------------------------------------------------------------------------------------------------

  2) [webkit] › e2etests/draftandcollaborationshould.spec.ts:54:2 › Collaboration Document › Send Draft Document To Writers 

    locator.click: Target crashed
    =========================== logs ===========================
    waiting for selector "id=SideBar_SystemSettings_Tools"
      selector resolved to visible <a role="button" target="_self" aria-expanded="fals…>…</a>
    attempting click action
      waiting for element to be visible, enabled and stable
        element is not stable - waiting...
      element is visible, enabled and stable
      scrolling into view if needed
    ============================================================

      22 | 	const policyTechSidebar = new PolicyTechSidebar(page);
      23 | 	await policyTechSidebar.clickSettingsAndToolsTab();
    > 24 | 	await policyTechSidebar.clickToolsSubTab();
         | 	                        ^
      25 | 	await policyTechSidebar.clickArchiveSubTab();
      26 | 	const policyTechArchive = new PolicyTechSettingsAndToolsToolsArchive(page);
      27 | 	await policyTechArchive.clickChooseArchiveTypeButton();

        at PolicyTechSidebar.clickToolsSubTab (/tests/tests/PageObjectModels/PolicyTech/MainWindow/sidebar.ts:42:28)
        at /tests/tests/e2etests/draftandcollaborationshould.spec.ts:24:26

    attachment #1: trace (application/zip) ---------------------------------------------------------
    test-results/e2etests-draftandcollaborationshould-Collaboration-Document-Send-Draft-Document-To-Writers-webkit/trace.zip
    Usage:

        npx playwright show-trace test-results/e2etests-draftandcollaborationshould-Collaboration-Document-Send-Draft-Document-To-Writers-webkit/trace.zip

    ------------------------------------------------------------------------------------------------

  3) [webkit] › e2etests/reviewandapprovalshould.spec.ts:41:2 › Review Document2 › Send Document To Review 

    locator.click: Target closed
    =========================== logs ===========================
    waiting for selector "id=Archive_Types_Button"
    ============================================================

      29 | 	await policyTechSidebar.clickArchiveSubTab();
      30 | 	const policyTechArchive = new PolicyTechSettingsAndToolsToolsArchive(page);
    > 31 | 	await policyTechArchive.clickChooseArchiveTypeButton();
         | 	                        ^
      32 | 	await policyTechArchive.clickDocumentsUnpublishedButton();
      33 | 	await policyTechArchive.clickArchiveTypeSelectorPopupOkButton();
      34 | 	await policyTechArchive.checkSelectAllCheckbox();

        at PolicyTechSettingsAndToolsToolsArchive.clickChooseArchiveTypeButton (/tests/tests/PageObjectModels/PolicyTech/MainWindow/SettingsAndTools/Tools/archive.ts:33:38)
        at /tests/tests/e2etests/reviewandapprovalshould.spec.ts:31:26

    attachment #1: trace (application/zip) ---------------------------------------------------------
    test-results/e2etests-reviewandapprovalshould-Review-Document2-Send-Document-To-Review-webkit/trace.zip
    Usage:

        npx playwright show-trace test-results/e2etests-reviewandapprovalshould-Review-Document2-Send-Document-To-Review-webkit/trace.zip

    ------------------------------------------------------------------------------------------------

  Slow test file: [webkit] › e2etests/reviewandapprovalshould.spec.ts (51s)
  Slow test file: [webkit] › e2etests/draftandcollaborationshould.spec.ts (47s)
  Consider splitting slow test files to speed up parallel execution

  3 failed
    [webkit] › e2etests/draftandcollaborationshould.spec.ts:37:2 › Draft Document › Save New Document 
    [webkit] › e2etests/draftandcollaborationshould.spec.ts:54:2 › Collaboration Document › Send Draft Document To Writers 
    [webkit] › e2etests/reviewandapprovalshould.spec.ts:41:2 › Review Document2 › Send Document To Review 
npm notice 
npm notice New minor version of npm available! 8.11.0 -> 8.16.0
npm notice Changelog: https://github.com/npm/cli/releases/tag/v8.16.0
npm notice Run npm install -g [email protected] to update!
npm notice 

eatonjl avatar Aug 08 '22 13:08 eatonjl

Here is one for page crash:

Running 3 tests using 1 worker

  pw:browser <launching> /ms-playwright/chromium-1015/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-default-apps --disable-dev-shm-usage --disable-extensions --disable-features=ImprovedCookieControls,LazyFrameLoading,GlobalMediaControls,DestroyProfileOnBrowserClose,MediaRouter,DialMediaRouteProvider,AcceptCHFrame,AutoExpandDetailsElement,CertificateTransparencyComponentUpdater,AvoidUnnecessaryBeforeUnloadCheckSync --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 --user-data-dir=/tmp/playwright_chromiumdev_profile-TZHjSr --remote-debugging-pipe --no-startup-window +0ms
  pw:browser <launched> pid=6597 +5ms
  pw:browser [pid=6597][err] [0808/133922.985027:ERROR:bus.cc(398)] Failed to connect to the bus: Failed to connect to socket /var/run/dbus/system_bus_socket: No such file or directory +27ms
  pw:browser [pid=6597][err] [0808/133922.985093:ERROR:bus.cc(398)] Failed to connect to the bus: Failed to connect to socket /var/run/dbus/system_bus_socket: No such file or directory +0ms
  pw:browser [pid=6597][err] [0808/133922.994883:WARNING:bluez_dbus_manager.cc(247)] Floss manager not present, cannot set Floss enable/disable. +10ms
  pw:browser [pid=6597][err] [0808/133922.997903:WARNING:sandbox_linux.cc(376)] InitializeSandbox() called with multiple threads in process gpu-process. +3ms
  pw:browser [pid=6597][err] [0808/133925.316008:ERROR:cert_issuer_source_aia.cc(134)] AiaRequest::OnFetchCompleted got error -301 +2s
  pw:browser [pid=6597][err] [0808/133925.318046:ERROR:cert_issuer_source_aia.cc(134)] AiaRequest::OnFetchCompleted got error -301 +1ms
  pw:browser [pid=6597][err] [0808/133925.318114:ERROR:cert_verify_proc_builtin.cc(690)] CertVerifyProcBuiltin for doorman.qa1.gw.navex-pe.com failed: +0ms
  pw:browser [pid=6597][err] ----- Certificate i=1 (CN=OBIWANDC,0.9.2342.19200300.100.1.25=#796F6461,0.9.2342.19200300.100.1.25=#6C6F63616C) ----- +0ms
  pw:browser [pid=6597][err] ERROR: No matching issuer found +1ms
  pw:browser [pid=6597][err]  +2ms
  pw:browser [pid=6597][err]  +0ms
  pw:browser [pid=6597][err] [0808/133925.319222:ERROR:ssl_client_socket_impl.cc(983)] handshake failed; returned -1, SSL error code 1, net_error -202 +0ms
  pw:browser [pid=6597][err] [0808/133926.137790:ERROR:cert_issuer_source_aia.cc(134)] AiaRequest::OnFetchCompleted got error -301 +817ms
  pw:browser [pid=6597][err] [0808/133926.137987:ERROR:cert_issuer_source_aia.cc(134)] AiaRequest::OnFetchCompleted got error -301 +0ms
  pw:browser [pid=6597][err] [0808/133926.138048:ERROR:cert_verify_proc_builtin.cc(690)] CertVerifyProcBuiltin for id1.qa1.gw.navex-pe.com failed: +1ms
  pw:browser [pid=6597][err] ----- Certificate i=1 (CN=OBIWANDC,0.9.2342.19200300.100.1.25=#796F6461,0.9.2342.19200300.100.1.25=#6C6F63616C) ----- +0ms
  pw:browser [pid=6597][err] ERROR: No matching issuer found +0ms
  pw:browser [pid=6597][err]  +0ms
  pw:browser [pid=6597][err]  +0ms
  pw:browser [pid=6597][err] [0808/133926.138825:ERROR:ssl_client_socket_impl.cc(983)] handshake failed; returned -1, SSL error code 1, net_error -202 +0ms
  pw:browser [pid=6597] <gracefully close start> +8s
  pw:browser [pid=6597] <process did exit: exitCode=0, signal=null> +22ms
  pw:browser [pid=6597] starting temporary directories cleanup +0ms
  pw:browser [pid=6597] finished temporary directories cleanup +10ms
  pw:browser [pid=6597] <gracefully close end> +0ms
  ✓  [webkit] › e2etests/draftandcollaborationshould.spec.ts:37:2 › Draft Document › Save New Document (24s)
  pw:browser <launching> /ms-playwright/webkit-1683/pw_run.sh --inspector-pipe --headless --no-startup-window +0ms
  pw:browser <launched> pid=7109 +5ms
  pw:browser [pid=7109][err]  +18s
  pw:browser [pid=7109][err] (WPEWebProcess:7177): WPE-FDO-WARNING **: 13:39:53.395: Failed to send message 67 to socket: Error sending data: Broken pipe +0ms
  ✘  [webkit] › e2etests/draftandcollaborationshould.spec.ts:54:2 › Collaboration Document › Send Draft Document To Writers (3s)
  pw:browser [pid=7109] <gracefully close start> +10s
  pw:browser [pid=7109] <process did exit: exitCode=0, signal=null> +9ms
  pw:browser [pid=7109] starting temporary directories cleanup +0ms
  pw:browser [pid=7109] finished temporary directories cleanup +33ms
  pw:browser [pid=7109] <gracefully close end> +0ms
  ✘  [webkit] › e2etests/reviewandapprovalshould.spec.ts:41:2 › Review Document2 › Send Document To Review (9s)
  pw:browser <launching> /ms-playwright/webkit-1683/pw_run.sh --inspector-pipe --headless --no-startup-window +0ms
  pw:browser <launched> pid=7681 +4ms
  pw:browser [pid=7681] <gracefully close start> +10s
  pw:browser [pid=7681] <process did exit: exitCode=0, signal=null> +9ms
  pw:browser [pid=7681] starting temporary directories cleanup +0ms
  pw:browser [pid=7681] finished temporary directories cleanup +14ms
  pw:browser [pid=7681] <gracefully close end> +0ms


  1) [webkit] › e2etests/draftandcollaborationshould.spec.ts:54:2 › Collaboration Document › Send Draft Document To Writers 

    page.waitForEvent: Page crashed
    =========================== logs ===========================
    waiting for event "popup"
    ============================================================

      57 | 		const policyTechSidebar = new PolicyTechSidebar(page);
      58 | 		[page1] = await Promise.all([
    > 59 | 			page.waitForEvent('popup'),
         | 			     ^
      60 | 			policyTechSidebar.openNewHtmlDocument(),
      61 | 		]);
      62 | 		const policyTechDocumentPage = new PolicyTechDocumentPage(page1);

        at /tests/tests/e2etests/draftandcollaborationshould.spec.ts:59:9

    attachment #1: trace (application/zip) ---------------------------------------------------------
    test-results/e2etests-draftandcollaborationshould-Collaboration-Document-Send-Draft-Document-To-Writers-webkit/trace.zip
    Usage:

        npx playwright show-trace test-results/e2etests-draftandcollaborationshould-Collaboration-Document-Send-Draft-Document-To-Writers-webkit/trace.zip

    ------------------------------------------------------------------------------------------------

  2) [webkit] › e2etests/reviewandapprovalshould.spec.ts:41:2 › Review Document2 › Send Document To Review 

    page.waitForEvent: Page crashed
    =========================== logs ===========================
    waiting for event "popup"
    ============================================================

      44 | 		const policyTechSidebar = new PolicyTechSidebar(page);
      45 | 		[page1] = await Promise.all([
    > 46 | 			page.waitForEvent('popup'),
         | 			     ^
      47 | 			policyTechSidebar.openNewHtmlDocument(),
      48 | 		]);
      49 | 		await page1.waitForLoadState();

        at /tests/tests/e2etests/reviewandapprovalshould.spec.ts:46:9

    attachment #1: trace (application/zip) ---------------------------------------------------------
    test-results/e2etests-reviewandapprovalshould-Review-Document2-Send-Document-To-Review-webkit/trace.zip
    Usage:

        npx playwright show-trace test-results/e2etests-reviewandapprovalshould-Review-Document2-Send-Document-To-Review-webkit/trace.zip

    ------------------------------------------------------------------------------------------------

  Slow test file: [webkit] › e2etests/draftandcollaborationshould.spec.ts (27s)
  Consider splitting slow test files to speed up parallel execution

  2 failed
    [webkit] › e2etests/draftandcollaborationshould.spec.ts:54:2 › Collaboration Document › Send Draft Document To Writers 
    [webkit] › e2etests/reviewandapprovalshould.spec.ts:41:2 › Review Document2 › Send Document To Review 
  1 passed (52s)

eatonjl avatar Aug 08 '22 13:08 eatonjl

@mxschmitt I've tentatively assigned to you as part of triaging, but please review to ensure there's enough info above to take action.

rwoll avatar Aug 11 '22 20:08 rwoll

@eatonjl what is your host docker machine - is it mac or ubuntu based? If its ubuntu20 then it might be related to https://github.com/microsoft/playwright/issues/15764.

mxschmitt avatar Aug 12 '22 11:08 mxschmitt

@mxschmitt The machine I am using the Docker image on is an M1pro Mac. I just had another employee try it (on a Mac as well, not sure about the processor) and he was getting the "Target Closed" issue as well.

eatonjl avatar Aug 12 '22 12:08 eatonjl

We would need to have a reproduction which we can run locally to debug this further, would it be possible to share a minimal repro with us? Otherwise we unfortunately can't act on it.

mxschmitt avatar Aug 12 '22 13:08 mxschmitt

I can share the files with something like wetransfer (our repos are locked down). Would that be fine? I just need an email to send it to.

eatonjl avatar Aug 12 '22 14:08 eatonjl

I provided you my email here https://github.com/microsoft/playwright/issues/16261#issuecomment-1207813036

mxschmitt avatar Aug 12 '22 15:08 mxschmitt

Thank you! I am going to get something fixed in the code that I am currently working on and then I can send you that.

eatonjl avatar Aug 12 '22 15:08 eatonjl

@mxschmitt I sent those files and info. Let me know if you have any issue (other than the issue you are looking into) with it.

eatonjl avatar Aug 15 '22 17:08 eatonjl

@mxschmitt Following up to see if you were able to get the files OK.

eatonjl avatar Aug 18 '22 13:08 eatonjl

I think I'm seeing this same issue on GitHub Actions running on Mac — https://github.com/inrupt/solid-client-js/runs/7917797697?check_suite_focus=true (with DEBUG on: https://github.com/inrupt/solid-client-js/runs/7918082641?check_suite_focus=true )

I'm unable to reproduce locally (I'm on a Mac), and the tests pass on all other environments. We only started seeing this after upgrading to the latest version of Playwright: https://github.com/inrupt/solid-client-js/pull/1684

The trace also doesn't seem to give anything of help, from what I can tell (they're available as artifacts for that workflow)

ThisIsMissEm avatar Aug 19 '22 12:08 ThisIsMissEm

@mxschmitt I sent those files and info. Let me know if you have any issue (other than the issue you are looking into) with it.

Unfortunately the transfer expired, do you mind sharing it again?

mxschmitt avatar Aug 23 '22 16:08 mxschmitt

@ThisIsMissEm this is most likely caused by a race inside your code, please file a separate issue with a repro, otherwise we can't act on it.

mxschmitt avatar Aug 23 '22 16:08 mxschmitt

@mxschmitt I already sent you my code. Did you not get it? If it is a race condition, why is it only happening on Mac OS systems and only when run in the Docker image? Edit - Sorry, I didn't realize you were talking to ThisIsMissEm directly.

eatonjl avatar Aug 23 '22 16:08 eatonjl

@ThisIsMissE this is most likely caused by a race inside your code, please file a separate issue with a repro, otherwise we can't act on it.

I haven't been able to see one, and as far as I know the mac github actions runners are running within docker, hence commenting here instead of a new ticket. If it were a race, then I'd be able to reproduce on a non-GitHub Actions environment.

But if you want I can open a separate ticket (though I'm certain this is a dupe)

ThisIsMissEm avatar Aug 23 '22 16:08 ThisIsMissEm

@eatonjl the link to your we transfer has expired. So you need to share it with me again.

mxschmitt avatar Aug 24 '22 10:08 mxschmitt

@mxschmitt Files resent. I am sending another one with the info needed for the .env file.

eatonjl avatar Aug 24 '22 13:08 eatonjl

.env file data sent also.

eatonjl avatar Aug 24 '22 13:08 eatonjl

@mxschmitt Did you get the files alright this time around?

eatonjl avatar Aug 30 '22 14:08 eatonjl

@mxschmitt Did you get the files alright this time around?

Sorry I was out of office, the credentials for Martin1 are not working for me, it says they are wrong.

mxschmitt avatar Aug 31 '22 10:08 mxschmitt

Very odd. I will get the password reset so you can get in. I will post here once that is done.

eatonjl avatar Aug 31 '22 19:08 eatonjl

@mxschmitt The user should be working now. Let me know if you still get an issue.

eatonjl avatar Sep 06 '22 13:09 eatonjl