HodorNV / ALOps

ALOps
59 stars 24 forks source link

Problem with ALOpsAppLicenseCheck and .bclicence : NULL cannot be converted to Microsoft.Dynamics.Nav.Types.PermissionMask type due to invalid enumeration values #612

Closed DanielGoehler closed 1 year ago

DanielGoehler commented 1 year ago

Describe the bug We get with on bclicence the following error message: NULL cannot be converted to Microsoft.Dynamics.Nav.Types.PermissionMask type due to invalid enumeration values. Specify one of the following enumeration values and try again. Possible enumeration values are "None;Read;Insert;Modify;Delete;Execute;MaxDirect;IndirectRead;IndirectInsert;IndirectModify;IndirectDelete;ReadDeleteInsertModify;IndirectExecute;Max;HasExpDate;IncludedLimitedUsage;ExcludedLimitedUsage;IgnoreWildcard".

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

- task: ALOpsAppLicenseCheck@1
  inputs:
    licensefile: '$(Build.SourcesDirectory)\CustomerLicence.bclicense'
    artifact_filter: '*.app'

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

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

name                                                      value
----                                                      -----
usedocker                                                 False
fixed_tag                                                      
licensefile      C:\agent\_work\563\s\CustomerLicence.bclicense
artifact_path                              C:\agent\_work\563\a
artifact_filter                                           *.app
artifact_include                                               
artifact_exclude                                               
exclude_ranges                                                 

*** 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
*** 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 4.0.2
BcContainerHelper emits usage statistics telemetry to Microsoft

ModuleType Version    Name                                ExportedCommands                                             
---------- -------    ----                                ----------------                                             
Script     4.0.2      BcContainerHelper                   {Add-FontsToBcContainer, Add-GitToAlProjectFolder, Backup-...

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

 -select: Latest -type: OnPrem -country: W1
*** Platform: C:\bcartifacts.cache\onprem\21.4.52563.52785\platform
*** Localisation: C:\bcartifacts.cache\onprem\21.4.52563.52785\w1
*** BC Management DLL: C:\bcartifacts.cache\onprem\21.4.52563.52785\platform\ServiceTier\program files\Microsoft Dynamics NAV\210\Service\Microsoft.Dynamics.Nav.Management.dll
*** BC App Management DLL: C:\bcartifacts.cache\onprem\21.4.52563.52785\platform\ServiceTier\program files\Microsoft Dynamics NAV\210\Service\Microsoft.Dynamics.Nav.Apps.Management.dll
*** BC NCL Management DLL: C:\bcartifacts.cache\onprem\21.4.52563.52785\platform\ServiceTier\program files\Microsoft Dynamics NAV\210\Service\Microsoft.Dynamics.Nav.Ncl.dll
*** BC Types DLL: C:\bcartifacts.cache\onprem\21.4.52563.52785\platform\ServiceTier\program files\Microsoft Dynamics NAV\210\Service\Microsoft.Dynamics.Nav.Types.dll
*** Load CodeAnalysis from [C:\bcartifacts.cache\onprem\21.4.52563.52785\platform\ServiceTier\program files\Microsoft Dynamics NAV\210\Service]
*** Get License: [C:\agent\_work\563\s\CustomerLicence.bclicense]
*** App License Check: [C:\agent\_work\563\a]
*** Resolved Path  : C:\agent\_work\563\a
*** Apps to process:

Name                                               
----                                               
Company_Customer-BaseApp_21.4.25907.0.app

*** Detect license format
*** Parsing Format: BCLicense
*** License Header
Microsoft Software License Information
Copyright (C) 2007-2022 Microsoft Corporation. All rights reserved
****************************************************************************
VOICE Kundenaccount     : 1234567890
Lizenziert für          : <Customer Name>
                          <Address>

                          <City>

                          <Post Code>
                          Germany
Produkt Linie           : Microsoft Dynamics 365 Business Central on premises
Produkt-Edition         : Essentials
Produkt-Version         : 21
Land                    : Germany
Sprache                 : German
Erstellungsdatum        : 21.02.2023 12:44:15 (-08:00)
Erstes Registrierungsdatum : 22 December 2020
****************************************************************************
Name                                                                  Anzahl
----------------------------------------------------------------- ----------
Country Code: Germany                                                      1
<License Details>
****************************************************************************

*** Checking License against App: Company_Customer-BaseApp_21.4.25907.0.app
##[error]NULL kann aufgrund von ungültigen Enumerationswerten nicht in den Typ "Microsoft.Dynamics.Nav.Types.PermissionMask" konvertiert werden. Geben Sie einen der folgenden Enumerationswerte an, und versuchen Sie es erneut. Mögliche Enumerationswerte sind "None;Read;Insert;Modify;Delete;Execute;MaxDirect;IndirectRead;IndirectInsert;IndirectModify;IndirectDelete;ReadDeleteInsertModify;IndirectExecute;Max;HasExpDate;IncludedLimitedUsage;ExcludedLimitedUsage;IgnoreWildcard".
2023-02-21T20:49:20.9417745Z ##[section]Finishing: ALOpsAppLicenseCheck
waldo1001 commented 1 year ago

We weren't able to decently test this, I'm afraid - but we have a suspicion we fixed this in the next release..

pri-kise commented 1 year ago

is there any ETA for this release?

marcelvos1 commented 1 year ago

Hi @waldo1001 , do you have an ETA for this release? Thanks for your reply.

waldo1001 commented 1 year ago

This is fixed - but we need to fix other issues before we can release.
We try to release today!

marcelvos1 commented 1 year ago

Thanks @waldo1001 !

waldo1001 commented 1 year ago

The release is still being verified :( image

AdminHodor commented 1 year ago

Dear @DanielGoehler,

Please try our latest release v1.455.3559 which should solve this issue.

Kind regards,

DanielGoehler commented 1 year ago

@AdminHodor It works now, thanks.