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

X-signing: error message and prompt to enable MAS temporary key reset doesn't display for ~20 seconds #27863

Closed
wrjlewis opened this issue Jul 26, 2024 · 4 comments · Fixed by element-hq/matrix-react-sdk#34
Assignees
Labels
A-E2EE A-E2EE-Cross-Signing O-Occasional Affects or can be seen by some users regularly or most users rarely S-Major Severely degrades major functionality or product features, with no satisfactory workaround T-Defect

Comments

@wrjlewis
Copy link

Steps to reproduce

  1. Where are you starting? What can you see?
    Element Web on Chromium
  2. What do you click?
    In settings, key reset
  3. More steps…
    Go through the cross signing key reset flow, which will eventually fail and show an error message, prompting the user to enable key reset temporarily within MAS

That error message takes up to 20 seconds to display, while a loading icon spins, and in the background numerous attempts to /upload fail

Outcome

What did you expect?

The error message to appear within an acceptable period, within a couple seconds?

What happened instead?

It retries the failing upload request so many times that the error doesn't appear for 20 or so seconds, at which point the user would have probably given up already.

What would be great?

If the error message appeared more quickly, and there is an option to 'retry' once the user has enabled the option in MAS to allow key-resetting.

Operating system

MacOS

Browser information

Version 1.52.0 (51895) Chromium Engine Version 126.0.6478.183

URL for webapp

element.elementdemo.will (local ESS install)

Application version

Element version: 1.11.69 Crypto version: Rust SDK 0.7.0 (068a0af), Vodozemac 0.6.0

Homeserver

No response

Will you send logs?

No

@t3chguy t3chguy self-assigned this Jul 26, 2024
@dosubot dosubot bot added A-Error-Message O-Uncommon Most users are unlikely to come across this or unexpected workflow S-Minor Impairs non-critical functionality or suitable workarounds exist labels Jul 26, 2024
@dbkr dbkr added S-Major Severely degrades major functionality or product features, with no satisfactory workaround O-Occasional Affects or can be seen by some users regularly or most users rarely A-E2EE A-E2EE-Cross-Signing and removed S-Minor Impairs non-critical functionality or suitable workarounds exist O-Uncommon Most users are unlikely to come across this or unexpected workflow A-Error-Message labels Jul 29, 2024
@t3chguy
Copy link
Member

t3chguy commented Jul 31, 2024

The slowness here is due to matrix-org/matrix-js-sdk#4061

@richvdh
Copy link
Member

richvdh commented Jul 31, 2024

What exactly is the error code returned by /keys/upload? The retry logic should only retry after HTTP 500 errors and the like.

@t3chguy
Copy link
Member

t3chguy commented Jul 31, 2024

The PR makes it retry on anything that is !res.ok as far as I can tell. It is relying on http-api/fetch to make the distinction by throwing when !ok - it lost its status code filtering during review.

Fetch ok only considers statuses in the 200-299 range: https://developer.mozilla.org/en-US/docs/Web/API/Response/ok

@richvdh
Copy link
Member

richvdh commented Aug 1, 2024

Per the discussion on matrix-org/matrix-js-sdk#4061, I don't think that's correct

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-E2EE A-E2EE-Cross-Signing O-Occasional Affects or can be seen by some users regularly or most users rarely S-Major Severely degrades major functionality or product features, with no satisfactory workaround T-Defect
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants