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

Can't Sign Into Gmail #868

Open
Bundito14 opened this issue Dec 4, 2019 · 82 comments · Fixed by #1119
Open

Can't Sign Into Gmail #868

Bundito14 opened this issue Dec 4, 2019 · 82 comments · Fixed by #1119

Comments

@Bundito14
Copy link

Bundito14 commented Dec 4, 2019

I would love to use this browser as an everyday alternative, however, it won't let me sign into my Google account due to "security reasons." Is there a workaround to this?


(from @PalmerAL):

For anyone else having this issue, please post the following:

  1. Do you have 2FA enabled?
  2. OS
  3. Approximate location (if you're willing to share)

If you're running the latest version of Min, try enabling the "use a custom user agent" in the Min preferences, and pasting the following in the user agent field:

Mozilla/5.0 (Windows NT 10.0; WOW64; rv:74.0) Gecko/20100101 Firefox/74.0

Once you do this, you'll need to restart Min before signing in.

Please let us know whether this works for you.

@PalmerAL
Copy link
Collaborator

PalmerAL commented Dec 4, 2019

Can you post a screenshot of the exact error you're getting? Multiple people have reported this in the past few weeks (1, 2), but I'm able to sign in without any issues, so I'm not sure why this is happening.

@ghost
Copy link

ghost commented Dec 4, 2019

In my case I can login my first account but after this I can't add any another accounts.

Couldn't sign you in

You are trying to sign in from a browser or app that doesn't allow us to keep your account secure.

Try using a different browser. Learn more

@PalmerAL
Copy link
Collaborator

PalmerAL commented Dec 4, 2019

This looks to be the same as this issue unfortunately: MarshallOfSound/Google-Play-Music-Desktop-Player-UNOFFICIAL-#3545. I've also tried this with two accounts, and I can log in to both simultaneously, so it appears to only be applied to some subset of people.

@lee-yunseok Assuming you're running min with electron 7 (which you should be if you used the default version from npm), can you try this?

  • Go here and find your current user agent.
  • Replace the Chromium version string in the user agent with "78.0.3904.97" or "78.0.3904.108".
  • In UASwitcher.js, set newUserAgent to the string from step 2.

@ghost
Copy link

ghost commented Dec 5, 2019

@PalmerAL Where is the Chromium version string?

@PalmerAL
Copy link
Collaborator

PalmerAL commented Dec 5, 2019

@lee-yunseok It's the part of the string that starts with "chrome", for example:

Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.94 Safari/537.36

@ghost
Copy link

ghost commented Dec 5, 2019

@PalmerAL Sorry, wrong question. Where is user agent?

@PalmerAL
Copy link
Collaborator

PalmerAL commented Dec 6, 2019

@lee-yunseok For getting the user agent, use the link above; once you've modified it, delete the contents of UASwitcher.js in (/main), and replace it with this:

app.userAgentFallback = <the new user agent>

@ghost
Copy link

ghost commented Dec 7, 2019

@PalmerAL It doesn't work for my RPi.

@PalmerAL
Copy link
Collaborator

Some more reports of this happening in other browsers: https://old.reddit.com/r/kde/comments/e7136e/google_bans_falkon_and_konqueror_browsers/

Supposedly it works if you use a Firefox user agent.

@ghost
Copy link

ghost commented Dec 12, 2019

@PalmerAL Okay it failed on my RPi, also edited UA with cURL but that didn't work either when I using original Mozilla/5.0 (X11; Linux aarch64). but I got a hint from there, set user agent to Firefox - Windows in the Inspect Element and it work. Don't need to edit UASwitcher.js.

@Bundito14 I don't know what OS you use, but how about trying this?

@drumber13
Copy link

Я нашел решение проблемы. Могу ли я написать его здесь, чтобы гугл увидели и не пофиксили?

@PalmerAL
Copy link
Collaborator

PalmerAL commented Jan 5, 2020

@malyiy I don't think that's something to worry about, although I can't say for sure.

(using Google Translate):

Я не думаю, что это о чем-то беспокоиться, хотя я не могу сказать наверняка.

@drumber13
Copy link

@PalmerAL Мы можем списаться в чате каком-то? Я скажу как, а там уже ты разберешься
:)

@PalmerAL
Copy link
Collaborator

PalmerAL commented Jan 6, 2020

@malyiy You can email me: [email protected].

@LouieTian0209
Copy link

@PalmerAL For me I can only sign into the first account, and all other sign in attempts after that will get denied due to "security reasons". I'm thinking maybe it has something to do with 2-step authentication cuz the first account that I can sign in doesn't have 2-step authentication whereas all other accoutns I have have that feature enabled. Not guaranteed, just my observation.

@PalmerAL
Copy link
Collaborator

I've added a user agent option to the settings page in f427d20, which should make it somewhat easier to work around this.

@ghost
Copy link

ghost commented May 4, 2020

I've added a user agent option to the settings page in f427d20, which should make it somewhat easier to work around this.

This has solved my issue with google services. Will continue to use with everything and report anymore issues.

@whiterock
Copy link

I have the same issue. In google chrome I googled "my user agent" which showed:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/81.0.4044.138 Safari/537.36
Putting this in the custom user agent in the preferences in min and restarting, I unfortunately still get the message:
Screenshot 2020-05-11 at 13 49 53
Do I maybe need to clear some cache? If so, how?

@PalmerAL
Copy link
Collaborator

No Chrome user agent works (even if it's identical); you have to use a Firefox one.

@whiterock
Copy link

No Chrome user agent works (even if it's identical); you have to use a Firefox one.

Ah thank you, using the firefox agent worked. Very strange, I wonder why that is ...

@ItsJamie9494
Copy link

I'm guessing Google has a different verification method for Chrome user agents

@FcoMarcosMAbreu
Copy link

Just contributing with the dicussion...

I'd tried the latest Google Chrome's user agent and didn't work.

So I did set user agent with the latest Mozilla Firefox's user agent. Now I can log into Google.

@PalmerAL
Copy link
Collaborator

@FcoMarcosMAbreu Can you also try the Edge user agent?

Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/83.0.4103.61 Safari/537.36 Edg/83.0.478.37

I'm hoping to be able to enable that one by default (#893)

@ebrensi
Copy link

ebrensi commented Jul 8, 2020

The default settings work great for me in Pop_OS! 20.04. I have gmail open in a tab right now.

@thommesborg
Copy link

Hi all. I see this is a very old thread, but it's not fixed jet. I'm also unable to log-in to google-accounts. Tried to change the user-agent several times to no avail.

@daniel-bergmann
Copy link

daniel-bergmann commented Oct 5, 2022

#868 (comment)
I did manage to move across this problem, but it's still a hack. @thommesborg

@thommesborg
Copy link

#868 (comment) I did manage to move across this problem, but it's still a hack. @thommesborg

Hi Dan, tried it but won't work.

Thanks for the suggestion!!

@deveshXm
Copy link

Hi! I turned off ad blocker and tracker blocking and then it allowed me to login to the browser. This worked for me. Maybe it is blocking something which google needs.

@ghost
Copy link

ghost commented Nov 12, 2022

Long time no see. One of the Raspberry Pi user here. With RPi 4B, RasPiOS(Linux Debian based) ARM64, still working with user agent Mozilla/5.0 (X11; Linux x86_64; rv:106.0) Gecko/20100101 Firefox/106.0

For multi-user login, JUST enable user scripts works well. #868 (comment)

@S0Iomon
Copy link

S0Iomon commented Nov 28, 2022

Galaxy Nexus works now. Mozilla Firefox as User Agent does not.

@fearlessgeekmedia
Copy link

Having this problem on Arch Linux. It's a shame because I really like the Min browser, yet I need to access some stuff in my Google accounts.

@brr53
Copy link

brr53 commented Feb 13, 2023

The current approach to solving this issue is wrong and should not be considered. We should not be setting the Chrome user agent to a different browser such as Firefox. Doing so can give unintended consequences as it is easily distinguishable. The true foolproof solution comes from patching navigator.userAgent AND navigator.appVersion to remove the subversions.

Be sure that this script executes before Google's. Looking forward to hearing if this worked for you.

    const reg = /[0-9]+\.[0-9]+ Safari/;
    const patchedUserAgent = navigator.userAgent.replace(reg, "0.0 Safari");
    const patchedAppVersion = navigator.appVersion.replace(reg, "0.0 Safari");
    Object.defineProperty(navigator, "userAgent", {
      get() {
        return patchedUserAgent;
      },
      enumerable: true,
      configurable: true,
    })
    Object.defineProperty(navigator, "appVersion", {
      get() {
        return patchedAppVersion;
      },
      enumerable: true,
      configurable: true,
    })

@fearlessgeekmedia
Copy link

OK, I'm trying it in the developer tools. But how do I get it to put the script before the page even loads their script? I don't even get a chance. I'm not that fast.

@fearlessgeekmedia
Copy link

I figured it out. I didn't know anything about userscripts in Min. But now I do. :) I created one with this code and it worked. Thanks!

@lbkNhubert
Copy link

Cannot get this to work. Scripts active. Explicit, idiot-level step by step instructions for this specific issue much appreciated. Thank you.

@devgocri
Copy link

devgocri commented Apr 10, 2023

@lbkNhubert and everyone else that may need it, I have put @brr53's solution into a userscript file so all you need to do is download the file and put in the proper userscripts folder as explained here

https://gist.github.com/devgocri/fb550849a75f60c62996f1cdd3c1a47a

This has worked well for me so far.

@lbkNhubert
Copy link

Thank you @devgocri, unfortunately for some reason this still does not work. I do have other userscripts working, but I can't get the one to allow login to google accounts to work.

@lbkNhubert
Copy link

Adding a match for *.google.com now has things working. Thank you for the help. Looking at the console log, I saw other google sites being hit and figured adding a wildcard was worth a try.

@cbertelli
Copy link

The new beta (v. 1.28.0-beta) opens GMail and Chat without any workaround

@PalmerAL
Copy link
Collaborator

PalmerAL commented Sep 8, 2023

For anyone experiencing this, I have two branches that may fix this:

  1. The user agent changes that @brr53 recommended: https://github.com/minbrowser/min/tree/ua-updates
  2. Allowing the /browserinfo endpoint when content blocking is on: https://github.com/minbrowser/min/tree/google-signin-2
  3. Both changes combined: https://github.com/minbrowser/min/tree/google-signin-changes

If you're having this issue, can you please try running the branches above, and let me know which (if any) work?

@devgocri
Copy link

devgocri commented Sep 9, 2023

The latest version of Min allows me to log into Google services (1.28.1).

@PalmerAL
Copy link
Collaborator

The latest version of Min allows me to log into Google services (1.28.1).

This isn't universal unfortunately, see #2306 for an example.

I don't think there's much harm in releasing these changes, so I'm going to include them in the next release (#2318). Hopefully after that we can gather more data on whether this makes a difference.

@iambudi
Copy link

iambudi commented Sep 23, 2023

I'm not signing to gmail, but it's the same issue.
I go to here: StackOverflow AI Early Access, choose login using google account.

image

Previously i used user agent : Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:100.0) Gecko/20100101 Firefox/100.0
Using @louis-27 agent string:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Safari/537.36

It worked.

@PalmerAL
Copy link
Collaborator

@iambudi When it failed, were you using the Firefox UA or the default one? If you disable the custom UA setting and just use the default, does it work?

@iambudi
Copy link

iambudi commented Sep 27, 2023

@PalmerAL It failed when using firefox. Now it also works with the default one by unticking the custom user agent.

Check browser agent return
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/116.0.0.0 Safari/537.36

@cittadhammo
Copy link

cittadhammo commented Oct 9, 2023

Had the same problem today, the default user agent did not work, I used
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Safari/537.36
And it works

interestingly I have the message
Screenshot 2023-10-09 at 08 03 44

Also, I connected on brave at the same time and used gmail at the same time. I don't know if it helped

This is my computer config at the moment:

Screenshot 2023-10-09 at 08 05 13

@iambudi
Copy link

iambudi commented Jan 19, 2024

@PalmerAL It failed when using firefox. Now it also works with the default one by unticking the custom user agent.

This is no longer work on latest update (Mac Version). Should use the custom one.
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/608.4.8 (KHTML, like Gecko) Version/16.4 Safari/608.4.8

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.