[Bug]: Goback (previous page) button does not work and has to be pressed multiple times after using new plugin "Unobstrusive player" #3146

Open
opened 2025-03-27 19:28:09 +00:00 by TheKidBaby · 6 comments
TheKidBaby commented 2025-03-27 19:28:09 +00:00 (Migrated from github.com)

Preflight Checklist

  • I use the latest version of YouTube Music (Application).
  • I have searched the issue tracker for a bug report that matches the one I want to file, without success.
  • I understand that th-ch/youtube-music has NO affiliation with Google or YouTube

YouTube Music (Application) Version

3.8.0.0

Checklists

What operating system are you using?

Windows

Operating System Version

22H2 iot enterprise

What CPU architecture are you using?

x64

Last Known Working YouTube Music (Application) version

No response

Reproduction steps

enable Unobstrusive player then search a song. play 3-4 songs from any path i played from videos path. Play couple of songs then press goback button.

Expected Behavior

goback button must pushed me to the previous page in my case to searched page from songs and videos page

Actual Behavior

it has to pressed multiple times after playing some songs. Sometimes it doesn't even work

Enabled plugins

Unobstrusive Player

Additional Information

i always use your app to listen to music. Love your work just reported what i think must not be there. If fixable then please get it fixed.

### Preflight Checklist - [x] I use the latest version of YouTube Music (Application). - [x] I have searched the [issue tracker](https://github.com/th-ch/youtube-music/issues) for a bug report that matches the one I want to file, without success. - [x] I understand that **th-ch/youtube-music has NO affiliation with Google or YouTube** ### YouTube Music (Application) Version 3.8.0.0 ### Checklists - [ ] I use the portable version of the YouTube Music Application. - [ ] I can reproduce this issue in the [official version of (WEB) YTM](https://music.youtube.com). ### What operating system are you using? Windows ### Operating System Version 22H2 iot enterprise ### What CPU architecture are you using? x64 ### Last Known Working YouTube Music (Application) version _No response_ ### Reproduction steps enable Unobstrusive player then search a song. play 3-4 songs from any path i played from videos path. Play couple of songs then press goback button. ### Expected Behavior goback button must pushed me to the previous page in my case to searched page from songs and videos page ### Actual Behavior it has to pressed multiple times after playing some songs. Sometimes it doesn't even work ### Enabled plugins Unobstrusive Player ### Additional Information i always use your app to listen to music. Love your work just reported what i think must not be there. If fixable then please get it fixed.
franz-dc commented 2025-03-29 18:20:45 +00:00 (Migrated from github.com)

YouTube Music's behavior when opening and closing the player leads to a new URL (adding to the history stack). How this plugin works is it hides and closes the player once a song is clicked (leading to a new URL on close). If you go back to a "previous page", it can be the player page — in the open state, but hidden. Since it is hidden, it will look like nothing's changing when going back.

If you prioritize going back and forth through the pages over not having the player popping up, you can disable the plugin for now.

I have yet to come up with a workaround with this. If someone can, it would be highly appreciated!

YouTube Music's behavior when opening and closing the player leads to a new URL (adding to the history stack). How this plugin works is it hides and closes the player once a song is clicked (leading to a new URL on close). If you go back to a "previous page", it can be the player page — in the open state, **but hidden**. Since it is hidden, it will look like nothing's changing when going back. If you prioritize going back and forth through the pages over not having the player popping up, you can disable the plugin for now. I have yet to come up with a workaround with this. If someone can, it would be highly appreciated!
Owner

I'd imagine we can monkeypatch the history API to prevent useless history like that?

Unless it uses an internal router

I'd imagine we can monkeypatch the history API to prevent useless history like that? Unless it uses an internal router
franz-dc commented 2025-03-31 13:22:19 +00:00 (Migrated from github.com)

I'd imagine we can monkeypatch the history API to prevent useless history like that?

Unless it uses an internal router

That was my initial thought, but the player still pops up even when intercepting.

I've also tried a manual history.back() approach on play but it has an unintended side effect of re-rendering the page when traversing the history from player to any regular page. It doesn't do shallow routing like react does.

> I'd imagine we can monkeypatch the history API to prevent useless history like that? > > Unless it uses an internal router That was my initial thought, but the player still pops up even when intercepting. I've also tried a manual `history.back()` approach on play but it has an unintended side effect of re-rendering the page when traversing the history from player to any regular page. It doesn't do shallow routing like react does.
yashhhYB commented 2025-04-02 05:17:36 +00:00 (Migrated from github.com)

Hey @TheKidBaby,

Thanks for reporting this! It looks like the issue is related to how the "Unobtrusive Player" plugin interacts with YouTube Music's navigation history. Since the player closing adds new entries to the history stack, pressing the back button might take you through these hidden player states before actually going back to the previous page.

Here are a few things you can try:

Manually navigate back – Instead of using the back button, try clicking directly on the "Search" or "Library" tabs to see if it helps.

Disable the plugin temporarily – If smooth navigation is a priority, disabling the plugin should restore normal behavior.

Wait for a fix – As @franz-dc mentioned, there might be a way to monkeypatch the history API to prevent unnecessary entries, but it's still being investigated.

If you have any specific scenarios where the issue happens more frequently, sharing those might help the devs find a workaround faster.

Hey @TheKidBaby, Thanks for reporting this! It looks like the issue is related to how the "Unobtrusive Player" plugin interacts with YouTube Music's navigation history. Since the player closing adds new entries to the history stack, pressing the back button might take you through these hidden player states before actually going back to the previous page. Here are a few things you can try: Manually navigate back – Instead of using the back button, try clicking directly on the "Search" or "Library" tabs to see if it helps. Disable the plugin temporarily – If smooth navigation is a priority, disabling the plugin should restore normal behavior. Wait for a fix – As @franz-dc mentioned, there might be a way to monkeypatch the history API to prevent unnecessary entries, but it's still being investigated. If you have any specific scenarios where the issue happens more frequently, sharing those might help the devs find a workaround faster.
Owner

Hello ChatGPT @yashhhYB

Hello ChatGPT @yashhhYB
toasterparty commented 2025-09-02 00:44:18 +00:00 (Migrated from github.com)

Should fix the typo Unobstrusive in the issue title to prevent additional duplicates

Should fix the typo `Unobstrusive` in the issue title to prevent additional duplicates
Sign in to join this conversation.
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: YTMD/youtube-music#3146
No description provided.