googlearchive / gplus-quickstart-javascript

This quick-start app is built in JavaScript and lets you get started with the Google+ platform in a few minutes.
https://developers.google.com/+/quickstart/javascript
92 stars 111 forks source link

g-signin2 broken with IE11 #12

Closed razor-1 closed 8 years ago

razor-1 commented 9 years ago

This sample, and apparently anything else using g-signin2/auth2 are broken with IE11. You get the account selection/scope confirmation popup, but after authentication, nothing. The console logs a SCRIPT5: Access is Denied error.

gguuss commented 9 years ago

Thanks for the heads up - I'm looking into it - I have the button rendering here, https://gusclass.com/demos/button2/min.html but there's obviously other issues going on in the sample / client beyond that.

razor-1 commented 9 years ago

Thx. There was a SO http://stackoverflow.com/questions/31494204/google-sign-in-for-web-apps-not-working-with-internet-explorer about it that I bumped with a bounty to try to get some help, but no dice. Anything you need from me just lmk.

Jon

On Thu, Aug 20, 2015 at 12:43 PM, Gus Class notifications@github.com wrote:

Thanks for the heads up - I'm looking into it - I have the button rendering here, https://gusclass.com/demos/button2/min.html but there's obviously other issues going on in the sample / client beyond that.

— Reply to this email directly or view it on GitHub https://github.com/googleplus/gplus-quickstart-javascript/issues/12#issuecomment-133150371 .

razor-1 commented 9 years ago

Any updates on this? As bad as IE is, having Google Signin completely broken with it is not an acceptable situation.

eyalfink commented 9 years ago

@gguuss Does the link you sent (https://gusclass.com/demos/button2/min.html) works for you on IE11?

gguuss commented 9 years ago

Looking into it further, I'm seeing your bug and will try and sort out a workaround.

qrush commented 9 years ago

We're running into this too - not working at all on IE11.

gguuss commented 8 years ago

Tracking internally as 23388459

simoneisner commented 8 years ago

Hi guys.... this is causing a major issue for us as well. Bump!

eyalfink commented 8 years ago

Now it seems that it is broken to all browsers. Gus, in your example the callbacks are not called - this took our production (and otheres https://stackoverflow.com/questions/33559104/why-did-googleauth-then-stop-calling-callbacks#) down. Is there anyone to contact?

ithinkihaveacat commented 8 years ago

@eyalfink The callback issue should now be fixed.

eyalfink commented 8 years ago

thanks! Any chance that the IE issue will be solved too in the near future or should we look for workaround?

gguuss commented 8 years ago

A recent update has resolved the issue in IE11/Edge, closing, let us know if you encounter any additional issues.

frank-carnovale commented 8 years ago

One remaining glitch with the g-signin2 button under IE11/Edge: when the app is being tested from a development server, in my case http://mydevbox:3000. Works fine with other browsers even at this development address. But on login under Edge, the 'accounts.google.com' window gives a message "The site you're on is trying to close this window. Do you want to close this window?". Options are "Yes" and "No"; but neither results in successful login. When the app is ported to my https://my.site.com, all works ok even under Edge. I turned off all the Edge security settings I could find but no cigar. I can accept if the g-signin is not supported under Edge from http and/or a nonstandard port number, but it would have saved me a long troubleshooting day if this was noted somewhere; and it does work from the other browsers.

gguuss commented 8 years ago

What's strange is that I'm not seeing the issue when I test on my machine. Does this happen every time or just the first time signing in?

gguuss commented 8 years ago

I just checked on Edge 25.10586 / EdgeHTML 13.10586 and could not reproduce the issue, re-closing. There could be issues on older versions of Edge, please provide any version information if you are still encountering the issue.

IGZmanuelMartinVivaldi commented 8 years ago

Same problem of @frank-carnovale in Internet Explorer 11 (v11.212.10586.0) When using http:// protocol, after selecting the Google account in the 'accounts.google.com' window, it gives a message "The site you're on is trying to close this window. Do you want to close this window?". Options are "Yes" and "No"; but neither results in successful login or any response or error. The same page works fine in Chrome (using HTTP: too) There is any working example in Internet Explorer 11 using HTTP? Looks like all working demos in IE uses HTTPS

eeewing commented 8 years ago

I am also experiencing this problem in Edge only. Strangely, everything works fine on the Google Developers site , but if I copy-and-paste the exact code from that page onto my site, this problem occurs.

Very frustrating!

gguuss commented 8 years ago

@troglo @eeewing this seems to work - http://gusclass.com/demos/button2/min.html

Perhaps you are missing an insecure authorized origin?

IGZmanuelMartinVivaldi commented 8 years ago

Thanks @gguuss , your code in your server works fine in IE11, but in my server I copied all your code without any change and it doesn't work in IE11 (in Chrome it works fine). I don´t understand the reason, because the Client ID in the Google Developers Console looks right and work in others browsers.

eeewing commented 8 years ago

Playing around some more, I found that the Google button works fine (even inside Edge and IE11) from computers outside our organization...this seems to only occur on computers in our LAN. Checked with the network admin and it's not due to any policy we've configured...will next try to add the local server path as an origin and see what happens...

IGZmanuelMartinVivaldi commented 8 years ago

Thanks @eeewing , I was almost crazy. Same problem here only in LAN, it didn´t work with IE in our internal network but it works fine from outside, even using a VPN. I´ll try with IP address because I don´t have any other idea. If you or someone, even me, find a solution it´ll be nice if it can be shared here.

gguuss commented 8 years ago

@troglo do you notice anything on the console logging that indicates an issue? Is there anything that could be rewriting cookies or local storage?

IGZmanuelMartinVivaldi commented 8 years ago

Hello @gguuss , thanks for asking. We still have the problem with IE11 in our server, but in Chrome works fine. We copied your page (http://gusclass.com/demos/button2/min.html) that works fine n IE11 and changed the key, but it doesn't work neither.

Looks like there is a problem initializing cookie (in IE11 is empty) and object (in IE11 is null):

In our server with IE11: document.cookie is empty

In your server with IE11 and in our server with Chrome: "G_AUTHUSER_H=1; G_ENABLED_IDPS=google; __utma=90515468.2121219422.1461949971.1461949971.1461949971.1; __utmz=90515468.1461949971.1.1.utmcsr=google|utmccn=(organic)|utmcmd=organic|utmctr=(not%20provided)"

Console logs are different too: In our server with IE11: `CSI/tbsd_: 361,648 ms CSI/_tbnd: 361,973 ms init [object Object] {

  __proto__: { },
  El: null,
  hg: null

}`

In your server with IE11 and in our server with Chrome: `CSI/tbsd_: 552,143 ms CSI/_tbnd: 552,415 ms init [object Object] {

  __proto__: { },
  El: "107630593967952036939",
  hg: { }

}`

But I can imagine what the problem is, we´ll review if we are managing cookies in some way in our server, but that is working in Chrome confuse us.

gguuss commented 8 years ago

@IGZmanuelMartinVivaldi Note that sign-in on localhost does not work due to localhost cookie behavior. If you are encountering the issue on your server, e.g. http://gusclass.com in my case, then I'm not sure why the cookie would not be getting placed. It's possible also that you're encountering something with mixed http / https, try replacing <script src="https://apis.google.com/js/client:platform.js?onload=startApp" async defer></script> with <script src="//apis.google.com/js/client:platform.js?onload=startApp" async defer></script>

tclancy commented 8 years ago

I'm seeing this on IE11 at our site where the client is using their own SSL certificate on the host's domain. Is this because of the certificate?

Perhaps you are missing an insecure authorized origin?

Can you clarify what this means?

gguuss commented 8 years ago

@tclancy What's going on in your case is the button is not even rendering. Most likely there is an issue in your javascript or HTML that is preventing IE from showing the button.

Perhaps you are missing an insecure authorized origin?

This is referring to the console. On my test VM, moving the mouse around your sign-in DIV around the middle causes the button to indicate that it is clickable, clicking causes the sign-in dialog to appear, indicating your console configuration is not the issue. You should try and figure out why IE is not properly rendering your button in the Div, maybe start by moving the div outside of the login section.

tclancy commented 8 years ago

@gguuss Thanks a ton for the detailed response, you've given me more than enough to run with. I inherited this project from another developer and it's probably something weird in the CSS. Not looking for any additional help but thought I would mention in case it's useful to others: the button was working in IE previously and I haven't changed any front-end code between then and when it disappeared. I think the only change was the update to IE11, which may have fixed some CSS bugs we were relying on in IE.

It's definitely something strange in IE or the JavaScript that renders the button for IE. The HTML for the placeholder button in Chrome is

<button style="opacity: 0; z-index: 10000; left: 0px; top: 0px; position: absolute; cursor: pointer; outline: 0px; width: 112px; height: 36px;">Sign in with Google</button>

but in IE it's (note the height and width):

<button style="outline: 0px; left: 0px; top: 0px; width: 1px; height: 1px; position: absolute; z-index: 10000; cursor: pointer; opacity: 0;">Sign in with Google</button>

There are similar discrepancies for the <iframe> that actually hosts the button and the <div> that is parent to them both.

tiib7000 commented 8 years ago

@gguuss thank you for your help in advance I am using the code from http://gusclass.com/demos/button2/min.html with my client id. https://sunrise.xposc.com/gusclas.html I am having issues with IE11 64 bit version 11.0.9600.17959; the 'accounts.google.com' window gives a message "The site you're on is trying to close this window. Do you want to close this window?". Options are "Yes" and "No"; but neither results in successful login. The same page works fine with IE11 32 bit version 11.0.9600.17843, with Firefox and Chrome. The 2 computers are in the same network, so it is not a problem of network settings or anything else. Do you have any suggestions, please ?

eeewing commented 7 years ago

While this is technically "closed," I am STILL seeing this issue only on Edge (IE11 DOES work) and only when computers on our LAN attempt to sign into our site at help.swcsd.us. Signing in using Edge works as expected -- even from the same devices -- when browsing the site from outside our LAN.

Signing in using IE, Chrome, Firefox, or Safari works as expected no matter whether the user is signing in on our LAN or not.

Here's a video demonstrating the problem: https://youtu.be/zBz1OGzHQBA

Any ideas?

tclancy commented 7 years ago

@eeewing is the button there in the HTML source? My issue was that IE was collapsing the button via CSS for some reason. I simply overrode the CSS with an IE-only set of styles to make it appear again.

eeewing commented 7 years ago

The button shows up, and -- when clicked -- prompts the user for credentials. After sign in, however, nothing happens. The problem only occurs inside our LAN and only on Edge.

Jake-a-Lake commented 7 years ago

I was able to get around these problems by loading the script to initiate the Google button rendering etc. from $document.ready. (i.e.Whatever you have in the apis.google.com/js/client:platform.js?onload= x ) image image

eeewing commented 7 years ago

I was hopeful, but -- alas -- this did not resolve the issue for me. :-(

IGZmanuelMartinVivaldi commented 7 years ago

After installing Windows Creator Update it started working in Internet Explorer 11 (v11.015063.0) Also in Edge (Microsoft Edge 40.15063.0.0) I´m not sure if the solution is in the Creator update or the browsers.

faithern commented 6 years ago

Still having the same issue even though it's been 'fixed' - please advise!

faithern commented 6 years ago

The only way I can get rid of the popup asking if I want to close the window is to uncheck the Enable Protected Mode box for the Internet Security Zone, however this is not an option for all of our clients.... can someone please help me with this???