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

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

Open
3 of 5 tasks
TheKidBaby opened this issue Mar 27, 2025 · 5 comments
Labels
bug Something isn't working

Comments

@TheKidBaby
Copy link

TheKidBaby commented Mar 27, 2025

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.

@TheKidBaby TheKidBaby changed the title [Bug]: Goback (previous page) button does not work and has to be pressed multiple times after using new plugin "Unobstrusive player"" [Bug]: Goback (previous page) button does not work and has to be pressed multiple times after using new plugin "Unobstrusive player" Mar 27, 2025
@JellyBrick JellyBrick added the bug Something isn't working label Mar 28, 2025
@franz-dc
Copy link
Contributor

franz-dc commented Mar 29, 2025

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!

@ArjixWasTaken
Copy link
Contributor

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

Unless it uses an internal router

@franz-dc
Copy link
Contributor

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
Copy link

yashhhYB commented Apr 2, 2025

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.

@ArjixWasTaken
Copy link
Contributor

Hello ChatGPT @yashhhYB

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

5 participants