Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No applicable app licenses foundAt line:1 #700

Closed
jakko10 opened this issue Jan 13, 2021 · 31 comments
Closed

No applicable app licenses foundAt line:1 #700

jakko10 opened this issue Jan 13, 2021 · 31 comments
Labels
Issue-Bug It either shouldn't be doing this or needs an investigation.
Milestone

Comments

@jakko10
Copy link

jakko10 commented Jan 13, 2021

Brief description of the issue

PS C:\windows\system32> winget
Program 'winget.exe' failed to run: No applicable app licenses foundAt line:1 char:1
+ winget
+ ~~~~~~.
At line:1 char:1
+ winget
+ ~~~~~~
    + CategoryInfo          : ResourceUnavailable: (:) [], ApplicationFailedExceptio 
   n
    + FullyQualifiedErrorId : NativeCommandFailed

Steps to reproduce

Windows version; 1809 (OS Build 17763.1637)
Via powershell:

Add-AppxPackage Microsoft.VCLibs.140.00.UWPDesktop_14.0.29231.0_x64__8wekyb3d8bbwe
Add-AppxPackage Microsoft.VCLibs.140.00_14.0.29231.0_x64__8wekyb3d8bbwe
Add-AppxPackage Microsoft.DesktopAppInstaller_8wekyb3d8bbwe.appxbundle

Expected behavior

When I type in winget, I should get the help.

Actual behavior

Program 'winget.exe' failed to run: No applicable app licenses foundAt line:1 char:1
+ winget
+ ~~~~~~.
At line:1 char:1
+ winget
+ ~~~~~~
    + CategoryInfo          : ResourceUnavailable: (:) [], ApplicationFailedExceptio 
   n
    + FullyQualifiedErrorId : NativeCommandFailed

Environment

[winget --info]
Windows Package Manager version
Windows: Windows.Desktop version
Package: Microsoft.DesktopAppInstaller version

Any other software?
@ghost ghost added the Needs-Triage Issue need to be triaged label Jan 13, 2021
@denelon denelon added Issue-Bug It either shouldn't be doing this or needs an investigation. and removed Needs-Triage Issue need to be triaged labels Jan 15, 2021
@denelon
Copy link
Contributor

denelon commented Jan 15, 2021

@jakko10 is this computer air-gapped or is it connected to the Internet?

@jakko10
Copy link
Author

jakko10 commented Jan 15, 2021

It's connected to the internet.

@denelon denelon added this to To Do in Client-Bugs Mar 9, 2021
@matsmcp
Copy link

matsmcp commented Mar 16, 2021

I have the same issue on an air-gapped 2022 preview server.
Fully aware that 2022 preview is not production ready. Just wanted to inform that the Issue exists so it can be fixed before GA

@matsmcp
Copy link

matsmcp commented Mar 16, 2021

Spun up a 2022 on my home workstation (that do have Internet access).
On that one Windows terminal starts so on 2022 it seems to be an internet access issue.

@denelon
Copy link
Contributor

denelon commented Mar 16, 2021

Thank you for letting us know. We're looking into the issue trying to determine the root cause.

@brwilkinson
Copy link

Recent installs seem to work on Server 2022. Not sure if there was any change.

Will update if future installs also work.

@matsmcp
Copy link

matsmcp commented Mar 18, 2021

Mine has broken over night. It now says. The system cannot execute the specified program

@JohnT-MCE
Copy link

Still experiencing error

@denelon
Copy link
Contributor

denelon commented Apr 15, 2021

@JohnT-MCE what version of Windows are you on?
Is it a Windows Insider build?
Is it Windows server?

@JohnT-MCE
Copy link

@JohnT-MCE what version of Windows are you on?
Is it a Windows Insider build?
Is it Windows server?

Windows Server 2022 LTSC 21H2 (Build 20329)

@denelon
Copy link
Contributor

denelon commented Apr 23, 2021

We need to provide an offline license for server 2022.

Then the command to provision the license would look similar to:

Add-AppxProvisionedPackage -Online -PackagePath c:\Appx\myPackage.appx -DependencyPackagePath c:\Appx\dependency1\dependencyPackage.appx -LicensePath c:\Appx\myLicense.xml

@doctordns
Copy link

Why does winget need a license? What is the license for? Is licensing really an issue for developer powertoys like winget?

@denelon denelon self-assigned this Apr 27, 2021
@denelon denelon moved this from To Do to Triaged in Client-Bugs May 6, 2021
@scotbud123
Copy link

Do we know what the solution to this is?

It's happening to me on LTSC 2019 (Windows Build Version 1809).

@tazer4
Copy link

tazer4 commented May 29, 2021

So what is Microsoft's answer to this problem? Were supposed to have one of the most advanced and expensive versions (Enterprise LTSC) not be able to use what is most likely the greatest feature addition Windows has seen in the last 20 years?

@TheBigBear
Copy link

so how does one install winget on server 2022 21H2 ltsc build 20344.1 ?

@lukasgabriel
Copy link

Same here on LTSC 2019 (Windows Build Version 1809).

@jantari
Copy link

jantari commented Jul 5, 2021

In the latest release of winget (v1.0.11692 - link here) Microsoft quietly included a license XML file. I just tried it out and was now able to install and run winget on Server 2022 Preview with:

Add-AppxProvisionedPackage -Online -PackagePath .\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe.msixbundle -LicensePath .\08d8788d59cf47ed9bf42c31e31f8efa_License1.xml -Verbose

After that it just worked. Just a heads up in case anyone else here initially missed this.

@djpbessems
Copy link

Thanks for sharing jantari,
Probably worth noting, that the cmdlet Add-AppxPackage does not have a -LicensePath parameter, so you have to use Add-AppxProvisionedPackage

@kaspersmjohansen
Copy link

kaspersmjohansen commented Jul 5, 2021

Not working here for me. Which version of WS2022 are you using?

Nevermind, it's working. My system was missing the C++ Runtime framework packages for Desktop Bridge:
https://aka.ms/Microsoft.VCLibs.x64.14.00.Desktop.appx

https://docs.microsoft.com/en-us/troubleshoot/cpp/c-runtime-packages-desktop-bridge#how-to-install-and-update-desktop-framework-packages

Andreas Nick has tweeted about how to get winget working on WS2019:
https://twitter.com/nickinformation/status/1411271194519785472?s=27

@djpbessems
Copy link

For reference, this is the script I've used to install winget Windows Server 2019 myself
(https://code.spamasaurus.com/djpbessems/Packer.Images/src/branch/Server2019/scripts/Install-WinGet.ps1):

#Requires -Modules 'NtObjectManager'
[CmdletBinding()]
Param(
    # None
)

# Download dependencies
$AppxDependencies = @(
    @{
        ShortName     = 'vclibs'
        QualifiedName = 'Microsoft.VCLibs.140.00_8wekyb3d8bbwe'
    },
    @{
        ShortName     = 'vclibsuwp'
        QualifiedName = 'Microsoft.VCLibs.140.00.UWPDesktop_8wekyb3d8bbwe'
    }
)
ForEach ($Dependency in $AppxDependencies) {
    $InvokeWebRequestSplat = @{
        Uri             = 'https://store.rg-adguard.net/api/GetFiles'
        Method          = 'POST'
        ContentType     = 'application/x-www-form-urlencoded'
        Body            = "type=PackageFamilyName&url=$($Dependency.QualifiedName)&ring=RP&lang=en-US"
        UseBasicParsing = $True
    }
    $InvokeWebRequestSplat = @{
        Uri     = ((Invoke-WebRequest @InvokeWebRequestSplat).Links | Where-Object {$_.OuterHTML -match '.appx' -and $_.outerHTML -match 'x64'}).href
        OutFile = "$env:temp/$($Dependency.ShortName).appx"
    }
    Invoke-WebRequest @InvokeWebRequestSplat
}
# Download latest release (along with license) from github
$InvokeRestMethodSplat = @{
    Uri    = "https://api.github.com/repos/microsoft/winget-cli/releases/latest"
    Method = 'GET'
}
$LatestRelease = Invoke-RestMethod @InvokeRestMethodSplat
$InvokeWebRequestSplat = @{
    Uri     = ($LatestRelease.assets | Where-Object {$_.name -like '*.msixbundle'}).browser_download_url
    OutFile = "$env:temp\winget.msixbundle"
}
Invoke-WebRequest @InvokeWebRequestSplat
$InvokeWebRequestSplat = @{
    Uri     = ($LatestRelease.assets | Where-Object {$_.name -like '*license*.xml'}).browser_download_url
    OutFile = "$env:temp\wingetlicense.xml"
}
Invoke-WebRequest @InvokeWebRequestSplat

# Install dependencies
$AppxDependencies.ShortName | ForEach-Object {
    $AddAppxPackageSplat = @{
        Path = "$env:temp/$($_).appx"
    }
    Add-AppxPackage @AddAppxPackageSplat
}
# Install winget
$AddAppxProvisionedPackageSplat = @{
    Online = $True
    PackagePath = "$env:temp\winget.msixbundle"
    LicensePath = "$env:temp\wingetlicense.xml"
}
Add-AppxProvisionedPackage @AddAppxProvisionedPackageSplat

# Create reparse point
$SetExecutionAliasSplat = @{
    Path        = "$([System.Environment]::SystemDirectory)\winget.exe"
    PackageName = "Microsoft.DesktopAppInstaller_8wekyb3d8bbwe"
    EntryPoint  = "Microsoft.DesktopAppInstaller_8wekyb3d8bbwe!winget"
    Target      = "$((Get-AppxPackage Microsoft.DesktopAppInstaller).InstallLocation)\AppInstallerCLI.exe"
    AppType     = 'Desktop'
    Version     = 3
}
Set-ExecutionAlias @SetExecutionAliasSplat
& explorer.exe "shell:appsFolder\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe!winget"

@celphogeek
Copy link

I was facing this issue today, and what I do to fix was reinstall the following apps and install all Visual C++ Runtime:
Microsoft.NET.Native.Framework.2.2_2.2.29512.0_x64__8wekyb3d8bbwe.appx
Microsoft.NET.Native.Runtime.2.2_2.2.28604.0_x64__8wekyb3d8bbwe.appx
Microsoft.UI.Xaml.2.4_2.42007.9001.0_x64__8wekyb3d8bbwe.appx
Microsoft.VCLibs.140.00_14.0.30035.0_x64__8wekyb3d8bbwe.appx
Microsoft.VCLibs.140.00.UWPDesktop_14.0.30035.0_x64__8wekyb3d8bbwe.appx

The steps to follow is simple
1 - go to https://store.rg-adguard.net/
2 - Paste the link for Desktop App installer in the search box
image
3 - Download the .Appx files for your system, if your system is x64 search x64 .appx file, for desktop app installer you need download .msixbundle
image
4 - After download, go to powershell as admin and type Add-AppxPackage LocationOfAppxFile\Microsoft.VCLibs.140.00.UWPDesktop_14.0.30035.0_x64__8wekyb3d8bbwe.appx

example of location:
Add-AppxPackage C:\Users%USERPROFILE%\Downloads\Appx\Installer\Microsoft.VCLibs.140.00.UWPDesktop_14.0.30035.0_x64__8wekyb3d8bbwe.appx
Add-AppxPackage C:\Users%USERPROFILE%\Downloads\Appx\Installer\Microsoft.DesktopAppInstaller_2021.618.1855.0_neutral_~_8wekyb3d8bbwe.msixbundle

Make sure you install VCLibs before install the package of DesktopAppInstaller.

5 - Return to https://store.rg-adguard.net/ and paste the Microsoft Store link
image
And download
Microsoft.NET.Native.Framework.2.2_2.2.29512.0_x64__8wekyb3d8bbwe.appx
Microsoft.NET.Native.Runtime.2.2_2.2.28604.0_x64__8wekyb3d8bbwe.appx
Microsoft.UI.Xaml.2.4_2.42007.9001.0_x64__8wekyb3d8bbwe.appx
Microsoft.VCLibs.140.00_14.0.30035.0_x64__8wekyb3d8bbwe.appx

After downloaded repeat the process showed in the step 4, and them close powershell.

6 - Go to the folder you download the files and double-click all of them except desktop app installer (.msixbundle) and reinstall
Microsoft.NET.Native.Framework.2.2_2.2.29512.0_x64__8wekyb3d8bbwe.appx
Microsoft.NET.Native.Runtime.2.2_2.2.28604.0_x64__8wekyb3d8bbwe.appx
Microsoft.UI.Xaml.2.4_2.42007.9001.0_x64__8wekyb3d8bbwe.appx
Microsoft.VCLibs.140.00_14.0.30035.0_x64__8wekyb3d8bbwe.appx
Microsoft.VCLibs.140.00.UWPDesktop_14.0.30035.0_x64__8wekyb3d8bbwe.appx

The version of the files could change with time, but the process is the same.

VCLibs.140.00 may require you close the process TextInputApp.exe to install it.

After that I close powershell and them open again and it works.
image

@ItzLevvie
Copy link

ItzLevvie commented Aug 10, 2021

Make sure you install VCLibs before install the package of DesktopAppInstaller.

This can be avoided by doing Add-AppxPackage -Path <PATH_TO_MSIX> -DependencyPath <PATH_TO_APPX> rather than having to install both of them individually. For example: https://github.com/ItzLevvie/winget-pkgs-validate-and-install/blob/8ec179eb31213fda3d1440898ef7b2ac364e7502/Community%20Moderators%20-%202021-08-10%20-%20experimental.cmd#L24

For additional parameters, do help Add-AppxPackage in PowerShell.

Microsoft.NET.Native.Framework.2.2_2.2.29512.0_x64__8wekyb3d8bbwe.appx
Microsoft.NET.Native.Runtime.2.2_2.2.28604.0_x64__8wekyb3d8bbwe.appx
Microsoft.UI.Xaml.2.4_2.42007.9001.0_x64__8wekyb3d8bbwe.appx
Microsoft.VCLibs.140.00_14.0.30035.0_x64__8wekyb3d8bbwe.appx

Installing these aren't necessary for App Installer to fully work. Only the UWP Desktop version of VC Libs is the needed dependency:

<PackageDependency Name="Microsoft.VCLibs.140.00.UWPDesktop" MinVersion="14.0.25426.0" Publisher="CN=Microsoft Corporation, O=Microsoft Corporation, L=Redmond, S=Washington, C=US" />

EDIT: Also, this issue is about the No applicable app licenses foundAt line:1 error. If you want to solve that issue, you'll need to download https://github.com/microsoft/winget-cli/releases/download/v1.0.11692/08d8788d59cf47ed9bf42c31e31f8efa_License1.xml and use the Add-AppxProvisionedPackage command as described in #700 (comment).

@turbcool
Copy link

In the latest release of winget (v1.0.11692 - link here) Microsoft quietly included a license XML file. I just tried it out and was now able to install and run winget on Server 2022 Preview with:

Add-AppxProvisionedPackage -Online -PackagePath .\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe.msixbundle -LicensePath .\08d8788d59cf47ed9bf42c31e31f8efa_License1.xml -Verbose

After that it just worked. Just a heads up in case anyone else here initially missed this.

Thank you, this worked for me (Enterprise LTSC 2019)

@denelon
Copy link
Contributor

denelon commented Aug 20, 2021

We are not targeting Windows server builds, but the license is included for offline installation. I missed closing this issue when it was added to the release artifacts.

@denelon denelon closed this as completed Aug 20, 2021
Client-Bugs automation moved this from Assigned to Done Aug 20, 2021
@djpbessems
Copy link

We are not targeting Windows server builds, but the license is included for offline installation. I missed closing this issue when it was added to the release artifacts.

To me that sounds like "we're trying to introduce a new tool, but we don't want it to become mainstream, so we'll only support half of our own portfolio of operating systems"

@denelon
Copy link
Contributor

denelon commented Aug 20, 2021

@djpbessems that was not the intent behind my comment.

Currently, the Windows server SKUs don't ship with the Microsoft Store client enabled. This creates challenges for updating applications delivered by the Microsoft Store. As the Windows Package Manager ships as a part of the Desktop App Installer, and that is also not generally default on server SKUs, we don't yet have a solid delivery mechanism nor an update mechanism in place today.

We have already started looking at the next evolution for the Store For Business. The future integration with Intune is part of the story as we work towards support across our entire product portfolio.

@djpbessems
Copy link

@denelon Thanks for that clarification!
Just so you know: at my current project, we'd kill for being able to use winget-cli over chocolatey during our Packer builds..., but we're staying away from it as long as we need to adopt different package managers between client and server OS builds

@doctordns
Copy link

doctordns commented Aug 22, 2021

I continue to wonder why we have seen zero work on Cmdlets. This is disappointing - and for me at least a barrier to being able to recommend WinGet. It simply is not yet a complete Package Manager for Windows. Chocolately does a better job.

Jeffrey Snover used to say "Microsoft is not capable of sustained failure." Not sure it's true, in this case. At least so far.

@Masamune3210
Copy link

....I mean of course its not complete. Its not in the release build for a reason

@meiyujack
Copy link

Same on LTSC 2021, but thanks~

In the latest release of winget (v1.0.11692 - link here) Microsoft quietly included a license XML file. I just tried it out and was now able to install and run winget on Server 2022 Preview with:

Add-AppxProvisionedPackage -Online -PackagePath .\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe.msixbundle -LicensePath .\08d8788d59cf47ed9bf42c31e31f8efa_License1.xml -Verbose

After that it just worked. Just a heads up in case anyone else here initially missed this.

@kaspersmjohansen
Copy link

Same on LTSC 2021, but thanks~

In the latest release of winget (v1.0.11692 - link here) Microsoft quietly included a license XML file. I just tried it out and was now able to install and run winget on Server 2022 Preview with:

Add-AppxProvisionedPackage -Online -PackagePath .\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe.msixbundle -LicensePath .\08d8788d59cf47ed9bf42c31e31f8efa_License1.xml -Verbose

After that it just worked. Just a heads up in case anyone else here initially missed this.

However still not supported in Windows Server 2022 or earlier

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Issue-Bug It either shouldn't be doing this or needs an investigation.
Projects
None yet
Development

No branches or pull requests