No login #17

Closed
opened 2020-03-19 15:21:22 +00:00 by fernandogobah · 16 comments
fernandogobah commented 2020-03-19 15:21:22 +00:00 (Migrated from github.com)

Error to login account google

This is error message
"This browser or app may not be secure. Learn more

Try using a different browser. If you’re already using a supported browser, you can refresh your screen and try again to sign in."

Error to login account google This is error message "This browser or app may not be secure. Learn more Try using a different browser. If you’re already using a supported browser, you can refresh your screen and try again to sign in."
th-ch commented 2020-04-12 20:21:53 +00:00 (Migrated from github.com)

Hey @fernandogobah , thanks for submitting the issue! I was able to reproduce the bug, and the latest version (v1.3.1) ships with a fix for this (by setting a specific user-agent).

Feel free to re-open this issue if it does not work properly!

Hey @fernandogobah , thanks for submitting the issue! I was able to reproduce the bug, and the latest version ([v1.3.1](https://github.com/th-ch/youtube-music/releases/tag/v1.3.1)) ships with a fix for this (by setting a specific user-agent). Feel free to re-open this issue if it does not work properly!
ivansaul commented 2020-08-03 15:11:15 +00:00 (Migrated from github.com)

Hello @th-ch , I had the same error as @fernandogobah . I am using the (.AppImage) on an ArchLinux. How could I solve that error, any idea?

Hello @th-ch , I had the same error as @fernandogobah . I am using the **(.AppImage)** on an ArchLinux. How could I solve that error, any idea?
th-ch commented 2021-01-15 21:56:35 +00:00 (Migrated from github.com)

Hey @ivansaul, do you still have the issue with the latest version 1.9.0?

Hey @ivansaul, do you still have the issue with the [latest version 1.9.0](https://github.com/th-ch/youtube-music/releases/tag/v1.9.0)?
ivansaul commented 2021-01-28 21:22:58 +00:00 (Migrated from github.com)

Hi @th-ch , I've been testing the app (.AppImage) for a few hours. At the moment I did not have any problems when logging in with my google account. But I found a couple of bugs with the plugins (discord and downloader).

The discord plugin does not work,, while downloader gives the impression that it will work fine, since it does the download and conversion process but the final file (.mp3) I couldn't find anywhere.
I haven't had a chance to test the (AUR) package yet. Thanks for developing this great app ❤️.

Hi @th-ch , I've been testing the app (**.AppImage**) for a few hours. At the moment I did not have any problems when logging in with my google account. But I found a couple of bugs with the plugins (discord and downloader). The discord plugin does not work,, while downloader gives the impression that it will work fine, since it does the download and conversion process but the final file (.mp3) I couldn't find anywhere. I haven't had a chance to test the (AUR) package yet. Thanks for developing this great app ❤️.
keliel commented 2021-12-11 19:37:52 +00:00 (Migrated from github.com)

Bumping this as it is still broken in version 1.14.0, as stated in the linked issue #507 .
Sadly it seems updating/faking the browser agent does not work anymore.

As far as I can tell this player is the most maintained and I would hate to use ytmdesktop again, which has not been updated for over a year, but has a working login. There the login window opens separately. Could this be the reason for it working smoothly?
Google themselves suggest using OAuth 2.0. Could this help here?

I am not at all familiar with electron apps, so sadly that is all I can contribute here :/

Bumping this as it is still broken in version 1.14.0, as stated in the linked issue #507 . Sadly it seems updating/faking the browser agent does not work anymore. As far as I can tell this player is the most maintained and I would hate to use [ytmdesktop](https://github.com/ytmdesktop/ytmdesktop) again, which has not been updated for over a year, but has a working login. There the login window opens separately. Could this be the reason for it working smoothly? Google themselves suggest using [OAuth 2.0](https://developers.google.com/identity/protocols/oauth2). Could this help here? I am not at all familiar with electron apps, so sadly that is all I can contribute here :/
Araxeus commented 2021-12-11 19:46:16 +00:00 (Migrated from github.com)

I'd like to help but don't know how as it works fine for me

try using different agents (https://github.com/th-ch/youtube-music/issues/507#issuecomment-987355507)
or updating electron version maybe (electron v14 deprecates the remote module - will probably need some code changes)

(OAuth is used for google login on external websites and is irrelevant here from what I know)

I'd like to help but don't know how as it works fine for me try using different agents (https://github.com/th-ch/youtube-music/issues/507#issuecomment-987355507) or updating electron version maybe (electron v14 deprecates the remote module - will probably need some code changes) (OAuth is used for google login on external websites and is irrelevant here from what I know)
keliel commented 2021-12-11 20:39:06 +00:00 (Migrated from github.com)

@Araxeus Thank's for the hint. Using the userAgent my chrome has set, seemed to do the trick. Could've thought of that 🤦‍♂️
Still would be good to not have to rely on workarounds, where users need to use the console, when having an electron app.

@Araxeus Thank's for the hint. Using the userAgent my chrome has set, seemed to do the trick. Could've thought of that 🤦‍♂️ Still would be good to not have to rely on workarounds, where users need to use the console, when having an electron app.
Araxeus commented 2021-12-12 16:37:44 +00:00 (Migrated from github.com)

Could you say what is the value of navigator.userAgent when it doesn't works vs when it does work?

You can check by writing it in devtools

Could you say what is the value of `navigator.userAgent` when it doesn't works vs when it does work? You can check by writing it in devtools
keliel commented 2021-12-12 20:18:47 +00:00 (Migrated from github.com)

Currently it is at Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) YouTubeMusic/1.14.0 Chrome/89.0.4389.128 Electron/12.2.2 Safari/537.36, which is what it was when it didn't work (if I remember correctly).
To fix the issue I just used the navigator.userAgent from my Chrome browser Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/96.0.4664.93 Safari/537.36.

I simply replaced it by updating the userAgent as a getter function once, before choosing to sign in. Since @mimaketi used a completely different string (obv. bc it is Arch), my best guess for the relevant difference is the YouTubeMusic/1.14.0 part. as maybe this is not a recognized "browser".

Currently it is at `Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) YouTubeMusic/1.14.0 Chrome/89.0.4389.128 Electron/12.2.2 Safari/537.36`, which is what it was when it didn't work (if I remember correctly). To fix the issue I just used the `navigator.userAgent` from my Chrome browser `Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/96.0.4664.93 Safari/537.36`. I simply replaced it by updating the userAgent as a getter function once, before choosing to sign in. Since @mimaketi used a completely different string (obv. bc it is Arch), my best guess for the relevant difference is the `YouTubeMusic/1.14.0` part. as maybe this is not a recognized "browser".
Araxeus commented 2021-12-12 22:00:19 +00:00 (Migrated from github.com)

this is the part where we set user agent:
5483f0ee36/index.js (L207-L211)

We are not setting chrome version so i'm guessing electron automatically adds this stuff which might be outdated because of an old electron version which might be causing the problem so maybe we just need to update the electron version?

this is the part where we set user agent: https://github.com/th-ch/youtube-music/blob/5483f0ee36f4fa29a9bcccadc87d2c1f767d446e/index.js#L207-L211 We are not setting chrome version so i'm guessing electron automatically adds this stuff which might be outdated because of an old electron version which might be causing the problem so maybe we just need to update the electron version?
Araxeus commented 2021-12-12 22:13:35 +00:00 (Migrated from github.com)

can you try the changes from this PR? #515
I could upload windows binaries if needed

can you try the changes from this PR? #515 I could upload windows binaries if needed
keliel commented 2021-12-12 23:02:29 +00:00 (Migrated from github.com)

@Araxeus Windows binaries/executables would be great, as I have installed it via chocolatey initially.

@Araxeus Windows binaries/executables would be great, as I have installed it via chocolatey initially.
Araxeus commented 2021-12-12 23:18:21 +00:00 (Migrated from github.com)
https://www.mediafire.com/folder/fvjiihmu3ka2z/Youtube-Music_useragents-patch
keliel commented 2021-12-12 23:35:42 +00:00 (Migrated from github.com)

User agent is now set even at startup and before going to sign-in page.
Sadly I still get presented with the insecure login page 😞
User agent can confirm is Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:95.0) Gecko/20100101 Firefox/95.0

User agent is now set even at startup and before going to sign-in page. Sadly I still get presented with the insecure login page 😞 User agent can confirm is `Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:95.0) Gecko/20100101 Firefox/95.0`
keliel commented 2021-12-12 23:49:33 +00:00 (Migrated from github.com)

This seems to be the only error showing up in console:

/signin/v2/identifier?ltmpl=music&service=youtube&uilel=3&passive=true&continue=https%3A%2F%2Fwww.youtube.com%2Fsignin%3Faction_handle_signin%3Dtrue%26app%3Ddesktop%26hl%3Den-GB%26next%3Dhttps%253A%252F%252Fmusic.youtube.com%252Fwatch%253Fv%253DEGslnMjjsqY%2526list%253DRDAMVMEGslnMjjsqY%2526index%253D0%26feature%3D__FEATURE__&hl=en-GB&flowName=GlifWebSignIn&flowEntry=ServiceLogin:1 Invalid 'X-Frame-Options' header encountered when loading 'https://accounts.youtube.com/': 'ALLOW-FROM https://accounts.google.com' is not a recognized directive. The header will be ignored.

Currently the workaround that worked for me initially also seems to no longer go though :/

This seems to be the only error showing up in console: ``` /signin/v2/identifier?ltmpl=music&service=youtube&uilel=3&passive=true&continue=https%3A%2F%2Fwww.youtube.com%2Fsignin%3Faction_handle_signin%3Dtrue%26app%3Ddesktop%26hl%3Den-GB%26next%3Dhttps%253A%252F%252Fmusic.youtube.com%252Fwatch%253Fv%253DEGslnMjjsqY%2526list%253DRDAMVMEGslnMjjsqY%2526index%253D0%26feature%3D__FEATURE__&hl=en-GB&flowName=GlifWebSignIn&flowEntry=ServiceLogin:1 Invalid 'X-Frame-Options' header encountered when loading 'https://accounts.youtube.com/': 'ALLOW-FROM https://accounts.google.com' is not a recognized directive. The header will be ignored. ``` Currently the workaround that worked for me initially also seems to no longer go though :/
Araxeus commented 2021-12-13 19:19:28 +00:00 (Migrated from github.com)

Hey I think I might have actually fixed the problem!
Feels free to give it a try 😃

Here are windows binaries:
https://www.mediafire.com/folder/fvjiihmu3ka2z/Youtube-Music_useragents-patch_v2 @KimBum

Hey I think I might have actually fixed the problem! Feels free to give it a try 😃 Here are windows binaries: https://www.mediafire.com/folder/fvjiihmu3ka2z/Youtube-Music_useragents-patch_v2 @KimBum
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
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#17
No description provided.