apache / cordova-windows

[DEPRECATED] Apache Cordova Windows
Apache License 2.0
203 stars 171 forks source link

Can not run app with `widget.name` that includes pipe `|` #338

Closed janpio closed 1 year ago

janpio commented 5 years ago

Bug Report

Problem

What is expected to happen?

I want to be able to run an app with a pipe in its name for Windows similar like I can for Android.

What does actually happen?

During "Installing app" step I get this:

Add-AppxPackage : Deployment failed with HRESULT: 0x80073CF6, Package could not be registered. (Exception from HRESULT: 0x80073CF6)                               

NOTE: For additional information, look for [ActivityId] d145f98e-1c83-0003-9e62-50d1831cd501 in the Event Log or use the command line Get-AppPackageLog -ActivityI
d145f98e-1c83-0003-9e62-50d1831cd501                                                                                                                              

At E:\Projects\throwaway\cordovaPipeName\platforms\windows\AppPackages\CordovaApp.Windows10_1.0.0.0_anycpu_debug_Test\Add-AppDevPackage.ps1:396 char:13           
+             Add-AppxPackage -Path $DeveloperPackagePath.FullName -For ...                                                                                       
+             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~                                                                                           
    + CategoryInfo          : WriteError: (E:\Projects\thr...ycpu_debug.appx:String) [Add-AppxPackage], IOException                                               
    + FullyQualifiedErrorId : DeploymentError,Microsoft.Windows.Appx.PackageManager.Commands.AddAppxPackageCommand                                                

Error: Could not install the app.                                                                                                                                 
Starting application...                                                                                                                                           
Get-AppxPackageManifest : Cannot process argument transformation on parameter 'Package'. Object reference not set to an instance of an object.                    
At E:\Projects\throwaway\cordovaPipeName\platforms\windows\cordova\lib\WindowsStoreAppUtils.ps1:157 char:41                                                       
+     $manifest = Get-appxpackagemanifest $package                                                                                                                
+                                         ~~~~~~~~                                                                                                                
    + CategoryInfo          : InvalidData: (:) [Get-AppxPackageManifest], ParameterBindingArgumentTransformationException                                         
    + FullyQualifiedErrorId : ParameterArgumentTransformationError,Microsoft.Windows.Appx.PackageManager.Commands.GetAppxPackageManifestCommand                   

ActivateApplication:  !                                                                                                                                           
Exception calling "ActivateApplication" with "4" argument(s): "Value does not fall within the expected range."                                                    
At E:\Projects\throwaway\cordovaPipeName\platforms\windows\cordova\lib\WindowsStoreAppUtils.ps1:164 char:5                                                        
+     $appActivator.ActivateApplication($applicationUserModelId,$null,[ ...                                                                                       
+     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~                                                                                           
    + CategoryInfo          : NotSpecified: (:) [], MethodInvocationException                                                                                     
    + FullyQualifiedErrorId : ArgumentException                                                                                                                   

Information

E:\Projects\throwaway\cordovaPipeName  (helloworld@1.0.0) 
λ cordova platform list                                   
Installed platforms:                                      
  android 8.0.0                                           
  windows 7.0.0                                           
Available platforms:                                      
  browser ^6.0.0                                          
  electron ^1.0.0                                         
  ios ^5.0.0                                              
  osx ^5.0.0                                              

E:\Projects\throwaway\cordovaPipeName  (helloworld@1.0.0)                                                                                  
λ cat config.xml                                                                                                                           
<?xml version='1.0' encoding='utf-8'?>                                                                                                     
<widget id="io.cordova.hellocordova" version="1.0.0" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0">    
    <name>Hello|Cordova</name>                                                                                                             
    <description>                                                                                                                          
        A sample Apache Cordova application that responds to the deviceready event.                                                        
    </description>                                                                                                                         
    <author email="dev@cordova.apache.org" href="http://cordova.io">                                                                       
        Apache Cordova Team                                                                                                                
    </author>                                                                                                                              
    <content src="index.html" />                                                                                                           
    <plugin name="cordova-plugin-whitelist" spec="1" />                                                                                    
    <access origin="*" />                                                                                                                  
    <allow-intent href="http://*/*" />                                                                                                     
    <allow-intent href="https://*/*" />                                                                                                    
    <allow-intent href="tel:*" />                                                                                                          
    <allow-intent href="sms:*" />                                                                                                          
    <allow-intent href="mailto:*" />                                                                                                       
    <allow-intent href="geo:*" />                                                                                                          
    <platform name="android">                                                                                                              
        <allow-intent href="market:*" />                                                                                                   
    </platform>                                                                                                                            
    <platform name="ios">                                                                                                                  
        <allow-intent href="itms:*" />                                                                                                     
        <allow-intent href="itms-apps:*" />                                                                                                
    </platform>                                                                                                                            
</widget>    

λ cordova run android
Checking Java JDK and Android SDK versions
ANDROID_SDK_ROOT=undefined (recommended setting)
ANDROID_HOME=C:\Users\Jan\AppData\Local\Android\sdk (DEPRECATED)
Subproject Path: CordovaLib
Subproject Path: app
> Task :app:preBuild UP-TO-DATE
> Task :CordovaLib:preBuild UP-TO-DATE
> Task :CordovaLib:preDebugBuild UP-TO-DATE
> Task :CordovaLib:checkDebugManifest UP-TO-DATE
> Task :CordovaLib:processDebugManifest UP-TO-DATE
> Task :app:preDebugBuild UP-TO-DATE
> Task :CordovaLib:compileDebugAidl NO-SOURCE
> Task :app:compileDebugAidl NO-SOURCE
> Task :CordovaLib:packageDebugRenderscript NO-SOURCE
> Task :app:compileDebugRenderscript UP-TO-DATE
> Task :app:checkDebugManifest UP-TO-DATE
> Task :app:generateDebugBuildConfig UP-TO-DATE
> Task :app:prepareLintJar UP-TO-DATE
> Task :app:generateDebugSources UP-TO-DATE
> Task :CordovaLib:compileDebugRenderscript UP-TO-DATE
> Task :CordovaLib:generateDebugBuildConfig UP-TO-DATE
> Task :CordovaLib:generateDebugResValues UP-TO-DATE
> Task :CordovaLib:generateDebugResources UP-TO-DATE
> Task :CordovaLib:packageDebugResources UP-TO-DATE
> Task :CordovaLib:generateDebugRFile UP-TO-DATE
> Task :CordovaLib:prepareLintJar UP-TO-DATE
> Task :CordovaLib:generateDebugSources UP-TO-DATE
> Task :CordovaLib:javaPreCompileDebug UP-TO-DATE
> Task :CordovaLib:compileDebugJavaWithJavac UP-TO-DATE
> Task :CordovaLib:processDebugJavaRes NO-SOURCE
> Task :CordovaLib:transformClassesAndResourcesWithPrepareIntermediateJarsForDebug UP-TO-DATE
> Task :app:javaPreCompileDebug UP-TO-DATE
> Task :app:mainApkListPersistenceDebug UP-TO-DATE
> Task :app:generateDebugResValues UP-TO-DATE
> Task :app:generateDebugResources UP-TO-DATE
> Task :app:mergeDebugResources UP-TO-DATE
> Task :app:createDebugCompatibleScreenManifests UP-TO-DATE
> Task :app:processDebugManifest UP-TO-DATE
> Task :app:processDebugResources UP-TO-DATE
> Task :app:compileDebugJavaWithJavac UP-TO-DATE
> Task :app:compileDebugNdk NO-SOURCE
> Task :app:compileDebugSources UP-TO-DATE
> Task :app:mergeDebugShaders UP-TO-DATE
> Task :app:compileDebugShaders UP-TO-DATE
> Task :app:generateDebugAssets UP-TO-DATE
> Task :CordovaLib:mergeDebugShaders UP-TO-DATE
> Task :CordovaLib:compileDebugShaders UP-TO-DATE
> Task :CordovaLib:generateDebugAssets UP-TO-DATE
> Task :CordovaLib:packageDebugAssets UP-TO-DATE
> Task :app:mergeDebugAssets UP-TO-DATE
> Task :app:validateSigningDebug UP-TO-DATE
> Task :app:signingConfigWriterDebug UP-TO-DATE
> Task :app:transformClassesWithDexBuilderForDebug UP-TO-DATE
> Task :app:transformDexArchiveWithExternalLibsDexMergerForDebug UP-TO-DATE
> Task :app:transformDexArchiveWithDexMergerForDebug UP-TO-DATE
> Task :app:mergeDebugJniLibFolders UP-TO-DATE
> Task :CordovaLib:compileDebugNdk NO-SOURCE
> Task :CordovaLib:mergeDebugJniLibFolders UP-TO-DATE
> Task :CordovaLib:transformNativeLibsWithMergeJniLibsForDebug UP-TO-DATE
> Task :CordovaLib:transformNativeLibsWithIntermediateJniLibsForDebug UP-TO-DATE
> Task :app:transformNativeLibsWithMergeJniLibsForDebug UP-TO-DATE
> Task :app:processDebugJavaRes NO-SOURCE
> Task :app:transformResourcesWithMergeJavaResForDebug UP-TO-DATE
> Task :app:packageDebug UP-TO-DATE
> Task :app:assembleDebug UP-TO-DATE
> Task :app:cdvBuildDebug UP-TO-DATE

BUILD SUCCESSFUL in 6s
42 actionable tasks: 42 up-to-date
Built the following apk(s):
        E:\Projects\throwaway\cordovaPipeName\platforms\android\app\build\outputs\apk\debug\app-debug.apk
Checking Java JDK and Android SDK versions
ANDROID_SDK_ROOT=undefined (recommended setting)
ANDROID_HOME=C:\Users\Jan\AppData\Local\Android\sdk (DEPRECATED)
No target specified, deploying to device '02e7f7e9215da7f8'.
Using apk: E:\Projects\throwaway\cordovaPipeName\platforms\android\app\build\outputs\apk\debug\app-debug.apk
Package name: io.cordova.hellocordova
LAUNCH SUCCESS

E:\Projects\throwaway\cordovaPipeName  (helloworld@1.0.0)
λ cordova run windows
ENV var MSBUILDDIR is set C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\15.0\Bin
Building project: E:\Projects\throwaway\cordovaPipeName\platforms\windows\CordovaApp.Windows10.jsproj
        Configuration : debug
        Platform      : anycpu
        Buildflags    : /p:AppxBundle=Never
        MSBuildTools  : C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\15.0\Bin
buildProject spawn: C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\15.0\Bin\msbuild [
  'E:\\Projects\\throwaway\\cordovaPipeName\\platforms\\windows\\CordovaApp.Windows10.jsproj',
  '/clp:NoSummary;NoItemAndPropertyList;Verbosity=minimal',
  '/nologo',
  '/p:Configuration=debug',
  '/p:Platform=anycpu',
  '/p:AppxBundle=Never'
] { stdio: 'inherit' }
  prebuild.js: Patching platform `10`
  - Injected `base.js` reference to `/www/index.html`
  - Removing /( *)(<script\s+(?:type="text\/javascript"\s+)?src="\/\/Microsoft.WinJS.2.0\/js\/base.js">\s*<\/script>)(\s*)/ from /www/index.html
  - Removing /( *)(<script\s+(?:type="text\/javascript"\s+)?src="\/\/Microsoft.Phone.WinJS.2.1\/js\/base.js">\s*<\/script>)(\s*)/ from /www/index.html
  CordovaApp.Windows10 -> E:\Projects\throwaway\cordovaPipeName\platforms\windows\AppPackages\CordovaApp.Windows10_1.0.0.0_anycpu_debug_Test\CordovaApp.Windows10_1.0.0.0_anycpu
  _debug.appx
Deploying windows10 package to device:
E:\Projects\throwaway\cordovaPipeName\platforms\windows\AppPackages\CordovaApp.Windows10_1.0.0.0_anycpu_debug_Test\CordovaApp.Windows10_1.0.0.0_anycpu_debug.appx
Attempting to uninstall previous application version...
Attempting to install application...
Found package: E:\Projects\throwaway\cordovaPipeName\platforms\windows\AppPackages\CordovaApp.Windows10_1.0.0.0_anycpu_debug_Test\CordovaApp.Windows10_1.0.0.0_anycpu_debug.appx

Installing app...
Add-AppxPackage : Deployment failed with HRESULT: 0x80073CF6, Package could not be registered. (Exception from HRESULT: 0x80073CF6)

NOTE: For additional information, look for [ActivityId] d145f98e-1c83-0003-9e62-50d1831cd501 in the Event Log or use the command line Get-AppPackageLog -ActivityID
d145f98e-1c83-0003-9e62-50d1831cd501

At E:\Projects\throwaway\cordovaPipeName\platforms\windows\AppPackages\CordovaApp.Windows10_1.0.0.0_anycpu_debug_Test\Add-AppDevPackage.ps1:396 char:13
+             Add-AppxPackage -Path $DeveloperPackagePath.FullName -For ...
+             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : WriteError: (E:\Projects\thr...ycpu_debug.appx:String) [Add-AppxPackage], IOException
    + FullyQualifiedErrorId : DeploymentError,Microsoft.Windows.Appx.PackageManager.Commands.AddAppxPackageCommand

Error: Could not install the app.
Starting application...
Get-AppxPackageManifest : Cannot process argument transformation on parameter 'Package'. Object reference not set to an instance of an object.
At E:\Projects\throwaway\cordovaPipeName\platforms\windows\cordova\lib\WindowsStoreAppUtils.ps1:157 char:41
+     $manifest = Get-appxpackagemanifest $package
+                                         ~~~~~~~~
    + CategoryInfo          : InvalidData: (:) [Get-AppxPackageManifest], ParameterBindingArgumentTransformationException
    + FullyQualifiedErrorId : ParameterArgumentTransformationError,Microsoft.Windows.Appx.PackageManager.Commands.GetAppxPackageManifestCommand

ActivateApplication:  !
Exception calling "ActivateApplication" with "4" argument(s): "Value does not fall within the expected range."
At E:\Projects\throwaway\cordovaPipeName\platforms\windows\cordova\lib\WindowsStoreAppUtils.ps1:164 char:5
+     $appActivator.ActivateApplication($applicationUserModelId,$null,[ ...
+     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [], MethodInvocationException
    + FullyQualifiedErrorId : ArgumentException
timbru31 commented 1 year ago

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.