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

Reader: Back Navigation Not Working Properly #98359

Open
artemiomorales opened this issue Jan 14, 2025 · 10 comments
Open

Reader: Back Navigation Not Working Properly #98359

artemiomorales opened this issue Jan 14, 2025 · 10 comments
Labels
[Feature] Reader The reader site on Calypso. Needs triage Ticket needs to be triaged [Pri] TBD Review and assign an appropriate [Pri] label as soon as possible. [Type] Bug When a feature is broken and / or not performing as intended

Comments

@artemiomorales
Copy link
Contributor

artemiomorales commented Jan 14, 2025

Context and steps to reproduce

Back navigation is inconsistent throughout the Reader.

  • Start at /read and click on a recent post or author avatar
  • Click the back button — see that you go back to the previous page as expected
  • Now click on the Likes page
  • Click on a user avatar
  • Click the back button — see that you go to the wrong page (the page that you went to the first time you clicked the back button)

Expected: Browser goes to the Likes page.
Actual: Browser goes to another page in your history.

This seems to happen whenever you click the back button or navigate back once. After that, the backwards navigation breaks.

back-button-bug-v3.mp4

Site owner impact

Less than 20% of the total website/platform users

Severity

Moderate

What other impact(s) does this issue have?

No revenue impact

If a workaround is available, please outline it here.

No response

Platform

No response

@artemiomorales artemiomorales added [Feature] Reader The reader site on Calypso. [Type] Bug When a feature is broken and / or not performing as intended Needs triage Ticket needs to be triaged and removed Needs triage Ticket needs to be triaged labels Jan 14, 2025
@github-actions github-actions bot added the [Pri] TBD Review and assign an appropriate [Pri] label as soon as possible. label Jan 14, 2025
@holdercp holdercp self-assigned this Jan 15, 2025
@holdercp
Copy link
Contributor

holdercp commented Jan 15, 2025

@artemiomorales I've tried a bunch of different ways to reproduce this on trunk and production and I've been unsuccessful. Here's what I'm seeing:

Screen.Recording.2025-01-15.at.2.41.11.PM.mov

I noticed in your video that you're running Calypso locally. Is there a chance this is a bug with a development branch you were working on?

@holdercp
Copy link
Contributor

@artemiomorales Just following up on this. I was unable to reproduce on production. Are you still seeing this issue?

@artemiomorales
Copy link
Contributor Author

@holdercp Thanks for looking at this! Yes, I'm seeing the issue on production. Here's a screen capture:

back-button-bug-v4.mp4

It happens very consistently in Chrome for me, about 90% of the time. I've just tried in Firefox and it happens far less consistently, maybe 10% of the time.

Perhaps there's an issue with some of the users in my feed, or an issue with my account? I notice it when I'm just casually using the Reader; it's pretty frustrating. I wonder if anyone else can reproduce it? 🤔

@holdercp
Copy link
Contributor

I'm able to reproduce in Chrome and it looks like the issue started back around December 30th according to logs. I've identified what's happening but not why it's happening yet.

@holdercp
Copy link
Contributor

holdercp commented Jan 30, 2025

@artemiomorales

^ Nevermind. I discovered another issue with navigation that was introduced recently but it has slightly different behavior.

I'm still unable to reproduce even when using the latest Chrome and following the steps in the video
/read -> feed -> back button -> /activities/likes -> feed -> back button

I consistently land back on /activities/likes.

Do you see any console errors? My suspicion is the router state is not being updated correctly when going to /activities/likes so it "skips" that page when going back but I can't seem to trigger the bug on my end.

@artemiomorales
Copy link
Contributor Author

@holdercp I signed out, cleared my local storage and cookies, and still saw the issue. I just updated the latest version of Chrome, and still see the issue. It's actually worse now, potentially due to the recently merged profile page — the back navigation is now pretty broken in a few cases.

I sometimes see a Uncaught TypeError: Cannot read properties of undefined (reading 'replace') error, sometimes coupled with a rest-proxy/?v=2.0:21 POST https://public-api.wordpress.com/rest/v1.1/js-error?_envelope=1 429 (Too Many Requests) error, though it's not necessary to see the issue.

I also occasionally see a async-load-emoji-text.32cc1dfd0c564f465b3e.min.js:1 Uncaught (in promise) TypeError: Cannot read properties of undefined (reading '0') error, though it's not necessary to see the issue either.

Here's a video going through some flows, showing the back button working incorrectly with and without the above errors:

back-button-bug-v5.mp4

@artemiomorales
Copy link
Contributor Author

I also noticed another, potentially related issue and opened it today: #99166

@holdercp
Copy link
Contributor

The video was very helpful. It's very obvious this is an issue, I just cannot seem to reproduce it. The first issue with the "cannot read properties of undefined..." was fixed in #99123.

Still working at it but even after following your steps, I can't reproduce the issue. This makes me think it's due to some difference between our env's.

Do you see any errors or warnings when running locally? Maybe the error/warning is getting muted in production. There does seem to be some perceived slowness on the Likes page so maybe there's something with that specific page. Does it always occur when attempting to navigate back to activities/likes?

@Addison-Stavlo
Copy link
Contributor

I am not able to reproduce this either, what I am seeing is consistent with what @holdercp describes. 🤔

@holdercp
Copy link
Contributor

Sorry, I lost track of this with the board filtering. I'm going to move this to Unassigned since it's difficult to reproduce. Not trying to push work on you @artemiomorales but maybe you're the best person to investigate the root cause since you can reproduce reliably.

@holdercp holdercp removed their assignment Mar 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] Reader The reader site on Calypso. Needs triage Ticket needs to be triaged [Pri] TBD Review and assign an appropriate [Pri] label as soon as possible. [Type] Bug When a feature is broken and / or not performing as intended
Projects
None yet
Development

No branches or pull requests

3 participants