White Screen when using Capacitor


I had a stable ionic app and tried to use capacitor for additional features such as local notifications on device (offered ionic native plugins don’t work)
After I followed the tutorial what needs to be done to use an existing app with capacitor and I build the apk file, signed it, zipaligned it, installed it on my device, then start it: the splash screen shows correctly but then the screen gets white and is frozen.
Nothing happens after that.

What is the problem? Can anyone help me?

First: The Cordova Plugin for Local Notification works. Maybe you have an issue in combination with another Plugin?

Second: So you have any error console output?

Sorry to say that, but they do not work. I tried baidu-push and phonegap local notification (Both didnt show anything) .
Then i tried local-notification from Katzer. After i added the plugin my build crashed when executing the subprocess: processReleaseManifest

Errormessage appears: AndroidManifest.xml:28:13-35 Error:
Attribute meta-data#android.support.VERSION@value value=(25.4.0) from [com.android.support:appcompat-v7:25.4.0] AndroidManifest.xml:28:13-35
is also present at [com.android.support:support-v4:26.1.0] AndroidManifest.xml:28:13-35 value=(26.1.0).
Suggestion: add ‘tools:replace=“android:value”’ to element at AndroidManifest.xml:26:9-28:38 to override.

Manifest merger failed : Attribute meta-data#android.support.VERSION@value value=(25.4.0) from [com.android.support:appcompat-v7:25.4.0] AndroidManifest.xml:28:13-35

After that i saw somewhere the tip to update build.gradle file with this code piece:

configurations.all {
resolutionStrategy.eachDependency { DependencyResolveDetails details ->
def requested = details.requested
if (requested.group == ‘com.android.support’) {
if (!requested.name.startsWith(“multidex”)) {
details.useVersion ‘25.3.0’

The next time i tried to execute the build process i received following error:

\Builder.java:32: error: package android.support.v4.media.app.NotificationCompat does not exist
import android.support.v4.media.app.NotificationCompat.MediaStyle;

Builder.java:130: error: cannot find symbol
symbol: method setChannelId(String)

\Builder.java:296: error: cannot find symbol
MediaStyle style;
Builder.java:298: error: cannot find symbol
style = new MediaStyle(builder)

I followed the documentation how to implement everything. When i remove the Katzer local-notification plugin my build works again.

@EinfachHans If you really believe these plug-ins work, then please tell me what to do different with katzer local notification plugin. Because I followed EXACTLY the documentation and it doesn’t work.

Now back again to the main topic. When I build the app with capacitor install it and run it after splash screen I get a frozen white screen.

1 Like

So @EinfachHans, i managed to get Local-Plugin working. But it was a some amount of work, big research, configuration changes and one javascript version of local-notification plugin was not working. Through debugging i found out this error:

Uncaught TypeError: Object(…) is not a function at LocalNotifications.schedule (index.js:49) at HomePage.webpackJsonp.76.HomePage.launchNotification (home.ts:76) at home.ts:49 at PrivateChannel.Dispatcher.emit (pusher.js:1596) at PrivateChannel.Channel.handleEvent (pusher.js:3238) at pusher.js:136 at ConnectionManager.Dispatcher.emit (pusher.js:1596) at message (pusher.js:8168) at Connection.Dispatcher.emit (pusher.js:1596) at message (pusher.js:2984) I tried to update @ionic-native and i got the same error, but at the startup of the application.

Then i saw the tip, that some should use an earlier javascript version of ionic native local-notification script (4.7.0) to access cordova local-notification plugin from Katzer. My version was > 5.0.0. So i changed it to 4.7.0. And thats what was working for me ! So we both were indeed right. I was right when saying, that the plugin is not working and you were right, that some version are working.

1 Like