HodorNV / ALOps

ALOps
55 stars 24 forks source link

Cannot bind argument to parameter 'Name' because it is null. #726

Closed Arthurvdv closed 3 months ago

Arthurvdv commented 4 months ago

Describe the bug The ALOpsAppCompiler@2 is failing on the Next Major artifact.

##[error]Cannot bind argument to parameter 'Name' because it is null.

2024-02-23T10:06:51.8126445Z ##[section]Starting: Compile Extension
2024-02-23T10:06:51.8198095Z ==============================================================================
2024-02-23T10:06:51.8198201Z Task         : ALOps App Compiler
2024-02-23T10:06:51.8198254Z Description  : Compile AL Extension(s) for Business Central
2024-02-23T10:06:51.8198327Z Version      : 2.0.5150
2024-02-23T10:06:51.8198375Z Author       : Hodor
2024-02-23T10:06:51.8198432Z Help         : Compile Business Central extension(s) from AL code.
2024-02-23T10:06:51.8198507Z ==============================================================================
2024-02-23T10:06:52.3600624Z ******************************************************************************
2024-02-23T10:06:52.3622468Z *** ALOps v2 - Preview                                                     ***
2024-02-23T10:06:52.3638842Z ******************************************************************************
2024-02-23T10:06:52.3815591Z *** Importing required ALOps-Functions
2024-02-23T10:06:52.4663313Z *** Task Inputs:
2024-02-23T10:06:52.4705848Z 
2024-02-23T10:06:52.4850458Z name                                             value                                                                 
2024-02-23T10:06:52.4853962Z ----                                             -----                                                                 
2024-02-23T10:06:52.4857311Z artifactversion                                                                                                        
2024-02-23T10:06:52.4859878Z artifacttype                                     Sandbox                                                               
2024-02-23T10:06:52.4862501Z artifactcountry                                  base                                                                  
2024-02-23T10:06:52.4866177Z versionselect                                    nextmajor                                                             
2024-02-23T10:06:52.4869118Z alternativeartifacturl                                                                                                 
2024-02-23T10:06:52.4872057Z alternativevsixurl                                                                                                     
2024-02-23T10:06:52.4875052Z alsourcepath                                     C:\vsts-agent-alops-warp10\_work\2331\s\App                           
2024-02-23T10:06:52.4916083Z ruleset                                          https://vrabadevops.blob.core.windows.net/rulesets/prep.appsource.r...
2024-02-23T10:06:52.4920102Z suppresswarnings                                 None                                                                  
2024-02-23T10:06:52.4922823Z appversiontemplate                               A.A.*.0                                                               
2024-02-23T10:06:52.4925559Z updatebuildnumber                                False                                                                 
2024-02-23T10:06:52.4969156Z appfilenametemplate                              %APP_PUBLISHER%_%APP_NAME%_%APP_VERSION%_%BC_TYPE%_%BC_VERSION%_%BC...
2024-02-23T10:06:52.4972162Z alcodeanalyzer                                   CodeCop,UICop,AppSourceCop                                            
2024-02-23T10:06:52.4975697Z ignorepragmas                                                                                                          
2024-02-23T10:06:52.4979218Z enable_external_rulesets                         True                                                                  
2024-02-23T10:06:52.4983286Z showmycode                                       false                                                                 
2024-02-23T10:06:52.4987565Z resourceexposurepolicy_allowdebugging            Enable                                                                
2024-02-23T10:06:52.4991818Z resourceexposurepolicy_allowdownloadingsource    Disable                                                               
2024-02-23T10:06:52.4995830Z resourceexposurepolicy_includesourceinsymbolfile Disable                                                               
2024-02-23T10:06:52.4999729Z internalsvisibleto                               Keep                                                                  
2024-02-23T10:06:52.5003596Z preprocessorsymbols                                                                                                    
2024-02-23T10:06:52.5007487Z applicationinsightskey                                                                                                 
2024-02-23T10:06:52.5011340Z alcachepath                                      C:\vsts-agent-alops-warp10\_work\2331\s                               
2024-02-23T10:06:52.5015146Z publishartifact                                  False                                                                 
2024-02-23T10:06:52.5018967Z publishxlif                                      False                                                                 
2024-02-23T10:06:52.5022942Z failonwarnings                                   False                                                                 
2024-02-23T10:06:52.5026795Z failonany                                        False                                                                 
2024-02-23T10:06:52.5030630Z storageaccount                                                                                                         
2024-02-23T10:06:52.5034512Z sastoken                                                                                                               
2024-02-23T10:06:52.5038450Z printappmanifest                                 True                                                                  
2024-02-23T10:06:52.5042422Z outputalclogs                                    True                                                                  
2024-02-23T10:06:52.5046366Z additionalprobingpaths                                                                                                 
2024-02-23T10:06:52.5050304Z allowed_publisher_names                                                                                                
2024-02-23T10:06:52.5054203Z allowed_publisher_names_separator                ,                                                                     
2024-02-23T10:06:52.5058134Z accept_insider_eula                              True                                                                  
2024-02-23T10:06:52.5062050Z track_source_build_metadata                      True                                                                  
2024-02-23T10:06:52.5062196Z 
2024-02-23T10:06:52.5089483Z 
2024-02-23T10:06:52.5101738Z 
2024-02-23T10:06:52.5303584Z *** For documentation, please visit   : https://www.alops.be/documentation
2024-02-23T10:06:52.5308646Z 
2024-02-23T10:06:55.7499472Z *** ALOps License:
2024-02-23T10:06:55.7529690Z   * Licensed To: Van Roey (Collection License)
2024-02-23T10:06:55.7534271Z 
2024-02-23T10:06:55.7779019Z *** Importing required Task-Functions
2024-02-23T10:06:55.8476596Z 
2024-02-23T10:06:55.8663266Z *** Artifact Type   : [Sandbox]
2024-02-23T10:06:55.8680205Z *** Artifact Version: []
2024-02-23T10:06:55.8689821Z *** Artifact Country: [base]
2024-02-23T10:06:55.8699472Z *** AL Source Path  : [C:\vsts-agent-alops-warp10\_work\2331\s\App]
2024-02-23T10:06:55.8709205Z *** AL Cache Path   : [C:\vsts-agent-alops-warp10\_work\2331\s]
2024-02-23T10:06:55.8713189Z 
2024-02-23T10:06:55.8731842Z 
2024-02-23T10:06:55.8936837Z *** Default Working Folder: C:\vsts-agent-alops-warp10\_work\2331\s
2024-02-23T10:06:55.8953165Z *** Artifact Folder       : C:\vsts-agent-alops-warp10\_work\2331\a
2024-02-23T10:06:55.8962683Z *** Agent Tool Folder     : C:\vsts-agent-alops-warp10\_work\_tool
2024-02-23T10:06:55.8971610Z *** Agent Temp Folder     : C:\vsts-agent-alops-warp10\_work\_temp
2024-02-23T10:06:55.8975320Z 
2024-02-23T10:06:55.9015078Z *** Resolving Path: [C:\vsts-agent-alops-warp10\_work\2331\s\App]
2024-02-23T10:06:55.9059854Z *** AL Source Folder      : C:\vsts-agent-alops-warp10\_work\2331\s\App
2024-02-23T10:06:55.9070565Z *** Resolving Path: [C:\vsts-agent-alops-warp10\_work\2331\s]
2024-02-23T10:06:55.9083821Z *** AL Cache Folder       : C:\vsts-agent-alops-warp10\_work\2331\s
2024-02-23T10:06:55.9087380Z 
2024-02-23T10:06:55.9105525Z *** Check BcContainerHelper
2024-02-23T10:06:55.9531864Z *** Load BcContainerHelper
2024-02-23T10:06:56.0173470Z BcContainerHelper version 6.0.6
2024-02-23T10:06:56.1924332Z BC.HelperFunctions emits usage statistics telemetry to Microsoft
2024-02-23T10:06:57.9759281Z 
2024-02-23T10:06:57.9764980Z 
2024-02-23T10:06:58.0007231Z ##[command]"Get-BCArtifactUrl" 
2024-02-23T10:06:58.0007463Z Name                           Value                                                                                   
2024-02-23T10:06:58.0007888Z ----                           -----                                                                                   
2024-02-23T10:06:58.0008076Z accept_insiderEula             True                                                                                    
2024-02-23T10:06:58.0008226Z select                         nextmajor                                                                               
2024-02-23T10:06:58.0011407Z type                           Sandbox                                                                                 
2024-02-23T10:06:58.0011851Z country                        base                                                                                    
2024-02-23T10:06:58.0012084Z 
2024-02-23T10:06:58.0012171Z 
2024-02-23T10:06:58.0012396Z  -accept_insiderEula: True -select: nextmajor -type: Sandbox -country: base
2024-02-23T10:07:20.0235673Z Downloading artifact /sandbox/24.0.16534.0/base
2024-02-23T10:07:20.0607036Z Downloading C:\Windows\ServiceProfiles\NetworkService\AppData\Local\Temp\15ed2869-1762-44ae-96f7-91b503f135f1.zip
2024-02-23T10:07:20.0780123Z Downloading using WebClient
2024-02-23T10:07:32.6249112Z Unpacking artifact to tmp folder using Expand-Archive
2024-02-23T10:07:36.1002359Z Downloading platform artifact /sandbox/24.0.16534.0/platform
2024-02-23T10:07:36.1032181Z Downloading C:\Windows\ServiceProfiles\NetworkService\AppData\Local\Temp\0697c8e6-c990-4459-8c7e-f3897d49ee8b.zip
2024-02-23T10:07:36.1048513Z Downloading using WebClient
2024-02-23T10:08:34.4325860Z Unpacking artifact to tmp folder using Expand-Archive
2024-02-23T10:10:20.3316866Z *** Platform: c:\bcartifacts.cache\sandbox\24.0.16534.0\platform
2024-02-23T10:10:20.3381929Z *** Localisation: c:\bcartifacts.cache\sandbox\24.0.16534.0\base
2024-02-23T10:10:20.3963827Z *** BC Management DLL: C:\bcartifacts.cache\sandbox\24.0.16534.0\platform\ServiceTier\program files\Microsoft Dynamics NAV\240\Service\Management\Microsoft.Dynamics.Nav.Management.dll
2024-02-23T10:10:20.4737957Z *** BC App Management DLL: 
2024-02-23T10:10:20.5694141Z ##[error]Cannot bind argument to parameter 'Name' because it is null.
2024-02-23T10:10:20.5971733Z ##[section]Finishing: Compile Extension
m3koenig commented 4 months ago

Same here! :)

DanielGoehler commented 4 months ago

Same here!

acjdekorte commented 4 months ago

Something simular here

waldo1001 commented 4 months ago

We have been able to repro it.

No need to mention: Microsoft is breaking stuff, and not documenting what they are breaking, so we need to reverse engineer what causes this. MOst probably the altool, but why they broke the dll - weird. This takes time - and it wouldn't be the first time that it's just "work in progress" and one of the next vNext-versions, it would suddenly start to work again .. .

waldo1001 commented 4 months ago

You're not going to believe it.

Dlls used to be here: program files/Microsoft Dynamics NAV/240/Service Then, they moved "a few" dlls to program files/Microsoft Dynamics NAV/240/Service/Management

Now .. they renamed SOME dlls (replaced "Dynamics.Nav" to "BusinessCentral"), forgot about the namespace, and moved the compiled dlls to: program files/Microsoft Dynamics NAV/240/Service/Admin

All 3 places still exist - and we used to have versioning-issues in the past.

😱

We'll fix it - but I expect it to not work in the very near future 🙄.

Arthurvdv commented 4 months ago

We'll fix it - but I expect it to not work in the very near future 🙄.

Is my assumption right we're using these App Management dlls for retrieving the details from a (runtime) app file? I'm asking this because with the new altool (https://github.com/HodorNV/ALOps/issues/719) I believe it's possible to remove the depedency to these App Management dlls, which are indeed subject to change at the most inconvenient moments.

waldo1001 commented 4 months ago

altool only gives details of the manifest and is able to create symbol file. We need more (on some tasks).

We are looking into the altool, but we definitely needs the rest of the cmdlets as well ..

CarloAxians commented 3 months ago

Hi @waldo1001, any update on this. Is there for the time being a workaround for this, or do we need to wait for a fix?

dsaveyn commented 3 months ago

Hi @waldo1001, any update on this. Is there for the time being a workaround for this, or do we need to wait for a fix?

We are struggling with this one. Any timeline on this?

waldo1001 commented 3 months ago

We're working on it.

All of a sudden, Microsoft moved their libraries, and only made it possible to run them in PS7. DevOps doesn't "just" allow to create tasks that run in PS7.
So we have to find workarounds (there are - but it takes time to implement them in 21 steps... :( ).

We have it working for the compile-step, but since this is a MAJOR redesign and major refactor, we need to thoroughly test it.. and then apply it to all other steps.

waldo1001 commented 3 months ago

Should be fixed in latest release (v1.463) - please test thoroughly (we had to do quite some surgery to make it work)

Arthurvdv commented 3 months ago

Thank you for making this huge refactor in a relatively short period of time.

It looks promising and as a bonus we see a performance gain in the duration on the ALOpsAppCompiler@2 up to a whopping 200% 😲

acjdekorte commented 3 months ago

Thank you @waldo1001. The problem seems to be fixed.