Skip to content

Important chat message sending bugs #3132

Description

@taoeffect

Problem

I sent a message to myself with an attachment on mobile, then opened the browser on desktop. I didn't see the message. I didn't see the white "reconnecting" banner at the top either. I waited and nothing happened.

So I sent myself a text message to see what would happen. It appeared grey in the message view. Then the attachment message I had sent on mobile appeared below the greyed out message. Finally much later the message I sent myself on Desktop turned white, but it remained above the prior attachment message (the order of the messages is clearly wrong, related: #2963).

In the console were these errors:

Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'scrollToItem')
    at s (ChatMain.vue:1043:35)
    at s.scrollToMessage (ChatMain.vue:1055:9)
    at ChatMain.vue:1101:30
logger.js:13 Error re-syncing server time; will re-attempt in 5s TypeError: Failed to fetch
    at Object.fetch (chelonia.mjs:58:33)
    at Object.Hg (time-sync.mjs:22:36)
    at time-sync.mjs:61:22
(anonymous) @ logger.js:13
3logger.js:13 [ChatMain.vue] Error setting read until Error: [chelonia] parseEncryptedOrUnencryptedMessage: Invalid height 771; it must be between 0 and 770
    at yi (sw-primary.js?routerBase=%2Fapp&standalone=0:34:70615)
    at g (sw-primary.js?routerBase=%2Fapp&standalone=0:34:67908)
    at async chelonia/kv/set (sw-primary.js?routerBase=%2Fapp&standalone=0:34:68767)
    at async okTurtles.eventQueue/queueEvent (sw-primary.js?routerBase=%2Fapp&standalone=0:13:34473)
    at async sw-primary.js?routerBase=%2Fapp&standalone=0:13:153579
    at async okTurtles.eventQueue/queueEvent (sw-primary.js?routerBase=%2Fapp&standalone=0:13:34463)
    at async sw-primary.js?routerBase=%2Fapp&standalone=0:34:96198
Image

Clicking ChatMain.vue:1101:30 took me here:

Image

Solution

Fix the undefined bug reading scrollToItem (this.$refs.conversation.scrollToItem(index) in scrollToMessage), and fix the message ordering when rendering as well. The followup message I sent myself should've appeared below the prior message I sent on my phone.

Finally, ideally we'd figure out why I didn't see my message from mobile and fix that too. Or at least display some sort of "fetching messages..." banner somewhere.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions