FoxxMD / multi-scrobbler

Scrobble plays from multiple sources to multiple clients
https://foxxmd.github.io/multi-scrobbler
MIT License
299 stars 14 forks source link

YouTube Music Authentication fails unless cookies from Chrome used #98

Closed Nikey646 closed 9 months ago

Nikey646 commented 9 months ago

Describe the bug Unable to log in to YouTube Music anymore.

To Reproduce Steps to reproduce the behavior:

  1. Try to log in to the YouTube Music Source.

Expected behavior To have the source working.

Logs If possible reproduce the issue with debug logging ON

2023-09-16T17:21:07+10:00 error : [Sources] [Ytmusic - MyYTMusic] Cannot start polling because source is not authenticated correctly.
2023-09-16T17:21:07+10:00 info : [App] Scheduler started.
2023-09-16T17:21:05+10:00 warn : [Sources] ytmusic (MyYTMusic) source auth failed.
2023-09-16T17:21:05+10:00 debug : [Sources] Checking ytmusic (MyYTMusic) source auth...
2023-09-16T17:21:05+10:00 info : [Sources] ytmusic (MyYTMusic) source initialized
2023-09-16T17:21:05+10:00 debug : [Sources] Attempting ytmusic (MyYTMusic) initialization...
2023-09-16T17:21:05+10:00 debug : [Sources] (MyYTMusic) Constructing ytmusic source

Versions (please complete the following information): Provide version information for any related sources/clients.

mindlessp0tatoe commented 9 months ago

Hello @Nikey646, I had a similar issue to this. Please see: #97

What fixed it for me was using google chrome (not Firefox or brave etc) as those did not work for me. Could you try installing chrome and trying again perhaps?

Nikey646 commented 9 months ago

Hello @Nikey646, I had a similar issue to this. Please see: #97

What fixed it for me was using google chrome (not Firefox or brave etc) as those did not work for me. Could you try installing chrome and trying again perhaps?

That is weird, and probably still a bug. Edge / Firefox don't work, and I imagine anything else besides chrome won't work.

mindlessp0tatoe commented 9 months ago

That is weird, and probably still a bug. Edge / Firefox don't work, and I imagine anything else besides chrome won't work.

Does this mean the issue is resolved with using chrome?

Nikey646 commented 9 months ago

That is weird, and probably still a bug. Edge / Firefox don't work, and I imagine anything else besides chrome won't work.

Does this mean the issue is resolved with using chrome?

I mean, the issue would be resolved when it can work from any browser. This is a work around, not a fix hence not closing the issue.

The base library that was originally used before forking to fix my other issue (#86) has been updated to include all cookies rather than the "required" cookies that were previously used to "future proof" may fix this.

FoxxMD commented 9 months ago

Unfortunately there's nothing I can currently do about this.

The NPM package at 1.6.0 of the base library youtube-music-ts-api does indeed make cookies retrieved from FF work. However, building the library from source at the 1.6.0 commit does not create a reproducible build

diff

and the source version does not work with FF cookies. I suspect the author published additional work in the NPM package that is not present in the repo.

Since the author has not yet merged my fix for #86 I cannot use the official build and since the source build does not work I cannot just update my downstream fork with the included fix.

So for now everyone will need to use chrome to get cookies. If you'd like to get this to resolved you can comment on my PR so the author will notice it?

Nikey646 commented 9 months ago

You're all good @FoxxMD, I understand there is nothing you can do right now, unfortunately it means this issue just kinda gets to sit open.

At least there is a work around and this issue clearly showing the work around for anyone looking for issues about YouTube Music, as un-ideal as the solution is.

FoxxMD commented 9 months ago

The upstream library merged my PR for #86 and I've updated MS to use the latest version which includes the cookies fix. You can try it on develop git branch or docker image.

FoxxMD commented 9 months ago

This is included in 0.6.0. I'll re-open this if there are still issues.