iOS app stuck on blank white screen on startup after Cordova 7 (Meteor 2.16) update

Hi all,

I’ve had reports from 4 different users about my app getting stuck on a blank white screen on startup after they updated to the newest App Store version, which just so happens to be the first version that supports Cordova 7.

Uninstalling and reinstalling the app from the App Store fixes the problem.

I think there are quite a few other users also affected, although the majority aren’t. Unfortunately there’s not really much I can do at this point - the damage is done :pensive:

Nonetheless, does anyone know what the cause might be?

It must be something to do with the state of the installed app on the device since a reinstall fixes it. I’ve tested updating the app on various iOS devices myself, but I’m unable to replicate the problem.

When the user opens the app, the Accounts.onLogin & Meteor.onConnection events trigger on the server. I also get the “pause” and “resume” events from document.addEventListener on the client (via custom analytics that use Meteor.call), but nothing else.

So it’s like the main startup flow hits an exception? Unfortunately I have no way of know what that exception is.

Any ideas or suggestions would be appreciated. Thanks!

P.S. This is the app: https://bomad.app/

@graemian

Login popup or redirect?

Do you have login popup, like Google login, or some other SSO login? I have tried to change setting from popup to redirect, but it did not work on my forked OIDC/OAuth2 that supports many additional login methods, like Auth0, ADFS 4.0, Azure AD B2C, Oracle OIM, etc. Those have not been ported to Meteor 3 yet, it would be nice to have help to porting to Meteor 3.

iOS issues about Login popup not working

Authentication settings where changing login style from popup to redirect does not work

Custom OIDC/OAuth2 packages at wekan-oidc and wekan-accounts-oidc

At wiki right menu topic “Login Auth” custom logins listed

Nah, not using any Google or other SSO logins

That sounds tough! If reinstalling helps, it’s likely a cached data issue from the update. Maybe try adding more logs on startup to catch where it’s getting stuck. Remote debugging might also reveal silent errors. Hope this gives you a lead!

@graemian,

We’ve had that issue for a year with our users, with Meteor 2.14:
A-After App Store upgrade-> white screen → reinstall as the only solution
B-After HCP → white screen → kill and reopen

For some periods, we were able to reproduce with a phone and it would then stop affecting device A. Then, suddenly, device B would now display the problem. So it seems like a timing issue. Yes, could be related to caches as well.

We’ve talked about it with @filipenevola at Quave and they provided us with patches for iOS. We have not released to the App Store yet as it’s tricky. Our biggest clients had so much issues. But it seems to have fixed case B. We have no confirmation for case A but it looks promising.

The patches are related to a timing issue with the local web server.

I don’t know if they share them freely so I’ll let them jump in here.
I’ll be happy to comment after we publish on the App Store in roughly a month.

Regards,

Chandi

Not a secret at all.

Feel free to share here.

@graemian , we do use localstorage and cookies. do you ?

@adamrichard : we can’t see anything in the logs. 1-It’s very difficult to reproduce since it mostly happens on the App Store. Through test flight, we’ve been able to reproduce a couple of times only then it stopped happening. What kind of logs were you thinking about ?

@burni13 Do I use localstorage and cookies for what? I’m just using basic Meteor, out of the box.

I never found a way to replicate the problem. However, I later managed break an installed iOS Meteor app in a similar way (i.e. stuck on white screen at startup). It think I did this by installing a build with Cordova 7, then overwriting it with a Cordova 6 build, then back to Cordova 7, or something like that.

I think the next logical step to debug this problem would be to inspect the container using Xcode:

But I never got around to that or pursued this any further. I think it was because was just really busy, and the problem was unlikely to come up again, and the damage was already done.

Coincidentally, I got a white screen when running 2 instances of my app in the same iPad today (using 2 different app ids).

I can see from the log that the web server can’t use the port it wants to:

I can reliably reproduce this.

The weird thing is that I also have another Meteor test app installed on the iPad, and it doesn’t interfere like this.

So a possible cause for the white screen is that iOS doesn’t properly shutdown a previous instance of the app and then the new instance fails due to this web server error.

The major difficulty in production environments is that we don’t have access to these logs on client devices. It would have been great if Meteor showed an error screen with the logs instead of a blank screen. I’m sure one of my users would have taken a picture and sent it to me.