microsoft / navcontainerhelper

Official Microsoft repository for BcContainerHelper, a PowerShell module, which makes it easier to work with Business Central Containers on Docker.
MIT License
388 stars 247 forks source link

/home/vsts/.bccontainerhelper/alLanguageExtension/15.0.1143290/extension/bin/linux/altool not found #3674

Open Arthurvdv opened 2 months ago

Arthurvdv commented 2 months ago

Describe the issue With the release v15.0.1143290 of the AL Language, it seems that the altool binary for Linux is missing.

/home/vsts/.bccontainerhelper/alLanguageExtension/15.0.1143290/extension/bin/linux/altool not found

In our Azure DevOps pipelines we use the New-BcNuGetPackage and Push-BcNuGetPackage on a ubuntu-latest Hosted Agent.

Scripts used to create container and cause the issue

$package = New-BcNuGetPackage -appfile $appFile
Push-BcNuGetPackage -nuGetServerUrl $nuGetServerUrl -nuGetToken $nuGetToken -bcNuGetPackage $package

Full output of scripts

Starting: Generate NuGet Package
==============================================================================
Task         : PowerShell
Description  : Run a PowerShell script on Linux, macOS, or Windows
Version      : 2.245.1
Author       : Microsoft Corporation
Help         : https://docs.microsoft.com/azure/devops/pipelines/tasks/utility/powershell
==============================================================================
Generating script.
========================== Starting Command Output ===========================
/usr/bin/pwsh -NoLogo -NoProfile -NonInteractive -Command . '/home/vsts/work/_temp/9929f2da-9f06-48f2-9642-898353220580.ps1'
**************************************
* App File = [VanRoey_<redacted>_24.0.166048.0_sandbox_24.5_be.app]

Get-AppJsonFromAppFile -appFile VanRoey_<redacted>_24.0.166048.0_sandbox_24.5_be.app
BcContainerHelper version 6.0.22
BC.HelperFunctions emits usage statistics telemetry to Microsoft
Running on Linux, PowerShell 7.4.5
Downloading AL Language Extension (Prerelease) to /home/vsts/.bccontainerhelper/alLanguageExtension/15.0.1143290.zip
using Expand-Archive
/usr/bin/chmod: cannot access '/home/vsts/.bccontainerhelper/alLanguageExtension/15.0.1143290/extension/bin/linux/altool': No such file or directory
Exception: /home/vsts/.local/share/powershell/Modules/BcContainerHelper/6.0.22/HelperFunctions.ps1:129
Line |
 129 |  …             throw "Command $command not found, you might need to inst …
     |                ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     | Command
     | /home/vsts/.bccontainerhelper/alLanguageExtension/15.0.1143290/extension/bin/linux/altool not found, you might need to install that command.

##[error]PowerShell exited with code '1'.
Finishing: Generate NuGet Package
freddydk commented 2 months ago

The problem is in the pre-release version of the AL Language extension. The altool is now altool.dll (which seems to be wrong) - I will report this. In the meantime, I have changed BcContainerHelper to use the latest version as the default instead of the pre-release.

Arthurvdv commented 2 months ago

Thank you for resolving this so quickly!

I can confirm changing to to latest version (instead of the pre-release) has resolved this issue.

Arthurvdv commented 1 month ago

Unfortunately the release of the AL Language v14.0.1161190 today, has reoccurred this issue.

Starting: Generate NuGet Package
==============================================================================
Task         : PowerShell
Description  : Run a PowerShell script on Linux, macOS, or Windows
Version      : 2.245.1
Author       : Microsoft Corporation
Help         : https://docs.microsoft.com/azure/devops/pipelines/tasks/utility/powershell
==============================================================================
Generating script.
========================== Starting Command Output ===========================
/usr/bin/pwsh -NoLogo -NoProfile -NonInteractive -Command . '/home/vsts/work/_temp/a14d4cd2-5a82-404a-8872-b8df890c8d61.ps1'
**************************************
* App File = [VanRoey_<redacted>_24.0.168095.0_sandbox_25.0_be.app]

Get-AppJsonFromAppFile -appFile VanRoey_<redacted>_24.0.168095.0_sandbox_25.0_be.app
BcContainerHelper version 6.0.24
BC.HelperFunctions emits usage statistics telemetry to Microsoft
Running on Linux, PowerShell 7.4.5
Downloading AL Language Extension to /home/vsts/.bccontainerhelper/alLanguageExtension/14.0.1161190.zip
using Expand-Archive
/usr/bin/chmod: cannot access '/home/vsts/.bccontainerhelper/alLanguageExtension/14.0.1161190/extension/bin/linux/altool': No such file or directory
Exception: /home/vsts/.local/share/powershell/Modules/BcContainerHelper/6.0.24/HelperFunctions.ps1:129
Line |
 129 |  …             throw "Command $command not found, you might need to inst …
     |                ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     | Command
     | /home/vsts/.bccontainerhelper/alLanguageExtension/14.0.1161190/extension/bin/linux/altool not found, you might need to install that command.

##[error]PowerShell exited with code '1'.
Finishing: Generate NuGet Package
freddydk commented 1 month ago

Latest BcContainerHelper - 6.0.25 is able to work with AL Language extensions with no executables - please grab that and retry.