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

Rapidly changing rooms can soft-crash react #11120

Closed
turt2live opened this issue Oct 11, 2019 · 8 comments · Fixed by matrix-org/matrix-js-sdk#1188
Closed

Rapidly changing rooms can soft-crash react #11120

turt2live opened this issue Oct 11, 2019 · 8 comments · Fixed by matrix-org/matrix-js-sdk#1188
Assignees
Labels
T-Defect Z-Soft-Crash React soft crash caught by an error boundary

Comments

@turt2live
Copy link
Member

2019-10-11T10:22:18.662Z E Invalid arguments for `getRelationsForEvent`
Error: Invalid arguments for `getRelationsForEvent`
    at d.getRelationsForEvent (http://127.0.0.1:8084/bundles/47654951f59a9322430d/bundle.js:40:144250)
    at t.getRelationsForEvent (http://127.0.0.1:8084/bundles/47654951f59a9322430d/bundle.js:99:169821)
    at t.getReactions (http://127.0.0.1:8084/bundles/47654951f59a9322430d/bundle.js:109:17234)
    at t.getInitialState (http://127.0.0.1:8084/bundles/47654951f59a9322430d/bundle.js:109:12290)
    at new EventTile (http://127.0.0.1:8084/bundles/47654951f59a9322430d/bundle.js:72:236335)
    at Ko (http://127.0.0.1:8084/bundles/47654951f59a9322430d/bundle.js:59:47183)
    at va (http://127.0.0.1:8084/bundles/47654951f59a9322430d/bundle.js:59:62752)
    at Zs (http://127.0.0.1:8084/bundles/47654951f59a9322430d/bundle.js:59:99683)
    at qs (http://127.0.0.1:8084/bundles/47654951f59a9322430d/bundle.js:59:83963)
    at Gs (http://127.0.0.1:8084/bundles/47654951f59a9322430d/bundle.js:59:80988)
    at Ms (http://127.0.0.1:8084/bundles/47654951f59a9322430d/bundle.js:59:79559)
    at http://127.0.0.1:8084/bundles/47654951f59a9322430d/bundle.js:59:41813
    at t.unstable_runWithPriority (http://127.0.0.1:8084/bundles/47654951f59a9322430d/bundle.js:67:3884)
    at po (http://127.0.0.1:8084/bundles/47654951f59a9322430d/bundle.js:59:41541)
    at _o (http://127.0.0.1:8084/bundles/47654951f59a9322430d/bundle.js:59:41758)
    at go (http://127.0.0.1:8084/bundles/47654951f59a9322430d/bundle.js:59:41693)
    at As (http://127.0.0.1:8084/bundles/47654951f59a9322430d/bundle.js:59:78550)
    at Object.enqueueSetState (http://127.0.0.1:8084/bundles/47654951f59a9322430d/bundle.js:59:46506)
    at t.E.setState (http://127.0.0.1:8084/bundles/47654951f59a9322430d/bundle.js:49:1439)
    at http://127.0.0.1:8084/bundles/47654951f59a9322430d/bundle.js:99:66472
    at c (http://127.0.0.1:8084/bundles/47654951f59a9322430d/bundle.js:1:143441)
    at D._settlePromiseFromHandler (http://127.0.0.1:8084/bundles/47654951f59a9322430d/bundle.js:1:116608)
    at D._settlePromise (http://127.0.0.1:8084/bundles/47654951f59a9322430d/bundle.js:1:117408)
    at D._settlePromiseCtx (http://127.0.0.1:8084/bundles/47654951f59a9322430d/bundle.js:1:117914)
    at http://127.0.0.1:8084/bundles/47654951f59a9322430d/bundle.js:1:72750
2019-10-11T10:22:18.672Z E Invalid arguments for `getRelationsForEvent`
Error: Invalid arguments for `getRelationsForEvent`
    at d.getRelationsForEvent (http://127.0.0.1:8084/bundles/47654951f59a9322430d/bundle.js:40:144250)
    at t.getRelationsForEvent (http://127.0.0.1:8084/bundles/47654951f59a9322430d/bundle.js:99:169821)
    at t.getReactions (http://127.0.0.1:8084/bundles/47654951f59a9322430d/bundle.js:109:17234)
    at t.getInitialState (http://127.0.0.1:8084/bundles/47654951f59a9322430d/bundle.js:109:12290)
    at new EventTile (http://127.0.0.1:8084/bundles/47654951f59a9322430d/bundle.js:72:236335)
    at Ko (http://127.0.0.1:8084/bundles/47654951f59a9322430d/bundle.js:59:47183)
    at va (http://127.0.0.1:8084/bundles/47654951f59a9322430d/bundle.js:59:62752)
    at Zs (http://127.0.0.1:8084/bundles/47654951f59a9322430d/bundle.js:59:99683)
    at qs (http://127.0.0.1:8084/bundles/47654951f59a9322430d/bundle.js:59:83963)
    at Gs (http://127.0.0.1:8084/bundles/47654951f59a9322430d/bundle.js:59:80988)
    at Ms (http://127.0.0.1:8084/bundles/47654951f59a9322430d/bundle.js:59:79559)
    at http://127.0.0.1:8084/bundles/47654951f59a9322430d/bundle.js:59:41813
    at t.unstable_runWithPriority (http://127.0.0.1:8084/bundles/47654951f59a9322430d/bundle.js:67:3884)
    at po (http://127.0.0.1:8084/bundles/47654951f59a9322430d/bundle.js:59:41541)
    at _o (http://127.0.0.1:8084/bundles/47654951f59a9322430d/bundle.js:59:41758)
    at go (http://127.0.0.1:8084/bundles/47654951f59a9322430d/bundle.js:59:41693)
    at As (http://127.0.0.1:8084/bundles/47654951f59a9322430d/bundle.js:59:78550)
    at Object.enqueueSetState (http://127.0.0.1:8084/bundles/47654951f59a9322430d/bundle.js:59:46506)
    at t.E.setState (http://127.0.0.1:8084/bundles/47654951f59a9322430d/bundle.js:49:1439)
    at http://127.0.0.1:8084/bundles/47654951f59a9322430d/bundle.js:99:66472
    at c (http://127.0.0.1:8084/bundles/47654951f59a9322430d/bundle.js:1:143441)
    at D._settlePromiseFromHandler (http://127.0.0.1:8084/bundles/47654951f59a9322430d/bundle.js:1:116608)
    at D._settlePromise (http://127.0.0.1:8084/bundles/47654951f59a9322430d/bundle.js:1:117408)
    at D._settlePromiseCtx (http://127.0.0.1:8084/bundles/47654951f59a9322430d/bundle.js:1:117914)
    at http://127.0.0.1:8084/bundles/47654951f59a9322430d/bundle.js:1:72750
2019-10-11T10:22:18.672Z E The above error occured while React was rendering the following components: 
    in EventTile
    in li
    in ol
    in div
    in div
    in div
    in t
    in ScrollPanel
    in MessagePanel
    in TimelinePanel
    in div
    in div
    in div
    in t
    in t
    in main
    in RoomView
    in div
    in t
    in div
    in LoggedInView
    in t
    in MatrixChat
@turt2live turt2live added T-Defect Z-Soft-Crash React soft crash caught by an error boundary 🔥 Fire 🔥 labels Oct 11, 2019
@jryans
Copy link
Collaborator

jryans commented Oct 18, 2019

This appears to be a new soft crash issue (doesn't match any of the past ones).

@jryans
Copy link
Collaborator

jryans commented Oct 29, 2019

This seems to suggest we were creating a new EventTile, and it had a mxEvent object, but calling getId() on the event returned a falsy value. How is that possible...? 🤔

@t3chguy
Copy link
Member

t3chguy commented Oct 29, 2019

Those were my findings last week also :((
Mentioned them in standup but did not document them here, makes very little sense

@jryans jryans self-assigned this Oct 29, 2019
jryans added a commit to matrix-org/matrix-react-sdk that referenced this issue Oct 29, 2019
This adds some temporary logging to investigate
element-hq/element-web#11120.
@jryans
Copy link
Collaborator

jryans commented Oct 29, 2019

We'll start by adding a diagnostic log to better understand what's happening here.

@turt2live, please continue to send rageshakes when this happens so we can see what we learn from the logging.

@jryans
Copy link
Collaborator

jryans commented Oct 31, 2019

For now, I'll take this off the project board until we get a new rageshake.

@t3chguy
Copy link
Member

t3chguy commented Dec 27, 2019

I tried to have a cursory glance at this but without having this occur locally I'm stuck, passing this back off to you as you're assigned @jryans - see above-referenced rageshake

@dbkr
Copy link
Member

dbkr commented Jan 29, 2020

I appear to be getting this, albeit by creating a room and then refreshing the client shortly afterwards. The stack trace you wanted is:

Stacktrace for https://github.com/vector-im/riot-web/issues/11120 
    in EventTile (created by MessagePanel)
    in MessagePanel (created by TimelinePanel)
    in TimelinePanel (created by RoomView)
    in RoomView (created by LoggedInView)
    in LoggedInView (created by MatrixChat)
    in MatrixChat

although I'm not sure what else we would have expected.

@jryans jryans removed their assignment Jan 29, 2020
@jryans
Copy link
Collaborator

jryans commented Jan 29, 2020

Removed assignment, as I'm not sure I'll have time any more, but we should definitely figure this out.

dbkr added a commit to matrix-org/matrix-js-sdk that referenced this issue Jan 29, 2020
dbkr added a commit to matrix-org/matrix-react-sdk that referenced this issue Jan 29, 2020
When the client loaded, we'd load the room view which would try to
get a room object from the client, fail because the client wasn't
ready, think it's because the user wasn't joined to the room and
start peeking instead.

Coupled with the bug fixed by matrix-org/matrix-js-sdk#1188
this would have caused element-hq/element-web#11120
jryans added a commit to matrix-org/matrix-react-sdk that referenced this issue May 26, 2021
The cited issue (element-hq/element-web#11120) has
since been fixed, so this "temporary" (2 years ago) logging is no longer needed.
su-ex added a commit to SchildiChat/element-web that referenced this issue Feb 22, 2024
* Remove `feature_favourite_messages` as it is has been abandoned for now ([\#11097](matrix-org/matrix-react-sdk#11097)). Fixes element-hq#25555.
* Don't setup keys on login when encryption is force disabled ([\element-hq#11125](matrix-org/matrix-react-sdk#11125)). Contributed by @kerryarchibald.
* OIDC: attempt dynamic client registration ([\element-hq#11074](matrix-org/matrix-react-sdk#11074)). Fixes element-hq#25468 and element-hq#25467. Contributed by @kerryarchibald.
* OIDC: Check static client registration and add login flow ([\element-hq#11088](matrix-org/matrix-react-sdk#11088)). Fixes element-hq#25467. Contributed by @kerryarchibald.
* Improve message body output from plain text editor ([\element-hq#11124](matrix-org/matrix-react-sdk#11124)). Contributed by @alunturner.
* Disable encryption toggle in room settings when force disabled ([\element-hq#11122](matrix-org/matrix-react-sdk#11122)). Contributed by @kerryarchibald.
* Add .well-known config option to force disable encryption on room creation ([\element-hq#11120](matrix-org/matrix-react-sdk#11120)). Contributed by @kerryarchibald.
* Handle permalinks in room topic ([\element-hq#11115](matrix-org/matrix-react-sdk#11115)). Fixes element-hq#23395.
* Add at room avatar for RTE ([\element-hq#11106](matrix-org/matrix-react-sdk#11106)). Contributed by @alunturner.
* Remove new room breadcrumbs ([\element-hq#11104](matrix-org/matrix-react-sdk#11104)).
* Update rich text editor dependency and associated changes ([\element-hq#11098](matrix-org/matrix-react-sdk#11098)). Contributed by @alunturner.
* Implement new model, hooks and reconcilation code for new GYU notification settings ([\element-hq#11089](matrix-org/matrix-react-sdk#11089)). Contributed by @justjanne.
* Allow maintaining a different right panel width for thread panels ([\element-hq#11064](matrix-org/matrix-react-sdk#11064)). Fixes element-hq#25487.
* Make AppPermission pane scrollable ([\element-hq#10954](matrix-org/matrix-react-sdk#10954)). Fixes element-hq#25438 and element-hq#25511. Contributed by @luixxiul.
* Integrate compound design tokens ([\element-hq#11091](matrix-org/matrix-react-sdk#11091)). Fixes vector-im/internal-planning#450.
* Don't warn about the effects of redacting state events when redacting non-state-events ([\element-hq#11071](matrix-org/matrix-react-sdk#11071)). Fixes element-hq#8478.
* Allow specifying help URLs in config.json ([\element-hq#11070](matrix-org/matrix-react-sdk#11070)). Fixes element-hq#15268.
* Fix error when generating error for polling for updates ([\element-hq#25609](element-hq#25609)).
* Fix spurious notifications on non-live events ([\element-hq#11133](matrix-org/matrix-react-sdk#11133)). Fixes element-hq#24336.
* Prevent auto-translation within composer ([\#11114](matrix-org/matrix-react-sdk#11114)). Fixes element-hq#25624.
* Fix caret jump when backspacing into empty line at beginning of editor ([\#11128](matrix-org/matrix-react-sdk#11128)). Fixes element-hq#22335.
* Fix server picker not allowing you to switch from custom to default ([\element-hq#11127](matrix-org/matrix-react-sdk#11127)). Fixes element-hq#25650.
* Consider the unthreaded read receipt for Unread dot state ([\element-hq#11117](matrix-org/matrix-react-sdk#11117)). Fixes element-hq#24229.
* Increase RTE resilience ([\element-hq#11111](matrix-org/matrix-react-sdk#11111)). Fixes element-hq#25277. Contributed by @alunturner.
* Fix RoomView ignoring alias lookup errors due to them not knowing the roomId ([\element-hq#11099](matrix-org/matrix-react-sdk#11099)). Fixes element-hq#24783 and element-hq#25562.
* Fix style inconsistencies on SecureBackupPanel ([\element-hq#11102](matrix-org/matrix-react-sdk#11102)). Fixes element-hq#25615. Contributed by @luixxiul.
* Remove unknown MXIDs from invite suggestions ([\element-hq#11055](matrix-org/matrix-react-sdk#11055)). Fixes element-hq#25446.
* Reduce volume of ring sounds to normalised levels ([\element-hq#9143](matrix-org/matrix-react-sdk#9143)). Contributed by @JMoVS.
* Fix slash commands not being enabled in certain cases ([\element-hq#11090](matrix-org/matrix-react-sdk#11090)). Fixes element-hq#25572.
* Prevent escape in threads from sending focus to main timeline composer ([\element-hq#11061](matrix-org/matrix-react-sdk#11061)). Fixes element-hq#23397.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
T-Defect Z-Soft-Crash React soft crash caught by an error boundary
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants