apache / cordova-ios

Apache Cordova iOS
https://cordova.apache.org/
Apache License 2.0
2.16k stars 989 forks source link

Webview reload loop on start #1081

Closed anushi1210 closed 1 year ago

anushi1210 commented 3 years ago

Bug Report

Problem

Hi to you all, hope you're all doing fine. I have this strange reload issue with every hybrid-cordova app developed using ui5 framework (https://sapui5.hana.ondemand.com/) with ios versions below 13.x. The apps worked fine until cordova-ios@5.x, but from upgrade to cordova-ios@6.x i noticed this continuous reload loop when app starts.

What is expected to happen?

The app should load (bootstrap) normally and show a login view.

What does actually happen?

The app enters a reload loop on start

Information

I've created a github repo as a showcase of my problem, code is downloadable at this link: https://github.com/anushi1210/wk-test-ui5-cordova The app is really minimal and represents how i normally have configured until now my cordova apps built with UI5 framework. The problem is related to ios version 12.x and below, so for ios versions from 13.x onward the app works fine with the latest cordova-ios@6.x. To make the app work again with all supported iOS versions i had to downgrade to cordova-ios@5.1.1. I checked the log on xcode from the simulator, but didn't find anything relevant (xcode is a bit unknown as a habitat to me and i don't really know how to debug swift or objective c classes from there). There is an error about a component-preload.js which fails to load, but i have that log even when the app works fine and generally it shows because i didn't setup a preload version of UI5, which i normally do in production environment, so most certainly it's not that the problem. I forgot to mention the same app with the same configuration works fine on every version of Android.

If anyone could tell me more about this or have any advice i would really appreciate since i've struggled with this problem for a while now. Thanks.

*Edit: in this minimal version i didn't see this log, but when debugging the real app i happened to always find on xcode this log too: "ProcessAssertion() Unable to acquire assertion for process with PID 0". I don't know if this may be in any way relevant but it seemed an important error.

Command or Code

https://github.com/anushi1210/wk-test-ui5-cordova

Environment, Platform, Device

cordova-ios@6.x iphone 6 plus with iOS 12.4 ipad air simulator with iOS 12.4

Checklist

bartvanvelden commented 3 years ago

We are experiencing a similar case and pinpointed it to some JS being loaded synchronous upon start. This seems to prevent the web view from starting properly on iOS 12.x.

MarcelSchuermann commented 3 years ago

I think this is related to issue 1103. I am experiencing the same but not on the main page - see issue above.

@bartvanvelden : what solution did you find to the JS being loaded synchronously?

Any updates to this?

dpogue commented 1 year ago

I've marked this issue as stale because it's been over a year with no further comments. If this is still an issue in the latest cordova-ios version and an up-to-date iOS version, please let us know. Otherwise, this issue will be closed.

dpogue commented 1 year ago

Closing as stale.