cordova-plugin-splashscreen: Electron/Browser JS crash, SplashScreenProxy

Bug Report

Command or Code

cordova plugin add cordova-plugin-splashscreen@latest
cordova platform add electron@latest
cordova run electron  --nobuild

<platform name="browser">
        <preference name="SplashScreen" value="/res/screens/browser/land-480x320-screen.png" />
        <preference name="AutoHideSplashScreen" value="true" />
        <preference name="SplashScreenDelay" value="3000" />
        <preference name="ShowSplashScreen" value="true" />
        <preference name="SplashScreenWidth" value="480" />
        <preference name="SplashScreenHeight" value="320" />
 </platform>

What does actually happen?

adding proxy for SplashScreen
SplashScreenProxy.js:80 Uncaught TypeError: Cannot read property 'appendChild' of null
    at Object.show (SplashScreenProxy.js:80)
    at showAndHide (SplashScreenProxy.js:143)
    at SplashScreenProxy.js:158
    at XMLHttpRequest.xhrStatusChangeHandler (cordova.js:902)

Environment, Platform, Device

cordova@9.0.0 cordova-lib@9.0.1 cordova-plugin-splashscreen@5.0.3 cordova-electron@1.1.1.

Checklist

  • I searched for existing GitHub issues
  • I updated all Cordova tooling to most recent version
  • I included all the necessary information above

About this issue

Most upvoted comments

This is bug for Browser platform because the cordova-plugin-splashscreen is not properly configured

Go to your config.xml file and add this

    <platform name="browser">
    <preference name="SplashScreen" value="/img/logo.png" /> <!-- defaults to "/img/logo.png" -->
    <preference name="AutoHideSplashScreen" value="true" /> <!-- defaults to "true" -->
    <preference name="SplashScreenDelay" value="3000" /> <!-- defaults to "3000" -->
    <preference name="SplashScreenBackgroundColor" value="green" /> <!-- defaults to "#464646" -->
    <preference name="ShowSplashScreen" value="false" /> <!-- defaults to "true" -->
    <preference name="SplashScreenWidth" value="600" /> <!-- defaults to "170" -->
    <preference name="SplashScreenHeight" value="300" /> <!-- defaults to "200" -->
</platform>

<preference name="SplashScreen" value="/img/logo.png" /> <preference name="AutoHideSplashScreen" value="true" /> <preference name="SplashScreenDelay" value="3000" /> <preference name="SplashScreenBackgroundColor" value="green" /> <preference name="ShowSplashScreen" value="false" /> <preference name="SplashScreenWidth" value="600" /> <preference name="SplashScreenHeight" value="300" />

HEY BRO U SAVED ME LOVE U LOTS OF LOVE