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
Please help me with my error message. When I publish runtime package, I get error "Timeout downloading file". It happens when I am on VPN or somehow have slow download. When I have good connection I do not get mentioned error.
I tried find reason why it happens.
Function "Publish-BcContainerApp" call "Sort-AppFilesByDependencies".
Function "Sort-AppFilesByDependencies" sort files and need extract information from them. Runtime packages are extracted by "Get-AppJsonFromAppFile". Now follow these functions "Get-AppJsonFromAppFile" --> "RunAlTool" --> "DownloadLatestAlLanguageExtension" --> "Download-File" --> "DownloadFileLow"
"Download-File" and "DownloadFileLow" have parameter $timeout, but other functions don't have this parameter. "Download-File" preset this parameter by "$bccontainerHelperConfig.defaultDownloadTimeout". Problem is that preset value is small.
First question is, Is it possible set parameter "$bccontainerHelperConfig.defaultDownloadTimeout" from script?
I tried use switch "excludeRuntimePackages" for "Sort-AppFilesByDependencies", because it skip vsix downloading. But it skip also my file so publish function have any file for publish.
Second question, Is it possible add code to "Sort-AppFilesByDependencies" that returns input files when array have only one file?
It is not necessary sort and it can skip for me problematic code and could help to performance when one file is published.
Example for code before "# Read all app.json objects, populate $apps"
if (@($appFiles).Count -le 1) {
if ($excludeRuntimePackages) {
try {
$tmpFolder = Join-Path ([System.IO.Path]::GetTempPath()) ([Guid]::NewGuid().ToString())
Extract-AppFileToFolder -appFilename $appFiles -appFolder $tmpFolder -generateAppJson 6> $null
return @($appFiles)
}
catch {
if ($_.exception.message -eq "You cannot extract a runtime package") {
return @()
}
else {
throw "Unable to extract and analyze appFile $appFiles"
}
}
}
else {
return @($appFiles)
}
}
Thank you for your help
Additional context
It happens on VPN or when download is not quict enought.
The text was updated successfully, but these errors were encountered:
First question is, Is it possible set parameter "$bccontainerHelperConfig.defaultDownloadTimeout" from script?
Yes, after running any BCContainerHelper command (eg: Test-BcContainer) the variable has been loaded globally and can be changed directly. Before that you change the config file.
First question is, Is it possible set parameter "$bccontainerHelperConfig.defaultDownloadTimeout" from script?
Yes, after running any BCContainerHelper command (eg: Test-BcContainer) the variable has been loaded globally and can be changed directly. Before that you change the config file.
You can also just use Import-Module BcContainerHelper - then the config variable is initialized.
Import-Module is implicit when you run the first function from the module.
Thank you guys for your help. It looks that it helps. @freddydk if you agree with my suggestion about change in sorting function I can do this change and I can create PR for you.
Please help me with my error message. When I publish runtime package, I get error "Timeout downloading file". It happens when I am on VPN or somehow have slow download. When I have good connection I do not get mentioned error.
I tried find reason why it happens.
Function "Publish-BcContainerApp" call "Sort-AppFilesByDependencies".
Function "Sort-AppFilesByDependencies" sort files and need extract information from them. Runtime packages are extracted by "Get-AppJsonFromAppFile". Now follow these functions "Get-AppJsonFromAppFile" --> "RunAlTool" --> "DownloadLatestAlLanguageExtension" --> "Download-File" --> "DownloadFileLow"
"Download-File" and "DownloadFileLow" have parameter $timeout, but other functions don't have this parameter. "Download-File" preset this parameter by "$bccontainerHelperConfig.defaultDownloadTimeout". Problem is that preset value is small.
First question is, Is it possible set parameter "$bccontainerHelperConfig.defaultDownloadTimeout" from script?
I tried use switch "excludeRuntimePackages" for "Sort-AppFilesByDependencies", because it skip vsix downloading. But it skip also my file so publish function have any file for publish.
Second question, Is it possible add code to "Sort-AppFilesByDependencies" that returns input files when array have only one file?
It is not necessary sort and it can skip for me problematic code and could help to performance when one file is published.
Example for code before "# Read all app.json objects, populate $apps"
Thank you for your help
Additional context
The text was updated successfully, but these errors were encountered: