Skip to content

Flaky playwright test: crypto/event-shields.spec.ts: should show correct shields on events sent by devices which have since been deleted #28061

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

Closed
RiotRobot opened this issue Sep 17, 2024 · 81 comments · Fixed by element-hq/matrix-react-sdk#143 or #28641
Labels
A-E2EE Z-Flaky-Test A test is raising false alarms Z-Flaky-Test-Webkit Flaky playwright test in Webkit

Comments

@RiotRobot
Copy link
Contributor

RiotRobot commented Sep 17, 2024

Update January 2025: now flaking with a new error (https://github.com/element-hq/element-web/actions/runs/12782458340/job/35632032105):

Error:   2) [WebKit] › crypto/event-shields.spec.ts:276:13 › Cryptography › event shields › should show correct shields on events sent by devices which have since been deleted 
    Error: jsHandle.evaluate: Error: attempted to take ownership of Rust value while it was borrowed

       at ../pages/client.ts:69

      67 |     public async evaluate<T>(fn: (client: MatrixClient) => T, arg?: any): Promise<T> {
      68 |         await this.prepareClient();
    > 69 |         return this.client.evaluate(fn, arg);
         |                            ^
      70 |     }
      71 |
      72 |     public evaluateHandle<R, Arg, O extends MatrixClient = MatrixClient>(
        at Bot.evaluate (/home/runner/work/element-web/element-web/playwright/pages/client.ts:69:28)
        at /home/runner/work/element-web/element-web/playwright/e2e/crypto/event-shields.spec.ts:303:13

https://github.com/element-hq/matrix-react-sdk/actions/runs/10908576705

@RiotRobot RiotRobot added the Z-Flaky-Test A test is raising false alarms label Sep 17, 2024
@dosubot dosubot bot added the A-E2EE label Sep 17, 2024
@RiotRobot
Copy link
Contributor Author

@RiotRobot
Copy link
Contributor Author

@RiotRobot
Copy link
Contributor Author

@RiotRobot
Copy link
Contributor Author

@RiotRobot
Copy link
Contributor Author

@RiotRobot
Copy link
Contributor Author

@RiotRobot
Copy link
Contributor Author

@RiotRobot
Copy link
Contributor Author

@RiotRobot
Copy link
Contributor Author

@RiotRobot
Copy link
Contributor Author

@RiotRobot
Copy link
Contributor Author

@RiotRobot
Copy link
Contributor Author

@RiotRobot
Copy link
Contributor Author

@RiotRobot
Copy link
Contributor Author

@RiotRobot
Copy link
Contributor Author

@RiotRobot
Copy link
Contributor Author

@RiotRobot
Copy link
Contributor Author

@RiotRobot
Copy link
Contributor Author

@RiotRobot
Copy link
Contributor Author

@RiotRobot
Copy link
Contributor Author

@RiotRobot
Copy link
Contributor Author

@dbkr
Copy link
Member

dbkr commented Oct 10, 2024

This has flaked twice in a row for me. If nobody has time to look, I think we'll have to disable it.

@dbkr
Copy link
Member

dbkr commented Oct 10, 2024

ftr, this is:

https://e2e-131--matrix-react-sdk.netlify.app/#?testId=549c35dde3453c6f6198-53d1af2a964b4d8c9a63

Error: jsHandle.evaluate: Error: Cannot encrypt event in unconfigured room !wDXBgADKUDbRHIRBhX:localhost

    at RustCrypto.encryptEvent (http://localhost:8080/bundles/94c04cf2a65f14e9f347/771.js:3276:13)
    at MatrixClient.encryptEventIfNeeded (http://localhost:8080/bundles/94c04cf2a65f14e9f347/init.js:9339:30)
    at async MatrixClient.encryptAndSendEvent (http://localhost:8080/bundles/94c04cf2a65f14e9f347/init.js:9271:9)
    at async <anonymous>:260:30
    at RustCrypto.encryptEvent (/home/runner/work/matrix-react-sdk/matrix-react-sdk/matrix-react-sdk/http:/localhost:8080/bundles/94c04cf2a65f14e9f347/771.js:3276:13)
    at MatrixClient.encryptEventIfNeeded (/home/runner/work/matrix-react-sdk/matrix-react-sdk/matrix-react-sdk/http:/localhost:8080/bundles/94c04cf2a65f14e9f347/init.js:9339:30)
    at async MatrixClient.encryptAndSendEvent (/home/runner/work/matrix-react-sdk/matrix-react-sdk/matrix-react-sdk/http:/localhost:8080/bundles/94c04cf2a65f14e9f347/init.js:9271:9)
    at /home/runner/work/matrix-react-sdk/matrix-react-sdk/matrix-react-sdk/async <anonymous>:260:30
    at Bot.sendMessage (/home/runner/work/matrix-react-sdk/matrix-react-sdk/matrix-react-sdk/playwright/pages/client.ts:125:23)
    at /home/runner/work/matrix-react-sdk/matrix-react-sdk/matrix-react-sdk/playwright/e2e/crypto/event-shields.spec.ts:276:13

ie. the bot client is failing to send a message into the room because it's not ready yet, so probably needs more waiting on the bot side?

@RiotRobot
Copy link
Contributor Author

@richvdh
Copy link
Member

richvdh commented Oct 16, 2024

ugh.

  3) crypto/event-shields.spec.ts:273:13 › Cryptography › event shields › should show correct shields on events sent by devices which have since been deleted 
    Error: Timed out 5000ms waiting for expect(locator).not.toBeVisible()

    Locator: locator('.mx_EventTile').filter({ hasText: 'test encrypted from verified' }).locator('.mx_EventTile_e2eIcon')
    Expected: not visible
    Received: visible
    Call log:
      - expect.not.toBeVisible with timeout 5000ms
      - waiting for locator('.mx_EventTile').filter({ hasText: 'test encrypted from verified' }).locator('.mx_EventTile_e2eIcon')
      -   locator resolved to <div tabindex="0" aria-labelledby="floating-ui-248" aria-label="State of the end-to-end encryption" class="mx_EventTile_e2eIcon mx_EventTile_e2eIcon_warning"></div>
      -   unexpected value "visible"
      -   locator resolved to <div tabindex="0" aria-labelledby="floating-ui-248" aria-label="State of the end-to-end encryption" class="mx_EventTile_e2eIcon mx_EventTile_e2eIcon_warning"></div>
      -   unexpected value "visible"
      -   locator resolved to <div tabindex="0" aria-labelledby="floating-ui-248" aria-label="State of the end-to-end encryption" class="mx_EventTile_e2eIcon mx_EventTile_e2eIcon_warning"></div>
      -   unexpected value "visible"
      -   locator resolved to <div tabindex="0" aria-labelledby="floating-ui-248" aria-label="State of the end-to-end encryption" class="mx_EventTile_e2eIcon mx_EventTile_e2eIcon_warning"></div>
      -   unexpected value "visible"
      -   locator resolved to <div tabindex="0" aria-labelledby="floating-ui-248" aria-label="State of the end-to-end encryption" class="mx_EventTile_e2eIcon mx_EventTile_e2eIcon_warning"></div>
      -   unexpected value "visible"
      -   locator resolved to <div tabindex="0" aria-labelledby="floating-ui-248" aria-label="State of the end-to-end encryption" class="mx_EventTile_e2eIcon mx_EventTile_e2eIcon_warning"></div>
      -   unexpected value "visible"
      -   locator resolved to <div tabindex="0" aria-labelledby="floating-ui-248" aria-label="State of the end-to-end encryption" class="mx_EventTile_e2eIcon mx_EventTile_e2eIcon_warning"></div>
      -   unexpected value "visible"
      -   locator resolved to <div tabindex="0" aria-labelledby="floating-ui-248" aria-label="State of the end-to-end encryption" class="mx_EventTile_e2eIcon mx_EventTile_e2eIcon_warning"></div>
      -   unexpected value "visible"
      -   locator resolved to <div tabindex="0" aria-labelledby="floating-ui-248" aria-label="State of the end-to-end encryption" class="mx_EventTile_e2eIcon mx_EventTile_e2eIcon_warning"></div>
      -   unexpected value "visible"


      306 |
      307 |             const penultimate = page.locator(".mx_EventTile").filter({ hasText: "test encrypted from verified" });
    > 308 |             await expect(penultimate.locator(".mx_EventTile_e2eIcon")).not.toBeVisible();
          |                                                                            ^
      309 |         });
      310 |     });
      311 | });

        at /home/runner/work/matrix-react-sdk/matrix-react-sdk/matrix-react-sdk/playwright/e2e/crypto/event-shields.spec.ts:308:76

It's a different failure mode to before.

@RiotRobot RiotRobot reopened this Jan 15, 2025
@RiotRobot RiotRobot added the Z-Flaky-Test-Webkit Flaky playwright test in Webkit label Jan 15, 2025
@RiotRobot
Copy link
Contributor Author

@richvdh richvdh removed their assignment Jan 20, 2025
@github-actions github-actions bot added the Stale label Feb 4, 2025
Copy link

github-actions bot commented Feb 4, 2025

This flaky test issue has not been updated in 14 days. It is being closed as presumed resolved.

@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Feb 4, 2025
@RiotRobot RiotRobot reopened this Feb 11, 2025
@RiotRobot
Copy link
Contributor Author

@RiotRobot
Copy link
Contributor Author

@RiotRobot
Copy link
Contributor Author

@RiotRobot
Copy link
Contributor Author

@RiotRobot
Copy link
Contributor Author

@RiotRobot
Copy link
Contributor Author

@RiotRobot
Copy link
Contributor Author

@RiotRobot
Copy link
Contributor Author

@RiotRobot
Copy link
Contributor Author

@RiotRobot
Copy link
Contributor Author

@RiotRobot
Copy link
Contributor Author

@RiotRobot
Copy link
Contributor Author

@RiotRobot
Copy link
Contributor Author

@RiotRobot
Copy link
Contributor Author

@RiotRobot
Copy link
Contributor Author

@RiotRobot
Copy link
Contributor Author

@RiotRobot
Copy link
Contributor Author

@RiotRobot
Copy link
Contributor Author

@RiotRobot
Copy link
Contributor Author

@github-actions github-actions bot added the Stale label May 21, 2025
Copy link

This flaky test issue has not been updated in 14 days. It is being closed as presumed resolved.

@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale May 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-E2EE Z-Flaky-Test A test is raising false alarms Z-Flaky-Test-Webkit Flaky playwright test in Webkit
Projects
None yet
3 participants