App hangs on startup if no snapshot update available

Note: my app is currently using the beta builds of WKWebView and Ionic Pro.

The issue:
Let’s say I have an app of version X. I set my snapshot versioning to ignore version X, or set the max version at X - 1. As expected, this causes Ionic Deploy to see that there is no update available.

If I have my snapshot versioned like this, however, the app hangs at the splash screen after downloading from the app store for the first time. There was an error similar to this (hanging when no updates available) in a previous version, so I hope this can be fixed soon.

I believe the culprit is that the ‘updated’ field is empty, causing the hang:

2018-07-18 13:18:40.456672-0700 JetInsight Crew[98774:3379712] Got app preferences: {
appId = a53dc182;
channel = develop;
debug = true;
host = “https://api.ionicjs.com”;
maxVersions = 2;
minBackgroundDuration = 30;
updateMethod = auto;
updates = {
};
}
2018-07-18 13:18:40.490109-0700 JetInsight Crew[98774:3379712] Got app info: {
bundleName = “com.jetinsight.crew”;
bundleVersion = “2.0.4”;
device = “2C829222-9FEA-4329-AC66-A62E77E1F07A”;
platform = ios;
platformVersion = “11.3”;
version = “2.0.4”;
}
2018-07-18 13:18:40.509479-0700 JetInsight Crew[98774:3379712] Got app info: {
bundleName = “com.jetinsight.crew”;
bundleVersion = “2.0.4”;
device = “2C829222-9FEA-4329-AC66-A62E77E1F07A”;
platform = ios;
platformVersion = “11.3”;
version = “2.0.4”;
}
2018-07-18 13:18:40.509879-0700 JetInsight Crew[98774:3379712] Ionic Native: deviceready event fired after 2681 ms
2018-07-18 13:18:40.510214-0700 JetInsight Crew[98774:3379712] WARN: This function has been deprecated in favor of IonicCordova.getAppDetails.
2018-07-18 13:18:40.822082-0700 JetInsight Crew[98774:3379712] calling _reload
2018-07-18 13:18:40.822587-0700 JetInsight Crew[98774:3379712] done _reloading

I must note that I am not calling getAppDetails, it is the deploy plugin itself, haha.

Did you solve that issue? I’m probably facing somewhat similiar. What I would like to ask you: does your issue also occur with builds without “–prod” flag? I noticed I only encounter them with “–prod” builds.:thinking:

@svzi This was using the beta/rc builds from last week, but switching the IonUpdate method to ‘none’ and running automatic sync manually seemed to fix it. I did not notice a difference between -prod and regular builds, but I will check again. What update method are you using?

@jetinsight Thanks for your feedback, I really appreciate it.

reading your post, I switched from update method “auto” to “none”, but that doesn’t change anything. I’ve also updated my packages from beta/rc to the newest builds, but nothing helped. As soon as I build with “–prod”, my app hangs with a white screen (tested on Android).

I will open an issue for that. Thanks anyway! :+1:

@svzi Are you using any sort of webpack config in your package.json? removing that made everything work as expected

@jetinsight Thank you very much for your help! I simply forgot to copy a custom js library, that I’ve had recently added to my index.html. After fixing that, everything is working as expected. :sunglasses: