HodorNV / ALOps

ALOps
59 stars 24 forks source link

Access to the path 'E:\BcContainerHelper\bcartifacts.cache\onprem\18.2.26217.26490\VSIX-Temp' is denied #400

Closed CarloAxians closed 3 years ago

CarloAxians commented 3 years ago

Describe the bug Sometimes our build fails with the error Access to the path 'E:\BcContainerHelper\bcartifacts.cache\onprem\18.2.26217.26490\VSIX-Temp' is denied When we rename the directory on the server to VSIX and rerun the build it runs fine again.

When this error occurs all other builds also fail with a different error: Windows PowerShell is in NonInteractive mode. Read and Prompt functionality is not available.

the used yaml

- task: ALOpsAppCompiler@2
  displayName: 'Compile i-Suite Extension'
  inputs:
    artifacttype: ${{parameters.docker_artifacttype}}
    artifactversion: ${{parameters.docker_artifactversion}}
    artifactcountry: ${{parameters.docker_artifactcountry}}
    alsourcepath: 'base/'
    appversiontemplate: '?.?.[yyyyMMdd].*'
    appfilenametemplate: '%APP_PUBLISHER%_%APP_NAME%_%APP_VERSION%_APP.app'
    failonwarnings: ${{parameters.compile_failonwarnings}}
    showmycode: ${{parameters.compile_showmycode}}
    publishartifact: false

the output

2021-07-19T15:29:47.1801036Z *** Platform: e:\BcContainerHelper\bcartifacts.cache\onprem\18.2.26217.26490\platform
2021-07-19T15:29:47.1867936Z *** Localisation: e:\BcContainerHelper\bcartifacts.cache\onprem\18.2.26217.26490\w1
2021-07-19T15:29:47.2196636Z *** VSIX Path: E:\BcContainerHelper\bcartifacts.cache\onprem\18.2.26217.26490\platform\ModernDev\program files\Microsoft Dynamics NAV\180\AL Development Environment\ALLanguage.vsix
2021-07-19T15:29:47.2410848Z   * Extracting VSIX to temporary path [e:\BcContainerHelper\bcartifacts.cache\onprem\18.2.26217.26490\VSIX-Temp]
2021-07-19T15:29:58.1297382Z   * Rename temporary VSIX Path [e:\BcContainerHelper\bcartifacts.cache\onprem\18.2.26217.26490\VSIX-Temp] => [e:\BcContainerHelper\bcartifacts.cache\onprem\18.2.26217.26490\VSIX]
2021-07-19T15:29:58.4186800Z ##[error]Toegang tot het pad E:\BcContainerHelper\bcartifacts.cache\onprem\18.2.26217.26490\VSIX-Temp is geweigerd.

Expected behavior Why does this error occur and what can we do to prevent this.

waldo1001 commented 3 years ago

Can you show the entire output so we can look into the ALOps specifics/params/version ?

CarloAxians commented 3 years ago

Hi @waldo1001,

This is the logging of the last one that failed:


2021-07-23T02:52:46.3578625Z ==============================================================================
2021-07-23T02:52:46.3579128Z Task         : ALOps App Compiler
2021-07-23T02:52:46.3579526Z Description  : Compile AL Extension(s) for Business Central
2021-07-23T02:52:46.3579893Z Version      : 2.0.2571
2021-07-23T02:52:46.3580175Z Author       : Hodor
2021-07-23T02:52:46.3580576Z Help         : Compile Business Central extension(s) from AL code.
2021-07-23T02:52:46.3581048Z ==============================================================================
2021-07-23T02:52:49.2759223Z ******************************************************************************
2021-07-23T02:52:49.2764415Z *** ALOps v2 - Preview                                                     ***
2021-07-23T02:52:49.2771523Z ******************************************************************************
2021-07-23T02:52:49.2778041Z *** Importing required ALOps-Functions
2021-07-23T02:52:50.1577087Z *** Task Inputs:
2021-07-23T02:52:50.1643919Z 
2021-07-23T02:52:50.1788775Z name                   value                                           
2021-07-23T02:52:50.1791278Z ----                   -----                                           
2021-07-23T02:52:50.1795571Z artifactversion        18                                              
2021-07-23T02:52:50.1799551Z artifacttype           OnPrem                                          
2021-07-23T02:52:50.1803913Z artifactcountry        w1                                              
2021-07-23T02:52:50.1808501Z versionselect          Latest                                          
2021-07-23T02:52:50.1812779Z alternativevsixurl                                                     
2021-07-23T02:52:50.1817445Z alsourcepath           base/                                           
2021-07-23T02:52:50.1821665Z ruleset                                                                
2021-07-23T02:52:50.1826141Z appversiontemplate     ?.?.[yyyyMMdd].*                                
2021-07-23T02:52:50.1832700Z updatebuildnumber      True                                            
2021-07-23T02:52:50.1836432Z appfilenametemplate    %APP_PUBLISHER%_%APP_NAME%_%APP_VERSION%_APP.app
2021-07-23T02:52:50.1841059Z alcodeanalyzer                                                         
2021-07-23T02:52:50.1845466Z showmycode             Keep                                            
2021-07-23T02:52:50.1849993Z applicationinsightskey                                                 
2021-07-23T02:52:50.1854544Z alcachepath            E:\Agent\_work\2\s                              
2021-07-23T02:52:50.1859174Z publishartifact        False                                           
2021-07-23T02:52:50.1863495Z publishxlif            False                                           
2021-07-23T02:52:50.1867907Z failonwarnings         False                                           
2021-07-23T02:52:50.1872101Z storageaccount                                                         
2021-07-23T02:52:50.1876523Z sastoken                                                               
2021-07-23T02:52:50.1880253Z printappmanifest       True                                            
2021-07-23T02:52:50.1882643Z outputalclogs          True                                            
2021-07-23T02:52:50.1884731Z additionalprobingpaths                                                 
2021-07-23T02:52:50.1885505Z 
2021-07-23T02:52:50.1916244Z 
2021-07-23T02:52:50.1925880Z 
2021-07-23T02:52:50.2138746Z *** For documentation, please visit   : https://www.alops.be/documentation
2021-07-23T02:52:50.2140417Z 
2021-07-23T02:52:50.4949221Z *** ALOps License:
2021-07-23T02:52:50.4974999Z   * Licensed To: Axians Business Solutions (RepositoryPer5 License)
2021-07-23T02:52:50.4978497Z 
2021-07-23T02:52:50.7837024Z *** Importing required Task-Functions
2021-07-23T02:52:54.1910057Z 
2021-07-23T02:52:54.2117731Z *** Artifact Type   : [OnPrem]
2021-07-23T02:52:54.2129956Z *** Artifact Version: [18]
2021-07-23T02:52:54.2147864Z *** Artifact Country: [w1]
2021-07-23T02:52:54.2166153Z *** AL Source Path  : [base/]
2021-07-23T02:52:54.2185067Z *** AL Cache Path   : [E:\Agent\_work\2\s]
2021-07-23T02:52:54.2197054Z 
2021-07-23T02:52:54.2229288Z 
2021-07-23T02:52:54.2480287Z *** Default Working Folder: E:\Agent\_work\2\s
2021-07-23T02:52:54.2487298Z *** Artifact Folder       : E:\Agent\_work\2\a
2021-07-23T02:52:54.2495130Z *** Agent Tool Folder     : E:\Agent\_work\_tool
2021-07-23T02:52:54.2504375Z *** Agent Temp Folder     : E:\Agent\_work\_temp
2021-07-23T02:52:54.2509176Z 
2021-07-23T02:52:54.2566610Z *** Resolving Path: [base/]
2021-07-23T02:52:54.2644824Z *** Resolved Path : [E:\Agent\_work\2\s\base\]
2021-07-23T02:52:54.2653930Z *** AL Source Folder      : E:\Agent\_work\2\s\base\
2021-07-23T02:52:54.2663859Z *** Resolving Path: [E:\Agent\_work\2\s]
2021-07-23T02:52:54.2677302Z *** AL Cache Folder       : E:\Agent\_work\2\s
2021-07-23T02:52:54.2680603Z 
2021-07-23T02:52:54.2701167Z *** Check BcContainerHelper
2021-07-23T02:52:54.3657464Z *** Load BcContainerHelper
2021-07-23T02:52:54.5023292Z Setting bcartifactsCacheFolder = e:\BcContainerHelper\bcartifacts.cache
2021-07-23T02:52:54.7714160Z BcContainerHelper version 2.0.14
2021-07-23T02:52:58.8886558Z 
2021-07-23T02:52:58.8891985Z 
2021-07-23T02:52:58.8969047Z ##[command]"Get-BCArtifactUrl" 
2021-07-23T02:52:58.8970065Z Name                           Value                                                                                   
2021-07-23T02:52:58.8971413Z ----                           -----                                                                                   
2021-07-23T02:52:58.8972481Z select                         Latest                                                                                  
2021-07-23T02:52:58.8973547Z version                        18                                                                                      
2021-07-23T02:52:58.8974627Z type                           OnPrem                                                                                  
2021-07-23T02:52:58.8975677Z country                        w1                                                                                      
2021-07-23T02:52:58.8976216Z 
2021-07-23T02:52:58.8976443Z 
2021-07-23T02:52:58.8977059Z  -select: Latest -version: 18 -type: OnPrem -country: w1
2021-07-23T02:52:59.2704246Z Downloading application artifact /onprem/18.3.27240.27480/w1
2021-07-23T02:52:59.2875990Z Downloading C:\Users\cmertens\AppData\Local\Temp\076b0c7c-3db3-4572-96b7-caa7e96ee18c.zip
2021-07-23T02:53:01.9230287Z Unpacking application artifact to tmp folder using Expand-Archive
2021-07-23T02:53:05.9383340Z Downloading platform artifact /onprem/18.3.27240.27480/platform
2021-07-23T02:53:05.9406578Z Downloading C:\Users\cmertens\AppData\Local\Temp\73aba65a-77d9-436e-8e28-2100955f421e.zip
2021-07-23T02:53:18.7203671Z Unpacking platform artifact to tmp folder using Expand-Archive
2021-07-23T02:54:49.9031147Z Downloading Prerequisite Components
2021-07-23T02:54:49.9299100Z Downloading e:\BcContainerHelper\bcartifacts.cache\onprem\18.3.27240.27480\platform\Prerequisite Components\DotNetCore\DotNetCore.1.0.4_1.1.1-WindowsHosting.exe
2021-07-23T02:54:51.7174909Z Downloading e:\BcContainerHelper\bcartifacts.cache\onprem\18.3.27240.27480\platform\Prerequisite Components\Open XML SDK 2.5 for Microsoft Office\OpenXMLSDKv25.msi
2021-07-23T02:54:51.7820037Z Downloading e:\BcContainerHelper\bcartifacts.cache\onprem\18.3.27240.27480\platform\Prerequisite Components\IIS URL Rewrite Module\rewrite_2.0_rtw_x64.msi
2021-07-23T02:54:52.1940994Z *** Platform: e:\BcContainerHelper\bcartifacts.cache\onprem\18.3.27240.27480\platform
2021-07-23T02:54:52.2030088Z *** Localisation: e:\BcContainerHelper\bcartifacts.cache\onprem\18.3.27240.27480\w1
2021-07-23T02:54:52.2512579Z *** BC Management DLL: E:\BcContainerHelper\bcartifacts.cache\onprem\18.3.27240.27480\platform\ServiceTier\program files\Microsoft Dynamics NAV\180\Service\Microsoft.Dynamics.Nav.Management.dll
2021-07-23T02:54:52.4698653Z *** BC App Management DLL: E:\BcContainerHelper\bcartifacts.cache\onprem\18.3.27240.27480\platform\ServiceTier\program files\Microsoft Dynamics NAV\180\Service\Microsoft.Dynamics.Nav.Apps.Management.dll
2021-07-23T02:54:52.6601504Z *** Get [*.app] and [app.json] files recursive from [E:\Agent\_work\2\s\base\]
2021-07-23T02:54:52.7914750Z *** Found [6] files.
2021-07-23T02:54:52.7926226Z *** Extract App detail from [E:\Agent\_work\2\s\base\.previous\Axians Business Solutions_I-Suite_5.4.20210625.1809_APP.app]
2021-07-23T02:54:53.5041039Z *** Extract App detail from [E:\Agent\_work\2\s\base\.previous\Microsoft_Application_18.2.26217.26490.app]
2021-07-23T02:54:53.5285452Z *** Extract App detail from [E:\Agent\_work\2\s\base\.previous\Microsoft_Base Application_18.2.26217.26490.app]
2021-07-23T02:54:53.8262620Z *** Extract App detail from [E:\Agent\_work\2\s\base\.previous\Microsoft_System Application_18.2.26217.26490.app]
2021-07-23T02:54:53.8462426Z *** Extract App detail from [E:\Agent\_work\2\s\base\.previous\Microsoft_System_18.0.26213.26464.app]
2021-07-23T02:54:53.8749056Z *** Extract App detail from [E:\Agent\_work\2\s\base\app.json]
2021-07-23T02:54:53.9598955Z *** Starting Batch compile of Apps:
2021-07-23T02:54:53.9640926Z   * E:\Agent\_work\2\s\base
2021-07-23T02:54:53.9655071Z *** Start Compiling: [E:\Agent\_work\2\s\base]
2021-07-23T02:54:54.0370814Z *** Get App Information
2021-07-23T02:54:54.0416702Z *** Loading Json Object: [E:\Agent\_work\2\s\base\app.json]
2021-07-23T02:54:54.0463127Z   * Id         : 624f7a07-33aa-4739-aa76-41b7502c4d04
2021-07-23T02:54:54.0473069Z   * Publisher  : Axians Business Solutions
2021-07-23T02:54:54.0482933Z   * Name       : I-Suite
2021-07-23T02:54:54.0493437Z   * Description: I-Suite is een oplossing voor de Maak industrie en voor de AGF (aardappelen, groenten en fruit)
2021-07-23T02:54:54.0674452Z *** Match: yyyyMMdd
2021-07-23T02:54:54.0770677Z *** Retaining original [Major] from version (?.0.0.0)
2021-07-23T02:54:54.0806835Z *** Retaining original [Minor] from version (0.?.0.0)
2021-07-23T02:54:54.0832449Z *** Setting Managed App Version [E:\Agent\_work\2\s\base\app.json] =>  5.5.20210723.2167
2021-07-23T02:54:54.0993016Z *** VSCode Settings: [E:\Agent\_work\2\s\base\.vscode\settings.json]
2021-07-23T02:54:54.1008886Z *** VSCode-Settings json found.
2021-07-23T02:54:54.1021338Z *** Loading Json Object: [E:\Agent\_work\2\s\base\.vscode\settings.json]
2021-07-23T02:54:54.1199022Z *** Get CodeAnalyzers from VSCode Settings
2021-07-23T02:54:54.1276517Z *** Set CodeAnalyzers: CodeCop,UICop,AppSourceCop
2021-07-23T02:54:54.1352877Z *** Using Ruleset: [E:\Agent\_work\2\s\.codeAnalysis\I-Suite.ruleset.json]
2021-07-23T02:54:54.1464103Z ##[command]"Get-BCArtifactUrl" 
2021-07-23T02:54:54.1465573Z Name                           Value                                                                                   
2021-07-23T02:54:54.1467372Z ----                           -----                                                                                   
2021-07-23T02:54:54.1470981Z select                         Latest                                                                                  
2021-07-23T02:54:54.1474872Z version                        18                                                                                      
2021-07-23T02:54:54.1477087Z type                           OnPrem                                                                                  
2021-07-23T02:54:54.1478956Z country                        w1                                                                                      
2021-07-23T02:54:54.1480647Z 
2021-07-23T02:54:54.1480948Z 
2021-07-23T02:54:54.1481226Z 
2021-07-23T02:54:54.3155328Z *** Platform: e:\BcContainerHelper\bcartifacts.cache\onprem\18.3.27240.27480\platform
2021-07-23T02:54:54.3253501Z *** Localisation: e:\BcContainerHelper\bcartifacts.cache\onprem\18.3.27240.27480\w1
2021-07-23T02:54:54.3599028Z *** VSIX Path: E:\BcContainerHelper\bcartifacts.cache\onprem\18.3.27240.27480\platform\ModernDev\program files\Microsoft Dynamics NAV\180\AL Development Environment\ALLanguage.vsix
2021-07-23T02:54:54.4361277Z   * Extracting VSIX to temporary path [e:\BcContainerHelper\bcartifacts.cache\onprem\18.3.27240.27480\VSIX-Temp]
2021-07-23T02:55:06.0045417Z   * Rename temporary VSIX Path [e:\BcContainerHelper\bcartifacts.cache\onprem\18.3.27240.27480\VSIX-Temp] => [e:\BcContainerHelper\bcartifacts.cache\onprem\18.3.27240.27480\VSIX]
2021-07-23T02:55:06.3468044Z ##[error]Toegang tot het pad E:\BcContainerHelper\bcartifacts.cache\onprem\18.3.27240.27480\VSIX-Temp is geweigerd.
2021-07-23T02:55:06.4139867Z ##[section]Finishing: Compile i-Suite Extension`
waldo1001 commented 3 years ago

We have an idea on what it could be - it's could be a PowerShell/MovingFiles issue (when files are locked).

We'll look into it - we have no repro, so it's a bit "flying blind" ..

waldo1001 commented 3 years ago

We added a change for this - will be part of next release. But - still flying blind, so hope it'll solve your issue ;-).

AdminHodor commented 3 years ago

Dear @CarloAxians ,

Please tryout our latest release v1.445.

Kind regards

CarloAxians commented 3 years ago

Issue did not occur anymore