Windows cannot install package because this package depends on another package that couldn't be found

0

We are developing an UWP app where we have automated Jenkins jobs runs everyday. Couple of days back we configured a new cloud slave machine where I was trying to run the same Jenkins job, but unfortunately I'm encountering a package installation error from Jenkins side while running the powershell script to install the App in-order to run automations tests on it.

Here is details error log(exact package name are removed for privacy concern):

Building remotely on gui_slave (codedui) in workspace c:\jenkins\workspace
No emails were triggered.
Jenkins Artifactory Plugin version: 2.7.2
Beginning to resolve Build Info dependencies.
Finished resolving Build Info dependencies.
Beginning to resolve Build Info build dependencies.
Dependency on build [AppName_winGL_build], number [LATEST], pattern [buildfile.zip] - [1] result found.
File 'c:\jenkins\workspace\buildfile.zip' already exists locally, skipping remote download.
Finished resolving Build Info build dependencies.
[workspace] $ cmd /c call C:\Users\ADMINI~1\AppData\Local\Temp\hudson5953527437702531475.bat

c:\jenkins\workspace>echo Removing previous package 
Removing previous package

c:\jenkins\workspace>rm -rf AppName_* 

c:\jenkins\workspace>exit 0 
[workspace] $ powershell.exe -NonInteractive -ExecutionPolicy ByPass "& 'C:\Users\ADMINI~1\AppData\Local\Temp\hudson1092677328160315251.ps1'"
[workspace] $ cmd /c call C:\Users\ADMINI~1\AppData\Local\Temp\hudson8287274088387671359.bat
Removing existing test files
Running test setup script
Found powershell script: C:\jenkins\workspace\AppName_4.1.0.353_Test\Add-AppDevPackage.ps1
Found bundle: C:\jenkins\workspace\AppName_4.1.0.353_Test\AppName_4.1.0.353_x86_x64_arm.appxbundle

Installing app...
Found dependency package(s):
C:\jenkins\workspace\AppName_4.1.0.353_Test\Dependencies\x86\Microsoft.NET.Native.Framework.1.3.appx
C:\jenkins\workspace\AppName_4.1.0.353_Test\Dependencies\x86\Microsoft.NET.Native.Runtime.1.4.appx
C:\jenkins\workspace\AppName_4.1.0.353_Test\Dependencies\x86\Microsoft.VCLibs.x86.14.00.appx
Add-AppxPackage : Deployment failed with HRESULT: 0x80073CF3, Package failed updates, dependency or conflict 
validation.

Windows cannot install package 89006A2E.AppName because this package depends on another package that couldn't be 
found. This package requires minimum version 1.4.24201.0 of framework Microsoft.NET.Native.Runtime.1.4 published by 
CN=Microsoft Corporation, O=Microsoft Corporation, L=Redmond, S=Washington, C=US to install; the frameworks with name 
Microsoft.NET.Native.Runtime.1.4 available to the user are 
Microsoft.NET.Native.Runtime.1.4_1.4.24201.0_x86__8wekyb3d8bbwe. Provide the correct framework along wi
Windows cannot install package 89006A2E.AppName because this package depends on another package that couldn't be 
found. This package requires minimum version 1.4.24201.0 of framework Microsoft.NET.Native.Runtime.1.4 published by 
CN=Microsoft Corporation, O=Microsoft Corporation, L=Redmond, S=Washington, C=US to install; the frameworks with name 
Microsoft.NET.Native.Runtime.1.4 available to the user are 
Microsoft.NET.Native.Runtime.1.4_1.4.24201.0_x86__8wekyb3d8bbwe. Provide the correct framework along with this package.

NOTE: For additional information, look for [ActivityId] 67e7a303-493c-0003-aca6-e7673c49d201 in the Event Log or use 
the command line Get-AppxLog -ActivityID 67e7a303-493c-0003-aca6-e7673c49d201

At C:\jenkins\workspace\AppName_4.1.0.353_Test\Add-AppDevPackage.ps1:388 char:13
+             Add-AppxPackage -Path $DeveloperPackagePath.FullName -Dep ...
+             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : WriteError: (C:\jenkins\work..._arm.appxbundle:String) [Add-AppxPackage], IOException
    + FullyQualifiedErrorId : DeploymentError,Microsoft.Windows.Appx.PackageManager.Commands.AddAppxPackageCommand

Error: Could not install the app.
Build step 'Execute Windows batch command' marked build as failure
[MSTEST-PLUGIN] Processing test results in file(s) TestResults\*.trx
FATAL: [MSTEST-PLUGIN] No MSTest TRX test report files were found. Configuration error?
Build step 'Publish MSTest test result report' marked build as failure
Email was triggered for: Failure - Any
Sending email for trigger: Failure - Any
An attempt to send an e-mail to empty list of recipients, ignored.
Finished: FAILURE

The same Powershell script runs perfectly fine when we run it manually but not when run with Jenkins.

I tried solving this problem at MSDN forum, but got pointed out that the problem lies with Jenkins but not windows package. I'm not deep into Jenkins jobs thus looking out for help over here

What have I tried to solve this issue:

1 - Adding the dependency manually like this -

<PackageDependency Name="Microsoft.NET.Native.Runtime.1.4" MinVersion="1.4.24201.0" Publisher="CN=Microsoft Corporation, O=Microsoft Corporation, L=Redmond, S=Washington, C=US" />

2 - Reinstalling the fresh Runtime.

3 - Copying the Runtime bundle from package Dependency folder to my machine.

Nothing worked till now. Some help would definitely be appreciated.

Regards,

Dash

jenkins
uwp
ui-automation
coded-ui-tests
jenkins-cli
asked on Stack Overflow Dec 1, 2016 by Dash

1 Answer

0

I'm happy to share with you that we fixed this problem by ourselves. Below are the steps fixed this problem.

  1. Installed 64 bit Java on the slave machine.
  2. The client was launched using the 64 bit Java command prompt like this - C:\java64location\java.exe jarfile jenkinssecretargs. Note - Previously the client was launched using the 32bit Java command prompt.
  3. The above command is a startup command in task scheduler.

This is really annoying but we suppose there was a problem with the new slave machine and running the client using 64 bit solved it.

Marking this as an answer. Someone might find it useful.

answered on Stack Overflow Dec 1, 2016 by Dash

User contributions licensed under CC BY-SA 3.0