TheCocoaProject / cordova-plugin-nativestorage

Cordova plugin: Native storage of variables in Android, iOS and Windows
http://thecocoaproject.github.io/
Apache License 2.0
292 stars 106 forks source link

Angular Cordova app stucks at splash screen on iOS 13+ #147

Open jessecarterjs opened 5 years ago

jessecarterjs commented 5 years ago

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

Ive already posted that issue in ios-cordova repo and one of the responses said that the problem may comes from cordova-plugin-nativestorage because of this line

2019-10-30 21:53:31.393422+0200 MyAppName[5006:76802] ERROR: {"code":2,"source":"Native","exception":null}

It also suggest to change cordova-plugin-nativestorage with ionic-storage / sqlite, but honestly Im not so into that cordova stuff and dont want to do that.

Command or Code

XCode console output

2019-10-30 21:53:29.330779+0200 MyAppName[5006:76802] Apache Cordova native platform version 5.0.1 is starting.
2019-10-30 21:53:29.331097+0200 MyAppName[5006:76802] Multi-tasking -> Device: YES, App: YES
2019-10-30 21:53:29.354444+0200 MyAppName[5006:76802] 

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
2019-10-30 21:53:29.553348+0200 MyAppName[5006:76802] Using UIWebView
2019-10-30 21:53:29.554794+0200 MyAppName[5006:76802] [CDVTimer][console] 0.066996ms
2019-10-30 21:53:29.554959+0200 MyAppName[5006:76802] [CDVTimer][handleopenurl] 0.046015ms
2019-10-30 21:53:29.556141+0200 MyAppName[5006:76802] Unlimited access to network resources
2019-10-30 21:53:29.556288+0200 MyAppName[5006:76802] [CDVTimer][intentandnavigationfilter] 1.237988ms
2019-10-30 21:53:29.556437+0200 MyAppName[5006:76802] [CDVTimer][gesturehandler] 0.054955ms
2019-10-30 21:53:29.557578+0200 MyAppName[5006:76802] [CDVTimer][statusbar] 1.064062ms
2019-10-30 21:53:29.559284+0200 MyAppName[5006:76802] [CDVTimer][splashscreen] 1.588106ms
2019-10-30 21:53:29.559414+0200 MyAppName[5006:76802] [CDVTimer][TotalPluginStartup] 4.725933ms
2019-10-30 21:53:29.569610+0200 MyAppName[5006:76802] createNotificationChecker
2019-10-30 21:53:29.569713+0200 MyAppName[5006:76802] not coldstart
2019-10-30 21:53:29.600238+0200 MyAppName[5006:76802] active
2019-10-30 21:53:29.600445+0200 MyAppName[5006:76802] PushPlugin skip clear badge
2019-10-30 21:53:30.824848+0200 MyAppName[5006:76802] Resetting plugins due to page load.
2019-10-30 21:53:30.858296+0200 MyAppName[5006:76802] Failed to load webpage with error: The operation couldn’t be completed. (NSURLErrorDomain error -999.)
2019-10-30 21:53:30.859842+0200 MyAppName[5006:76802] Resetting plugins due to page load.
2019-10-30 21:53:31.380998+0200 MyAppName[5006:76802] Finished load of: file:///Users/dev/Library/Developer/CoreSimulator/Devices/3B770CB2-C0C6-4657-8924-3D1807191DF4/data/Containers/Bundle/Application/46FF1912-B517-40C0-953A-EAB39407458F/MyAppName.app/www/start.html
2019-10-30 21:53:31.393422+0200 MyAppName[5006:76802] ERROR: {"code":2,"source":"Native","exception":null}
2019-10-30 21:53:31.741927+0200 MyAppName[5006:76802] action @ 21:53:31.679 @ngrx/store/update-reducers (in 2.00 ms)
2019-10-30 21:53:31.742080+0200 MyAppName[5006:76802]  prev state (Empty)
2019-10-30 21:53:31.742161+0200 MyAppName[5006:76802]  action [object Object]
2019-10-30 21:53:31.742480+0200 MyAppName[5006:76802]  next state [object Object]
2019-10-30 21:53:31.742744+0200 MyAppName[5006:76802] action @ 21:53:31.682 @ngrx/store-devtools/recompute (in 1.00 ms)
2019-10-30 21:53:31.743047+0200 MyAppName[5006:76802]  prev state [object Object]
2019-10-30 21:53:31.743380+0200 MyAppName[5006:76802]  action [object Object]
2019-10-30 21:53:31.743688+0200 MyAppName[5006:76802]  next state [object Object]
2019-10-30 21:53:31.743997+0200 MyAppName[5006:76802] action @ 21:53:31.684 @ngrx/store-devtools/recompute (in 1.00 ms)
2019-10-30 21:53:31.744172+0200 MyAppName[5006:76802]  prev state [object Object]
2019-10-30 21:53:31.744415+0200 MyAppName[5006:76802]  action [object Object]
2019-10-30 21:53:31.744572+0200 MyAppName[5006:76802]  next state [object Object]
2019-10-30 21:53:31.744812+0200 MyAppName[5006:76802] action @ 21:53:31.708 @ngrx/effects/init (in 0.00 ms)
2019-10-30 21:53:31.744964+0200 MyAppName[5006:76802]  prev state [object Object]
2019-10-30 21:53:31.745133+0200 MyAppName[5006:76802]  action [object Object]
2019-10-30 21:53:31.745350+0200 MyAppName[5006:76802]  next state [object Object]
2019-10-30 21:53:31.745506+0200 MyAppName[5006:76802] action @ 21:53:31.729 [Authentication] Login (in 0.00 ms)
2019-10-30 21:53:31.745652+0200 MyAppName[5006:76802]  prev state [object Object]
2019-10-30 21:53:31.749514+0200 MyAppName[5006:76802]  action [object Object]
2019-10-30 21:53:31.749624+0200 MyAppName[5006:76802]  next state [object Object]
2019-10-30 21:53:32.029293+0200 MyAppName[5006:76802] Setting the WebView's frame to {{0, 0}, {768, 980}}
2019-10-30 21:53:32.029455+0200 MyAppName[5006:76802] Setting the WebView's frame to {{0, 0}, {768, 1024}}
2019-10-30 21:53:32.037024+0200 MyAppName[5006:76802] THREAD WARNING: ['InAppBrowser'] took '17.160889' ms. Plugin should use a background thread.
2019-10-30 21:53:32.320230+0200 MyAppName[5006:77457] WF: === Starting WebFilter logging for process MyAppName
2019-10-30 21:53:32.320400+0200 MyAppName[5006:77457] WF: _userSettingsForUser : (null)
2019-10-30 21:53:32.320607+0200 MyAppName[5006:77457] WF: _WebFilterIsActive returning: NO
2019-10-30 21:53:32.588420+0200 MyAppName[5006:76802] Unbalanced calls to begin/end appearance transitions for <UIViewController: 0x7fd418e23b30>.

Environment, Platform, Device

Version information

I am using XCode 11.1

***old package.json versions

"cordova-ios": "git+https://github.com/apache/cordova-ios.git",
    "cordova-ios-plugin-no-export-compliance": "0.0.5",
    "cordova-plugin-inappbrowser": "^2.0.2",
    "cordova-plugin-nativestorage": "2.3.2",
    "cordova-plugin-splashscreen": "^5.0.2",
    "cordova-plugin-statusbar": "^2.4.1",
    "cordova-plugin-whitelist": "1",
    "phonegap-plugin-push": "^2.2.1"

***new package.json versions

"cordova-ios": "git+https://github.com/apache/cordova-ios.git",
    "cordova-ios-plugin-no-export-compliance": "0.0.6",
    "cordova-plugin-inappbrowser": "3.1.0",
    "cordova-plugin-nativestorage": "2.3.2",
    "cordova-plugin-splashscreen": "5.0.3",
    "cordova-plugin-statusbar": "2.4.3",
    "cordova-plugin-whitelist": "1.3.4",
    "phonegap-plugin-push": "2.3.0"

Checklist

jessecarterjs commented 4 years ago

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.