New-WinGetSource fails with Unauthorized error on publish-azwebapp
@RDMacLachlan is already working on this.
Since Apr 11, 2024.
Assessment
This issue has not been assessed yet.
Description
Brief description of your issue
Attempting to create a New-WinGetSource fails on line 157 of New-ARMObjects.ps1:
$Result = Publish-AzWebApp -ArchivePath $RestSourcePath -ResourceGroupName $AzResourceGroup -Name $AzFunctionName -Force
with error:
..."\WinGet.RestSource-Winget.PowerShell.Source\Library\New-ARMObjects.ps1:157
Line |
157 | … $Result = Publish-AzWebApp -ArchivePath $RestSourcePath -ResourceGr …
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| Deployment failed with status code Unauthorized"
Steps to reproduce
This command works until the last step of publishing as described above:
New-WinGetSource -Name "contosorestsource4" -ResourceGroup "rg-winget-rest-source" -Region "eastus" -ImplementationPerformance "Basic" -ShowConnectionInstructions -Verbose
I haven't figured out why it is failing but I noticed two things:
-
a resource group with the same name as the one I gave was also created but without and hyphens. I get this warning for an RG I'm not using: "WARNING: Found an existing Resource Group matching the name of rgwingetrestsource. Will not create a new Resource Group." this seems like a separate bug. If I look in my RGs this new RG does exist and there is nothing inside.
-
The function app environment variables is missing a few values because their names cannot be found in the key vault. The "New-ARMObjects.ps1" script does not appear to attempt to create these missing key vault secrets with the names expected in the Function App environment variables so I'm not sure why they are mentioned in the Function App config. Screenshot:
Expected behavior
I expected the command to complete successfully
Actual behavior
Failure due to auth
Environment
Windows Package Manager v1.7.10861
Copyright (c) Microsoft Corporation. All rights reserved.
Windows: Windows.Desktop v10.0.22631.3296
System Architecture: X64
Package: Microsoft.DesktopAppInstaller v1.22.10861.0
- Dominant language
- C#
- Stars
- 317
- Forks
- 79
- Avg merge
- 12h 22m
- Merged PRs (30d)
- 3
Getting set up
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from microsoft/winget-cli-restsource
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
-
Issue-Feature
Difficulty 4/5 3-5 days Newbie friendliness 55/100
-
Difficulty 4/5 3-5 days Newbie friendliness 45/100
-
Font SupportMay be free again @dkbennett claimed this 279 days ago, and no pull request is open. OpenIssue-Feature
microsoft/winget-cli-restsource#310 · 1 comment · 1 assignee ·
-
Issue-Bug
Difficulty 4/5 3-5 days Newbie friendliness 25/100
microsoft/winget-cli-restsource#309 · 2 comments ·
All issues in microsoft/winget-cli-restsource
Similar issues
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
fluentassertions/fluentassertions#3353 ·
Maintainers usually reply within 1 day
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
-
Difficulty 2/5 Half a day Newbie friendliness 78/100
unoplatform/uno#24769 ·
Maintainers usually reply within 1 day
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
AvaloniaUI/Avalonia#22323 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
microsoft/onnxruntime-genai#2633 ·
Maintainers usually reply within 1 day