[Manjaro] Unsupported Browser #507

Closed
opened 2021-12-02 11:37:53 +00:00 by WhiteHusky · 16 comments
WhiteHusky commented 2021-12-02 11:37:53 +00:00 (Migrated from github.com)

Using the AUR package youtube-music-bin and cannot login due to the unsupported browser error.

So whatever fix mentioned in #17 didn't stick.

Using the AUR package `youtube-music-bin` and cannot login due to the unsupported browser error. So whatever fix mentioned in #17 didn't stick.
Araxeus commented 2021-12-02 16:00:19 +00:00 (Migrated from github.com)

maybe the user agent needs to be updated @th-ch

a14d27da70/index.js (L207-L211)

maybe the user agent needs to be updated @th-ch https://github.com/th-ch/youtube-music/blob/a14d27da70caba3fcdfc104f04aeef15646fa1b5/index.js#L207-L211
WhiteHusky commented 2021-12-02 17:23:27 +00:00 (Migrated from github.com)

@Araxeus
Looks like it's gonna be a pain to fix. I did a patch in an attempt to circumvent but,
image

const userAgents = {
	mac: "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:70.0) Gecko/20100101 Firefox/70.0",
	windows: "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:90.0) Gecko/20100101 Firefox/90.0",
	linux: "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:94.0) Gecko/20100101 Firefox/94.0",
}

const userAgent = 
	is.macOS() ? userAgents.mac :
	is.windows() ? userAgents.windows :
	userAgents.linux;

// Also overwrite the user agent to prevent finding the actual user agent
win.webContents.userAgent = userAgent;
@Araxeus Looks like it's gonna be a pain to fix. I did a patch in an attempt to circumvent but, ![image](https://user-images.githubusercontent.com/3196371/144471672-cdec76d1-769d-45b8-b9ed-37b50be87f1d.png) ```js const userAgents = { mac: "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:70.0) Gecko/20100101 Firefox/70.0", windows: "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:90.0) Gecko/20100101 Firefox/90.0", linux: "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:94.0) Gecko/20100101 Firefox/94.0", } const userAgent = is.macOS() ? userAgents.mac : is.windows() ? userAgents.windows : userAgents.linux; // Also overwrite the user agent to prevent finding the actual user agent win.webContents.userAgent = userAgent; ```
WhiteHusky commented 2021-12-02 17:27:09 +00:00 (Migrated from github.com)

Wait what
image
Okay so maybe my patch works. Sorta. I'll publish it in a PR and someone much more of a guru can figure out what's going on. Electron is not in my wheelhouse.

Wait what ![image](https://user-images.githubusercontent.com/3196371/144472348-cb69d5c4-fbf8-4f18-9377-c1af688a932f.png) Okay so _maybe_ my patch works. Sorta. I'll publish it in a PR and someone much more of a guru can figure out what's going on. Electron is not in my wheelhouse.
mimaketi commented 2021-12-06 23:24:51 +00:00 (Migrated from github.com)

On Arch, opening the developer tools, and running the below in the console allowed me to login no problem.

Object.defineProperty(navigator, 'userAgent', { get: function () { return 'Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:94.0) Gecko/20100101 Firefox/94.0'; } });

On Arch, opening the developer tools, and running the below in the console allowed me to login no problem. `Object.defineProperty(navigator, 'userAgent', { get: function () { return 'Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:94.0) Gecko/20100101 Firefox/94.0'; } });`
obvionaoe commented 2021-12-15 13:26:51 +00:00 (Migrated from github.com)

Please fix this and #17 , as the app is completely unusable for someone who only uses the library part of Youtube Music

Please fix this and #17 , as the app is completely unusable for someone who only uses the library part of Youtube Music
Araxeus commented 2021-12-15 17:44:03 +00:00 (Migrated from github.com)

Please fix this and #17 , as the app is completely unusable for someone who only uses the library part of Youtube Music

@obvionaoe Working on it 😅

meanwhile if you are on windows
you can install this version: https://www.mediafire.com/folder/fvjiihmu3ka2z/Youtube-Music+useragents-patch+v3
(which is compiled from the current changes on #515)

warning:

  • If you don't install via the setup, after logging in you might experience a temporarily broken navbar and have to Alt+F4 the program and start again to fix it (just once, but still might be better to just install)
> Please fix this and #17 , as the app is completely unusable for someone who only uses the library part of Youtube Music @obvionaoe Working on it 😅 meanwhile if you are on windows you can install this version: https://www.mediafire.com/folder/fvjiihmu3ka2z/Youtube-Music+useragents-patch+v3 (which is compiled from the current changes on #515) warning: * If you **don't** install via the setup, after logging in you might experience a temporarily broken navbar and have to `Alt+F4` the program and start again to fix it (just once, but still might be better to just install)
obvionaoe commented 2021-12-15 20:33:40 +00:00 (Migrated from github.com)

sadly, I'm on Linux

sadly, I'm on Linux
superbonaci commented 2021-12-20 14:05:03 +00:00 (Migrated from github.com)

Having this issue with latest snap on Ubuntu.

Having this issue with latest snap on Ubuntu.
superbonaci commented 2021-12-20 14:08:15 +00:00 (Migrated from github.com)

On Arch, opening the developer tools, and running the below in the console allowed me to login no problem.

Object.defineProperty(navigator, 'userAgent', { get: function () { return 'Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:94.0) Gecko/20100101 Firefox/94.0'; } });

THANKS A LOT, that worked for me on Ubuntu with snap 1.14. I had to enter twice that code on the console. Enter once on email login, then gave the error, then retry and re-enter again. Then worked. I had to do 2-step verification with my phone to confirm I'm signing in into a new device.

> On Arch, opening the developer tools, and running the below in the console allowed me to login no problem. > > ``` > Object.defineProperty(navigator, 'userAgent', { get: function () { return 'Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:94.0) Gecko/20100101 Firefox/94.0'; } }); >``` THANKS A LOT, that worked for me on Ubuntu with snap 1.14. I had to enter twice that code on the console. Enter once on email login, then gave the error, then retry and re-enter again. Then worked. I had to do 2-step verification with my phone to confirm I'm signing in into a new device.
mesmerx commented 2021-12-22 17:56:17 +00:00 (Migrated from github.com)

i use arch (not manjaro) and this problem dont occur, this is strange, what is thee electron version in manjaro?

i use arch (not manjaro) and this problem dont occur, this is strange, what is thee electron version in manjaro?
Araxeus commented 2021-12-22 17:58:33 +00:00 (Migrated from github.com)

i use arch (not manjaro) and this problem dont occur, this is strange, what is thee electron version in manjaro?

Its not about the OS, some accounts just have some kind of "shadowban" which causes this issue

> i use arch (not manjaro) and this problem dont occur, this is strange, what is thee electron version in manjaro? Its not about the OS, some accounts just have some kind of "shadowban" which causes this issue
mesmerx commented 2021-12-23 14:44:35 +00:00 (Migrated from github.com)

i use arch (not manjaro) and this problem dont occur, this is strange, what is thee electron version in manjaro?

Its not about the OS, some accounts just have some kind of "shadowban" which causes this issue

ohhh this makes sense, thx for explanation

> > i use arch (not manjaro) and this problem dont occur, this is strange, what is thee electron version in manjaro? > > Its not about the OS, some accounts just have some kind of "shadowban" which causes this issue ohhh this makes sense, thx for explanation
obvionaoe commented 2022-01-09 17:39:48 +00:00 (Migrated from github.com)

Hi, I know the PR has been merged, but is there a way to push the new version to the AUR? That version is still broken

Hi, I know the PR has been merged, but is there a way to push the new version to the AUR? That version is still broken
mesmerx commented 2022-01-17 18:53:04 +00:00 (Migrated from github.com)

Hi, I know the PR has been merged, but is there a way to push the new version to the AUR? That version is still broken

why dont use the git version, this package should be updated

> Hi, I know the PR has been merged, but is there a way to push the new version to the AUR? That version is still broken why dont use the git version, this package should be updated
obvionaoe commented 2022-01-18 18:30:58 +00:00 (Migrated from github.com)

I'm not sure it is... aur/youtube-music-git 1.14.0.r0.gf40ed04-1 [+0 ~0.00], it might be, I'm not very familiar with versioning in git based packages

But I also prefer to have a fixed version of a package installed, it's easier to troubleshoot. I'll just wait til 1.15.0 gets released!

I'm not sure it is... `aur/youtube-music-git 1.14.0.r0.gf40ed04-1 [+0 ~0.00]`, it might be, I'm not very familiar with versioning in git based packages But I also prefer to have a fixed version of a package installed, it's easier to troubleshoot. I'll just wait til 1.15.0 gets released!
mesmerx commented 2022-01-19 16:46:06 +00:00 (Migrated from github.com)

I'm not sure it is... aur/youtube-music-git 1.14.0.r0.gf40ed04-1 [+0 ~0.00], it might be, I'm not very familiar with versioning in git based packages

But I also prefer to have a fixed version of a package installed, it's easier to troubleshoot. I'll just wait til 1.15.0 gets released!

the git versions get the master branch to build so its always updated :) i created the first version of this package :)
it should release the 1.15 soon :)

> I'm not sure it is... `aur/youtube-music-git 1.14.0.r0.gf40ed04-1 [+0 ~0.00]`, it might be, I'm not very familiar with versioning in git based packages > > But I also prefer to have a fixed version of a package installed, it's easier to troubleshoot. I'll just wait til 1.15.0 gets released! the git versions get the master branch to build so its always updated :) i created the first version of this package :) it should release the 1.15 soon :)
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#507
No description provided.