timche / gmail-desktop

:postbox: Nifty Gmail desktop app for macOS, Linux & Windows

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Can't sign in: This browser or app may not be secure

jonrandy opened this issue · comments

  • Gmail Desktop Version: Latest
  • OS Version: Ubuntu

Steps to Reproduce:

  1. Install GMail dekstop
  2. Attempt to log in, fails with the following message:

This browser or app may not be secure

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

Same issue here, it seems that Gmail checks now the User Agent of the HTTP message and allows only the frequently updated browsers.

I couldn't reproduce it on macOS, but I'll take a look at it asap.

Related: https://support.google.com/accounts/thread/22873505?hl=en

Can you try other Google accounts please?

It could well be 2FA - but there's no way I'm switching that off

but there's no way I'm switching that off

I'd never suggest you to do that, no worries.

I'll keep an eye on this issue and see what can be done since it's not just Gmail Desktop only.

I just received an email from Google:

Starting February 15, 2021, G Suite accounts will only allow access to apps using OAuth. Password-based access will no longer be supported.

We’re constantly working to improve the security of your organization’s Google accounts. As part of this effort, and in consideration of the current threat landscape, we’ll be turning off access to less secure apps (LSA) — non-Google apps that can access your Google account with only a username and password, without requiring any additional verification steps. Access through only a username and password makes your account more vulnerable to hijacking attempts. Moving forward, only apps that support a more modern and secure access method called OAuth will be able to access your G Suite account.

I highly assume that this is related to this issue.

It is an issue with uncommon browsers and not especially with Linux; but btw. for Linux there exists many different browsers.

I've tested:

  • Gmail Desktop Version: Latest
  • OS Version: Windows 10

where I got the message 'This browser or app may not be secure'.

Login via the browsers Google Chrome and Microsoft Edge works on Windows 10.

Hello, same issue here but with MacOS :)

Workaround

I have released v2.16.0 which comes with the option to override the user agent as workaround for this issue: https://github.com/timche/gmail-desktop#i-cant-sign-in-this-browser-or-app-may-not-be-secure

Please let me know if it works out for you.

Hello @timche , same issue with the v2.16.1

Thanks for the feedback. I've just released v2.17.0 which fixes overriding the user agent globally. Please let me know if it works.

Same issue with the v2.17.0 :)

Thanks, v2.17.0 fixed the issue for me.

@floriangbh @petreikis can you please share your user agent?

Apparently the latest Google Chrome user agent is not working for me, but Firefox does.

@timche my user agent is "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:71.0) Gecko/20100101 Firefox/71.0"

I've added a note to the troubleshooting guide: https://github.com/timche/gmail-desktop#i-cant-sign-in-this-browser-or-app-may-not-be-secure

So if your user agent is still not working, please try a different one from the link provided in the guide.

Thanks @timche for the fix and thanks @petreikis for the user agent setting :)
Works on my Windows 7 machine now - at home I'll try it on Windows 10.

Here is my user agent : "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:71.0) Gecko/20100101 Firefox/71.0"

I'm just add it on the config file and this is now ok ! Thanks for your work 👍

I installed Gmail-Desktop on Linux/Kubuntu. When I start Gmail-Desktop and click the icon in the top left I see More Actions -> Special ial Window Settings, Special Application Settings, Window Manager Settings ... but no "menu Settings → Advanced → Edit Config File, which opens the JSON config file in your editor". to make the "overrideUserAgent" fix you mention. Help appreciated.

Sadly getting no luck with this. Tried multiple different user agents and nothin is working. I have also tried setting it in dev tools.

I checked my useragent on https://www.whatsmyua.info/ and it gives "rawUa: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36" and I am in fact using Google Chrome Version 79.0.3945.88 (Official Build) (64-bit) on my Linux/Kubuntu box. I'm not a developer and thus am unclear about the relationships between Gmail-Desktop, Electron, Snap, useragents and all the rest.

The suggestion in this thread is to set overrideUserAgent:

"you are able to override the user agent via the menu Settings → Advanced → Edit Config File, which opens the JSON config file in your editor.

In the config file, add a new key overrideUserAgent and set your user agent from whatsmyua.info as value.

Example:

{
"overrideUserAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.108 Safari/537.36"
}
Save the file, restart Gmail Desktop and sign in again."

But I can't find that menu setting or config file to do so ....

Hi,
I'll put you in a copy, and then here's where I've come up with a little solution.
minbrowser/min#890

Thank you

commented

Hi!

Please find here a working fix for accounts.google.com login.
minbrowser/min#893
Let me know if you think of a better approach!

Thanks

I'm having the same issue. No fixes provided have resolved the issue.

I'm having the same issue. No fixes provided have resolved the issue.

@eshack94 Please specify your OS and what exactly you've tried. Did you try the built-in user agent auto fix?

@timche I am on MacOS 11.2.3 (20D91). I've tried the built-in user agent autofix, along with multiple variations of valid custom user agent strings for Chrome, Edge, Safari, and Firefox. I've tried clearing browser caches and cookies, changing my network, and enabling "less secure" apps via my Google account settings.

So far none of these attempted solutions have worked. I would be very grateful for additional suggestions.

Thank you.

@eshack94 Thanks for the detailed answer. That's actually very interesting as it seems this block is dependent on the account. Do you have a normal Gmail account or one from Google Workspace (G Suite)?

@timche At first I tested with two personal (normal) Gmail accounts. I also tested a third account, which was a Google Workspace (G Suite) account. I have experienced the same behavior consistently, regardless of the account type.

Please let me know if there is additional specific info that might help you to debug.

@eshack94 are you using v2 or v3.0.0-alpha? If you are using v2, try out the latter.

Edit: Just to be sure, also reset your config with Settings > Advanced > Reset Config File before logging in changing versions.

Edit 2: Said logging in, but meant changing versions.

@timche I was previously using v2.25.2. And I also already tried the Reset Config File option with that version.

Also, I just tried v3.0.0-alpha.10. Initially I had the same problem, but saying "Yes" to the autofix option for v3.0.0-alpha.10 fixed the problem. Hopefully this info is helpful to you or to others who might stumble upon the same issue.

@eshack94 great news. Can you please try to reproduce the error and success states in v3. After each please copy your config and share it here. More specifically, I'm interested in the autoFixUserAgent and customUserAgent properties only.

Edit: Above I said logging in, but meant changing versions.

@timche Sure thing! I have to step away for a bit but I will work on reproducing error states when I'm back, along with the incremental changes made prior to each state.

@timche Update:

  • Clicked SettingsAdvancedReset Config FileRestart.
  • The app restarted and did not prompt to log in again and was still logged in without issues.
  • Set custom user agent string for Chrome: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/90.0.4430.30 Safari/537.36
    • Unchecked Use Custom Useragent Fix, then restarted per the prompt.
    • After restart I was still logged in.
    • Tried logging out and logging back again. Able to log in with Chrome useragent string.
  • Reset config again, restarted. Applied custom useragent string for Edge: Mozilla/5.0 (Macintosh; Intel Mac OS X 11_2_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/89.0.4389.90 Safari/537.36 Edg/89.0.774.57.
    • Restarted and verified that I was still logged in.
    • Logged out to see if I can log in with this useragent string.
    • Able to log in with Edge useragent string.
  • Reset config. Restarted. Applied custom useragent string for Safari: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/14.0.3 Safari/605.1.15
    • Restarted and verified that I was still logged in.
    • Logged out to see if I can log in with this useragent string.
    • Able to log in with Safari useragent string.
  • Reset config. Restarted. Applied custom useragent string for Safari Technology Preview: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/14.2 Safari/605.1.15
    • Restarted and verified that I was still logged in.
    • Logged out to see if I can log in with this useragent string.
    • Able to log in with Safari useragent string.

Note that when signing out, I did so through the Google UI and I did not manually remove the account using the client menu. I do not know if that would make a difference (please let me know if it would be useful to also try that).

Based on above, it seems that for v3.0.0-alpha.10, the problem occurs initially with default useragent string, then is fixed with the autofix, then does not recur even after removing the autofix and applying a different custom user agent string.

i get this same error and i cannot make it work even with the workaround this is what i have in my config:

{
	"autoUpdate": true,
	"lastWindowState": {
		"bounds": {
			"x": 764,
			"y": 986,
			"width": 848,
			"height": 600
		},
		"fullscreen": false,
		"maximized": false
	},
	"compactHeader": true,
	"hideFooter": true,
	"hideSupport": true,
	"debugMode": true,
	"launchMinimized": false,
	"autoHideMenuBar": false,
	"enableTrayIcon": true,
	"showDockIcon": true,
	"customUserAgent": "Mozilla/5.0 (X11; Linux x86_64; rv:88.0) Gecko/20100101 Firefox/88.0",
	"autoFixUserAgent": false,
	"trustedHosts": [
		"https://github.com"
	],
	"confirmExternalLinks": true,
	"hardwareAcceleration": true,
	"downloadsShowSaveAs": false,
	"downloadsOpenFolderWhenDone": false,
	"downloadsLocation": "/home/kireita/Downloads",
	"resetConfig": false,
	"releaseChannel": "stable",
	"__internal__": {
		"migrations": {
			"version": "2.25.3"
		}
	},
	"darkMode": false
}

image

im using linux manjaro but none of the user agents work for me

@kireita Please try the current v3-alpha.

i get this when trying to update (this is the AUR package)

[2021-04-27 14:26:07.991] [error] Check for updates failed Error: ENOENT, dev-app-update.yml not found in /usr/lib/gmail-desktop/resources/app.asar
at createError (electron/js2c/asar_bundle.js:5:1289)
at e.readFile (electron/js2c/asar_bundle.js:5:8076)
at go$readFile (/usr/lib/gmail-desktop/resources/app.asar/node_modules/graceful-fs/graceful-fs.js:110:14)
at readFile (/usr/lib/gmail-desktop/resources/app.asar/node_modules/graceful-fs/graceful-fs.js:107:12)
at /usr/lib/gmail-desktop/resources/app.asar/node_modules/fs-extra/node_modules/universalify/index.js:10:14
at new Promise ()
at readFile (/usr/lib/gmail-desktop/resources/app.asar/node_modules/fs-extra/node_modules/universalify/index.js:7:14)
at AppImageUpdater.loadUpdateConfig (/usr/lib/gmail-desktop/resources/app.asar/node_modules/electron-updater/out/AppUpdater.js:600:62)
at Lazy. (/usr/lib/gmail-desktop/resources/app.asar/node_modules/electron-updater/out/AppUpdater.js:209:58)
at Lazy.get value [as value] (/usr/lib/gmail-desktop/resources/app.asar/node_modules/lazy-val/out/main.js:23:25)

no worries anymore i installed th .pacman file and now its working!

same issue on zorin os

Not sure if this helps (or adds to the confusion!) but I was able to add 5/6 accounts without issues and only had an issue with the last account. So does seem to be sporadic or maybe account dependent. All accounts have 2FA so pretty sure that's not the issue. Perhaps Google thought something fishy was going on since I added multiple accounts within a short time period? Going to try adding the 6th account after some time to see if the issue persists or goes away.

Using 3.0.0-alpha.34 on macOS 11.6.1 (Big Sur).

So I just added my 6th account (after an 18 day wait 😅), still got the same error message. But this time there was an option to "try again if this is a supported browser". Did so and it worked fine now. The first thing I noticed is that the interface looks different – it appears this account is using the new Gmail view. From what I can tell, this is the only major difference compared to all the other accounts that worked without any issues.

I've added a 7th account, and converted all of them to the new GMail view. 2 of them, my primary account and one of my G Suite accounts, decided that instead of enabling the new view, they would go into vacation mode. Upon closing the app and then re-starting one of them gave me the browser / app may not be secure message, but still allowed me to log in using my physical key. As of now, no more issues with it across all 7 accounts.