Open hpk42 opened 1 week ago
Is it 100% reproducible for you? I can't reproduce.
No, it's not reproducible. If that rules out fixing it feel free to close. I'll file another issue if it reappears. Was the first itme i encountered it (but i am also not often quote-replying to webxdc-app messages).
On Wed, Nov 13, 2024 at 02:09 -0800, WofWca wrote:
Is it 100% reproducible for you? I can't reproduce. -- Reply to this email directly or view it on GitHub: https://github.com/deltachat/deltachat-desktop/issues/4337#issuecomment-2473068586 You are receiving this because you authored the thread.
Message ID: @.***>
I looked through all the .slice
we have in the codebase and narrowed it down to these two lines:
They produce the same stack trace as in the screenshot you posted, unlike other .slice
. I might have missed some, but the first line I mentioned looks like the likely candidate. Edit: or IDK, I do not see how quote
can have an undefined
text: it's provided by the core, and it should always be a string.
@Simon-Laux also encountered this issue:
must be in react render function and inside of the message list+composer component, because that error boundary was triggered. I also can not reproduce it with the echo bot. basically I was quickly switching between quote messages while your answers came in.
And I myself also just managed to reproduce this with echo@nine.testrun.org. I sent a message to it and starting quickly pressing Ctrl+Up to quote, and got the crash: Cannot read properties of undefined (reading 'slice')
.
And indeed it points to this line, Message.tsx:805:28)
:
However, I am not 100% sure that this is the very same issue as in the original post.
This is what I got by putting a conditional breakpoint quote.text == undefined
there.
Looks like these two pieces of code could be causing the crash:
They actually mutate the state, draftState
, bypassing _setDraft
, and make the state invalid (because .quote
is missing the required properties). draftRef
was introduced in 4bbdbe390b03e15eb059ca6af15a44156413ee44.
I think this issue should belong to the "New Composer" project, given that it is not super severe. Un-assign it from the project if you disagree.