Blank page in iOS 12 at random timing in app - looks like a strange Content Security Protocol problem

Code runs perfectly in Browser, Android and in iOS 11.* platforms.
When running on iOS 12 the app gets stuck on a blank screen at random times.
After the app is stuck, you have to close it and restart. It then gets stuck on the splash screen.
You have to uninstall the app and re-install it to make it work again.
Nothing is saved on the device except the firebase token.

The only error in the log is:

ERROR Internal navigation rejected - <allow-navigation> not set for url=‘gap://ready’

The strange thing is, we would expect that if it was content security policy issue, there will be an error that can be recreated. However, the error does not seem to be deterministic. XHR and Http calls got to firebase just fine until the error suddenly occurs.

The CSP we are using in index.html:

<meta http-equiv=“Content-Security-Policy” content=“default-src gap://ready file:// ; script-src ‘self’ ‘unsafe-inline’ ‘unsafe-eval’ ; style-src ‘self’ ‘unsafe-inline’ ; img-src ‘self’ data: ; font-src ‘self’ data: ;”>


<access origin="" />
<allow-intent href="http://
/" />
<allow-intent href="https://
/" />
<allow-intent href="tel:
" />
<allow-intent href=“sms:" />
<allow-intent href="mailto:
” />
<allow-intent href=“geo:*” />
<allow-navigation href=“” />

Ionic Info:


ionic (Ionic CLI) : 4.1.2 (C:\Users\Lenovo\AppData\Roaming\npm\node_modules\ionic)
Ionic Framework : ionic-angular 3.9.2
@ionic/app-scripts : 3.2.0


cordova (Cordova CLI) : 7.1.0
Cordova Platforms : android 6.4.0, browser 5.0.3, ios 4.5.4
Cordova Plugins : cordova-plugin-ionic 5.1.6, cordova-plugin-ionic-keyboard 2.0.5, cordova-plugin-ionic-webview 2.1.4, (and 12 other plugins)


Android SDK Tools : 26.0.2 (C:\dev\lib\Android\sdk)
NodeJS : v8.10.0 (C:\dev\servers\nodejs\8.10.0\node.exe)
npm : 5.6.0
OS : Windows 7

ionic cordova plugin list

cordova-plugin-actionsheet 2.3.3 “ActionSheet”
cordova-plugin-app-version 0.1.9 “AppVersion”
cordova-plugin-camera 4.0.2 “Camera”
cordova-plugin-compat 1.2.0 “Compat”
cordova-plugin-device 2.0.1 “Device”
cordova-plugin-fcm 2.1.2 “FCMPlugin”
cordova-plugin-file 6.0.1 “File”
cordova-plugin-file-transfer 1.7.1 “File Transfer”
cordova-plugin-ionic 5.1.6 “cordova-plugin-ionic”
cordova-plugin-ionic-keyboard 2.0.5 “cordova-plugin-ionic-keyboard”
cordova-plugin-ionic-webview 2.1.4 “cordova-plugin-ionic-webview”
cordova-plugin-network-information 2.0.1 “Network Information”
cordova-plugin-splashscreen 5.0.2 “Splashscreen”
cordova-plugin-whitelist 1.3.3 “Whitelist”
phonegap-plugin-barcodescanner 7.0.2 “BarcodeScanner”

Any help will be highly appreciated!


I know this is late but did you find out anything on this? We are seeing something similar on our end. It throws no errors and happens ONCE everyday

1 Like

Same problem as yours @keczan ! I’m really lost on this…