Closed jessecarterjs closed 4 years ago
I had the same problem
The bug is perhaps related to cordova-plugin-nativestorage? Looking at your logs it says:
2019-10-30 21:53:31.393422+0200 MyAppName[5006:76802] ERROR: {"code":2,"source":"Native","exception":null}
https://github.com/TheCocoaProject/cordova-plugin-nativestorage#errors says: ITEM_NOT_FOUND = 2
Looking at https://github.com/TheCocoaProject/cordova-plugin-nativestorage/issues it seems some of the recent issues are related to data not being persisted on iOS. You could perhaps try changing the storage provider to see if it makes any difference, e.g. ionic-storage / sqlite.
Like @oddcb said, this could be the cause of a (faulty) plugin, too.
Therefore: Is this reproducible in a new, plain Cordova app? A minimal reproduction repository would really help to debug and later fix this issue. More information on how to create one: https://github.com/apache/cordova-contribute/blob/master/create-reproduction.md
I have this problem too.
I have not managed to find a pattern to reproduce it. It hangs at the beginning, but not always.
One option is that it is related to the webview. To make everything work correctly I use ionic webview.
Another option may be related to location or background processes ... crash-on-ios-13 intercom
And finally it can be related to NSAppTransportSecurity?
Something may change with ios 13.3 but I am defeated.
Regards
@identy Does it ever crash when you have it running in the simulator? Have you implemented a global error handler that can log the (supposed) javascript-crash? What plugins do you use? Have you tried visiting the repos of the plugins and looking through the issues (both closed and open) to see if there are recent problems with iOS 13?
hi @oddcb
Yes, the error is similar in the simulator. You cannot run javascript, or at least the console messages are not displayed.
I have made combinations with the different plugin but the behavior is similar. I do not use angular in this project, my case is pure javascript.
config ios
<?xml version='1.0' encoding='utf-8'?>
<widget id="...">
<name>...</name>
<description>...</description>
<author email="identy@identy.org" href="http://www.identy.org">gwt ltd.</author>
<content src="index.html" />
<access origin="*"
minimum-tls-version='TLSv1.1' requires-forward-secrecy='false' requires-certificate-transparency='true'
allows-arbitrary-loads-for-media='true' allows-arbitrary-loads-in-web-content='true' allows-local-networking='true'
/>
<access origin="tel:*" />
<access origin="geo:*" />
<access origin="mailto:*" />
<access origin="sms:*" />
<access origin="route:*" />
<access origin="market:*" />
<access origin="maps:*" />
<access origin="twitter:*" />
<access origin="whatsapp:*" />
<access origin="facebook:*" />
<access origin="google.navigation:*" />
<access origin="*.pushwoosh.com" />
<access origin="file://*/*" />
<access origin="http://*/*" />
<access origin="https://*/*" />
<access origin="ionic:*" />
<allow-navigation href="*" minimum-tls-version='TLSv1.1' requires-forward-secrecy='false' requires-certificate-transparency='true' />
<allow-navigation href="http:*//" />
<allow-navigation href="https://*" />
<allow-navigation href="ionic:*" />
<allow-intent href="*" />
<allow-intent href="http://*/*" />
<allow-intent href="https://*/*" />
<allow-intent href="ionic://*/*" />
<allow-intent href="gwt://*/*" />
<preference name="loadUrlTimeoutValue" value="20000" />
<preference name="target-device" value="universal" />
<preference name="Orientation" value="default" />
<preference name="Fullscreen" value="true" />
<preference name="SplashScreen" value="screen" />
<preference name="SplashScreenDelay" value="5000" />
<preference name="SplashScreenBackgroundColor" value="#000000" />
<preference name="SplashMaintainAspectRatio" value="true" />
<preference name="SplashShowOnlyFirstTime" value="false" />
<preference name="SplashReloadOnOrientationChange" value="false" />
<preference name="AutoHideSplashScreen" value="false" />
<preference name="FadeSplashScreen" value="true" />
<preference name="FadeSplashScreenDuration" value="2000" />
<preference name="ShowSplashScreenSpinner" value="true" />
<preference name="StatusBarStyle" value="lightcontent" />
<preference name="StatusBarOverlaysWebView" value="false" />
<preference name="KeyboardShrinksView" value="false" />
<preference name="HideKeyboardFormAccessoryBar" value="false" />
<preference name="KeyboardDisplayRequiresUserAction" value="true" />
<preference name="webviewbounce" value="false" />
<preference name="UIWebViewBounce" value="false" />
<preference name="DisallowOverscroll" value="true" />
<preference name="EnableViewportScale" value="true" />
<preference name="BackupWebStorage" value="none" />
<preference name="InAppBrowserStorageEnabled" value="true" />
<!-- <preference name="KeepRunning" value="true" /> -->
<!-- <preference name="exit-on-suspend" value="false" /> -->
<preference name="cordova.plugins.diagnostic.modules" value="LOCATION" />
<platform name="ios">
<allow-intent href="itms:*" />
<allow-intent href="itms-apps:*" />
<!-- <resource-file src="GoogleService-Info.plist" /> -->
<hook src="ul_web_hooks/entitlements.js" type="after_prepare" />
<preference name="deployment-target" value="10.0" />
<!--
WKWebView Ionic
-->
<allow-navigation href="ionic:*" />
<allow-intent href="ionic:*" />
<!-- <preference name="iosScheme" value="https" /> -->
<preference name="MixedContentMode" value="2" />
<preference name="AllowInlineMediaPlayback" value="true" />
<preference name="MediaPlaybackRequiresUserAction" value="false" />
<preference name="AllowBackForwardNavigationGestures" value="true" />
<preference name="Allow3DTouchLinkPreview" value="false" />
<preference name="AudioCanMix" value="true" />
<preference name="ScrollEnabled" value="true" />
<preference name="WKSuspendInBackground" value="true" />
<preference name="Fullscreen" value="true" />
<preference name="StatusBarStyle" value="default" />
<preference name="EnableViewportScale" value="false" />
<preference name="KeyboardShrinksView" value="false" />
<preference name="KeyboardDisplayRequiresUserAction" value="true" />
<preference name="CDVSystemSchemesOverride" value="maps,tel,telprompt,data,blob,file" />
<feature name="IntentAndNavigationFilter">
<param name="ios-package" value="CDVIntentAndNavigationFilter" />
<param name="onload" value="true" />
</feature>
<!-- Cordova WKWebView engine -->
<preference name="CordovaWebViewEngine" value="CDVWKWebViewEngine" />
<feature name="CDVWKWebViewEngine">
<param name="ios-package" value="CDVWKWebViewEngine" />
</feature>
<custom-config-file parent="FacebookHybridAppEvents" target="*-Info.plist">
<string>false</string>
</custom-config-file>
<custom-config-file parent="FacebookAutoLogAppEventsEnabled" target="*-Info.plist">
<string>true</string>
</custom-config-file>
<custom-config-file parent="FacebookAdvertiserIDCollectionEnabled" target="*-Info.plist">
<string>true</string>
</custom-config-file>
<custom-config-file parent="UIBackgroundModes" target="*-Info.plist">
<array>
<string>location</string>
<string>remote-notification</string>
</array>
</custom-config-file>
<custom-config-file parent="LSApplicationQueriesSchemes" target="*-Info.plist">
<array>
<string>whatsapp</string>
<string>instagram</string>
<string>fb-messenger-share-api</string>
<string>fb</string>
<string>twitter</string>
<string>gplus</string>
<string>pintrest</string>
<string>youtube</string>
<string>vnd.youtube</string>
<string>yelp</string>
<string>linkedin</string>
<string>tumblr</string>
<string>whatsapp</string>
<string>snapchat</string>
<string>comgooglemaps</string>
<string>amazon</string>
<string>skype</string>
<string>googledrive</string>
<string>itms-apps</string>
<string>tel</string>
<string>mailto</string>
<string>uber</string>
<string>lyft</string>
<string>sumupmerchant</string>
<string>yammer</string>
<string>salesforce</string>
<string>wooqer</string>
</array>
</custom-config-file>
<config-file target="*-Info.plist" parent="NSAppTransportSecurity">
<dict>
<key>NSExceptionDomains</key>
<dict>
<key>https://...</key>
<dict>
<key>NSExceptionAllowsInsecureHTTPLoads</key>
<true/>
<key>NSExceptionRequiresForwardSecrecy</key>
<false/>
</dict>
<key>https://...</key>
<dict>
<key>NSIncludesSubdomains</key>
<true/>
<key>NSExceptionAllowsInsecureHTTPLoads</key>
<true/>
<key>NSExceptionRequiresForwardSecrecy</key>
<false/>
</dict>
<key>http://...</key>
<dict>
<key>NSIncludesSubdomains</key>
<true/>
<key>NSExceptionAllowsInsecureHTTPLoads</key>
<true/>
<key>NSExceptionRequiresForwardSecrecy</key>
<false/>
</dict>
<key>https://youtube.com</key>
<dict>
<key>NSIncludesSubdomains</key>
<true/>
<key>NSExceptionAllowsInsecureHTTPLoads</key>
<true/>
<key>NSExceptionRequiresForwardSecrecy</key>
<false/>
</dict>
<key>play.googleapis.com</key>
<dict>
<key>NSIncludesSubdomains</key>
<true/>
<key>NSExceptionAllowsInsecureHTTPLoads</key>
<true/>
<key>NSExceptionRequiresForwardSecrecy</key>
<false/>
</dict>
<key>googleapis.com</key>
<dict>
<key>NSIncludesSubdomains</key>
<true/>
<key>NSExceptionAllowsInsecureHTTPLoads</key>
<true/>
<key>NSExceptionRequiresForwardSecrecy</key>
<false/>
</dict>
<key>localhost</key>
<dict>
<key>NSExceptionAllowsInsecureHTTPLoads</key>
<true/>
</dict>
<key>127.0.0.1</key>
<dict>
<key>NSExceptionAllowsInsecureHTTPLoads</key>
<true/>
</dict>
</dict>
<key>NSAllowsArbitraryLoads</key>
<true/>
</dict>
</config-file>
<!-- Facebook SDK -->
<preference name="pods_ios_min_version" value="8.0"/>
<preference name="pods_use_frameworks" value="true"/>
<pod name="FBSDKCoreKit" spec="5.8.0"/>
<pod name="FBSDKLoginKit" spec="5.8.0"/>
<pod name="FBSDKShareKit" spec="5.8.0"/>
</platform>
<engines>
<engine name="apple-ios" version=">=11.0" />
<engine name="cordova-ios" version=">=5.0.1" />
</engines>
<plugin name="cordova-plugin-google-analytics" spec="^1.8.6" />
<plugin name="cordova-plugin-badge" spec="^0.8.8" />
<plugin name="cordova-plugin-camera" spec="^4.1.0">
<variable name="ANDROID_SUPPORT_V4_VERSION" value="27.+" />
</plugin>
<plugin name="cordova-plugin-dialogs" spec="^2.0.2" />
<plugin name="cordova-plugin-file" spec="^6.0.2" />
<plugin name="cordova-plugin-geolocation" spec="^4.0.2" />
<plugin name="cordova-plugin-inappbrowser" spec="^3.1.0" />
<plugin name="cordova-plugin-media-capture" spec="^3.0.3" />
<plugin name="cordova-plugin-network-information" spec="^2.0.2" />
<plugin name="cordova-plugin-x-socialsharing" spec="^5.4.7">
<variable name="ANDROID_SUPPORT_V4_VERSION" value="27.+" />
</plugin>
<plugin name="cordova-plugin-themeablebrowser" spec="^0.2.18" />
<plugin name="cordova-plugin-screen-orientation" spec="^3.0.2" />
<plugin name="cordova-plugin-statusbar" spec="^2.4.3" />
<plugin name="ionic-plugin-keyboard" spec="^2.2.1" />
<plugin name="cordova-plugin-navigationbar" spec="^1.0.31" />
<plugin name="cordova-plugin-device" spec="^2.0.3" />
<plugin name="cordova-plugin-apprate" spec="^1.4.0" />
<plugin name="es6-promise-plugin" spec="^4.2.2" />
<plugin name="cordova-plugin-globalization" spec="^1.11.0" />
<plugin name="cordova-plugin-whitelist" spec="^1.3.4" />
<plugin name="cordova.plugins.diagnostic" spec="^5.0.1">
<variable name="ANDROID_SUPPORT_VERSION" value="27.+" />
</plugin>
<plugin name="phonegap-plugin-barcodescanner" spec="^8.1.0">
<variable name="ANDROID_SUPPORT_V4_VERSION" value="27.+" />
</plugin>
<plugin name="cordova-plugin-file-transfer" spec="^1.7.1" />
<plugin name="cordova-plugin-splashscreen" spec="^5.0.3" />
<plugin name="cordova-plugin-app-version" spec="^0.1.9" />
<plugin name="cordova-plugin-contacts" spec="^3.0.1" />
<plugin name="cordova-custom-config" spec="^5.1.0" />
<plugin name="pushwoosh-cordova-plugin" spec="^7.18.3">
<variable name="LOG_LEVEL" value="DEBUG" />
<variable name="IOS_FOREGROUND_ALERT_TYPE" value="NONE" />
<variable name="ANDROID_FOREGROUND_PUSH" value="false" />
</plugin>
<plugin name="cordova-plugin-facebook4" spec="^6.2.0">
<variable name="FACEBOOK_HYBRID_APP_EVENTS" value="false" />
<variable name="ANDROID_SDK_VERSION" value="4.+" />
</plugin>
<plugin name="cordova-plugin-ionic-webview" spec="^4.1.3" />
<plugin name="cordova-plugin-cocoapod-support" spec="^1.6.2" />
</widget>
Hello,
I've managed to resolve my issue with just change version of cordova-plugin-inappbrowser. Actually it didn't workout with just setting the latest version so Ive add it like
<plugin name="cordova-plugin-inappbrowser" spec="git+https://github.com/apache/cordova-plugin-inappbrowser" />
into config.xml and
"cordova-plugin-inappbrowser": "git+https://github.com/apache/cordova-plugin-inappbrowser.git"
into package.json.
Hope that helps.
Hi, Is it your application that is hiding splash screen ? I have resolved this with this workaround :
// If we are in a cordova environment, Angular App have to hide splashscreen.
const hideSplashScreen = () => {
// A timeout is set to give more time for component loading
setTimeout(() => {
if (navigator["splashscreen"]) {
navigator["splashscreen"].hide();
}
}
, 300);
};
// If device is not ready, we add event to hide when ready
document.addEventListener("deviceready", hideSplashScreen, false);
hideSplashScreen();
I think that on iOS, JS app was loaded before device is ready but not on android. With my code, splashscreen will be hidden when device is ready and js loaded
iOS 13.2.3 - In my case, it corrected the problem, in test preview !
Hi, Is it your application that is hiding splash screen ? I have resolved this with this workaround :
// If we are in a cordova environment, Angular App have to hide splashscreen. const hideSplashScreen = () => { // A timeout is set to give more time for component loading setTimeout(() => { if (navigator["splashscreen"]) { navigator["splashscreen"].hide(); } } , 300); }; // If device is not ready, we add event to hide when ready document.addEventListener("deviceready", hideSplashScreen, false); hideSplashScreen();
I think that on iOS, JS app was loaded before device is ready but not on android. With my code, splashscreen will be hidden when device is ready and js loaded
In my case that wasn't the problem. Ive tried similar solution but with no success. Only updating the cordova-plugin-inappbrowser
helps.
I can’t reproduce on a new project, so it’s probably a bug in your code or in one of the plugins. You’ll have to debug it yourself.
Same issue here in June 2022, it hangs on blank screen and after couple of seconds then all works
It only happen when I run directly from XCode. If stop the debug and then run it directly on the device, it works fine
XCode is 12.4 (working on a 10.15.7 Mac). Cordova is 11.0.0. No Angular, just plain html
2022-06-10 12:52:08.653172-0600 HelloCordova[69036:4874338] Apache Cordova native platform version 6.2.0 is starting. 2022-06-10 12:52:08.653312-0600 HelloCordova[69036:4874338] Multi-tasking -> Device: YES, App: YES 2022-06-10 12:52:11.189912-0600 HelloCordova[69036:4874338] The preference key "AllowNewWindows" is not defined and will default to "FALSE" 2022-06-10 12:52:11.200813-0600 HelloCordova[69036:4874338] The preference key "MediaPlaybackAllowsAirPlay" is not defined and will default to "TRUE" 2022-06-10 12:52:11.210953-0600 HelloCordova[69036:4874338] The preference key "AllowBackForwardNavigationGestures" is not defined and will default to "FALSE" 2022-06-10 12:52:11.211173-0600 HelloCordova[69036:4874338] The preference key "Allow3DTouchLinkPreview" is not defined and will default to "TRUE" 2022-06-10 12:52:11.211266-0600 HelloCordova[69036:4874338] CDVWebViewEngine will reload WKWebView if required on resume 2022-06-10 12:52:11.211355-0600 HelloCordova[69036:4874338] Using WKWebView 2022-06-10 12:52:11.212043-0600 HelloCordova[69036:4874338] [CDVTimer][console] 0.104070ms 2022-06-10 12:52:11.212364-0600 HelloCordova[69036:4874338] [CDVTimer][handleopenurl] 0.112057ms 2022-06-10 12:52:11.215917-0600 HelloCordova[69036:4874338] Unlimited access to network resources 2022-06-10 12:52:11.216090-0600 HelloCordova[69036:4874338] [CDVTimer][intentandnavigationfilter] 3.584027ms 2022-06-10 12:52:11.216268-0600 HelloCordova[69036:4874338] [CDVTimer][gesturehandler] 0.074029ms 2022-06-10 12:52:11.218698-0600 HelloCordova[69036:4874338] [CDVTimer][statusbar] 2.324939ms 2022-06-10 12:52:11.218781-0600 HelloCordova[69036:4874338] [CDVTimer][TotalPluginStartup] 6.922960ms
Having the same issue as @sunco007, still no solution. Anyone having a suggestion how to further investigate the cause?
Bug Report
Problem
Cordova App is working fine with iOS< 13. But after updating to iOS 13, It is getting stuck at splash screen.
What does actually happen?
App was successfully builded via cordova cli, then in XCode but when the iPad Simulator loaded the app it stucks on the splash screen and just loads forever. This problem doesn't occur on iOS 12, there it works as expected. Ive tried to update all cordova plugins but it didn't helped.
Information
Command or Code
XCode console output
Environment, Platform, Device
Version information
I am using XCode 11.1
***old package.json versions
***new package.json versions
Checklist