Uploaded image for project: 'Apache Cordova'
  1. Apache Cordova
  2. CB-11474

protocol launch fails due to splash null reference

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 6.1.1
    • None
    • cordova-windows
    • Windows Platform Version: 4.4.0
      OS: Windows 10
      Compiled with Visual Studio Community Edition 2015
      Run on PC as a Windows App

    Description

      When the app launch in Windows is triggered using a custom URL (Protocol Declaration), the app crashes. As far as I could see, the reason seems to be a null reference for the system splash screen. The following occurs in cordova.js:

      1. The function activated is called
        cordova.js
        function activated(eventObject) {
            if (eventObject.detail.kind === Windows.ApplicationModel.Activation.ActivationKind.launch) {
                // Retrieve splash screen object 
                splash = eventObject.detail.splashScreen;
        
      2. It does not set the splash screen because the launch is Windows.ApplicationModel.Activation.ActivationKind.protocol
      3. The function positionControls is called and it access the splash object
        cordova.js
        function positionControls() {
            ...
            ...
        
            // Position the extended splash screen image in the same location as the system splash screen image.
            if (isPhone) {
                extendedSplashImage.style.top = 0;
                extendedSplashImage.style.left = 0;
                centerY();
            } else {
                extendedSplashImage.style.top = splash.imageLocation.y + 'px';
        
      4. The app crashes

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              doan.isakov Doan Isakov
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - 5h
                  5h
                  Remaining:
                  Remaining Estimate - 5h
                  5h
                  Logged:
                  Time Spent - Not Specified
                  Not Specified