Blank white page after login in iOS 8

(François Simond) #1

I installed a fresh discourse on, activated Google OAuth2 login.
During tests, a visitor could not create a new account via Google on

  • an iPhone 6 running latest iOS 8 (Safari and Chrome)
  • an iPhone 5s running iOS 7 (Chrome)

However, according to the report it was possible to:

  • login on a previously created Google OAuth2 account on both iPhones
  • creating a new account and log in using regular account.

In the same conditions, the visitor and myself have no trouble creating a new account on desktop browsers or Google Chrome on Android, with or without 2-step verification Google accounts.

It doesn’t appear to be a known bug so I’ll learn where to dig in logs to see if anything can be found.
Does the same occurs for you on my discourse and others?

Configuring Google login for Discourse
(Jeff Atwood) #2

One thing I have seen is the redirect back to the site (after Google login) doesn’t quite work on iPhone, resulting in a white empty page. But if you hard refresh the discourse URL you are in fact logged in.

(François Simond) #3

Thanks @codinghorror for the quick reply :smiley:

Yes that’s correct the visitor was left on an empty page with no redirection.
However this is what was happening on both iOS 7 and iOS 8 when hitting the back button after the blank page.

Unfortunately I deleted the multiple tests account created so I can’t say if those were created correctly or not regardless of the error message displayed.
Also I don’t have access to an iPhone or simulator for now.

(François Simond) #4

@codinghorror and @neil, it seem to fail consistently: do you plan a workaround?
Apparently Google doesn’t seem to care to fix it and using another kind of mechanism might be required.

(François Simond) #5

Okay I tried on an iPhone 6 myself, and account creation indeed works.

What’s missing really is the window/tab closing automatically once the process with Google (auth or account creation) is completed.
It’s confusing as it just sits here or present an error message if the visitor hit the back button.

(Neil Lalonde) #6

I dug into this problem today and found this bug (apple dev account required): Welcome | Apple Developer Forums

This was acknowledged as a Safari bug in beta versions of iOS 8, was released, and still hasn’t been fixed.

Facebook also has a bug on the problem, but Apple needs to fix it. So many authentication API’s have been broken by this.

The bug: window.close() fails silently if the window was opened with a call to


(Sam Saffron) #7

WAT?! That is crazy. Any workarounds for this?

(François Simond) #8

An incomplete workaround could be to resume things nicely instead of presenting an error (as pictured earlier) when hitting the back button.

I don’t know if it’s possible or really desirable as the proper filled in creation dialog is already present in the window behind. In such case, it could be necessary to make this one progress automatically when things change within the new window.

Is windows.close() called by Google Web app or discourse?
I wonder if, as parent window discourse could have the ability to insist on closing this stale window using javascript or maybe do something else like replacing the blank content to ask the user to close it manually.

The bug is present on iOS 8 but also 7, so it’s gonna stick for a while given how slow the upgrade adoption is this time.

(Jeff Atwood) #9

No, we never saw this bug in iOS 7. So I don’t think your statements are correct.

(François Simond) #10

The same issue was reported by a visitor on both an iPhone 5s running iOS 7 and iPhone 6 running iOS 8, I’ll ask again to see if it can be reproduced.
And also get some more details on the iOS 7 version.

(Neil Lalonde) #11

We would need to use window.close(), which doesn’t work because of the iOS bug.

I added that today. We should have always been rendering something on that page just in case it remains open, like we’re seeing now.

(François Simond) #12

Awesome job @neil!
It totally looks like it’s working as intended :smiley:
One would not guess there’s an annoying bug hiding behind this clever trick.

(Jeff Atwood) #13


  • logged in to meta.discourse on old iPhone 4 (incompatible with iOS 8) and it worked fine, no white screen at all.
  • works fine on Android 4.4 on Nexus 5 latest stable everything after clean wipe.
  • workaround @neil pictured is present on the page on iPhone 6+. You have to manually close the tab, but at least the text is there to help you figure this out vs. a totally blank white screen…

So this is absolutely an iOS 8 bug, @supercurio. 100% confirmed.

(Daveyon Mayne) #14

I have seen this issue on when I sign in with Github. I normally refresh the browser. Im on an iOS device 8. It is a bug for new version on iOS.

(François Simond) #15

@codinghorror the previous tester tried again on the iPhone 5s with iOS 7 and couldn’t reproduce.

This workaround will do the trick until Apple fix the bug, thanks!

(Jeff Atwood) #16

Yes, thanks for making sure we were on top of it, the problem is serious, and the workaround was something we probably should have done anyway (put helpful text on the page) just in case.

(Jeff Atwood) #17