You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I noticed the Microsoft.WinGet.RestSource just being released yesterday, so I was eager to try it out. When running the New-WinGetSource, it throws an error:
It fails uploading the .zip file to the Azure Function. This is because the default timeout is 10000 milliseconds, meaning 100 seconds. When attempting to manually upload the .zip file and set the timeout to 300 seconds, it succeeds.
Write-Information-MessageData "Publishing function files to the Azure Function."$DeployResult=Publish-AzWebApp-ArchivePath $RestSourcePath-ResourceGroupName $ResourceGroup-Name $FunctionName-Force -ErrorVariable DeployError
## Verifies that no error occured when publishing the Function Appif ($DeployError-or!$DeployResult) {
$ErrReturnObject=@{
DeployError=$DeployErrorDeployResult=$DeployResult
}
Write-Error"Failed to publishing the Function App. Error: $DeployError"-TargetObject $ErrReturnObjectreturn$false
}
## Restart the Function AppWrite-Verbose"Restarting Azure Function."if (!$(Restart-AzFunctionApp-Name $FunctionName-ResourceGroupName $ResourceGroup-Force -PassThru)) {
Write-Error"Failed to restart Function App. Name: $FunctionName"return$false
}
You might shorten it to:
Write-Information-MessageData "Publishing function files to the Azure Function."$DeployResult=Publish-AzWebApp-ArchivePath $RestSourcePath-ResourceGroupName $ResourceGroup-Name $FunctionName-Force -ErrorVariable DeployError -Restart # <-- Use restart right away## Verifies that no error occured when publishing the Function Appif ($DeployError-or!$DeployResult) {
$ErrReturnObject=@{
DeployError=$DeployErrorDeployResult=$DeployResult
}
Write-Error"Failed to publishing the Function App. Error: $DeployError"-TargetObject $ErrReturnObjectreturn$false
}
Environment
Windows Package Manager v1.9.25200
Copyright (c) Microsoft Corporation. All rights reserved.
Windows: Windows.Desktop v10.0.26100.2033
System Architecture: X64
Package: Microsoft.DesktopAppInstaller v1.24.25200.0
Winget Directories
-----------------------------------------------------------------------------------------------------------------------
Logs %LOCALAPPDATA%\Packages\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe\LocalState\Diag…
User Settings %LOCALAPPDATA%\Packages\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe\LocalState\sett…
Portable Links Directory (User) %LOCALAPPDATA%\Microsoft\WinGet\Links
Portable Links Directory (Machine) C:\Program Files\WinGet\Links
Portable Package Root (User) %LOCALAPPDATA%\Microsoft\WinGet\Packages
Portable Package Root C:\Program Files\WinGet\Packages
Portable Package Root (x86) C:\Program Files (x86)\WinGet\Packages
Installer Downloads %USERPROFILE%\Downloads
Links
---------------------------------------------------------------------------
Privacy Statement https://aka.ms/winget-privacy
License Agreement https://aka.ms/winget-license
Third Party Notices https://aka.ms/winget-3rdPartyNotice
Homepage https://aka.ms/winget
Windows Store Terms https://www.microsoft.com/en-us/storedocs/terms-of-sale
Admin Setting State
--------------------------------------------------
LocalManifestFiles Disabled
BypassCertificatePinningForMicrosoftStore Disabled
InstallerHashOverride Disabled
LocalArchiveMalwareScanOverride Disabled
ProxyCommandLineOptions Disabled
DefaultProxy Disabled
The text was updated successfully, but these errors were encountered:
Brief description of your issue
I noticed the
Microsoft.WinGet.RestSource
just being released yesterday, so I was eager to try it out. When running theNew-WinGetSource
, it throws an error:Steps to reproduce
Run
New-WinGetSource -Name wingetsource -Verbose -InformationAction continue -ResourceGroup winget -SubscriptionName "<subscriptionName>" -ShowConnectionInstructions
Expected behavior
Deploys the WinGet source successfully.
Actual behavior
It fails uploading the .zip file to the Azure Function. This is because the default timeout is 10000 milliseconds, meaning 100 seconds. When attempting to manually upload the .zip file and set the timeout to 300 seconds, it succeeds.
The following line is responsible:
$DeployResult = Publish-AzWebApp -ArchivePath $RestSourcePath -ResourceGroupName $ResourceGroup -Name $FunctionName -Force -ErrorVariable DeployError
There are perhaps to possible solutions:
-Async
parameterA small side note, instead of doing this:
You might shorten it to:
Environment
The text was updated successfully, but these errors were encountered: