I have read that many have the same problem as me but I cannot find the solution.
I migrated my ionic cordova app to capacitor.
The app works with “ionic serve” on my web browser or with “ionic capacitor run android --livereload” on my real android device.
When I deploy and sign aab pachage for android store and download it, the app shows white page and no error shown.
I am very worried.
Could you please support me?
Thanks
What does the console log say when it loads white? It must be showing an error or something?
Hi @Hills90210
White screen on Device. After download app from store. I used Android studio LogCat but no important messagehas been shown.
Does your capacitor.config.json
file still has the “server” object pointing to the local web server live reload configures?
If not, can you try running ionic capacitor run android
(without --livereload) and see if you see some error on the console?
capacitor.config.json
{
"appId": "xxx",
"appName": "xxx",
"webDir": "www",
"bundledWebRuntime": false,
"server": {
"cleartext": true
}
}
is ok?
Yeah, if it doesn’t have the “url” should be ok.
But can you also check the capacitor.config.json in android/app/src/main/assets/capacitor.config.json ?
./capacitor.config.json is the same of android/app/src/main/assets/capacitor.config.json
ionic capacitor run android
this command deploy app on device and app is ok
You need to test the app in debug mode, not production. Plugin in your device or use the simulator and run the app on the device. While its opening up the app, open chrome inspector for androids or safari developer preview for ios.
or if using native IDEs they would show the error as well.
there must be an error showing there.
Test on device using chrome inspector WORKS.
When I deploy aab on Google and I download it from store (Internal Tester), it NOT WORKS
White screen
I noticed a strange thing
If I load app using
ionic capacitor run android
It works.
If I use the same command with --prod
ionic capacitor run android --prod
I receive some error
Error: src/app/components/my-popover/my-popover.component.html:25:5 - error NG8001: 'ion-icon' is not a known element:
1. If 'ion-icon' is an Angular component, then verify that it is part of this module.
2. If 'ion-icon' is a Web Component then add 'CUSTOM_ELEMENTS_SCHEMA' to the '@NgModule.schemas' of this component to suppress this message.
Hi @lsantaniello, what device are you testing on?
We’ve had reports from (a few, luckily) users of our app of the exact same problem, after our recent upgrade to capacitor 4.
One user has a Huawei P30 Lite
thanks
Xiaomi 9 but why the problem is related to specific device?