IOS White Screen on Resume - Totally Stumped


#1

Hey all, I posted this as a continuation of a meteor issue but I think its probably buried. I’m kind of cross posting here to see if anyone has been seeing this issue.

Heres the GitHub Issue: https://github.com/meteor/meteor/issues/6471.

On IOS only, and only after Meteor 1.3, users get a white screen when they lock their iphones when the app is in the foreground and then unlock their phones. When the application comes into view again it is a blank white screen. No errors, no crashes in xcode, after the white screen occurs you can’t inspect the web view with safari.

The funny thing is, if I actually put the application in the background ( click the home button two times ) and turn the screen off, and refresh it that way, it works just fine, its only lock screen when the app is in the foreground.

I’ve tried replacing settings, mobile-config, commands, removing plugins such as push, to see if I can resolve it but I’m totally and utterly stumped at this point.


#2

So I can now repro it…

If I have my App ID in mobile config set to io.[app-name].app, white screen happens. However if I change it, for instance, io.[app-name].staging, everything works. Obviously not an ideal solution because my production app name cant change.


#3

I have bumped into similar behaviour after upgrading to Meteor 1.3. Once I remember to have seen the app trying to get new source code from the server. But I didn’t pay very much attention to this since I was struggling with other bugs that time. Now I’m working with that white screen bug, and I’m hoping I could reproduce white screen in iOS emulator. I’ll keep you informed, if I find something out!


#4

Now I was able to reproduce my white screen. It happens in production iOS apps and now I was able to make my app crash also in iOS emulator. The behaviour has happened in production apps quite randomly, but now it happened in my emulator quite much at the same time I deployed new version of my app to the server (modulus deploy).

This is my whole log. Does someone find there something interesting or useful?

2016-06-02 17:54:05.641 Momentum[93121:2867352] DiskCookieStorage changing policy from 2 to 0, cookie file: file:///Users/tom/Library/Developer/CoreSimulator/Devices/BEE95B4F-515E-48D6-BAB7-320EAE8EF49E/data/Containers/Data/Application/5BEB4EDB-D5B0-4CDD-8E57-489E515EB9CD/Library/Cookies/fi.klikinsaastaja.momentum.binarycookies 2016-06-02 17:54:05.747 Momentum[93121:2867352] Apache Cordova native platform version 4.1.0 is starting. 2016-06-02 17:54:05.748 Momentum[93121:2867352] Multi-tasking -> Device: YES, App: YES 2016-06-02 17:54:05.753 Momentum[93121:2867352] Started backup to iCloud! Please be careful. Your application might be rejected by Apple if you store too much data. For more information please read "iOS Data Storage Guidelines" at: https://developer.apple.com/icloud/documentation/data-storage/ To disable web storage backup to iCloud, set the BackupWebStorage preference to "local" in the Cordova config.xml file 2016-06-02 17:54:05.790 Momentum[93121:2867352] Using WKWebView 2016-06-02 17:54:05.790 Momentum[93121:2867352] [CDVTimer][handleopenurl] 0.082970ms 2016-06-02 17:54:05.792 Momentum[93121:2867352] [CDVTimer][intentandnavigationfilter] 2.030015ms 2016-06-02 17:54:05.793 Momentum[93121:2867352] [CDVTimer][gesturehandler] 0.091970ms 2016-06-02 17:54:05.844 Momentum[93121:2867352] Serving asset bundle version: 76f0a115181f00477662794ae2d118d61768dd08 [INFO] GCDWebServer started on port 12136 and reachable at http://localhost:12136/ 2016-06-02 17:54:05.848 Momentum[93121:2867352] [CDVTimer][webapplocalserver] 54.922998ms 2016-06-02 17:54:05.857 Momentum[93121:2867352] [CDVTimer][statusbar] 9.178042ms 2016-06-02 17:54:05.870 Momentum[93121:2867352] [CDVTimer][splashscreen] 12.715995ms 2016-06-02 17:54:05.885 Momentum[93121:2867352] [CDVTimer][socialsharing] 14.449000ms 2016-06-02 17:54:05.887 Momentum[93121:2867352] [CDVTimer][keyboard] 1.643002ms 2016-06-02 17:54:05.887 Momentum[93121:2867352] [CDVTimer][TotalPluginStartup] 96.912026ms 2016-06-02 17:54:07.699 Momentum[93121:2867352] Start downloading asset manifest from: manifest.json -- http://beast-64166.onmodulus.net/__cordova/ 2016-06-02 17:54:07.804 Momentum[93121:2867513] Downloaded asset manifest for version: dc8cbcb6f46667684acc1f7ef482e09521ff81ee 2016-06-02 17:54:07.806 Momentum[93121:2867513] Download failure: Skipping downloading new version because the Cordova platform version or plugin versions have changed and are potentially incompatible 2016-06-02 17:56:25.262 Momentum[93121:2867352] THREAD WARNING: ['InAppBrowser'] took '16.138916' ms. Plugin should use a background thread. 2016-06-02 18:03:09.421 Momentum[93121:2867352] Start downloading asset manifest from: manifest.json -- http://beast-64166.onmodulus.net/__cordova/ 2016-06-02 18:03:09.547 Momentum[93121:2874321] Downloaded asset manifest for version: 866e382d6ced33eaa1adf224f5ea05710bb74d21 2016-06-02 18:03:09.555 Momentum[93121:2874015] Start downloading assets from bundle with version: 866e382d6ced33eaa1adf224f5ea05710bb74d21 2016-06-02 18:03:10.690 Momentum[93121:2874321] [CDVTimer][assetBundleDownload] 1134.598017ms 2016-06-02 18:03:10.690 Momentum[93121:2874015] Finished downloading new asset bundle version: 866e382d6ced33eaa1adf224f5ea05710bb74d21 2016-06-02 18:03:10.719 Momentum[93121:2867352] Serving asset bundle version: 866e382d6ced33eaa1adf224f5ea05710bb74d21 2016-06-02 18:03:10.720 Momentum[93121:2867352] IAB.close() called but it was already closed.

Unfortunately I didn’t have inspector open when that crash happened. When I try to refresh the app from Safari inspector, it doesn’t come up but stays white. Putting the app in the background for a minute changes nothing. Re-opening the app after a reboot makes the app just get jammed to the bootsplash. Reinstalling the app seems to be the only workaround if user wants to be able to use the app again.

I’m not sure whether our white screen issues have the same root or not, but this is the diagnostic data for my white screen.


#5

I did a lot of digging after my original post and it is a bug with WKWebView. Please see the issue on the Meteor github that I started for more information. I even spoke with Apple Technicians that they relented that it was a bug on their side.

So the reason behind this bug is pretty simple, WKWebView runs on its OWN separate process, while UI Webview runs on the same process as your application, so if the OS tries to kill the webview, it doesn’t actually kill your application just the webview portion, resulting in the white screen. At least, this is my understanding.