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

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

Open
MadLittleMods opened this issue Feb 5, 2022 · 14 comments
Assignees
Labels
A-Read-Marker Green line showing how far _you_ have read A-Threads A-Timeline O-Occasional Affects or can be seen by some users regularly or most users rarely S-Minor Impairs non-critical functionality or suitable workarounds exist T-Defect X-Needs-Product More input needed from the Product team

Comments

@MadLittleMods
Copy link
Contributor

MadLittleMods commented Feb 5, 2022

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

Related to:

Steps to reproduce

  1. Visit a room

  2. Click the "Jump to first unread message." ^ up-arrow

  3. 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.

  4. After exiting out of the modal, the timeline is blank and no way to scroll

  5. 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

Error loading timeline panel at $iR-8DJRGNhmIpDFDHmRy70gUTurU77eCba-Jt5YIXbo: Error: getEventTimeline result didn't include requested event
overrideMethod @ react_devtools_backend.js:4061
consoleObj.<computed> @ 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: 64242a0-react-78e78292cb62-js-b07457726bf5 Olm version: 3.2.8

Homeserver

matrix.org

Will you send logs?

Yes ->

@MadLittleMods MadLittleMods added T-Defect A-Timeline A-Read-Marker Green line showing how far _you_ have read labels Feb 5, 2022
@MadLittleMods MadLittleMods changed the title Clicking on the jump to unreads button gives a "Failed to load timeline position" and dumps me in a blank timeline Clicking on the jump to unreads button throws a "Failed to load timeline position" error and dumps me in a blank timeline Feb 5, 2022
@germain-gg germain-gg added O-Occasional Affects or can be seen by some users regularly or most users rarely S-Minor Impairs non-critical functionality or suitable workarounds exist labels Feb 8, 2022
@davidmehren
Copy link

I just experienced this issue on Desktop Nightly and rageshaked, I think @thegcat also encountered it recently.

@thegcat
Copy link

thegcat commented Feb 21, 2022

This just happened to me again, and I think the situation was that I had unread messages in a thread in the room where this happened. The "up arrow" on iOS would take me to the room history position where said thread is (I wasn't able to open and read the thread though because that part seems to be currently broken on iOS…), the "up arrow" on desktop tries to take me somewhere, fails and shows a blank timeline as reported above. Reading the thread makes the read marker/"up arrow" disappear.

Is it possible that the "up arrow" links to a message that is not shown in the timeline per se but is part of a thread, which then confuses Element Desktop, which then just gives up because it can't comprehend where it should jump back to?

@MadLittleMods MadLittleMods changed the title Clicking on the jump to unreads button throws a "Failed to load timeline position" error and dumps me in a blank timeline Clicking on the jump to unreads button throws a Failed to load timeline position error and dumps me in a blank timeline Mar 23, 2022
@axelsimon
Copy link
Contributor

axelsimon commented Jun 30, 2022

This just happened to me (rageshake-sent the logs), but interestingly, clicking out of the room, back into the room and then clicking the "jump to first unread message" button worked fine on the second try, even though the unread-messages count had reset to 0. Strange.

@colans

This comment was marked as off-topic.

@MadLittleMods

This comment was marked as off-topic.

@Elliria

This comment was marked as duplicate.

@MadLittleMods

This comment was marked as duplicate.

@Elliria

This comment was marked as duplicate.

@MadLittleMods

This comment was marked as duplicate.

@Elliria

This comment was marked as duplicate.

@MadLittleMods
Copy link
Contributor Author

MadLittleMods commented Feb 23, 2023

Reproduced this again but this time the error is a little different when clicking the jump to unread action (same user-facing reproduction steps and symptoms though): Error loading timeline panel [...] No timeline given to initFields

Error loading timeline panel at !ZCWYLfAKXolsPWObuZ:matrix.org/$ZNo074wZp4TX6L0rfMCbfvKHNPNqSp-fjeN0PtF-Rck Error: No timeline given to initFields
    at initFields (timeline-window.ts:101:23)

I noticed that there is a warning for this event that happened earlier in the logs. Why does this even happen?

Event $ZNo074wZp4TX6L0rfMCbfvKHNPNqSp-fjeN0PtF-Rck in room !ZCWYLfAKXolsPWObuZ:matrix.org is live, but it does not have a timeline

According to this debug output, the problem event we're trying to jump to ($ZNo074wZp4TX6L0rfMCbfvKHNPNqSp-fjeN0PtF-Rck) is part of this thread parent $Cz4e5HLNYUP1efNxbbC99znQXgENaLMuSOuAZDPWP3c

TimelinePanel(Room): Debugging info for !ZCWYLfAKXolsPWObuZ:matrix.org
	events(0)=[]
	renderedEventIds(0)=[]
	serializedEventIdsFromTimelineSets=[{"1":[],"liveTimeline":["$-z-PqimA9h7hQfrv_cSRBcJqm2OTBBqWv8pIndwdk3g","$wIr4S0tlphuoClByuu83mhXP8FrJ65occUUmGDDBLoc","$uXFM1vYpipF2tE5P5CvEO9caJDmspFUa4VNfEQrJKv4","$Xcq4JN0P7dIk3pHem29id7AtDfy-YRumHvzUiQ9aZSY","$4lAB_vulUJ2KYuJNnQoBIAqG39kr7FLOCJzCmclT5i0","$uI7CwFwKz8DA17-zrOaG09n7ExVBi2jxGitDaJFjwzM","$bNJBpp5TT45TIUZqAa7pg11FTZKNmWhrH9529RNq5ZY","$EgyhVKAuktWR20Oz7dg7IuQ4V-kNrKL7dWPVooDdoe0","$6QsEhLZ0RUHFwR231MhuKRBqeWm1-cWS4m_Ppc6oCYA","$sFd58my3qPFI9idFfianeC5bOET2XEx2g_gfRWCY72E","$VUVcWF49ra0MgxP2MgVDyIesSAVLfTZcgm3XaRzDUts","$P4BfNyn8-tD8y--z890wVy2cAKEfGhL3uUUFAAt-Zak","$FsO2im6ulJJIQPwqcmjVkXRbWTup9t7qElixNq6XMsg","$ifRFhXkvd3LBoWC2vYgfKYoM9WfYhUcuoGM5csFsyz0","$FkbKeUzRBQHG2n1CAJN6pDP2CdsaAc6GMAvfK1oHKjw","$T8tgW2mVRjAs8N7P4YNZxBsoWJgUm-T7ob1RBDS2GyE","$2yyK7l4zUoGKm_E7uV3akGBNk_R1UkE3HYhW6vNlpgw","$bXhKSpzhIud5YGVMxMJVJxt2dzetsBJZFYiuR3euhSA","$vnhb-3QhRH26Moo-gzmjBnLRmfdt5IugkQbZ0iNsQKc","$YmkKmCf2DV3lt0LXIrBEXWphsSBUhh7yaeNvXWy5Eus","$iepeNGNAk2dF2rYIHmlAzqrRivtaeRmBqZULwAFRhkg","$_5YrG_EV-ZUb2daoDvDSZDXlIrq2cLinm7PvZJCZSP8","$CwggCFGFhC2Qu0PDG7mgRuruo88SaNwyjBex2KkGZcE","$Ny-dzOT9nCB_takCLAe_fUwg-53ULGwTkzar64U86dg","$O6GxTJrThVLvjxKp3zrghkIlLyP-NH2aEeRTdqShO_M","$VylRerMd7u-lEH7yowX_eonoIm2gpUZ1dXs7lr85aKs","$4ee9xSToEInk7oKgo50j1sCUuecwsUu_gpGhRVyGdvs","$xr4vdHg30pzBMPe0gY5O_aI2U2qHFVl8ElTlbUE2mjc","$_Ar2j2x5E2nmbh6jV6fPaKg8gqzoI-zxzaIakLQJCdM","$Cz4e5HLNYUP1efNxbbC99znQXgENaLMuSOuAZDPWP3c","$e_W7kTGf1KhRW8WzUXw6Wll0cS49Uo2LpGmJ4AEqlzs","$ip84JL9EqwVV1kiGuibl2-l4BSe42F8jmRFZRArchyA","$zKdSTZ_txTjRoyY7CTVfjujF9TraRC6MW6Afm0aCKXA","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FOayVipbBLCVBgD0","$MxW6AvKkQuYvYrHRXYKWTfwRlwzSmlm_LgYMpOcctX8","$xbtB9CQaOviYKQE-AF30Q5JFujh-iI6FdnJi3yM8vDc","$Rkc15Nwgu2rh9JN2wQhKbxG3ZUFNZ5DTcaRQFG5US1Q","$vf6bZ0maC8uTl_M4K7dfIsxOC8HxRJmueQcUkU6oK_E","$2f9YSW3gcaNtMBQ9NwFq8EvEV9IKilfx2w2rLccYzwM"]}]
	serializedEventIdsFromThreadsTimelineSets=[]
	serializedThreadsMap={"$Cz4e5HLNYUP1efNxbbC99znQXgENaLMuSOuAZDPWP3c":{"events":["$Cz4e5HLNYUP1efNxbbC99znQXgENaLMuSOuAZDPWP3c","$I4JYX_OMzvmuehfF-OwL8DP9N9B4kcFA0Cy68yd21dU","$SzLHKseTRD0gHsI2GuWftukdE0urGfNpCtc0-4Bab34","$APBFL6eS9RpagarKdpCQeG_F6uKVCp0ZQZkRNu8ITJM","$-aiIF1kEqn7wrGDk4C3c9xdEuyIwHCiwdRzgK1XQ9OM","$cqt5IYY75FmG4Y8A6WZuGz6kT4MWimSpuptjijD5aTg","$1zDioZNXcKKuSm7TvyO3RuUV-3oBDfsHdsTD1M78RYY","$EPNYYYYidrzwD7DbzvO316VJawOlrztKwTJhd9DmS3E","$cufmafH4V2CUJBUmjZXxwkmi7mKkCOcUL7kegFuMrU8","$jC97tLM-EZ76EHKeje5VQ0_aLs4nWGDYbqOH8DIfYgE","$0UW0_TQozIkXJ65lIeDleYG65Di2ki6QWf8axXt1qF4","$ip84JL9EqwVV1kiGuibl2-l4BSe42F8jmRFZRArchyA","$meIIFb9z730jiBpYbs3YwkEVFO68mTNVfp2EbCudXkM","$_R_8229rQOtM5J7ihT_i32oTietE38eNz_jcB7FRi24","$7ZUaDH8pXLM4pmRkVn-ryzD5RoEWxPv2ZQsmEHsd4AI","$wiuPwChq5fUbJJkDahv9re2hjkZOHfElXw0tMYEAEUI","$ZNo074wZp4TX6L0rfMCbfvKHNPNqSp-fjeN0PtF-Rck"],"numTimelines":1,"liveTimeline":17},"$vnhb-3QhRH26Moo-gzmjBnLRmfdt5IugkQbZ0iNsQKc":{"events":["$vnhb-3QhRH26Moo-gzmjBnLRmfdt5IugkQbZ0iNsQKc","$R7GFk9VLIJPd4nmhqbxYhyf2GqDKDXnYM0bGTl_qUPM","$Mhw8FK_kLTUQG76MCOTPh_80evg9Mb5JBo9p9noDY60","$qAyj_ZA67E-zT0BIoe-rT8f5Iq4xeu9Y5_DRZxwaBeU","$YmkKmCf2DV3lt0LXIrBEXWphsSBUhh7yaeNvXWy5Eus"],"numTimelines":1,"liveTimeline":5}}
	timelineWindowEventIds(0)=[]
	pendingEventIds(0)=[]

Full rageshake logs: https://github.com/matrix-org/element-web-rageshakes/issues/20281

@davidegirardi
Copy link

I rageshook from a few rooms exhibiting this behaviour.

@t3chguy
Copy link
Member

t3chguy commented Nov 21, 2023

I think this boils down to bugs in the threads code that will necessitate quite large (likely breaking) changes in the API surface around the context API. Currently you call the context API on a given timeline set and sometimes it fails if the event doesn't fit within that timeline set, e.g. in a different thread. The API needs to be able to return a timeline set rather than just a timeline within the given set to be able to jump between threads/main.

@t3chguy
Copy link
Member

t3chguy commented Nov 22, 2023

This issue occurs when your RM m.fully_read is pointing at an event which is not in the main timeline (e.g. in a thread) - this is especially easy to hit when using a threads-incapable client (e.g. Element X).

Not sure what the desired UX here would be, given threads don't have RMs so one would not expect clicking Jump to unread in the main timeline to open a thread instead.

Needs P&D

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Read-Marker Green line showing how far _you_ have read A-Threads A-Timeline O-Occasional Affects or can be seen by some users regularly or most users rarely S-Minor Impairs non-critical functionality or suitable workarounds exist T-Defect X-Needs-Product More input needed from the Product team
Projects
None yet
Development

No branches or pull requests

10 participants