element-hq / element-hq/element-web

Clicking on the jump to unreads button throws a `Failed to load timeline position` error and dumps me in a blank timeline

Open
#20,927 17 comments 17 reactions 1 assignee Claimed by @t3chguy View on GitHub
A-Read-Marker A-Threads A-Timeline O-Occasional S-Minor T-Defect X-Needs-Product
Dominant language
TypeScript
Stars
13.5k
Forks
2.8k
PR merge metrics
PR metrics pending

Description

Clicking on the jump to unreads button throws a `Failed to load timeline position` error and dumps me in a blank timeline

Related to:

- https://github.com/vector-im/element-web/issues/20397
- https://github.com/vector-im/element-web/issues/4257

### Steps to reproduce

1. Visit a room
1. Click the "Jump to first unread message." `^` up-arrow
![](https://user-images.githubusercontent.com/558581/152602295-4dee9b11-2e0c-4782-bb1c-10e42a004c08.png)
1. `Failed to load timeline position` error modal is thrown up
> Failed to load timeline position
>
> Tried to load a specific point in this room's timeline, but was unable to find it.

![](https://user-images.githubusercontent.com/558581/152602305-7068332b-156b-46e7-a782-2395171786f0.png)
1. After exiting out of the modal, the timeline is blank and no way to scroll
1. Have to switch rooms to get the timeline again

---

Reproduction/rage-shake logs: https://github.com/matrix-org/element-web-rageshakes/issues/10392

I was in the `!ltpmbfSHehPTwnLDNS:jki.re` room and clicked on the "Jump to first unread message." arrow and got the `Failed to load timeline position` error modal. With the following error in the devtools console.

Relevant code for the error: [`src/components/structures/TimelinePanel.tsx#L1219-L1244`](https://github.com/matrix-org/matrix-react-sdk/blob/7f3f18604417d9567c109201673e60a5f24a30ce/src/components/structures/TimelinePanel.tsx#L1219-L1244)
```
Error loading timeline panel at $iR-8DJRGNhmIpDFDHmRy70gUTurU77eCba-Jt5YIXbo: Error: getEventTimeline result didn't include requested event
overrideMethod @ react_devtools_backend.js:4061
consoleObj. @ rageshake.ts:65
(anonymous) @ instrument.js:111
(anonymous) @ logger.ts:50
onError @ TimelinePanel.tsx:1181
Promise.then (async)
loadTimeline @ TimelinePanel.tsx:1243
(anonymous) @ TimelinePanel.tsx:1003
(anonymous) @ RoomView.tsx:1659
...
```

I'm not sure what room the `$iR-8DJRGNhmIpDFDHmRy70gUTurU77eCba-Jt5YIXbo` event pertains to. Is there a way to look it up and tell which room it actually belongs to?

### Outcome

#### What did you expect?

Jump to first unread button jumps me to whatever the unreads are for that room. Or not be shown if it was for another room and this room doesn't have any unreads.

#### What happened instead?

Error modal is shown for a situation that probably shouldn't occur in the first place.

### Operating system

Windows 10

### Browser information

Chrome 97.0.4692.99

### URL for webapp

https://develop.element.io/

### Application version

Element version: 64242a004eb7-react-78e78292cb62-js-b07457726bf5 Olm version: 3.2.8

### Homeserver

matrix.org

### Will you send logs?

Yes ->

- Reproduction from @MadLittleMods, https://github.com/matrix-org/element-web-rageshakes/issues/10392
- Reproduction from @MadLittleMods, https://github.com/matrix-org/element-web-rageshakes/issues/10919
- Reproduction from @MadLittleMods, https://github.com/matrix-org/element-web-rageshakes/issues/10920
- Reproduction from @MadLittleMods, https://github.com/matrix-org/element-web-rageshakes/issues/11235
- Reproduction from @MadLittleMods, https://github.com/matrix-org/element-web-rageshakes/issues/12429
- Reproduction from @davidmehren, https://github.com/matrix-org/element-web-rageshakes/issues/10677
- Reproduction from @MadLittleMods, https://github.com/matrix-org/element-web-rageshakes/issues/20281

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.