Good afternoon,
I am working in an Ionic app using Angular and Capacitor. Sometimes, specially after updating the app, it launches to a white screen. It doesn’t reach AppComponent’s onInit().This happens in any Ionic app I have made that I try to run. I have created a completely new app using ionic start, and it still happens.
I am using the following dependencies
"dependencies": {
"@angular/animations": "^20.0.0",
"@angular/common": "^20.0.0",
"@angular/compiler": "^20.0.0",
"@angular/core": "^20.0.0",
"@angular/forms": "^20.0.0",
"@angular/platform-browser": "^20.0.0",
"@angular/platform-browser-dynamic": "^20.0.0",
"@angular/router": "^20.0.0",
"@capacitor/android": "7.4.3",
"@capacitor/app": "7.1.0",
"@capacitor/core": "7.4.3",
"@capacitor/haptics": "7.0.2",
"@capacitor/keyboard": "7.0.3",
"@capacitor/status-bar": "7.0.3",
"@ionic/angular": "^8.0.0",
"@types/node": "^24.5.2",
"ionicons": "^7.0.0",
"rxjs": "~7.8.0",
"tslib": "^2.3.0",
"zone.js": "~0.15.0"
},
If I clear the cache of the app manually it starts working again but after some use the problem reappears. Obviously this is not an ideal fix.
These are the logs before cleaning the cache https://pastebin.com/bnScJT0j
And after cleaning the cache (app launching correctly) https://pastebin.com/tGzf39Y3
This seems to only happen in devices of the brand Ulefone, or at least running on MediaTek Helio G36 8 Core. I have tested this in other brand’s devices and the apps run correctly.
I tried cleaning the WebView cache programatically like this
package com.redacted.package;
import android.os.Bundle;
import android.webkit.WebView;
import com.getcapacitor.BridgeActivity;
public class MainActivity extends BridgeActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
// Clear WebView cache to prevent connection issues
WebView webView = getBridge().getWebView();
webView.clearCache(true);
webView.clearHistory();
webView.clearFormData();
}
}
as a quick fix but to no avail.
Here are other things I have tried:
-
Update WebView (Currently at 140)
-
Developer options
-
Enable “Disable secondary process restrictions”
-
Disable “Hardware acceleration for mobile data connection”
-
Enable all compatibility options for the app
-
-
Uninstall WebView updates (on the model I’m using for testing, it went from 140 to 126)
-
Disable WebView multiprocessing in AndroidManifest.xml
xml
<application>...<meta-dataandroid:name="android.webkit.WebView.Multiprocess"android:value="false" /></application> -
Enable WebView debugging In capacitor.config.ts, set android.webContentsDebuggingEnabled: true
It appears to me that the WebView is failing to launch. This is a serious issue as we have about a hundred phones on clients that use this brand and need our app.
1 post - 1 participant





