HodorNV / ALOps

ALOps
56 stars 24 forks source link

Problems with German special characters in publisher name for ALOpsAppCompiler #325

Closed tfenster closed 3 years ago

tfenster commented 3 years ago

Describe the bug If we have an app as dependency in a build container which contains special characters in the publisher name, then the compilation fails

the used yaml

  - task: ALOpsAppCompiler@1
    displayName: 'ALOps Compile App'
    inputs:
      usedocker: true
      targetproject:      ${{ parameters.AppJson }}
      nav_app_version:    $(AppVersion)
      vsix_download_path: '$(job.VSIX_PATH)'
      failed_on_warnings: $(job.Compile.FailOnWarning)

the output

2021-02-23T19:38:43.5711208Z ##[section]Starting: ALOps Compile App
2021-02-23T19:38:43.5929521Z ==============================================================================
2021-02-23T19:38:43.5929802Z Task         : ALOps App Compiler
2021-02-23T19:38:43.5930031Z Description  : Compile AL Extensions for Business Central
2021-02-23T19:38:43.5930228Z Version      : 1.440.2167
2021-02-23T19:38:43.5930407Z Author       : Hodor
2021-02-23T19:38:43.5930639Z Help         : Compile a Business Central extension from AL code.
2021-02-23T19:38:43.5930917Z ==============================================================================
2021-02-23T19:38:45.4345535Z *** Validate configuration
2021-02-23T19:38:46.3533470Z *** Task Inputs:
2021-02-23T19:38:46.3533914Z 
2021-02-23T19:38:46.3534264Z name                                                value
2021-02-23T19:38:46.3534723Z ----                                                -----
2021-02-23T19:38:46.3535146Z usedocker                                            True
2021-02-23T19:38:46.3535706Z fixed_tag                                                
2021-02-23T19:38:46.3536132Z targetproject         C:\azp\agent\_work\1\s\app\app.json
2021-02-23T19:38:46.3536520Z nav_computername                                         
2021-02-23T19:38:46.3536940Z nav_serverinstance                                  BC140
2021-02-23T19:38:46.3537333Z nav_tenant                                        default
2021-02-23T19:38:46.3537742Z nav_ports_dev                                        7049
2021-02-23T19:38:46.3538127Z bc_username                                              
2021-02-23T19:38:46.3538532Z bc_password                                              
2021-02-23T19:38:46.3538943Z al_compiler_version                            0.12.15355
2021-02-23T19:38:46.3539344Z ruleset                                                  
2021-02-23T19:38:46.3539721Z al_analyzer                                              
2021-02-23T19:38:46.3540863Z nav_app_version                                 17.0.12.0
2021-02-23T19:38:46.3541317Z vsix_download_path                                       
2021-02-23T19:38:46.3549410Z use_ssl                                             False
2021-02-23T19:38:46.3550158Z download_test_symbols                               False
2021-02-23T19:38:46.3550595Z usecompression                                       True
2021-02-23T19:38:46.3551129Z publish_artifact                                     True
2021-02-23T19:38:46.3551477Z failed_on_warnings                                  False
2021-02-23T19:38:46.3552072Z app_file_suffix                                          
2021-02-23T19:38:46.3552406Z updatebuildnumber                                    True
2021-02-23T19:38:46.3552733Z setup_working_folder                                False
2021-02-23T19:38:46.3553045Z showmycode                                           Keep
2021-02-23T19:38:46.3553254Z 
2021-02-23T19:38:46.3553371Z 
2021-02-23T19:38:46.3553501Z 
2021-02-23T19:38:46.3553954Z *** For documentation, please visit   : https://www.alops.be/documentation
2021-02-23T19:38:46.3554357Z 
2021-02-23T19:38:46.3554776Z *** ALOps License:
2021-02-23T19:38:46.3555039Z   * Licensed To: Cosmo Consult SSC GmbH
2021-02-23T19:38:46.3555420Z 
2021-02-23T19:38:46.3555694Z *** Importing required PS-Functions
2021-02-23T19:38:46.5784672Z *** Initiate Docker Session
2021-02-23T19:38:46.5882381Z *** Direct PSSession to other container [f43e49742faf20fac0330e397213f57a1789a4938ca961b9d12b0be469401ad4]
2021-02-23T19:38:46.7023065Z *** Container resolved to hostname [f43e49742faf]
2021-02-23T19:38:46.9632861Z *** Set Docker Container ErrorActionPreference = Stop
2021-02-23T19:38:48.8275040Z *** Import NAV/BC Management DLL's
2021-02-23T19:38:48.8277162Z *** Loading assemblies for ServiceTier [BC].
2021-02-23T19:38:49.1817064Z *** Loading assemblies from: [C:\program files\microsoft dynamics nav\170\service]
2021-02-23T19:38:49.1819803Z *** Selected module: [C:\program files\microsoft dynamics nav\170\service\Microsoft.Dynamics.Nav.Apps.Management.dll]
2021-02-23T19:38:49.1822192Z *** Loading module: [C:\program files\microsoft dynamics nav\170\service\Microsoft.Dynamics.Nav.Apps.Management.dll]
2021-02-23T19:38:49.1823388Z *** Selected module: [C:\program files\microsoft dynamics nav\170\service\Microsoft.Dynamics.Nav.Management.dll]
2021-02-23T19:38:49.1828929Z *** Loading module: [C:\program files\microsoft dynamics nav\170\service\Microsoft.Dynamics.Nav.Management.dll]
2021-02-23T19:38:49.1873369Z *** Setting up AL Compiler [ALLanguage]
2021-02-23T19:38:50.0231992Z *** Downloading AL Compiler [ALLanguage]
2021-02-23T19:38:50.0233514Z *** Get Extension from Local-Disk...[C:\Run\ALLanguage.vsix]
2021-02-23T19:38:50.0236089Z *** Resolving Path [C:\Run\ALLanguage.vsix]
2021-02-23T19:38:50.0238547Z *** VSIX Path Resolved: [C:\Run\ALLanguage.vsix]
2021-02-23T19:38:50.0240303Z *** Unpacking Extension to folder...
2021-02-23T19:39:10.8605873Z *** Loading Json Object: [c:\Run\Microsoft.al\al-ALLanguage\extension\package.json]
2021-02-23T19:39:10.8606717Z *** Using AL Compiler [vALLanguage] located [C:\Run\Microsoft.al\al-ALLanguage\extension\bin\alc.exe]
2021-02-23T19:39:10.8607094Z ***
2021-02-23T19:39:10.8607370Z *** Working folder: C:\azp\agent\_work\1\s
2021-02-23T19:39:10.8607564Z ***
2021-02-23T19:39:10.8608000Z *** Copy Working folder to Docker Container: f43e49742faf20fac0330e397213f57a1789a4938ca961b9d12b0be469401ad4
2021-02-23T19:39:10.8608466Z *** Docker Working Folder: c:\Run\DevOps\
2021-02-23T19:39:10.8608916Z *** Copy from [C:\azp\agent\_work\1\s] to [c:\Run\DevOps\]
2021-02-23T19:39:10.8609329Z *** Source File setup completed
2021-02-23T19:39:10.8609717Z *** Target Project: \app\app.json
2021-02-23T19:39:10.8610139Z *** Check for app.json files: c:\Run\DevOps\
2021-02-23T19:39:10.8610526Z *** Multiple projects found:
2021-02-23T19:39:10.8610900Z    - C:\Run\DevOps\app
2021-02-23T19:39:10.8611262Z    - C:\Run\DevOps\test
2021-02-23T19:39:10.8611642Z *** Retrieving App-Info [\app\app.json]
2021-02-23T19:39:10.8612066Z *** Loading Json Object: [c:\Run\DevOps\app\app.json]
2021-02-23T19:39:10.8612747Z   * App.ID          = 97720075-a09c-4a9d-b939-45a9ead685a4
2021-02-23T19:39:10.8613155Z   * App.Name        = Umlaut-Test
2021-02-23T19:39:10.8613541Z   * App.Publisher   = COSMO CONSULT
2021-02-23T19:39:10.8613913Z   * App.Version     = 1.0.0.0
2021-02-23T19:39:10.8614264Z   * App.Platform    = 17.0.0.0
2021-02-23T19:39:10.8614633Z   * App.Application = 17.0.0.0
2021-02-23T19:39:10.8615194Z ***
2021-02-23T19:39:10.8615514Z *** Setting Managed App Version [c:\Run\DevOps\app\app.json] =>  17.0.12.0
2021-02-23T19:39:10.8975463Z ***
2021-02-23T19:39:10.8981174Z *** Working Direcotry: [c:\Run\DevOps\]
2021-02-23T19:39:10.8984251Z *** Target Project: [\app\app.json]
2021-02-23T19:39:10.8984613Z *** Project Directory: [c:\Run\DevOps\app]
2021-02-23T19:39:10.8985037Z *** VSCode Settings: [c:\Run\DevOps\app\.vscode\settings.json]
2021-02-23T19:39:10.8985516Z *** No VSCode-Settings json found.
2021-02-23T19:39:10.8985948Z *** No AL-RuleSet json found.
2021-02-23T19:39:10.8986302Z ***
2021-02-23T19:39:10.8986554Z *** Resolve Docker Credentials
2021-02-23T19:39:10.8987094Z *** Setup BC Username/Password from Container info
2021-02-23T19:39:10.8987505Z *** Download Symbols
2021-02-23T19:39:12.4366675Z *** Working Dir: c:\Run\DevOps\
2021-02-23T19:39:12.4368621Z *** Loading assemblies from: [C:\program files\microsoft dynamics nav\170\service]
2021-02-23T19:39:12.4370727Z *** PackageCache path created [c:\Run\DevOps\PackageCache]
2021-02-23T19:39:12.4373299Z ***
2021-02-23T19:39:12.4377083Z *** Propagated Dependency: Comsol Unternehmenslösungen AG - Comsol Multinav Mail - 16.4.26.74
2021-02-23T19:39:12.4378721Z *** Download System-Symbols for [17.0.0.0]
2021-02-23T19:39:12.4381241Z *** Downloading NAV Symbols for [System v17.0.0.0]
2021-02-23T19:39:12.4384478Z *** Downloading NAV Symbols from [https://f43e49742faf:7049/BC/dev/packages?publisher=Microsoft&appName=System&versionText=17.0.0.0&tenant=default]
2021-02-23T19:39:12.4386657Z *** Downloading NAV Symbols with BasicAuthentication [admin]
2021-02-23T19:39:12.4389089Z ##[command]Invoke-RestMethod -Method Get -Uri https://f43e49742faf:7049/BC/dev/packages?publisher=Microsoft&appName=System&versionText=17.0.0.0&tenant=default
2021-02-23T19:39:12.4393851Z *** Content-Disposition: attachment; filename=Microsoft_System_17.0.21485.21516.app
2021-02-23T19:39:12.4397891Z *** Saving symbol file [Microsoft_System_17.0.21485.21516.app] to [c:\Run\DevOps\PackageCache]
2021-02-23T19:39:12.4400327Z *** Read App Manifest: [c:\Run\DevOps\PackageCache\Microsoft_System_17.0.21485.21516.app].
2021-02-23T19:39:12.4402084Z ***
2021-02-23T19:39:12.4403919Z *** Download Application-Symbols for [17.0.0.0]
2021-02-23T19:39:12.4406563Z *** Downloading NAV Symbols for [Application v17.0.0.0]
2021-02-23T19:39:12.4408950Z *** Downloading NAV Symbols from [https://f43e49742faf:7049/BC/dev/packages?publisher=Microsoft&appName=Application&versionText=17.0.0.0&tenant=default]
2021-02-23T19:39:12.4410722Z *** Downloading NAV Symbols with BasicAuthentication [admin]
2021-02-23T19:39:12.4413643Z ##[command]Invoke-RestMethod -Method Get -Uri https://f43e49742faf:7049/BC/dev/packages?publisher=Microsoft&appName=Application&versionText=17.0.0.0&tenant=default
2021-02-23T19:39:12.4415560Z *** Content-Disposition: attachment; filename=Microsoft_Application_17.4.21491.21531.app
2021-02-23T19:39:12.4417539Z *** Saving symbol file [Microsoft_Application_17.4.21491.21531.app] to [c:\Run\DevOps\PackageCache]
2021-02-23T19:39:12.4419790Z *** Read App Manifest: [c:\Run\DevOps\PackageCache\Microsoft_Application_17.4.21491.21531.app].
2021-02-23T19:39:12.4421304Z *** Propagated Dependency: Microsoft - System Application - 17.4.0.0
2021-02-23T19:39:12.4425780Z *** Propagated Dependency: Microsoft - Base Application - 17.4.0.0
2021-02-23T19:39:12.4426203Z ***
2021-02-23T19:39:12.4428749Z *** Check for Depency Apps 3
2021-02-23T19:39:12.4431871Z *** Download Application-Symbols for [Comsol Multinav Mail v16.4.26.74]
2021-02-23T19:39:12.4433941Z *** Downloading NAV Symbols for [Comsol Multinav Mail v16.4.26.74]
2021-02-23T19:39:12.4439219Z *** Downloading NAV Symbols from [https://f43e49742faf:7049/BC/dev/packages?publisher=Comsol+Unternehmensl%c3%b6sungen+AG&appName=Comsol+Multinav+Mail&versionText=16.4.26.74&tenant=default]
2021-02-23T19:39:12.4441224Z *** Downloading NAV Symbols with BasicAuthentication [admin]
2021-02-23T19:39:12.4443737Z ##[command]Invoke-RestMethod -Method Get -Uri https://f43e49742faf:7049/BC/dev/packages?publisher=Comsol+Unternehmensl%c3%b6sungen+AG&appName=Comsol+Multinav+Mail&versionText=16.4.26.74&tenant=default
2021-02-23T19:39:12.4445692Z *** Content-Disposition: attachment; filename="=?utf-8?B?Q29tc29sIFVudGVybmVobWVuc2zDtnN1bmdlbiBBR19Db21zb2wgTXVsdGluYXYgTWFpbF8xNy40LjI2LjgzLmFwcA==?="
2021-02-23T19:39:12.4446847Z *** Saving symbol file [Comsol Unternehmenslösungen AG_Comsol Multinav Mail_17.4.26.83.app] to [c:\Run\DevOps\PackageCache]
2021-02-23T19:39:12.4449361Z *** Read App Manifest: [c:\Run\DevOps\PackageCache\Comsol Unternehmenslösungen AG_Comsol Multinav Mail_17.4.26.83.app].
2021-02-23T19:39:12.4451337Z *** Propagated Dependency: Microsoft - Application - 17.0.0.0
2021-02-23T19:39:12.4453989Z ***
2021-02-23T19:39:12.4457521Z *** Download Application-Symbols for [System Application v17.4.0.0]
2021-02-23T19:39:12.4460131Z *** Downloading NAV Symbols for [System Application v17.4.0.0]
2021-02-23T19:39:12.4462334Z *** Downloading NAV Symbols from [https://f43e49742faf:7049/BC/dev/packages?publisher=Microsoft&appName=System+Application&versionText=17.4.0.0&tenant=default]
2021-02-23T19:39:12.4463434Z *** Downloading NAV Symbols with BasicAuthentication [admin]
2021-02-23T19:39:12.4467183Z ##[command]Invoke-RestMethod -Method Get -Uri https://f43e49742faf:7049/BC/dev/packages?publisher=Microsoft&appName=System+Application&versionText=17.4.0.0&tenant=default
2021-02-23T19:39:12.4468136Z *** Content-Disposition: attachment; filename="Microsoft_System Application_17.4.21491.21531.app"
2021-02-23T19:39:12.4470199Z *** Saving symbol file [Microsoft_System Application_17.4.21491.21531.app] to [c:\Run\DevOps\PackageCache]
2021-02-23T19:39:12.4472626Z *** Read App Manifest: [c:\Run\DevOps\PackageCache\Microsoft_System Application_17.4.21491.21531.app].
2021-02-23T19:39:12.4474056Z ***
2021-02-23T19:39:12.4476158Z *** Download Application-Symbols for [Base Application v17.4.0.0]
2021-02-23T19:39:12.4477739Z *** Downloading NAV Symbols for [Base Application v17.4.0.0]
2021-02-23T19:39:12.4480806Z *** Downloading NAV Symbols from [https://f43e49742faf:7049/BC/dev/packages?publisher=Microsoft&appName=Base+Application&versionText=17.4.0.0&tenant=default]
2021-02-23T19:39:12.4482323Z *** Downloading NAV Symbols with BasicAuthentication [admin]
2021-02-23T19:39:12.4485252Z ##[command]Invoke-RestMethod -Method Get -Uri https://f43e49742faf:7049/BC/dev/packages?publisher=Microsoft&appName=Base+Application&versionText=17.4.0.0&tenant=default
2021-02-23T19:39:12.4486859Z *** Content-Disposition: attachment; filename="Microsoft_Base Application_17.4.21491.21531.app"
2021-02-23T19:39:12.4488821Z *** Saving symbol file [Microsoft_Base Application_17.4.21491.21531.app] to [c:\Run\DevOps\PackageCache]
2021-02-23T19:39:12.4492580Z *** Read App Manifest: [c:\Run\DevOps\PackageCache\Microsoft_Base Application_17.4.21491.21531.app].
2021-02-23T19:39:12.4494232Z ***
2021-02-23T19:39:12.4496322Z *** Download Application-Symbols for [Application v17.0.0.0]
2021-02-23T19:39:12.4498475Z *** Downloading NAV Symbols for [Application v17.0.0.0]
2021-02-23T19:39:12.4500985Z *** Downloading NAV Symbols from [https://f43e49742faf:7049/BC/dev/packages?publisher=Microsoft&appName=Application&versionText=17.0.0.0&tenant=default]
2021-02-23T19:39:12.4502208Z *** Downloading NAV Symbols with BasicAuthentication [admin]
2021-02-23T19:39:12.4504963Z ##[command]Invoke-RestMethod -Method Get -Uri https://f43e49742faf:7049/BC/dev/packages?publisher=Microsoft&appName=Application&versionText=17.0.0.0&tenant=default
2021-02-23T19:39:12.4507001Z *** Content-Disposition: attachment; filename=Microsoft_Application_17.4.21491.21531.app
2021-02-23T19:39:12.4509791Z *** Saving symbol file [Microsoft_Application_17.4.21491.21531.app] to [c:\Run\DevOps\PackageCache]
2021-02-23T19:39:12.4510751Z *** Read App Manifest: [c:\Run\DevOps\PackageCache\Microsoft_Application_17.4.21491.21531.app].
2021-02-23T19:39:12.4514595Z ***
2021-02-23T19:39:13.1904449Z *** Starting AL Compiler...
2021-02-23T19:39:13.1906919Z *** App.Name         = Umlaut-Test
2021-02-23T19:39:13.1910709Z *** App.Publisher    = COSMO CONSULT
2021-02-23T19:39:13.1913613Z *** App.Compiler Path= C:\Run\Microsoft.al\al-ALLanguage\extension\bin\alc.exe
2021-02-23T19:39:13.1916265Z *** Checking for Assemblies in App
2021-02-23T19:39:13.1919202Z *** Add Windows Assembly Path [C:\Windows\assembly]
2021-02-23T19:39:13.1921789Z *** Detect ALC.EXE Features.
2021-02-23T19:39:13.1923793Z ##[command]& C:\Run\Microsoft.al\al-ALLanguage\extension\bin\alc.exe /?
2021-02-23T19:39:14.0404826Z   * PARALLEL
2021-02-23T19:39:14.0407145Z   * MAXDEGREEOFPARALLELISM
2021-02-23T19:39:14.0409382Z   * ASSEMBLYPROBINGPATHS
2021-02-23T19:39:14.0412727Z ##[command]& C:\Run\Microsoft.al\al-ALLanguage\extension\bin\alc.exe /packagecachepath:"c:\Run\DevOps\PackageCache" /project:"c:\Run\DevOps\app" /out:"c:\Run\DevOps\COSMO CONSULT_Umlaut-Test_17.0.12.0.app" /fullpaths /parallel+ /maxDegreeOfParallelism:2 /assemblyprobingpaths:"C:\Windows\assembly"
2021-02-23T19:39:18.8417644Z *** AL Compiler Exit Code: 1
2021-02-23T19:39:18.8421657Z *** AL Compiler raw logs: Start
2021-02-23T19:39:18.8425272Z Microsoft (R) AL Compiler version 6.4.6.9919 Copyright (C) Microsoft Corporation. All rights reserved  Compilation started for project 'Umlaut-Test' containing '0' files at '19:39:13.926'.  error AL1022: A package with publisher 'Comsol Unternehmensl?sungen AG', name 'Comsol Multinav Mail', and a version compatible with '16.4.26.74' could not be found in the package cache folder 'c:\Run\DevOps\PackageCache'  Compilation ended at '19:39:18.702'. 
2021-02-23T19:39:18.8427071Z *** AL Compiler raw logs: End
2021-02-23T19:39:18.8429642Z *** Start processing compile results.
2021-02-23T19:39:18.8468042Z ##[error]Compilation started for project 'Umlaut-Test' containing '0' files at '19:39:13.926'.
2021-02-23T19:39:18.8480100Z ##[error]error AL1022: A package with publisher 'Comsol Unternehmensl?sungen AG', name 'Comsol Multinav Mail', and a version compatible with '16.4.26.74' could not be found in the package cache folder 'c:\Run\DevOps\PackageCache'
2021-02-23T19:39:18.8481760Z ##[error]Compilation ended at '19:39:18.702'.
2021-02-23T19:39:18.8482527Z *** Store compile log to [c:\Run\DevOps\compilelog.txt]
2021-02-23T19:39:18.8482768Z *** Start processing compile results done.
2021-02-23T19:39:18.8490479Z *** Transfer App Artifact from Docker container.
2021-02-23T19:39:19.2241061Z ##[error]Cannot find path 'c:\Run\DevOps\COSMO CONSULT_Umlaut-Test_17.0.12.0.app' because it does not exist.
2021-02-23T19:39:19.2714431Z ##[section]Async Command Start: Add Build Tag
2021-02-23T19:39:19.2715013Z Build '249' has following tags now: BC.Version.17.4.21491.21531, bcartifacts/cosmo-bc-onprem-17.4.21491.21531-de, BC.Platform.17.0.21485.21516, AL.Compiler.ALLanguage
2021-02-23T19:39:19.2715368Z ##[section]Async Command End: Add Build Tag
2021-02-23T19:39:19.2716138Z ##[section]Async Command Start: Update Build Number
2021-02-23T19:39:19.2716489Z Update build number to 17.0.12.0 for build 249
2021-02-23T19:39:19.2716814Z ##[section]Async Command End: Update Build Number
2021-02-23T19:39:19.2717720Z ##[section]Finishing: ALOps Compile App

You can see that it seems to be able to download the app file from the container, but the compiler seems unable to find it. The German special character "ö" looks wrong in the raw log, but AzDevOps can still interpret it during the download

2021-02-23T19:39:12.4428749Z *** Check for Depency Apps 3
2021-02-23T19:39:12.4431871Z *** Download Application-Symbols for [Comsol Multinav Mail v16.4.26.74]
2021-02-23T19:39:12.4433941Z *** Downloading NAV Symbols for [Comsol Multinav Mail v16.4.26.74]
2021-02-23T19:39:12.4439219Z *** Downloading NAV Symbols from [https://f43e49742faf:7049/BC/dev/packages?publisher=Comsol+Unternehmensl%c3%b6sungen+AG&appName=Comsol+Multinav+Mail&versionText=16.4.26.74&tenant=default]
2021-02-23T19:39:12.4441224Z *** Downloading NAV Symbols with BasicAuthentication [admin]
2021-02-23T19:39:12.4443737Z ##[command]Invoke-RestMethod -Method Get -Uri https://f43e49742faf:7049/BC/dev/packages?publisher=Comsol+Unternehmensl%c3%b6sungen+AG&appName=Comsol+Multinav+Mail&versionText=16.4.26.74&tenant=default
2021-02-23T19:39:12.4445692Z *** Content-Disposition: attachment; filename="=?utf-8?B?Q29tc29sIFVudGVybmVobWVuc2zDtnN1bmdlbiBBR19Db21zb2wgTXVsdGluYXYgTWFpbF8xNy40LjI2LjgzLmFwcA==?="
2021-02-23T19:39:12.4446847Z *** Saving symbol file [Comsol Unternehmenslösungen AG_Comsol Multinav Mail_17.4.26.83.app] to [c:\Run\DevOps\PackageCache]
2021-02-23T19:39:12.4449361Z *** Read App Manifest: [c:\Run\DevOps\PackageCache\Comsol Unternehmenslösungen AG_Comsol Multinav Mail_17.4.26.83.app].

image

The compiler however then fails to use it

2021-02-23T19:39:18.8429642Z *** Start processing compile results.
2021-02-23T19:39:18.8468042Z ##[error]Compilation started for project 'Umlaut-Test' containing '0' files at '19:39:13.926'.
2021-02-23T19:39:18.8480100Z ##[error]error AL1022: A package with publisher 'Comsol Unternehmensl?sungen AG', name 'Comsol Multinav Mail', and a version compatible with '16.4.26.74' could not be found in the package cache folder 'c:\Run\DevOps\PackageCache'
2021-02-23T19:39:18.8481760Z ##[error]Compilation ended at '19:39:18.702'.

If I keep the container after the build and take a look at the PackageCache, it seems to be fine:

PS C:\Run\DevOps\PackageCache> dir

    Directory: C:\Run\DevOps\PackageCache

Mode                 LastWriteTime         Length Name
----                 -------------         ------ ----
-a----        23.02.2021     20:03          99936 Comsol Unternehmenslösungen AG_Comsol Multinav Mail_17.4.26.83.app
-a----        23.02.2021     20:04           9193 Microsoft_Application_17.4.21491.21531.app
-a----        23.02.2021     20:04       31101880 Microsoft_Base Application_17.4.21491.21531.app
-a----        23.02.2021     20:03         109714 Microsoft_System Application_17.4.21491.21531.app
-a----        23.02.2021     20:03         136104 Microsoft_System_17.0.21485.21516.app

I also tried to set the locale, culture and codepage in the BC container, but the result is the same:

$cultureInfo = new-object System.Globalization.CultureInfo "de-DE"
$regionInfo = new-object System.Globalization.RegionInfo "de-DE"
Set-WinHomeLocation -GeoId $regionInfo.GeoId
Set-WinSystemLocale -SystemLocale $cultureInfo
Set-Culture -CultureInfo $cultureInfo
chcp 65001

Any ideas?

Expected behavior alc should find the dependency

Additional context This is happening in a process isolated Docker container on Windows Server 2019 (2004). If we switch to hyperv isolation, then it works, but a) this creates other problems we can't solve and b) process isolation works a lot better generally

tfenster commented 3 years ago

I can repro with very simple depency and dependent apps , so I also tested with bccontainerhelper and there it seems to work. Here is what I did:

  1. Create VM through https://github.com/Azure/azure-quickstart-templates/tree/master/docker-portainer-traefik-windows-vm
  2. Install bccontainerhelper, import it and create an image
    
    PS C:\Users\vmadministrator> install-module -force bccontainerhelper
    PS C:\Users\vmadministrator> import-module BcContainerHelper
    BcContainerHelper version 2.0.5
    WARNING: The names of some imported commands from the module 'BcContainerHelper' include unapproved verbs that might make them less discoverable.
    To find the commands with unapproved verbs, run the Import-Module command again with the Verbose parameter. For a list of approved verbs, type
    Get-Verb.
    PS C:\Users\vmadministrator> New-BcImage -artifactUrl (Get-BCArtifactUrl -type OnPrem -country de -version 17.4) -imageName "bcartifacts/cosmo-bc"
    -skipIfImageAlreadyExists
    Downloading application artifact /onprem/17.4.21491.21531/de
    Downloading C:\Users\vmadministrator\AppData\Local\Temp\f836cebe-e757-48ff-9fbf-bb9cf88d11bf.zip
    Unpacking application artifact to tmp folder using Expand-Archive
    Downloading platform artifact /onprem/17.4.21491.21531/platform
    Downloading C:\Users\vmadministrator\AppData\Local\Temp\4aa1c5ec-e169-449e-9495-49696564d9e6.zip
    Unpacking platform artifact to tmp folder using Expand-Archive
    Downloading Prerequisite Components
    Downloading c:\bcartifacts.cache\onprem\17.4.21491.21531\platform\Prerequisite Components\DotNetCore\DotNetCore.1.0.4_1.1.1-WindowsHosting.exe
    Downloading c:\bcartifacts.cache\onprem\17.4.21491.21531\platform\Prerequisite Components\Open XML SDK 2.5 for Microsoft Office\OpenXMLSDKv25.msi
    Downloading c:\bcartifacts.cache\onprem\17.4.21491.21531\platform\Prerequisite Components\IIS URL Rewrite Module\rewrite_2.0_rtw_x64.msi
    bcartifacts/cosmo-bc:onprem-17.4.21491.21531-de
    Fetching all docker images
    Building image bcartifacts/cosmo-bc:onprem-17.4.21491.21531-de based on mcr.microsoft.com/businesscentral:10.0.19041.804 with https://bcartifacts.
    azureedge.net/onprem/17.4.21491.21531/de
    Pulling latest image mcr.microsoft.com/businesscentral:10.0.19041.804
    10.0.19041.804: Pulling from businesscentral
    295f12394c4f: Already exists
    011d0150a5f1: Pulling fs layer
    89e51925ea7b: Pulling fs layer
    76cb4b8c83ff: Pulling fs layer
    1fbbd5e78b57: Pulling fs layer
    3b91f00834ab: Pulling fs layer
    ea051173cae2: Pulling fs layer
    6ef41115ba3f: Pulling fs layer
    ffa6ba321e77: Pulling fs layer
    38f67fa41c38: Pulling fs layer
    9e6b43e5b006: Pulling fs layer
    d28505210d5e: Pulling fs layer
    7d205849d7c2: Pulling fs layer
    4612d6ed67aa: Pulling fs layer
    1fbbd5e78b57: Waiting
    6485caa0bc22: Pulling fs layer
    3b91f00834ab: Waiting
    ea051173cae2: Waiting
    6ef41115ba3f: Waiting
    38f67fa41c38: Waiting
    9e6b43e5b006: Waiting
    d28505210d5e: Waiting
    7d205849d7c2: Waiting
    4612d6ed67aa: Waiting
    6485caa0bc22: Waiting
    ffa6ba321e77: Waiting
    89e51925ea7b: Verifying Checksum
    89e51925ea7b: Download complete
    1fbbd5e78b57: Verifying Checksum
    1fbbd5e78b57: Download complete
    3b91f00834ab: Verifying Checksum
    3b91f00834ab: Download complete
    ea051173cae2: Verifying Checksum
    ea051173cae2: Download complete
    6ef41115ba3f: Download complete
    76cb4b8c83ff: Verifying Checksum
    76cb4b8c83ff: Download complete
    38f67fa41c38: Verifying Checksum
    38f67fa41c38: Download complete
    ffa6ba321e77: Verifying Checksum
    ffa6ba321e77: Download complete
    d28505210d5e: Verifying Checksum
    d28505210d5e: Download complete
    7d205849d7c2: Verifying Checksum
    7d205849d7c2: Download complete
    4612d6ed67aa: Verifying Checksum
    4612d6ed67aa: Download complete
    6485caa0bc22: Verifying Checksum
    6485caa0bc22: Download complete
    9e6b43e5b006: Verifying Checksum
    9e6b43e5b006: Download complete
    011d0150a5f1: Verifying Checksum
    011d0150a5f1: Download complete
    011d0150a5f1: Pull complete
    89e51925ea7b: Pull complete
    76cb4b8c83ff: Pull complete
    1fbbd5e78b57: Pull complete
    3b91f00834ab: Pull complete
    ea051173cae2: Pull complete
    6ef41115ba3f: Pull complete
    ffa6ba321e77: Pull complete
    38f67fa41c38: Pull complete
    9e6b43e5b006: Pull complete
    d28505210d5e: Pull complete
    7d205849d7c2: Pull complete
    4612d6ed67aa: Pull complete
    6485caa0bc22: Pull complete
    Digest: sha256:c96b09a227b444d1299ee148ccd5465885bfff5159f94560c7cdba751b0a703a
    Status: Downloaded newer image for mcr.microsoft.com/businesscentral:10.0.19041.804
    mcr.microsoft.com/businesscentral:10.0.19041.804
    Generic Tag: 1.0.1.3
    Container OS Version: 10.0.19041.804 (2004)
    Host OS Version: 10.0.19041.804 (2004)
    Using process isolation
    Files in c:\bcartifacts.cache\3ggkfh5v.ego\my:
    Copying Platform Artifacts
    Copying Database
    Copying Licensefile
    Copying Installers
    Copying ConfigurationPackages
    Copying Applications
    c:\bcartifacts.cache\3ggkfh5v.ego
    Sending build context to Docker daemon  1.502GB

Step 1/6 : FROM mcr.microsoft.com/businesscentral:10.0.19041.804 ---> c50e34caab76 Step 2/6 : ENV DatabaseServer=localhost DatabaseInstance=SQLEXPRESS DatabaseName=CRONUS IsBcSandbox=N artifactUrl=https://bcartifacts.azureedge.ne t/onprem/17.4.21491.21531/de filesOnly=False ---> Running in cfb71dcef53e Removing intermediate container cfb71dcef53e ---> 08aaaff6fbcb Step 3/6 : COPY my /run/ ---> b5f9d34d1ef0 Step 4/6 : COPY NAVDVD /NAVDVD/ ---> 10dcb9d68c56 Step 5/6 : RUN \Run\start.ps1 -installOnly ---> Running in 66556cbb5a9e Using installer from C:\Run\150-new Installing Business Central Installing from DVD Starting Local SQL Server WARNING: Waiting for service 'SQL Server (SQLEXPRESS) (MSSQL$SQLEXPRESS)' to start... Starting Internet Information Server Copying Service Tier Files Copying PowerShell Scripts Copying dependencies Copying ReportBuilder Importing PowerShell Modules Determining Database Collation Changing Database Server Collation to Latin1_General_100_CI_AS Restoring CRONUS Demo Database Setting CompatibilityLevel for CRONUS on localhost\SQLEXPRESS Modifying Business Central Service Tier Config File for Docker Creating Business Central Service Tier Installing SIP crypto provider: 'C:\Windows\System32\NavSip.dll' Copying Web Client Files Copying Client Files Copying ModernDev Files Copying additional files Copying ConfigurationPackages Copying Test Assemblies Copying Applications Starting Business Central Service Tier Importing CRONUS license file Stopping Business Central Service Tier Installation took 336 seconds Installation complete Removing intermediate container 66556cbb5a9e ---> 476914330015 Step 6/6 : LABEL legal="http://go.microsoft.com/fwlink/?LinkId=837447" created="202102240110" nav="" cu="" country="de" version="17.4.21491.21531" platform="17.0.21485.21516" ---> Running in 136a6ef96ee5 Removing intermediate container 136a6ef96ee5 ---> 397daf6ef37f Successfully built 397daf6ef37f Successfully tagged bcartifacts/cosmo-bc:onprem-17.4.21491.21531-de Building image took 1654 seconds


3. Create a container

PS C:\Users\vmadministrator> New-BcContainer -accept_eula -containerName "umlaut-test" -auth NavUserPassword -Credential (New-Object pscredential 'admin', (ConvertTo-SecureString -String "Super5ecret!" -AsPlainText -Force)) -imageName "bcartifacts/cosmo-bc:onprem-17.4.21491.21531-de" BcContainerHelper is version 2.0.5 BcContainerHelper is running as administrator Host is Microsoft Windows Server Datacenter - 2004 Docker Client Version is 19.03.14 Docker Server Version is 19.03.14 Fetching all docker images Using image bcartifacts/cosmo-bc:onprem-17.4.21491.21531-de Creating Container umlaut-test Version: 17.4.21491.21531-de Style: onprem Multitenant: No Platform: 17.0.21485.21516 Generic Tag: 1.0.1.3 Container OS Version: 10.0.19041.804 (2004) Host OS Version: 10.0.19041.804 (2004) Using process isolation Using locale de-DE Disabling the standard eventlog dump to container log every 2 seconds (use -dumpEventLog to enable) Files in C:\ProgramData\BcContainerHelper\Extensions\umlaut-test\my:

Files: http://umlaut-test:8080/ALLanguage.vsix

Container Total Physical Memory is 16.0Gb Container Free Physical Memory is 11.4Gb

Initialization took 237 seconds Ready for connections! Reading CustomSettings.config from umlaut-test Creating Desktop Shortcuts for umlaut-test Container umlaut-test successfully created

Use: Get-BcContainerEventLog -containerName umlaut-test to retrieve a snapshot of the event log from the container Get-BcContainerDebugInfo -containerName umlaut-test to get debug information about the container Enter-BcContainer -containerName umlaut-test to open a PowerShell prompt inside the container Remove-BcContainer -containerName umlaut-test to remove the container again docker logs umlaut-test to retrieve information about URL's again


4. Download and expand dependency and dependent app

PS C:\Users\vmadministrator> wget -uri 'https://ccppi.blob.core.windows.net/test-artifacts/COSMO%20CONSULT%20Unternehmensl%C3%B6sungen_Dependency_1.0.0.0.app.zip?' -outfile 'COSMO CONSULT Unternehmenslösungen_Dependency_1.0.0.0.app.zip' -usebasicparsing PS C:\Users\vmadministrator> wget -uri 'https://ccppi.blob.core.windows.net/test-artifacts/app.zip?' -outfile 'app.zip' -usebasicparsing PS C:\Users\vmadministrator> Expand-Archive '.\COSMO CONSULT Unternehmenslösungen_Dependency_1.0.0.0.app.zip' -DestinationPath C:\ProgramData\BcContainerHelper\Extensions\umlaut-test\ PS C:\Users\vmadministrator> Expand-Archive .\app.zip -DestinationPath C:\ProgramData\BcContainerHelper\Extensions\umlaut-test\


5. Deploy dependency

PS C:\Users\vmadministrator> Publish-BcContainerApp -containerName "umlaut-test" -appFile "C:\programdata\BcContainerHelper\Extensions\umlaut-test\COSMO CONSULT Unternehmensl`"sungen_Dependency_1.0.0.0.app" -SkipVerification Publishing C:\ProgramData\BcContainerHelper\Extensions\umlaut-test\ec5014d8-e98a-4902-836d-fe3ded95ecd3\COSMO CONSULT Unternehmensl”sungen_Dependency_1.0.0.0.app App COSMO CONSULT Unternehmensl”sungen_Dependency_1.0.0.0.app successfully published


6. Compile dependent app

PS C:\Users\vmadministrator> Compile-AppInBcContainer -containerName "umlaut-test" -appProjectFolder "C:\ProgramData\BcContainerHelper\Extensions\umlaut-test\app\" -Credential (New-Object pscredential 'admin', (ConvertTo-SecureString -String "Super5ecret!" -AsPlainText -Force)) Using Symbols Folder: C:\ProgramData\BcContainerHelper\Extensions\umlaut-test\app.alpackages Downloading symbols: Microsoft_Application_17.4.21491.21531.app Url : http://172.21.187.21:7049/BC/dev/packages?publisher=Microsoft&appName=Application&versionText=17.0.0.0&tenant=default Adding dependency to System Application from Microsoft Adding dependency to Base Application from Microsoft Downloading symbols: Microsoft_System_17.0.21485.21516.app Url : http://172.21.187.21:7049/BC/dev/packages?publisher=Microsoft&appName=System&versionText=17.0.0.0&tenant=default Downloading symbols: COSMO CONSULT Unternehmenslösungen_Dependency_1.0.0.0.app Url : http://172.21.187.21:7049/BC/dev/packages?publisher=COSMO%20CONSULT%20Unternehmensl%C3%B6sungen&appName=Dependency&versionText=1.0.0.0&tenant=default Downloading symbols: Microsoft_System Application_17.4.21491.21531.app Url : http://172.21.187.21:7049/BC/dev/packages?publisher=Microsoft&appName=System Application&versionText=17.4.0.0&tenant=default Downloading symbols: Microsoft_Base Application_17.4.21491.21531.app Url : http://172.21.187.21:7049/BC/dev/packages?publisher=Microsoft&appName=Base Application&versionText=17.4.0.0&tenant=default Compiling... .\alc.exe /project:"C:\ProgramData\BcContainerHelper\Extensions\umlaut-test\app" /packagecachepath:"C:\ProgramData\BcContainerHelper\Extensions\umlaut-test\app.alpackages" /out:"C:\ProgramData\BcContainerHelper\Extensions\umlaut-test\app\output\COSMO CONSULT_Dependent-App_1.0.0.0.app" /assemblyprobingpaths:"C:\Program Files (x86)\Microsoft Dynamics NAV\170\RoleTailored Client","C:\Program Files\Microsoft Dynamics NAV\170\Service","C:\Program Files (x86)\Open XML SDK\V2.5\lib","c:\Windows\Microsoft.NET\Assembly","C:\Test Assemblies\Mock Assemblies" Microsoft (R) AL Compiler version 6.4.6.9919 Copyright (C) Microsoft Corporation. All rights reserved

Compilation started for project 'Dependent-App' containing '1' files at '1:40:58.115'.

Compilation ended at '1:41:2.854'.

C:\ProgramData\BcContainerHelper\Extensions\umlaut-test\app\output\COSMO CONSULT_Dependent-App_1.0.0.0.app successfully created in 36 seconds C:\ProgramData\BcContainerHelper\Extensions\umlaut-test\app\output\COSMO CONSULT_Dependent-App_1.0.0.0.app


[app.zip](https://github.com/HodorNV/ALOps/files/6032789/app.zip) is the dependent app and [COSMO CONSULT Unternehmenslösungen_Dependency_1.0.0.0.app.zip](https://github.com/HodorNV/ALOps/files/6032794/COSMO.CONSULT.Unternehmenslosungen_Dependency_1.0.0.0.app.zip) is the dependency.

The same dependency and dependent app cause the same failure as before in the ALOps compile step:

2021-02-23T23:45:30.5702472Z ##[section]Starting: ALOps Compile App 2021-02-23T23:45:30.5918752Z ============================================================================== 2021-02-23T23:45:30.5919039Z Task : ALOps App Compiler 2021-02-23T23:45:30.5919270Z Description : Compile AL Extensions for Business Central 2021-02-23T23:45:30.5919483Z Version : 1.440.2167 2021-02-23T23:45:30.5919645Z Author : Hodor 2021-02-23T23:45:30.5919875Z Help : Compile a Business Central extension from AL code. 2021-02-23T23:45:30.5920135Z ============================================================================== 2021-02-23T23:45:32.4276005Z Validate configuration 2021-02-23T23:45:32.7639574Z Task Inputs: 2021-02-23T23:45:32.7697317Z 2021-02-23T23:45:32.7821003Z name value 2021-02-23T23:45:32.7823997Z ---- ----- 2021-02-23T23:45:32.7826211Z usedocker True 2021-02-23T23:45:32.7827782Z fixed_tag
2021-02-23T23:45:32.7828806Z targetproject C:\azp\agent_work\1\s\app\app.json 2021-02-23T23:45:32.7831060Z nav_computername
2021-02-23T23:45:32.7832991Z nav_serverinstance BC140 2021-02-23T23:45:32.7834497Z nav_tenant default 2021-02-23T23:45:32.7836106Z nav_ports_dev 7049 2021-02-23T23:45:32.7837919Z bc_username
2021-02-23T23:45:32.7839541Z bc_password
2021-02-23T23:45:32.7841459Z al_compiler_version 0.12.15355 2021-02-23T23:45:32.7843741Z ruleset
2021-02-23T23:45:32.7845522Z al_analyzer
2021-02-23T23:45:32.7847760Z nav_app_version 17.0.2.0 2021-02-23T23:45:32.7849218Z vsix_download_path
2021-02-23T23:45:32.7851208Z use_ssl False 2021-02-23T23:45:32.7853434Z download_test_symbols False 2021-02-23T23:45:32.7855336Z usecompression True 2021-02-23T23:45:32.7856567Z publish_artifact True 2021-02-23T23:45:32.7858271Z failed_on_warnings False 2021-02-23T23:45:32.7860292Z app_file_suffix
2021-02-23T23:45:32.7862290Z updatebuildnumber True 2021-02-23T23:45:32.7865505Z setup_working_folder False 2021-02-23T23:45:32.7867364Z showmycode Keep 2021-02-23T23:45:32.7867741Z 2021-02-23T23:45:32.7893947Z 2021-02-23T23:45:32.7901668Z 2021-02-23T23:45:32.8053610Z For documentation, please visit : https://www.alops.be/documentation 2021-02-23T23:45:32.8056876Z 2021-02-23T23:45:33.0578709Z ALOps License: 2021-02-23T23:45:33.0602693Z * Licensed To: Cosmo Consult SSC GmbH 2021-02-23T23:45:33.0606612Z 2021-02-23T23:45:33.0711220Z Importing required PS-Functions 2021-02-23T23:45:33.5525713Z Initiate Docker Session 2021-02-23T23:45:33.5621476Z Direct PSSession to other container [1dd550bffca45ce20750980ea057b3dab02ce488ed6c8047dc5987389d893c5b] 2021-02-23T23:45:33.6720836Z Container resolved to hostname [1dd550bffca4] 2021-02-23T23:45:33.9407525Z Set Docker Container ErrorActionPreference = Stop 2021-02-23T23:45:35.9026851Z Import NAV/BC Management DLL's 2021-02-23T23:45:35.9029081Z Loading assemblies for ServiceTier [BC]. 2021-02-23T23:45:36.2027577Z Loading assemblies from: [C:\program files\microsoft dynamics nav\170\service] 2021-02-23T23:45:36.2029364Z Selected module: [C:\program files\microsoft dynamics nav\170\service\Microsoft.Dynamics.Nav.Apps.Management.dll] 2021-02-23T23:45:36.2032005Z Loading module: [C:\program files\microsoft dynamics nav\170\service\Microsoft.Dynamics.Nav.Apps.Management.dll] 2021-02-23T23:45:36.2034402Z Selected module: [C:\program files\microsoft dynamics nav\170\service\Microsoft.Dynamics.Nav.Management.dll] 2021-02-23T23:45:36.2036993Z Loading module: [C:\program files\microsoft dynamics nav\170\service\Microsoft.Dynamics.Nav.Management.dll] 2021-02-23T23:45:36.2081643Z Setting up AL Compiler [ALLanguage] 2021-02-23T23:45:37.0954816Z Downloading AL Compiler [ALLanguage] 2021-02-23T23:45:37.0958786Z Get Extension from Local-Disk...[C:\Run\ALLanguage.vsix] 2021-02-23T23:45:37.0963623Z Resolving Path [C:\Run\ALLanguage.vsix] 2021-02-23T23:45:37.0966666Z VSIX Path Resolved: [C:\Run\ALLanguage.vsix] 2021-02-23T23:45:37.0969134Z Unpacking Extension to folder... 2021-02-23T23:45:57.8776702Z Loading Json Object: [c:\Run\Microsoft.al\al-ALLanguage\extension\package.json] 2021-02-23T23:45:57.8780264Z Using AL Compiler [vALLanguage] located [C:\Run\Microsoft.al\al-ALLanguage\extension\bin\alc.exe] 2021-02-23T23:45:57.8782267Z 2021-02-23T23:45:57.8821850Z Working folder: C:\azp\agent_work\1\s 2021-02-23T23:45:57.8831102Z 2021-02-23T23:45:57.8840454Z Copy Working folder to Docker Container: 1dd550bffca45ce20750980ea057b3dab02ce488ed6c8047dc5987389d893c5b 2021-02-23T23:45:57.8849029Z Docker Working Folder: c:\Run\DevOps\ 2021-02-23T23:45:57.8857713Z Copy from [C:\azp\agent_work\1\s] to [c:\Run\DevOps] 2021-02-23T23:45:57.8954577Z Source File setup completed 2021-02-23T23:45:58.1198536Z Target Project: \app\app.json 2021-02-23T23:45:58.1202982Z Check for app.json files: c:\Run\DevOps\ 2021-02-23T23:45:58.1206589Z Multiple projects found: 2021-02-23T23:45:58.1208671Z - C:\Run\DevOps\app 2021-02-23T23:45:58.1212047Z - C:\Run\DevOps\test 2021-02-23T23:45:58.1214551Z Retrieving App-Info [\app\app.json] 2021-02-23T23:45:58.1217170Z Loading Json Object: [c:\Run\DevOps\app\app.json] 2021-02-23T23:45:58.1218854Z App.ID = 1d73f39c-7601-422f-b184-dadff041b33f 2021-02-23T23:45:58.1222168Z App.Name = Dependent-App 2021-02-23T23:45:58.1226832Z App.Publisher = COSMO CONSULT 2021-02-23T23:45:58.1228499Z App.Version = 1.0.0.0 2021-02-23T23:45:58.1230084Z App.Platform = 17.0.0.0 2021-02-23T23:45:58.1234626Z App.Application = 17.0.0.0 2021-02-23T23:45:58.1237384Z 2021-02-23T23:45:58.1241452Z Setting Managed App Version [c:\Run\DevOps\app\app.json] => 17.0.2.0 2021-02-23T23:45:58.1598096Z 2021-02-23T23:45:58.2140839Z Working Direcotry: [c:\Run\DevOps] 2021-02-23T23:45:58.2144254Z Target Project: [\app\app.json] 2021-02-23T23:45:58.2147917Z Project Directory: [c:\Run\DevOps\app] 2021-02-23T23:45:58.2149305Z VSCode Settings: [c:\Run\DevOps\app.vscode\settings.json] 2021-02-23T23:45:58.2151533Z No VSCode-Settings json found. 2021-02-23T23:45:58.2153925Z No AL-RuleSet json found. 2021-02-23T23:45:58.2155513Z 2021-02-23T23:45:58.3774033Z Resolve Docker Credentials 2021-02-23T23:45:58.3921046Z Setup BC Username/Password from Container info 2021-02-23T23:45:58.3950560Z Download Symbols 2021-02-23T23:46:00.0879115Z Working Dir: c:\Run\DevOps\ 2021-02-23T23:46:00.0880591Z Loading assemblies from: [C:\program files\microsoft dynamics nav\170\service] 2021-02-23T23:46:00.0882977Z PackageCache path created [c:\Run\DevOps\PackageCache] 2021-02-23T23:46:00.0885191Z 2021-02-23T23:46:00.0888145Z Propagated Dependency: COSMO CONSULT Unternehmenslösungen - Dependency - 1.0.0.0 2021-02-23T23:46:00.0890242Z Download System-Symbols for [17.0.0.0] 2021-02-23T23:46:00.0892112Z Downloading NAV Symbols for [System v17.0.0.0] 2021-02-23T23:46:00.0895384Z Downloading NAV Symbols from [https://1dd550bffca4:7049/BC/dev/packages?publisher=Microsoft&appName=System&versionText=17.0.0.0&tenant=default] 2021-02-23T23:46:00.0897529Z Downloading NAV Symbols with BasicAuthentication [admin] 2021-02-23T23:46:00.0899841Z ##[command]Invoke-RestMethod -Method Get -Uri https://1dd550bffca4:7049/BC/dev/packages?publisher=Microsoft&appName=System&versionText=17.0.0.0&tenant=default 2021-02-23T23:46:00.0902434Z Content-Disposition: attachment; filename=Microsoft_System_17.0.21485.21516.app 2021-02-23T23:46:00.0905972Z Saving symbol file [Microsoft_System_17.0.21485.21516.app] to [c:\Run\DevOps\PackageCache] 2021-02-23T23:46:00.0908044Z Read App Manifest: [c:\Run\DevOps\PackageCache\Microsoft_System_17.0.21485.21516.app]. 2021-02-23T23:46:00.0910207Z 2021-02-23T23:46:00.0913747Z Download Application-Symbols for [17.0.0.0] 2021-02-23T23:46:00.0917741Z Downloading NAV Symbols for [Application v17.0.0.0] 2021-02-23T23:46:00.0920339Z Downloading NAV Symbols from [https://1dd550bffca4:7049/BC/dev/packages?publisher=Microsoft&appName=Application&versionText=17.0.0.0&tenant=default] 2021-02-23T23:46:00.0923409Z Downloading NAV Symbols with BasicAuthentication [admin] 2021-02-23T23:46:00.0933119Z ##[command]Invoke-RestMethod -Method Get -Uri https://1dd550bffca4:7049/BC/dev/packages?publisher=Microsoft&appName=Application&versionText=17.0.0.0&tenant=default 2021-02-23T23:46:00.0935954Z Content-Disposition: attachment; filename=Microsoft_Application_17.4.21491.21531.app 2021-02-23T23:46:00.0937258Z Saving symbol file [Microsoft_Application_17.4.21491.21531.app] to [c:\Run\DevOps\PackageCache] 2021-02-23T23:46:00.0939423Z Read App Manifest: [c:\Run\DevOps\PackageCache\Microsoft_Application_17.4.21491.21531.app]. 2021-02-23T23:46:00.0941391Z Propagated Dependency: Microsoft - System Application - 17.4.0.0 2021-02-23T23:46:00.0945392Z Propagated Dependency: Microsoft - Base Application - 17.4.0.0 2021-02-23T23:46:00.0949776Z 2021-02-23T23:46:00.0952408Z Check for Depency Apps 3 2021-02-23T23:46:00.0958370Z Download Application-Symbols for [Dependency v1.0.0.0] 2021-02-23T23:46:00.0963056Z Downloading NAV Symbols for [Dependency v1.0.0.0] 2021-02-23T23:46:00.0965195Z Downloading NAV Symbols from [https://1dd550bffca4:7049/BC/dev/packages?publisher=COSMO+CONSULT+Unternehmensl%c3%b6sungen&appName=Dependency&versionText=1.0.0.0&tenant=default] 2021-02-23T23:46:00.0966255Z Downloading NAV Symbols with BasicAuthentication [admin] 2021-02-23T23:46:00.0969875Z ##[command]Invoke-RestMethod -Method Get -Uri https://1dd550bffca4:7049/BC/dev/packages?publisher=COSMO+CONSULT+Unternehmensl%c3%b6sungen&appName=Dependency&versionText=1.0.0.0&tenant=default 2021-02-23T23:46:00.0970959Z Content-Disposition: attachment; filename="=?utf-8?B?Q09TTU8gQ09OU1VMVCBVbnRlcm5laG1lbnNsw7ZzdW5nZW5fRGVwZW5kZW5jeV8xLjAuMC4wLmFwcA==?=" 2021-02-23T23:46:00.0973714Z Saving symbol file [COSMO CONSULT Unternehmenslösungen_Dependency_1.0.0.0.app] to [c:\Run\DevOps\PackageCache] 2021-02-23T23:46:00.0977063Z Read App Manifest: [c:\Run\DevOps\PackageCache\COSMO CONSULT Unternehmenslösungen_Dependency_1.0.0.0.app]. 2021-02-23T23:46:00.0979934Z Propagated Dependency: Microsoft - Application - 17.0.0.0 2021-02-23T23:46:00.0984711Z 2021-02-23T23:46:00.0988277Z Download Application-Symbols for [System Application v17.4.0.0] 2021-02-23T23:46:00.0990313Z Downloading NAV Symbols for [System Application v17.4.0.0] 2021-02-23T23:46:00.0993694Z Downloading NAV Symbols from [https://1dd550bffca4:7049/BC/dev/packages?publisher=Microsoft&appName=System+Application&versionText=17.4.0.0&tenant=default] 2021-02-23T23:46:00.0996381Z Downloading NAV Symbols with BasicAuthentication [admin] 2021-02-23T23:46:00.0999489Z ##[command]Invoke-RestMethod -Method Get -Uri https://1dd550bffca4:7049/BC/dev/packages?publisher=Microsoft&appName=System+Application&versionText=17.4.0.0&tenant=default 2021-02-23T23:46:00.1001753Z Content-Disposition: attachment; filename="Microsoft_System Application_17.4.21491.21531.app" 2021-02-23T23:46:00.1002701Z Saving symbol file [Microsoft_System Application_17.4.21491.21531.app] to [c:\Run\DevOps\PackageCache] 2021-02-23T23:46:00.1005328Z Read App Manifest: [c:\Run\DevOps\PackageCache\Microsoft_System Application_17.4.21491.21531.app]. 2021-02-23T23:46:00.1008104Z 2021-02-23T23:46:00.1012791Z Download Application-Symbols for [Base Application v17.4.0.0] 2021-02-23T23:46:00.1015519Z Downloading NAV Symbols for [Base Application v17.4.0.0] 2021-02-23T23:46:00.1018780Z Downloading NAV Symbols from [https://1dd550bffca4:7049/BC/dev/packages?publisher=Microsoft&appName=Base+Application&versionText=17.4.0.0&tenant=default] 2021-02-23T23:46:00.1022081Z Downloading NAV Symbols with BasicAuthentication [admin] 2021-02-23T23:46:00.1026587Z ##[command]Invoke-RestMethod -Method Get -Uri https://1dd550bffca4:7049/BC/dev/packages?publisher=Microsoft&appName=Base+Application&versionText=17.4.0.0&tenant=default 2021-02-23T23:46:00.1028956Z Content-Disposition: attachment; filename="Microsoft_Base Application_17.4.21491.21531.app" 2021-02-23T23:46:00.1032212Z Saving symbol file [Microsoft_Base Application_17.4.21491.21531.app] to [c:\Run\DevOps\PackageCache] 2021-02-23T23:46:00.1035722Z Read App Manifest: [c:\Run\DevOps\PackageCache\Microsoft_Base Application_17.4.21491.21531.app]. 2021-02-23T23:46:00.1038613Z 2021-02-23T23:46:00.1042841Z Download Application-Symbols for [Application v17.0.0.0] 2021-02-23T23:46:00.1046113Z Downloading NAV Symbols for [Application v17.0.0.0] 2021-02-23T23:46:00.1050156Z Downloading NAV Symbols from [https://1dd550bffca4:7049/BC/dev/packages?publisher=Microsoft&appName=Application&versionText=17.0.0.0&tenant=default] 2021-02-23T23:46:00.1051367Z Downloading NAV Symbols with BasicAuthentication [admin] 2021-02-23T23:46:00.1055275Z ##[command]Invoke-RestMethod -Method Get -Uri https://1dd550bffca4:7049/BC/dev/packages?publisher=Microsoft&appName=Application&versionText=17.0.0.0&tenant=default 2021-02-23T23:46:00.1057360Z Content-Disposition: attachment; filename=Microsoft_Application_17.4.21491.21531.app 2021-02-23T23:46:00.1061238Z Saving symbol file [Microsoft_Application_17.4.21491.21531.app] to [c:\Run\DevOps\PackageCache] 2021-02-23T23:46:00.1063653Z Read App Manifest: [c:\Run\DevOps\PackageCache\Microsoft_Application_17.4.21491.21531.app]. 2021-02-23T23:46:00.1066250Z 2021-02-23T23:46:00.8444821Z Starting AL Compiler... 2021-02-23T23:46:00.8447076Z App.Name = Dependent-App 2021-02-23T23:46:00.8449488Z App.Publisher = COSMO CONSULT 2021-02-23T23:46:00.8451449Z App.Compiler Path= C:\Run\Microsoft.al\al-ALLanguage\extension\bin\alc.exe 2021-02-23T23:46:00.8460736Z Checking for Assemblies in App 2021-02-23T23:46:00.8461271Z Add Windows Assembly Path [C:\Windows\assembly] 2021-02-23T23:46:00.8462687Z Detect ALC.EXE Features. 2021-02-23T23:46:00.8466926Z ##[command]& C:\Run\Microsoft.al\al-ALLanguage\extension\bin\alc.exe /? 2021-02-23T23:46:01.7848225Z PARALLEL 2021-02-23T23:46:01.7850242Z MAXDEGREEOFPARALLELISM 2021-02-23T23:46:01.7853542Z ASSEMBLYPROBINGPATHS 2021-02-23T23:46:01.7856784Z ##[command]& C:\Run\Microsoft.al\al-ALLanguage\extension\bin\alc.exe /packagecachepath:"c:\Run\DevOps\PackageCache" /project:"c:\Run\DevOps\app" /out:"c:\Run\DevOps\COSMO CONSULT_Dependent-App_17.0.2.0.app" /fullpaths /parallel+ /maxDegreeOfParallelism:2 /assemblyprobingpaths:"C:\Windows\assembly" 2021-02-23T23:46:06.8355865Z ** AL Compiler Exit Code: 1 2021-02-23T23:46:06.8357830Z AL Compiler raw logs: Start 2021-02-23T23:46:06.8361991Z Microsoft (R) AL Compiler version 6.4.6.9919 Copyright (C) Microsoft Corporation. All rights reserved Compilation started for project 'Dependent-App' containing '1' files at '23:46:1.667'. error AL1022: A package with publisher 'COSMO CONSULT Unternehmensl?sungen', name 'Dependency', and a version compatible with '1.0.0.0' could not be found in the package cache folder 'c:\Run\DevOps\PackageCache' Compilation ended at '23:46:6.705'. 2021-02-23T23:46:06.8363817Z AL Compiler raw logs: End 2021-02-23T23:46:06.8364446Z Start processing compile results. 2021-02-23T23:46:06.8402146Z ##[error]Compilation started for project 'Dependent-App' containing '1' files at '23:46:1.667'. 2021-02-23T23:46:06.8425618Z ##[error]error AL1022: A package with publisher 'COSMO CONSULT Unternehmensl?sungen', name 'Dependency', and a version compatible with '1.0.0.0' could not be found in the package cache folder 'c:\Run\DevOps\PackageCache' 2021-02-23T23:46:06.8427367Z ##[error]Compilation ended at '23:46:6.705'. 2021-02-23T23:46:06.8428341Z Store compile log to [c:\Run\DevOps\compilelog.txt] 2021-02-23T23:46:06.8428632Z Start processing compile results done. 2021-02-23T23:46:06.8428868Z *** Transfer App Artifact from Docker container. 2021-02-23T23:46:07.3018588Z ##[error]Cannot find path 'c:\Run\DevOps\COSMO CONSULT_Dependent-App_17.0.2.0.app' because it does not exist. 2021-02-23T23:46:07.3452356Z ##[section]Async Command Start: Add Build Tag 2021-02-23T23:46:07.3452833Z Build '258' has following tags now: bcartifacts/cosmo-bc-onprem-17.4.21491.21531-de, BC.Platform.17.0.21485.21516, BC.Version.17.4.21491.21531, AL.Compiler.ALLanguage 2021-02-23T23:46:07.3453201Z ##[section]Async Command End: Add Build Tag 2021-02-23T23:46:07.3453966Z ##[section]Async Command Start: Update Build Number 2021-02-23T23:46:07.3454288Z Update build number to 17.0.2.0 for build 258 2021-02-23T23:46:07.3454661Z ##[section]Async Command End: Update Build Number 2021-02-23T23:46:07.3455484Z ##[section]Finishing: ALOps Compile App

waldo1001 commented 3 years ago

Hi @tfenster ,

Thanks for the repro.

Now, before I set that up - from the info you were supplying, Bart had a hunch and created a hotfix, which should be online in about 20 minutes (v1.440.2170). Could you check that first?

tfenster commented 3 years ago

@waldo1001 Unfortunately the same result. I'll only add the relevant parts but let me know if you need more

2021-02-24T11:23:18.2304695Z ##[section]Starting: ALOps Compile App
2021-02-24T11:23:18.2694234Z ==============================================================================
2021-02-24T11:23:18.2694660Z Task         : ALOps App Compiler
2021-02-24T11:23:18.2695019Z Description  : Compile AL Extensions for Business Central
2021-02-24T11:23:18.2695370Z Version      : 1.440.2170
2021-02-24T11:23:18.2695669Z Author       : Hodor
2021-02-24T11:23:18.2696051Z Help         : Compile a Business Central extension from AL code.
2021-02-24T11:23:18.2696468Z ==============================================================================
...
2021-02-24T11:24:12.6426768Z *** Check for Depency Apps 3
2021-02-24T11:24:12.6439455Z *** Download Application-Symbols for [Dependency v1.0.0.0]
2021-02-24T11:24:12.6457132Z *** Downloading NAV Symbols for [Dependency v1.0.0.0]
2021-02-24T11:24:12.6477997Z *** Downloading NAV Symbols from [https://0398db2b8351:7049/BC/dev/packages?publisher=COSMO+CONSULT+Unternehmensl%c3%b6sungen&appName=Dependency&versionText=1.0.0.0&tenant=default]
2021-02-24T11:24:12.6497664Z *** Downloading NAV Symbols with BasicAuthentication [admin]
2021-02-24T11:24:12.6522795Z ##[command]Invoke-RestMethod -Method Get -Uri https://0398db2b8351:7049/BC/dev/packages?publisher=COSMO+CONSULT+Unternehmensl%c3%b6sungen&appName=Dependency&versionText=1.0.0.0&tenant=default
2021-02-24T11:24:12.6542384Z *** Content-Disposition: attachment; filename="=?utf-8?B?Q09TTU8gQ09OU1VMVCBVbnRlcm5laG1lbnNsw7ZzdW5nZW5fRGVwZW5kZW5jeV8xLjAuMC4wLmFwcA==?="
2021-02-24T11:24:12.6557419Z *** Saving symbol file [COSMO CONSULT Unternehmenslösungen_Dependency_1.0.0.0.app] to [c:\Run\DevOps\PackageCache]
2021-02-24T11:24:12.6586016Z *** Read App Manifest: [c:\Run\DevOps\PackageCache\COSMO CONSULT Unternehmenslösungen_Dependency_1.0.0.0.app].
2021-02-24T11:24:12.6612475Z *** Propagated Dependency: Microsoft - Application - 17.0.0.0
...
2021-02-24T11:24:14.2812661Z *** Starting AL Compiler...
2021-02-24T11:24:14.2846178Z *** App.Name         = Dependent-App
2021-02-24T11:24:14.2939271Z *** App.Publisher    = COSMO CONSULT
2021-02-24T11:24:14.2958897Z *** App.Compiler Path= C:\Run\Microsoft.al\al-ALLanguage\extension\bin\win32\alc.exe
2021-02-24T11:24:14.2983493Z *** Checking for Assemblies in App
2021-02-24T11:24:14.2999894Z *** Add Windows Assembly Path [C:\Windows\assembly]
2021-02-24T11:24:14.3014574Z *** Detect ALC.EXE Features.
2021-02-24T11:24:14.3024560Z ##[command]& C:\Run\Microsoft.al\al-ALLanguage\extension\bin\win32\alc.exe /?
2021-02-24T11:24:14.3036759Z   * PARALLEL
2021-02-24T11:24:14.3044173Z   * MAXDEGREEOFPARALLELISM
2021-02-24T11:24:14.3050198Z   * ASSEMBLYPROBINGPATHS
2021-02-24T11:24:14.3056202Z ##[command]& C:\Run\Microsoft.al\al-ALLanguage\extension\bin\win32\alc.exe /packagecachepath:"c:\Run\DevOps\PackageCache" /project:"c:\Run\DevOps\app" /out:"c:\Run\DevOps\COSMO CONSULT_Dependent-App_17.0.4.0.app" /fullpaths /parallel+ /maxDegreeOfParallelism:2 /assemblyprobingpaths:"C:\Windows\assembly"
2021-02-24T11:24:20.4446116Z *** AL Compiler Exit Code: 1
2021-02-24T11:24:20.4467763Z *** AL Compiler raw logs: Start
2021-02-24T11:24:20.4491858Z Microsoft (R) AL Compiler version 6.4.6.9919 Copyright (C) Microsoft Corporation. All rights reserved  Compilation started for project 'Dependent-App' containing '1' files at '11:24:13.989'.  error AL1022: A package with publisher 'COSMO CONSULT Unternehmensl?sungen', name 'Dependency', and a version compatible with '1.0.0.0' could not be found in the package cache folder 'c:\Run\DevOps\PackageCache'  Compilation ended at '11:24:20.301'. 
2021-02-24T11:24:20.4500954Z *** AL Compiler raw logs: End
2021-02-24T11:24:20.4504914Z *** Start processing compile results.
2021-02-24T11:24:20.4548305Z ##[error]Compilation started for project 'Dependent-App' containing '1' files at '11:24:13.989'.
2021-02-24T11:24:20.4575563Z ##[error]error AL1022: A package with publisher 'COSMO CONSULT Unternehmensl?sungen', name 'Dependency', and a version compatible with '1.0.0.0' could not be found in the package cache folder 'c:\Run\DevOps\PackageCache'
2021-02-24T11:24:20.4577426Z ##[error]Compilation ended at '11:24:20.301'.
2021-02-24T11:24:20.4578743Z *** Store compile log to [c:\Run\DevOps\compilelog.txt]
2021-02-24T11:24:20.4579114Z *** Start processing compile results done.
2021-02-24T11:24:20.4627243Z *** Transfer App Artifact from Docker container.
2021-02-24T11:24:21.0663621Z ##[error]Cannot find path 'c:\Run\DevOps\COSMO CONSULT_Dependent-App_17.0.4.0.app' because it does not exist.
2021-02-24T11:24:21.1703146Z ##[section]Async Command Start: Add Build Tag
2021-02-24T11:24:21.1704210Z Build '260' has following tags now: bcartifacts/cosmo-bc-onprem-17.4.21491.21531-de, BC.Platform.17.0.21485.21516, BC.Version.17.4.21491.21531, AL.Compiler.ALLanguage
2021-02-24T11:24:21.1704814Z ##[section]Async Command End: Add Build Tag
2021-02-24T11:24:21.1705849Z ##[section]Async Command Start: Update Build Number
2021-02-24T11:24:21.1706382Z Update build number to 17.0.4.0 for build 260
2021-02-24T11:24:21.1706736Z ##[section]Async Command End: Update Build Number
2021-02-24T11:24:21.1709475Z ##[section]Finishing: ALOps Compile App
waldo1001 commented 3 years ago

Good news is: I have a repro now: image I'll get back to you when I have more info..

tfenster commented 3 years ago

Very good :) I've now done it really step by step manually and it also works there. The only thing that seems to be different is the way how you download the files as I used the C# webclient and you are using Invoke-WebRequest. I hope to give that a try later to maybe confirm

tfenster commented 3 years ago

I tried with Invoke-WebRequest, but compiling works in that scenario as well, so I basically can only make it fail with ALOps

tfenster commented 3 years ago

@waldo1001 any progress on this? Do you have an idea if this is solvable? It would have quite an impact for us if not, so I'd like to get a feeling for that as soon as possible

waldo1001 commented 3 years ago

Thing is .. we have a clue, but by building this into a hotfix, we broke quite a few pipelines. Recovering from that, and preventing it for the future, has been our main prio since then. We'll pick it up this week - we NEED to fix this. "Not solvable" is not an option.

tfenster commented 3 years ago

@waldo1001 ok, thanks for the feedback. As always, if you need help, test, whatever, just let us know

waldo1001 commented 3 years ago

@tfenster , new hotfix online - can you check?

tfenster commented 3 years ago

@waldo1001 Great, works now! Thanks!