HodorNV / ALOps

ALOps
55 stars 24 forks source link

ALOpsAppLicenseCheck: Exception with Microsoft.BusinessCentral.CustomerAuditTelemetry #769

Closed DanielGoehler closed 1 week ago

DanielGoehler commented 2 weeks ago

Describe the bug Since yesterday evening, we have been encountering the following error message:

Could not load file or assembly 'Microsoft.BusinessCentral.CustomerAuditTelemetry, Version=9.0.24150.2, Culture=neutral, PublicKeyToken=31bf3856ad364e35'. The system cannot find the specified file.

the used yaml please provide the yaml that you used. It helps you put the yaml like this:

parameters:
  artifact_exclude: ''
  artifact_include: ''
  exclude_codeunits: false
  exclude_pages: false
  exclude_queries: false
  exclude_ranges: ''
  exclude_reports: false
  exclude_tables: false
  exclude_xmlports: false
  licensefile: ''
  warning_only: false

steps:
  - task: ALOpsAppLicenseCheck@1
    displayName: 'App License Check'
    condition: and(succeeded(), ne('${{parameters.licensefile}}', ''))
    inputs:
      licensefile: '${{parameters.licensefile}}'
      artifact_filter: '*.app'
      artifact_include: '${{parameters.artifact_include}}'
      artifact_exclude: '${{parameters.artifact_exclude}}'
      exclude_ranges: '${{parameters.exclude_ranges}}'
      exclude_tables: '${{parameters.exclude_tables}}'
      exclude_codeunits: '${{parameters.exclude_codeunits}}'
      exclude_pages: '${{parameters.exclude_pages}}'
      exclude_reports: '${{parameters.exclude_reports}}'
      exclude_xmlports: '${{parameters.exclude_xmlports}}'
      exclude_queries: '${{parameters.exclude_queries}}'
      warning_only: ${{parameters.warning_only}}
      pwsh: true

the output Also the complete output is necessary for us to see what is going on. Also use backtics:

##[section]Starting: App License Check
==============================================================================
Task         : ALOps App License Check
Description  : Check App files agains a license
Version      : 1.464.6120
Author       : Hodor
Help         : Check App files agains a license.
==============================================================================
*** Using Powershell 7
*** Validate configuration
*** Task Inputs:

[32;1mname                                  value
[32;1m----                                  -----
usedocker                             False
fixed_tag                                  
licensefile       CustomerLicense.bclicense
artifact_path         C:\agent\_work\4719\a
artifact_filter                       *.app
artifact_include                           
artifact_exclude                    OP*.app
exclude_ranges                             
exclude_tables                        False
exclude_codeunits                     False
exclude_pages                         False
exclude_reports                       False
exclude_xmlports                      False
exclude_queries                       False
warning_only                          False
pwsh                                   True

True
*** For documentation, please visit   : https://www.alops.be/documentation

*** Imported required PS-Functions
*** Parse Task Parameters
*** Load Management DLL's
*** Import NAV/BC Management DLL's [True]
*** ServiceTier not specified, loading default assemblies.
*** Default Assemblies not found. Load via BC-Artifacts
*** Install/Update BCContainerHelper [https://github.com/microsoft/navcontainerhelper]
*** Check BcContainerHelper
*** Load BcContainerHelper
BcContainerHelper version 6.0.15
BC.HelperFunctions emits usage statistics telemetry to Microsoft
Running on Windows, PowerShell 7.4.2

ModuleType Version    PreRelease Name                                ExportedCommands
---------- -------    ---------- ----                                ----------------
Script     6.0.15                BcContainerHelper                   {Add-FontsToBcContainer, Add-GitToAlProjectFolder,…

##[command]"Get-BCArtifactUrl" 
Name                           Value
----                           -----
country                        W1
type                           OnPrem
select                         Latest

 -country: W1 -type: OnPrem -select: Latest
Downloading artifact /onprem/24.2.20227.20424/w1
Downloading C:\Users\script-service\AppData\Local\Temp\25e25d94-c391-4665-b7eb-abf1f104ed58.zip
Downloading using HttpClient
Unpacking artifact to tmp folder using 7zip
Downloading platform artifact /onprem/24.2.20227.20424/platform
Downloading C:\Users\script-service\AppData\Local\Temp\dcbc3f69-3d83-4a34-af20-5cff691f984e.zip
Downloading using HttpClient
Unpacking artifact to tmp folder using 7zip
Downloading Prerequisite Components
Downloading C:\bcartifacts.cache\onprem\24.2.20227.20424\platform\Prerequisite Components\DotNetCore\DotNetCore.1.0.4_1.1.1-WindowsHosting.exe
Downloading using HttpClient
Downloading C:\bcartifacts.cache\onprem\24.2.20227.20424\platform\Prerequisite Components\IIS URL Rewrite Module\rewrite_2.0_rtw_x64.msi
Downloading using HttpClient
*** Platform: C:\bcartifacts.cache\onprem\24.2.20227.20424\platform
*** Localisation: C:\bcartifacts.cache\onprem\24.2.20227.20424\w1
*** BC Management DLL: C:\bcartifacts.cache\onprem\24.2.20227.20424\platform\ServiceTier\program files\Microsoft Dynamics NAV\240\Service\Management\Microsoft.Dynamics.Nav.Management.dll
*** Selected module: [C:\bcartifacts.cache\onprem\24.2.20227.20424\platform\ServiceTier\program files\Microsoft Dynamics NAV\240\Service\Management\Microsoft.Dynamics.Nav.Management.dll]
*** Loading module: [C:\bcartifacts.cache\onprem\24.2.20227.20424\platform\ServiceTier\program files\Microsoft Dynamics NAV\240\Service\Management\Microsoft.Dynamics.Nav.Management.dll]
*** Module [Microsoft.Dynamics.Nav.Ncl.dll] not available
*** BC Types DLL: C:\bcartifacts.cache\onprem\24.2.20227.20424\platform\ServiceTier\program files\Microsoft Dynamics NAV\240\Service\Management\Microsoft.Dynamics.Nav.Types.dll
*** Selected module: [C:\bcartifacts.cache\onprem\24.2.20227.20424\platform\ServiceTier\program files\Microsoft Dynamics NAV\240\Service\Management\Microsoft.Dynamics.Nav.Types.dll]
*** Loading module: [C:\bcartifacts.cache\onprem\24.2.20227.20424\platform\ServiceTier\program files\Microsoft Dynamics NAV\240\Service\Management\Microsoft.Dynamics.Nav.Types.dll]
##[error]Could not load file or assembly 'Microsoft.BusinessCentral.CustomerAuditTelemetry, Version=9.0.24150.2, Culture=neutral, PublicKeyToken=31bf3856ad364e35'. Das System kann die angegebene Datei nicht finden.
*** PWSH Run Completed: 1
##[section]Finishing: App License Check

Expected behavior ALOpsAppLicenseCheck should work without an Exception

teddy515 commented 2 weeks ago

We are seeing the same problem, and it looks like its trying to use the latest version, and in our project, we are using the 23.2 version.

But the logs showing its trying to download the artifact from: Downloading artifact /onprem/24.2.20227.20424/w1

country W1 type OnPrem select Latest

It would be a nice fix, if ALOps can update the variables so we can set the version ourselves.

waldo1001 commented 2 weeks ago

We created a fix for this over the weekend .. give us some time to test and release .. somewhere this week!

waldo1001 commented 1 week ago

This should be online already. Can you confirm?

DanielGoehler commented 1 week ago

Everything's back up and running on our end. What about you @teddy515?

teddy515 commented 1 week ago

It works for us as well!