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

[Disabled] Flaky cypress test: Device verification > Verify device during login with QR code #26293

Closed
richvdh opened this issue Oct 3, 2023 · 3 comments · Fixed by matrix-org/matrix-js-sdk#3791 or matrix-org/matrix-react-sdk#11771
Assignees
Labels
A-Element-R Issues affecting the port of Element's crypto layer to Rust Z-Element-R-Blocker A blocker for enabling Element R by default Z-Flaky-Test A test is raising false alarms

Comments

@richvdh
Copy link
Member

richvdh commented Oct 3, 2023

matrix-org/matrix-js-sdk#3770 / https://github.com/matrix-org/matrix-js-sdk/actions/runs/6395357104/job/17358911350#step:8:5058

     AssertionError: Timed out retrying after 10000ms: Unable to find an accessible element with the role "button" and name "Verify with another device"

 Here are the accessible roles:

 ...

  button:

  Name "Language Dropdown":
  <div
    aria-describedby="mx_LanguageDropdown_value"
    aria-disabled="true"
    aria-expanded="false"
    aria-haspopup="listbox"
    aria-label="Language Dropdown"
    aria-owns="mx_LanguageDropdown_input"
    class="mx_AccessibleButton mx_Dropdown_input mx_no_textinput mx_AccessibleButton_disabled"
    disabled=""
    role="button"
    tabindex="0"
  />

  Name "Help":
  <div
    aria-label="Help"
    class="mx_AccessibleButton mx_ServerPicker_help"
    role="button"
    tabindex="0"
  />

  Name "Edit":
  <div
    class="mx_AccessibleButton mx_ServerPicker_change mx_AccessibleButton_hasKind mx_AccessibleButton_kind_link"
    role="button"
    tabindex="0"
  />

  Name "Forgot password?":
  <div
    aria-disabled="true"
    class="mx_AccessibleButton mx_Login_forgot mx_AccessibleButton_hasKind mx_AccessibleButton_kind_link mx_AccessibleButton_disabled"
    disabled=""
    role="button"
    tabindex="0"
  />

  Name "Continue with OAuth test":
  <div
    class="mx_AccessibleButton mx_SSOButton"
    role="button"
    tabindex="0"
  />

Given the list of found roles, including "Continue with OAuth test", it might just have been slow to log in.

@richvdh richvdh added the Z-Flaky-Test A test is raising false alarms label Oct 3, 2023
@richvdh
Copy link
Member Author

richvdh commented Oct 3, 2023

This test is actually failing with multiple different problems:

@richvdh
Copy link
Member Author

richvdh commented Oct 3, 2023

Disabled the test for now for rust crypto in matrix-org/matrix-react-sdk#11710

@richvdh
Copy link
Member Author

richvdh commented Oct 4, 2023

Generally QR code verification seems a bit flaky. Trying it myself, after the "you've verified successfully!" banner, I saw this error in the logs:

rageshake.ts:74 WARN src/verification.rs:1277 Error calling changes callback: JsValue(Error: not implemented
Error: not implemented
    at get cancellationCode [as cancellationCode] (vector://vector/webapp/bundles/37a875d7a6ac3835fb69/34.js:2617:11)
    at Object.current (vector://vector/webapp/bundles/37a875d7a6ac3835fb69/bundle.js:201100:136)
    at RustVerificationRequest.eventListener (vector://vector/webapp/bundles/37a875d7a6ac3835fb69/bundle.js:20630:53)
    at RustVerificationRequest.emit (vector://vector/webapp/bundles/37a875d7a6ac3835fb69/bundle.js:59372:7)
    at RustVerificationRequest.emit (vector://vector/webapp/bundles/37a875d7a6ac3835fb69/bundle.js:48959:18)
    at onChange (vector://vector/webapp/bundles/37a875d7a6ac3835fb69/34.js:2312:12)
    at vector://vector/webapp/bundles/37a875d7a6ac3835fb69/37.js:7442:33
    at handleError (vector://vector/webapp/bundles/37a875d7a6ac3835fb69/37.js:346:18)
    at push.1377.module.exports.__wbg_call_97ae9d8645dc388b (vector://vector/webapp/bundles/37a875d7a6ac3835fb69/37.js:7441:66)
    at wasm://wasm/010897c6:wasm-function[9855]:0x38010e)

... and it seemed like the device was not, in fact, verified

@richvdh richvdh changed the title Flaky cypress test: Device verification > Verify device during login with QR code Flaky cypress test: Device verification > Verify device with QR code during login Oct 5, 2023
@richvdh richvdh changed the title Flaky cypress test: Device verification > Verify device with QR code during login Flaky cypress test: Device verification > Verify device during login with QR code Oct 5, 2023
@richvdh richvdh added the Z-Element-R-Blocker A blocker for enabling Element R by default label Oct 5, 2023
@germain-gg germain-gg added the A-Element-R Issues affecting the port of Element's crypto layer to Rust label Oct 9, 2023
richvdh added a commit to matrix-org/matrix-js-sdk that referenced this issue Oct 9, 2023
The rust crypto sdk doesn't actually finish QR code verification until the
`m.key.verification.done` is received, so make sure we don't tell the
application it is done before that happens.

Fixes element-hq/element-web#26293
github-merge-queue bot pushed a commit to matrix-org/matrix-js-sdk that referenced this issue Oct 10, 2023
…3791)

* Element-R: Don't mark QR code verification as done too soon

The rust crypto sdk doesn't actually finish QR code verification until the
`m.key.verification.done` is received, so make sure we don't tell the
application it is done before that happens.

Fixes element-hq/element-web#26293

* ignore fallback line

* Revert unnecessary changes

Can't get the coverage high enough on this and it's not needed.
@richvdh richvdh changed the title Flaky cypress test: Device verification > Verify device during login with QR code [Disabled] Flaky cypress test: Device verification > Verify device during login with QR code Oct 18, 2023
@richvdh richvdh reopened this Oct 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Element-R Issues affecting the port of Element's crypto layer to Rust Z-Element-R-Blocker A blocker for enabling Element R by default Z-Flaky-Test A test is raising false alarms
Projects
None yet
2 participants