Closed Yura13 closed 10 months ago
can you see what is the exception in logcat?
I saw a lot of next message:
cancelDraw androidx.core.splashscreen.SplashScreen$Impl$setKeepOnScreenCondition$1@b516b93 isViewVisible: true
A stuck splash screen generally indicates an error that prevented something from initialising properly. The error could be in JS (webview) land or on the native side.
Splash Screen stucks when app running on a device without any errors or warnings.
I'm not sure where you checked for errors, so I'll describe how to check both the native side and JS land.
For the Webview/JS, use the Chrome inspector to see any console output.
To check for native logs, open the android project in android studio. The project can be found at <cordova-project>/platforms/android
. Do NOT accept any updates that Android Studio may prompt when you open the project, as it will likely break the project. You can launch the app from Android Studio which has the native debugger attached and a filtered logcat.
cancelDraw androidx.core.splashscreen.SplashScreen$Impl$setKeepOnScreenCondition$1@b516b93 isViewVisible: true
This looks like a log message stating that android is still waiting on the condition to return false. Any actual insight on what the app is actually doing is probably further up in the log.
If you can provide a logcat dump for your application from applcation start to when it "hangs" at the splashscreen, someone can probably help you dissect it.
Thanks a lot! I found the problem.
When I got stuck splash screent when running ionic cordova run android --consolelogs --debug --device --livereload
.
The app successfully runs on the device after removing --livereload
or using ionic cordova run android --consolelogs --debug --device --livereload --host=YOUR_IP_ADDRESS
.
Bug Report
Problem
Splash Screen stucks when running app on device.
What is expected to happen?
Splash Screen should hide after app is loaded.
What does actually happen?
Splash Screen stucks when app running on a device without any errors or warnings.
Information
I've migrated cordova-android from 10 to 12 and updated a bunch of plugins. I've used this article https://ionic.zendesk.com/hc/en-us/articles/7891143965975-Migrating-to-Cordova-Android-11. The same happens when migrating from 10 to 11.
Environment, Platform, Device
Version information
OS - Windows 10 Android SDK Platform 33 Android SDK Build-Tools 34.0.0 Node.js - v18.16.1 Cordova-CLI - 12.0.0 (cordova-lib@12.0.1) Ionic-CLI - 7.1.1 Device - Galaxy Tab A SM-T510
config.xml
package.json