You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Apr 18, 2026. It is now read-only.
Repository navigation
This repository was archived by the owner on Apr 18, 2026. It is now read-only.
Google Sign-In now returning error popup_closed_by_user #506
Our Electron desktop application has been using Google Sign-In for months now without any issues. But all of a sudden, starting today, Google Sign-In from our Electron desktop app started returning the "popup_closed_by_user" error. The login pop-up properly renders and you can successfully login to your Google account, but when the pop-up closes, instead of it properly logging in the user, it returns the popup_closed_by_user error.
Google Sign-In continues to work fine for our website from web browsers like Chrome, Safari, and Firefox, but no longer works from our Electron desktop app.
It appears there has been some kind of regression in the Google Sign-In service?
@grant looks like there was a regression in Google Sign-in recently. Seems somewhat similar to #473 in that it is only affecting certain clients like Electron, though the error in this case is different. Any chance you could ping the team to see if anything changed?
I do not seem to see recent changes to the gapi client.
Perhaps this is related: #405
Can you provide more details in the request and why Electron is making the request fail?
Just like to chip in here and say we're experiencing the popup_closed_by_user error failure also in our React project - appears to be affecting a small % of users across a range of devices (Chrome, FireFox, Safari, Safari Mobile)
Same for our project, React app running in electron gives popup_closed_by_user error. Web version is fine.
We use react-google-login and I was thinking maybe it has the issue, so I tried with simplest page with just google's suggested button and result is the same - working in browser, not working in electron.
@JorgenPhi
I'm not sure why this is happening for this set of applications. I've stated that I believe there's no change in gapi that would cause this.
If there a specific something specific I can do, LMK. However, I cannot debug other projects that use this project like Electron.
@grant
Perhaps some more info will help:
I too am seeing this in my electron project. With no changes in our code, no changes to the electron base, our google authentication flow began failing and only giving a message of "popup_closed_by_user". We regressed against prior releases, also known to be previously working and found them to all fail the exact same way.
It is unlikely that this change is anything other than a change to the auth api given the steps we took to verify the issue and the google authentication being the only common factor.
Was something changed in policies? Is this a part/byproduct of the g+ shutdown (we are in the process of removing g+ for auth and profile info)?
Our project uses electron-prebuilt and was tested against 3.x and 4.x builds. All fail with the same error.
Apologies for the callout, we have thousands of users affected by this and having some support would be great.
Reacted by seamusml, Abed Abu-Hijleh, diabolic8733 and Sachin Rekhi
Note: I do not work on this library. I just work at Google and help all over.
I have notified the Google team this issue.
My unofficial guess is that G+ login/changes may be related.
I will report the answer I receive as soon as I get one from the gapi team.
Reacted by diabolic8733, bodhi3032, Emmanuel dos Santos, seamusml and asmaahosny91
For those still struggling with the popup_closed_by_user issue on Electron, just to let you know that in order to fix this issue, you need to set the BrowserWindow.webPreferences.nativeWindowOpen property to true (this is required from Electron v8.2.4) on the window which hosts the Google sign-in button.
Reacted by Tom Enden, Macgill Davis, Dan Ochiana, Watson Yim, Miguel Hernández, Erik Dvorcak, visionari-labs, Nadiger Chaitanya, Afrie Irham, FilthyRaptor and 4 more
Reacted by Macgill Davis, Dan Ochiana, Miguel Hernández, Erik Dvorcak, visionari-labs, Nadiger Chaitanya, evgenijchul, Afrie Irham, Pablo Pissi, Khoo Tuck Hoe and 1 more
For those still struggling with the popup_closed_by_user issue on Electron, just to let you know that in order to fix this issue, you need to set the BrowserWindow.webPreferences.nativeWindowOpen property to true (this is required from Electron v8.2.4) on the window which hosts the Google sign-in button.
Can you please tell me google login issue you are facing in development
mode or production mode.
If you are facing in development mode/production mode , it means you need
to set in
webPresences:{
nodeIntegration:true,
nativeWindowOpen:true,
webSecurity:false
}
in electron.js file
If again it is not fixed then you need implement through deeplinking
By the use of electron.shell
Thanks and Regards
Neeraj Maurya
MERN Stack Developer
Activity
aabuhijleh commentedon Feb 11, 2019
I'm encountering the exact same issue with Electron. Working fine on Chrome.
sachinrekhi commentedon Feb 11, 2019
@grant looks like there was a regression in Google Sign-in recently. Seems somewhat similar to #473 in that it is only affecting certain clients like Electron, though the error in this case is different. Any chance you could ping the team to see if anything changed?
diabolic8733 commentedon Feb 11, 2019
Same exact issue with Electron starting on Feb 6th. No changes were made to our end.
grant commentedon Feb 11, 2019
I do not seem to see recent changes to the gapi client.
Perhaps this is related: #405
Can you provide more details in the request and why Electron is making the request fail?
josephfoulds commentedon Feb 12, 2019
Just like to chip in here and say we're experiencing the
popup_closed_by_usererror failure also in our React project - appears to be affecting a small % of users across a range of devices (Chrome, FireFox, Safari, Safari Mobile)bastienduran commentedon Feb 12, 2019
Hi,
We do have the same issue.
popup_closed_by_usererror in our React/Electron project.The same code works fine in Chrome, Safari and Firefox.
EDIT : this issue affects only users who have to signIn, already connected ones are not affected.
rustemkk commentedon Feb 13, 2019
Hello,
Same for our project, React app running in electron gives
popup_closed_by_usererror. Web version is fine.We use
react-google-loginand I was thinking maybe it has the issue, so I tried with simplest page with just google's suggested button and result is the same - working in browser, not working in electron.seamusml commentedon Feb 14, 2019
Hi, Also can report that this is no longer working for our electron app, but is working fine in any browser.
diabolic8733 commentedon Feb 18, 2019
Any updates here? @grant
grant commentedon Feb 19, 2019
@JorgenPhi
I'm not sure why this is happening for this set of applications. I've stated that I believe there's no change in
gapithat would cause this.If there a specific something specific I can do, LMK. However, I cannot debug other projects that use this project like Electron.
bastienduran commentedon Feb 19, 2019
@grant
Of course you can not debug other projects, bug as for @JorgenPhi, there were no modifications on the electron app.
bodhi3032 commentedon Feb 19, 2019
@grant
Perhaps some more info will help:
I too am seeing this in my electron project. With no changes in our code, no changes to the electron base, our google authentication flow began failing and only giving a message of "popup_closed_by_user". We regressed against prior releases, also known to be previously working and found them to all fail the exact same way.
It is unlikely that this change is anything other than a change to the auth api given the steps we took to verify the issue and the google authentication being the only common factor.
Was something changed in policies? Is this a part/byproduct of the g+ shutdown (we are in the process of removing g+ for auth and profile info)?
Our project uses electron-prebuilt and was tested against 3.x and 4.x builds. All fail with the same error.
Apologies for the callout, we have thousands of users affected by this and having some support would be great.
bodhi3032 commentedon Feb 19, 2019
This may be related. Or not at all. Timeline coincides.
https://developers.google.com/terms/api-services-user-data-policy
manelpb commentedon Feb 21, 2019
Any update about this issue? I'm also having the same problem
grant commentedon Feb 21, 2019
I have notified the Google team this issue.
My unofficial guess is that G+ login/changes may be related.
I will report the answer I receive as soon as I get one from the gapi team.
17 remaining items
wrksp-andreas commentedon Jul 16, 2020
Seems to be happening again. Same symptoms as listed previously. Everything works fine in chrome, but is busted in electron.
imvenky commentedon Jul 20, 2020
Hey, I'm also facing the same issue, it works in my machine but not working in my colleague's machine, please help me to fix this.
edouardmercier commentedon Oct 2, 2020
For those still struggling with the
popup_closed_by_userissue on Electron, just to let you know that in order to fix this issue, you need to set theBrowserWindow.webPreferences.nativeWindowOpenproperty totrue(this is required from Electron v8.2.4) on the window which hosts the Google sign-in button.IbrahimShamma99 commentedon Nov 15, 2020
It also happens in React App all browsers with me
macgill4444 commentedon Dec 11, 2020
@edouardmercier thank you so much! That fixed the issue for us on electron!
dev-neeraj-maurya commentedon Sep 3, 2021
I'm also facing the same issue with Electron. Working fine on Chrome.
afrieirham commentedon Sep 24, 2021
I can verify this works, thank you for this 👍
jhkcia commentedon Feb 18, 2022
thanks @edouardmercier
maradanasai commentedon Apr 5, 2022
I'm getting this error even in chrome if I login in incognito tab. I'm using the following code
bedamatta05 commentedon May 17, 2022
Facing the same issue in react app in all browser. Someone please help.
dvanderb commentedon May 17, 2022
For authentication/authorization issues please note that gapi.auth2 has been deprecated and replaced with Google Identity Services. See https://developers.googleblog.com/2021/08/gsi-jsweb-deprecation.html for more information. If you have questions related to authentication/authorization please look at the associated documentation or post questions on Stack Overflow with the google-oauth tag.
dev-neeraj-maurya commentedon May 21, 2022
bedamatta05 commentedon May 21, 2022
dev-neeraj-maurya commentedon May 24, 2022
dev-neeraj-maurya commentedon Oct 11, 2022