-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Google Sign-In JavaScript client not working on PWA App #473
Comments
I also just started experiencing this issue about a day ago in my Electron app. User clicks the Sign-In with Google button within my Electron app (which is just a light-weight wrapper around a website), a pop-up window appears, but the window is blank instead of showing the typical Google login options. The following error is shown in the console in the pop-up window:
When I Sign-In with Google directly from our website in Chrome, it works fine. So seems like an issue potentially with an interaction with Electron. Everything was working fine for months and this issue just started occurring about a day or so ago. So seems like a change might have been made on the Google side. A few other people have also run into this issue on Stack Overflow in the last day: https://stackoverflow.com/questions/52713993/google-sign-in-api-hang-with-uncaught-error-failed-to-get-parent-origin-from-url?noredirect=1&lq=1 |
We're seeing a similar issue in our iOS and Android application which are web view wrappers around a website. When the user clicks the button we trigger native auth. Until Monday at about 11:30 am PST. Now when the user attempts to login they are redirected to a blank screen. We didn't make any code or configuration changes the correspond with the failures. |
Affecting us too, for the last day or so. It seems like if you click the sign in button again, while the blank popup is still open from your last attempt, then it goes through (the popup navigates to the correct URL). But every time I click the sign in button without the popup already open, it just opens the blank popup containing the console error. |
@BHSPitMonkey are you experiencing the issue in an Electron app, mobile web view, or something else? |
also noticed it started happening on plain old flask web app I had built a few months ago. It was working yesterday one moment, then the next, it just stopped. I had been about to test moving it to a new server, so I had been actively testing on the original. I haven't seen the workaround @BHSPitMonkey just mentioned work on any linux desktop browsers, with my primary user. I tried it on iOS chrome, and it worked first with my primary gmail.com email address user, then I tried my Google Apps user, and it hung at "Sending login request to Google...". , (but that could be more a coding error on my part, having to do with setting up new users if they don't exist. It's been a while since I made this app, and I thought that had been working, by maybe not) If I retry with my primary gmail user, it still works after that on both iOS browswers. Still not able to get it to work on Linux Ubuntu 16.04 Google Chrome, however. I also get the "Uncaught Failed to get parent origin from URL hash!" EDIT: After clearing cookies, i was able to get my primary Gmail user working. Still no luck on new users, but I'm guessing there's a problem on my end. |
I'm seeing this with a standard web site in Chrome 69. |
As it might be easier for me, since I'm not dealing with anything in real production, I tried changing the client secrets, resetting the secret. That didn't change anything for me. I've also updated my domain ownership, as that wasn't done yet. Still the same problems. My app is now letting me log in, but it's supposed to also register new accounts in the DB when they don't exist, which isn't happening. Again, I suspect that's my fault, but I'll report back if I find otherwise. |
my issue was related to some users not having a 'name' key come back from google. I'm not sure it has to do with scopes, or if it's even a new thing. I wonder if the recent Google+ problems sparked something about authorizations to access that key. I changed my logic to derive a name from the email address instead, and all is well for me. |
@grant any chance you could help bring this to the attention of the right folks at Google? This appears to be a regression introduced a few days ago causing Google sign-in to now fail in a variety of settings. |
@bochunz Is there a recent gapi client change causing the above error? |
It's hard to tell if the offending change is in the gapi client or on the server, but there was definitely a regression this week. It's still happening to me, but it's sporadic. |
Same issue on the example of https://developers.google.com/identity/sign-in/web/sign-in When the Chrome dev tools is open, the popup is correctly loaded. https://drive.google.com/open?id=1Qfv_aziyunwo0T7hi4rIPAl28RDH1-WE |
Clicking on the "Sign in" button on the sign-in developer page works in Chromium, but not Firefox. Firefox returns the "uncaught exception: Failed to get parent origin from URL hash!" error. |
Building on @boris-hocde , this has "fixed" the issue for me, although I had to change several other things to make it work.
|
@grant I second @sachinrekhi , we currently only offering sign in to our desktop app thru Google OAuth, so this issue is effectively shutting us down. |
This is killing our PWA. Google should fix it fast. It is certainly a bug
introduced by then recently. The same app opening inside Chrome works
flawless.
|
Agreed, I just had to spend all weekend programming a workaround because we have no idea when it will be fixed. |
@bochunz Were you able to determine if there was a recent client or server change that is causing this regression in Google login? |
I switched from |
I pinged an engineer at Google who made recent changes to gapi. I'll update here. |
@grant Can they roll the changes back while they figure it out? |
Wow, I spent hours on this issue. I really want this bug to be fix asap. |
Thank you! I hope this will be fixed soon. Also breaks our SSO for Google users. |
@grant Any update here? Can they please just roll the change back until they figure out what's wrong. |
@sachinrekhi I've managed to get it working on Electron by setting Now it works as well as it's working on the website using Chrome. |
@sachinrekhi , in my case, I don't think i can use this solution. Anyone knows if there is a similar approach for the native Android PWA launcher? |
I have an angular 6 + PWA app that is consuming google login. I have implemented it using https://www.npmjs.com/package/angular-6-social-login. I have started facing the same issue where pop goes blank and url is accounts.google.com/o/oauth2/iframe. In browser, this works just fine. I noticed that in browser when the google pop up appears, client id is being passed in it and when opened as a PWA, client id is not being passed and hence url for pop is not constructed. That might be one of the reason. I don't see this as a node package issue. I request Google to resolve this issue at the earliest. Also since i am using this package for google login, i cannot change popup to redirecturi. Hence i need a workaround in angular 6. Please suggest if any. |
The change that caused this issue has been rolled back. Can you guys verify if GSI works on PWA now? |
Hi all, |
Awesome! Just verified that Google login once again works again in my Electron app. |
It worked. Thanks!
|
yes, now it works again. Thank you for fixing that. |
yes, now it is working thanks. |
Sadly this appears to be broken again on iOS 13.4.1 |
Hello there! Maybe is related to this issue... can't tell... If anyone hears something please let me know! |
Greetings,
Since yesterday when I use the gapi.auth2 to do a Google Sign-in on an installed PWA app on Android, the App opens the browser window to select the user, but it remains blank.
The same page on the Chrome browser on Android open the user selection as usual. The code is the same, from the same server. The code was not modified in more than 15 days. I presume the problem is some change in the gapi JS client code from Google servers.
Inspecting the PWA Google Sign-in tab on chrome show the following error:
Uncaught Failed to get parent origin from URL hash!
Anyone has any clue how to solve this?
The text was updated successfully, but these errors were encountered: