Coder Social home page Coder Social logo

Comments (10)

janpio avatar janpio commented on May 30, 2024

Probably related:

'WWAHost.exe' (Script): Loaded 'Script Code (MSAppHost/3.0)'. 
Exception was thrown at line 944, column 5 in ms-appx-web://io.cordova.hellocordova/www/cordova.js
0x800a138f - JavaScript runtime error: Unable to get property 'attributes' of undefined or null reference

image
image

from cordova-windows.

janpio avatar janpio commented on May 30, 2024

The image is usually visible as it should be, and only during fadeout of the splashscreen the "broken image" image disappears.

from cordova-windows.

janpio avatar janpio commented on May 30, 2024

Ok, similar to iOS there seems to be a native splashscreen, and a manually constructed one with a spinner. That second one can't properly display the splashscreen image.

from cordova-windows.

janpio avatar janpio commented on May 30, 2024

To make the problem more visible, add this to your config.xml:

    <platform name="windows">
        <preference name="SplashScreenBackgroundColor" value="red" />
        <preference name="SplashScreenDelay" value="10000" />
        <preference name="FadeSplashScreenDuration" value="5000" />
	</platform>

from cordova-windows.

janpio avatar janpio commented on May 30, 2024

Debugging the webview content this is visible:

<div class="extendedSplashScreen hidden" id="extendedSplashScreen" style="opacity: 1; background-color: red;"><span id="extendedSplashImageHelper"></span><img id="extendedSplashImage" style="left: 290px; top: 300px; width: 620px; height: 300px;" draggable="false" onload="" alt="Splash screen image" src="ms-appx-web:///images/splashscreen.png"><progress class="win-medium win-ring extended-splash-progress-desktop" id="extendedSplashProgress" style="margin-top: 632px;"></progress></div>

And indeed, ms-appx-web:///images/splashscreen.png can not be loaded if you add it to the page html directly:

<div class="app">
            <h1>Apache Cordova</h1><img src="ms-appx-web:///images/splashscreen.png">
            <div class="blink" id="deviceready">
                <p class="event listening" style="display:none;">Connecting to Device</p>
                <p class="event received" style="display:block;">Device is Ready</p>
            </div>
        </div>

image

So either this never worked, or something broke it.

from cordova-windows.

janpio avatar janpio commented on May 30, 2024

Ah there it is:
image

from cordova-windows.

janpio avatar janpio commented on May 30, 2024

So this can be fixed by replacing

<meta http-equiv="Content-Security-Policy" content="default-src 'self' data: gap: https://ssl.gstatic.com 'unsafe-eval'; style-src 'self' 'unsafe-inline'; media-src *; img-src 'self' data: content:;">

with

<meta http-equiv="Content-Security-Policy" content="default-src 'self' data: gap: https://ssl.gstatic.com 'unsafe-eval'; style-src 'self' 'unsafe-inline'; media-src *; img-src 'self' data: content: ms-appx-web:;">

in index.html (See difference at the end of string).

Now the question becomes: Should this be added to our default project at https://github.com/apache/cordova-app-hello-world/blob/master/template_src/www/index.html#L31? Or should we change index.html dynamically somehow only for Windows? Or is there some other workaround?

from cordova-windows.

brodybits avatar brodybits commented on May 30, 2024

What is the status of this issue?

Any reason for this issue to block a patch release?

from cordova-windows.

brodybits avatar brodybits commented on May 30, 2024

I think we should address this in the next major release.

from cordova-windows.

timbru31 avatar timbru31 commented on May 30, 2024

We are archiving this repository following Apache Cordova's Deprecation Policy. We will not continue to work on this repository. Therefore all issues and pull requests are being closed. Thanks for your contribution.

from cordova-windows.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.