element-hq / element-hq/element-web

Timeline won't load more messages - `TypeError: Cannot read properties of null (reading 'getEvents')`

Open
#22,899 1 comment 0 reactions 0 assignees View on GitHub
A-Timeline O-Uncommon S-Critical T-Defect
Dominant language
TypeScript
Stars
13.5k
Forks
2.8k
PR merge metrics
PR metrics pending

Description

### Steps to reproduce

1. Switch to a room
1. Scroll up and start paginating
1. Get stuck with a loading indicator
- It was stuck the whole day. Every time I came back it wouldn't get further
1. Eventually pressed the up arrow to view messages and now it has a loading indicator on the bottom and top
1. Everything is broken now and I see errors in the console
- Screenshots in [rageshake](https://github.com/matrix-org/element-web-rageshakes/issues/14197)

```
TypeError: Cannot read properties of null (reading 'getEvents')
at TimelineWindow.getEvents (timeline-window.ts:378:37)
at TimelinePanel_TimelinePanel.getEvents (TimelinePanel.tsx:1412:59)
at TimelinePanel.tsx:534:73
```

### Outcome

#### What did you expect?

Timeline is able to scrollback and is able to recover.

#### What happened instead?

Timeline broken on both ends.

### Operating system

Windows 10

### Browser information

Chrome Version 103.0.5060.114

### URL for webapp

develop.element.io

### Application version

1519d5672e4c-react-0053f21286e8-js-32bb4b1fc464

### Homeserver

matrix.org

### Will you send logs?

Yes -> https://github.com/matrix-org/element-web-rageshakes/issues/14197

Contributor guide

Open the contributing guide

Research direction

Read timeline-window.ts around TimelineWindow.getEvents and TimelinePanel.tsx around TimelinePanel.getEvents. First reproduce the stuck loading state while paginating in a room and inspect the reported null getEvents error. Done means the timeline can scroll back and recover without breaking at either end.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
frontend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.