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

[Manjaro] Unsupported Browser #507

Closed
WhiteHusky opened this issue Dec 2, 2021 · 16 comments · Fixed by #515
Closed

[Manjaro] Unsupported Browser #507

WhiteHusky opened this issue Dec 2, 2021 · 16 comments · Fixed by #515

Comments

@WhiteHusky
Copy link

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

Araxeus commented Dec 2, 2021

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

youtube-music/index.js

Lines 207 to 211 in a14d27d

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:90.0) Gecko/20100101 Firefox/90.0",
}

@WhiteHusky
Copy link
Author

@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;

@WhiteHusky
Copy link
Author

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.

@mimaketi
Copy link

mimaketi commented Dec 6, 2021

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'; } });

@keliel keliel mentioned this issue Dec 11, 2021
@obvionaoe
Copy link

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

@Araxeus
Copy link
Collaborator

Araxeus commented Dec 15, 2021

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

sadly, I'm on Linux

@superbonaci
Copy link

Having this issue with latest snap on Ubuntu.

@superbonaci
Copy link

superbonaci commented Dec 20, 2021

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

mesmerx commented Dec 22, 2021

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

@Araxeus
Copy link
Collaborator

Araxeus commented Dec 22, 2021

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

mesmerx commented Dec 23, 2021

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

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

mesmerx commented Jan 17, 2022

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

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

mesmerx commented Jan 19, 2022

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 up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants