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

First session after completing registration can't send messages. #24831

Closed
lampholder opened this issue Mar 15, 2023 · 10 comments
Closed

First session after completing registration can't send messages. #24831

lampholder opened this issue Mar 15, 2023 · 10 comments
Assignees
Labels
A-Storage Storage layer of the app, including IndexedDB, local storage, etc. O-Occasional Affects or can be seen by some users regularly or most users rarely S-Critical Prevents work, causes data loss and/or has no workaround T-Defect Z-FTUE

Comments

@lampholder
Copy link
Member

lampholder commented Mar 15, 2023

Steps to reproduce

  1. Register on a new server from app.element.io
  2. Complete email registration
  3. Click the link in the email - use the Element instance in that new browser tab going forward
  4. Be invited to a room and join successful
  5. Try and send a message - it doesn't send
  6. Other sessions then complete successfully

Other notes:

The tab I originally initiated registration from went blank.

In the console there was a message Uncaught (in promise) Error: Event blocked by other events not yet sent - this could just be because something affected the first message and then sending further messages is blocked on the user resolving the status of that first failed message? If so this is just a UI issue (I find that behaviour surprising)

Outcome

What did you expect?

Message to send

What happened instead?

Message failed to send

Operating system

Windows 10

Browser information

Firefox latest

URL for webapp

app.element.io

Application version

Latest

Homeserver

beta.matrix.org

Will you send logs?

Yes

@lampholder
Copy link
Member Author

In the console there was a message "Uncaught (in promise) Error: Event blocked by other events not yet sent" - this could jus tbe because something affected the first message and then sending further messages is blocked on the user resolving the staus of that first failed message? If so this is just a UI issue (I find that behaviour surprising)

It's not this - there's some weird indexeddb thing going on:

Error running command: syncToDatabase InvalidStateError: IDBDatabase.transaction: Can't start a transaction on a closed database [bd1c383784ee9e53831c.worker.js:1:114907](https://app.element.io/bd1c383784ee9e53831c.worker.js)
IndexedDBStore failure, degrading to MemoryStore InvalidStateError: IDBDatabase.transaction: Can't start a transaction on a closed database
    _ indexeddb-remote-backend.ts:188

@MadLittleMods MadLittleMods added S-Critical Prevents work, causes data loss and/or has no workaround O-Uncommon Most users are unlikely to come across this or unexpected workflow A-Storage Storage layer of the app, including IndexedDB, local storage, etc. labels Mar 15, 2023
@MadLittleMods
Copy link
Contributor

MadLittleMods commented Mar 15, 2023

IDBDatabase.transaction: Can't start a transaction on a closed database

Around your IndexedDB error, it looks like you have run into this before -> #13371

And there has been a couple other people who have reported this error:

@neilisfragile
Copy link
Member

neilisfragile commented Mar 15, 2023

I experienced the same error earlier today.

I created an account on a new homeserver with email registration and was unable to send messages into encrypted rooms due to

Error running command: syncToDatabase InvalidStateError: IDBDatabase.transaction: Can't start a transaction on a closed database [bd1c383784ee9e53831c.worker.js:1:114907](https://app.element.io/bd1c383784ee9e53831c.worker.js)
IndexedDBStore failure, degrading to MemoryStore InvalidStateError: IDBDatabase.transaction: Can't start a transaction on a closed database
    _ indexeddb-remote-backend.ts:188

Signing out and back in did not fix it, but closing and reopening my browser (Chrome on Mac Version 111.0.5563.64 (Official Build) (x86_64)) resolved the problem.

@MadLittleMods MadLittleMods added O-Occasional Affects or can be seen by some users regularly or most users rarely Z-FTUE and removed O-Uncommon Most users are unlikely to come across this or unexpected workflow labels Mar 16, 2023
@t3chguy
Copy link
Member

t3chguy commented Mar 16, 2023

If refreshing/restarting the app/logging out&back in didn't fix this but restarting the browser does it sounds like the browser's IDB is getting wedged in an unusable state

Could really do with logs extracted from console to further chase this one down.

Related #7465
Related #17891
Related #18423

@t3chguy t3chguy self-assigned this Mar 16, 2023
@t3chguy
Copy link
Member

t3chguy commented Mar 16, 2023

I could not reproduce this using the repro steps in the OP on Chrome on macOS.

image

@t3chguy
Copy link
Member

t3chguy commented Mar 16, 2023

Though in the original tab I do see something:

image
image

Seems like this might be more related to having two clients open against the same IDB potentially.

@t3chguy
Copy link
Member

t3chguy commented Mar 16, 2023

I wonder if it is related to the new tab wiping the IDB out from under the old tab's guest session. Old tab would have an auto-registered guest and then new tab logs straight into your new account, the 2 tabs could be fighting over the IDB.

@t3chguy
Copy link
Member

t3chguy commented Mar 16, 2023

@lampholder @neilisfragile I could not reproduce the full failure mode, only some of the error messages in the original tab (still in the registration flow) - could you try reproduce on https://pr10395--matrix-react-sdk.netlify.app/

@neilisfragile
Copy link
Member

Frustratingly, I also can't reproduce. I'll keep trying, but if anyone else (@lampholder ?) please please share some logs.

@t3chguy
Copy link
Member

t3chguy commented Mar 31, 2023

Considering this closed by the PRs above - please shout if you see it again once you are running those

@t3chguy t3chguy closed this as completed Mar 31, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Storage Storage layer of the app, including IndexedDB, local storage, etc. O-Occasional Affects or can be seen by some users regularly or most users rarely S-Critical Prevents work, causes data loss and/or has no workaround T-Defect Z-FTUE
Projects
None yet
Development

No branches or pull requests

4 participants