microsoft / AL-Go

The plug-and-play DevOps solution for Business Central app development on GitHub
MIT License
293 stars 124 forks source link

Error when creating local dev environment #981

Closed FrankAuwers closed 7 months ago

FrankAuwers commented 8 months ago
  _                     _   _____             ______
 | |                   | | |  __ \           |  ____|
 | |     ___   ___ __ _| | | |  | | _____   __ |__   _ ____   __
 | |    / _ \ / __/ _` | | | |  | |/ _ \ \ / /  __| | '_ \ \ / /
 | |____ (_) | (__ (_| | | | |__| |  __/\ V /| |____| | | \ V /
 |______\___/ \___\__,_|_| |_____/ \___| \_/ |______|_| |_|\_/

Downloading GitHub Helper module from https://raw.githubusercontent.com/microsoft/AL-Go-Actions/v4.1/Github-Helper.psm1
Downloading AL-Go Helper script from https://raw.githubusercontent.com/microsoft/AL-Go-Actions/v4.1/AL-Go-Helper.ps1

This script will create a docker based local development environment for your project.

NOTE: You need to have Docker installed, configured and be able to create Business Central containers for this to work.
If this fails, you can setup a cloud based development environment by running cloudDevEnv.ps1

All apps and test apps will be compiled and published to the environment in the development scope.
The script will also modify launch.json to have a Local Sandbox configuration point to your environment.

Applying settings from D:\Scapta\Scaptify\.github\AL-Go-Settings.json
Applying settings from D:\Scapta\Scaptify\.AL-Go\settings.json
No settings found in D:\Scapta\Scaptify\.github\localDevEnv.settings.json
No settings found in D:\Scapta\Scaptify\.AL-Go\localDevEnv.settings.json
No settings found in D:\Scapta\Scaptify\.AL-Go\FrankAuwers.settings.json
Checking System Requirements

Container name
--------------
Please enter the name of the container to create (default bcserver) scaptify
scaptify selected

Authentication mechanism for container
--------------------------------------
a Windows Authentication
b Username/Password authentication

Select authentication mechanism for container (default b) 
Username/Password authentication selected

LicenseFileUrl
--------------
When developing AppSource Apps, your local development environment needs the developer licensefile with permissions to your AppSource app object IDs

Local path or a secure download URL to license file  "https://xpr365fileshare.file.core.windows.net/bclic/4941796.bclicense?sp=r&st=2023-04-14T07:48:53Z&se=2029-12-31T23:00:00Z&spr=https&sv=2021-12-02&sig=Dv8F9GNGpQsBof%2F0qbLL%2F8Y9sA2yt4cIkrL5E02%2F4MQ%3D&sr=f"                                  https://xpr365fileshare.file.core.windows.net/bclic/4941796.bclicense?sp=r&st=2023-04-14T07:48:53Z&se=2029-12-31T23:00:00Z&spr=https&sv=2021-12-02&sig=Dv8F9GNGpQsBof%2F0qbLL%2F8Y9sA2yt4cIkrL5E02%2F4MQ%3D&sr=f selected                                                                                                                                                                                                                                                                                                                                                                                         Using BcContainerHelper preview version                                                                                                                                                                                                                                                                  
Downloading BcContainerHelper preview version from Blob Storage                                                                                                                                                                                                                                          Using 7zip                                                                                                                                                                                                                                                                                               Import from C:\ProgramData\BcContainerHelper\6.0.9-preview1163\BcContainerHelper\BcContainerHelper.ps1                                                                                                                                                                                                   BcContainerHelper version 6.0.9-preview1163                                                                                                                                                                                                                                                              BC.HelperFunctions emits usage statistics telemetry to Microsoft                                                                                                                                                                                                                                         Running on Windows, PowerShell 5.1.22621.2506                                                                                                                                                                                                                                                            
Applying settings from D:\Scapta\Scaptify\.github\AL-Go-Settings.json
Applying settings from D:\Scapta\Scaptify\.AL-Go\settings.json                                                                                                                                                                                                                                           No settings found in D:\Scapta\Scaptify\.github\localDevEnv.settings.json                                                                                                                                                                                                                                No settings found in D:\Scapta\Scaptify\.AL-Go\localDevEnv.settings.json                                                                                                                                                                                                                                 No settings found in D:\Scapta\Scaptify\.AL-Go\FrankAuwers.settings.json                                                                                                                                                                                                                                 
Not using Azure KeyVault, attempting to retrieve an auth token using gh auth token                                                                                                                                                                                                                       Checking type                                                                                                                                                                                                                                                                                            Checking appFolders, testFolders and bcptTestFolders                                                                                                                                                                                                                                                     Application Dependency 23.0.0.0                                                                                                                                                                                                                                                                          
Checking artifact setting for project
Downloading artifacts from https://bcartifacts.azureedge.net/sandbox/23.5.16502.17350/base
Downloading artifact /sandbox/23.5.16502.17350/base
Downloading C:\Users\FrankAuwers\AppData\Local\Temp\d57acb07-5dd1-41fb-8763-fae49c4ea139.zip
Downloading using WebClient
Unpacking artifact to tmp folder using 7zip
Downloading platform artifact /sandbox/23.5.16502.17350/platform
Downloading C:\Users\FrankAuwers\AppData\Local\Temp\058f135e-7083-47c5-b610-9812215fb0c3.zip
Downloading using WebClient
Unpacking artifact to tmp folder using 7zip
Downloading Prerequisite Components
Downloading c:\bcartifacts.cache\sandbox\23.5.16502.17350\platform\Prerequisite Components\IIS URL Rewrite Module\rewrite_2.0_rtw_x64.msi
Downloading using WebClient
Downloading c:\bcartifacts.cache\sandbox\23.5.16502.17350\platform\Prerequisite Components\DotNetCore\DotNetCore.1.0.4_1.1.1-WindowsHosting.exe
Downloading using WebClient
Updating app- and test Dependencies
Analyzing Test App Dependencies
No performance test apps found in bcptTestFolders in .AL-Go\settings.json
WARNING: No test apps found in testFolders in .AL-Go\settings.json
Checking appDependencyProbingPaths
Dependency to projects '*' in https://github.com/scapta/xpr365-Library@main, version latest, release status release
Using secret GhTokenWorkflow for access to repository
Downloading dependencies ...
Locating Apps artifacts for projects: *
Analyzing releases https://api.github.com/repos/scapta/xpr365-Library/releases
Downloading release 23.1, projects *, type Apps
project '*'
AssetPatterns: '*-*-Apps-*.zip' | '*-Apps-*.zip'
https://api.github.com/repos/scapta/xpr365-Library/releases/assets/151689897
Locating Dependencies artifacts for projects: *
Analyzing releases https://api.github.com/repos/scapta/xpr365-Library/releases
Downloading release 23.1, projects *, type Dependencies
project '*'
AssetPatterns: '*-*-Dependencies-*.zip' | '*-Dependencies-*.zip'
Locating TestApps artifacts for projects: *
Analyzing releases https://api.github.com/repos/scapta/xpr365-Library/releases
Downloading release 23.1, projects *, type TestApps
project '*'
AssetPatterns: '*-*-TestApps-*.zip' | '*-TestApps-*.zip'
https://api.github.com/repos/scapta/xpr365-Library/releases/assets/151689898
  _____                               _
 |  __ \                             | |
 | |__) |_ _ _ __ __ _ _ __ ___   ___| |_ ___ _ __ ___
 |  ___/ _` | '__/ _` | '_ ` _ \ / _ \ __/ _ \ '__/ __|
 | |  | (_| | | | (_| | | | | | |  __/ |_  __/ |  \__ \
 |_|   \__,_|_|  \__,_|_| |_| |_|\___|\__\___|_|  |___/

Pipeline name                   localDevEnv
Container name                  scaptify
Image name
ArtifactUrl                     https://bcartifacts.azureedge.net/sandbox/23.5.16502.17350/base
SasToken                        Not Specified
BcAuthContext                   Not Specified
Environment
ReUseContainer                  False
KeepContainer                   True
useCompilerFolder               False
artifactCachePath
useDevEndpoint                  True
Auth                            UserPassword
CompanyName
MemoryLimit                     8G
FailOn                          error
TreatTestFailuresAsWarnings     False
Enable Task Scheduler           False
Assign Premium Plan             False
Install Test Runner             False
Install Test Framework          False
Install Test Libraries          False
Install Perf. Toolkit           False
InstallOnlyReferencedApps       True
generateDependencyArtifact      False
CopySymbolsFromContainer        False
enableCodeCop                   False
enableAppSourceCop              True
enableUICop                     False
enablePerTenantExtensionCop     False
enableCodeAnalyzersOnTestApps   False
doNotPerformUpgrade             False
doNotPublishApps                False
uninstallRemovedApps            False
escapeFromCops                  False
doNotBuildTests                 False
doNotRunTests                   True
doNotRunBcptTests               True
useDefaultAppSourceRuleSet      False
rulesetFile
generateErrorLog                False
enableExternalRulesets          False
azureDevOps                     False
gitLab                          False
gitHubActions                   False
vsixFile
License file                    Specified
CodeSignCertPfxFile             Not specified
CodeSignCertPfxPassword         Not specified
CodeSignCertIsSelfSigned        False
KeyVaultCertPfxFile             Not specified
KeyVaultCertPfxPassword         Not specified
KeyVaultClientId
BuildOutputFile
ContainerEventLogFile
TestResultsFile                 D:\Scapta\Scaptify\TestResults.xml
BcptTestResultsFile             D:\Scapta\Scaptify\bcptTestResults.json
TestResultsFormat               JUnit
AdditionalCountries
PackagesFolder                  .packages
OutputFolder
BuildArtifactFolder
CreateRuntimePackages           False
AppVersion
AppBuild                        20240313
AppRevision                     224241
SourceRepositoryUrl
SourceCommit
BuildBy                         BcContainerHelper,6.0.9-preview1163
BuildUrl
Mandatory Affixes               Shopify
Supported Countries
ObsoleteTagMinAllowedMajorMinor
Install Apps
- D:\Scapta\Scaptify\.dependencies\XPR365-Library-main-Apps-23.1.20240215.105656.zip
Install Test Apps
- (D:\Scapta\Scaptify\.dependencies\XPR365-Library-main-TestApps-23.1.20240215.105656.zip)
Previous Apps
- None
Application folders
- D:\Scapta\Scaptify\Scaptify
Test application folders
- None
BCPT Test application folders
- None
BCPT Test suites
- None
Custom CodeCops
- None

  _____       _ _ _                                          _        _
 |  __ \     | | (_)                                        (_)      (_)
 | |__) |   _| | |_ _ __   __ _    __ _  ___ _ __   ___ _ __ _  ___   _ _ __ ___   __ _  __ _  ___
 |  ___/ | | | | | | '_ \ / _` |  / _` |/ _ \ '_ \ / _ \ '__| |/ __| | | '_ ` _ \ / _` |/ _` |/ _ \
 | |   | |_| | | | | | | | (_| | | (_| |  __/ | | |  __/ |  | | (__  | | | | | | | (_| | (_| |  __/
 |_|    \__,_|_|_|_|_| |_|\__, |  \__, |\___|_| |_|\___|_|  |_|\___| |_|_| |_| |_|\__,_|\__, |\___|
                           __/ |   __/ |                                                 __/ |
                          |___/   |___/                                                 |___/

Pulling mcr.microsoft.com/businesscentral:ltsc2022-dev

Pulling generic image took 585 seconds

   _____                _   _                               _        _
  / ____|              | | (_)                             | |      (_)
 | |     _ __ ___  __ _| |_ _ _ __   __ _    ___ ___  _ __ | |_ __ _ _ _ __   ___ _ __
 | |    | '__/ _ \/ _` | __| | '_ \ / _` |  / __/ _ \| '_ \| __/ _` | | '_ \ / _ \ '__|
 | |____| | |  __/ (_| | |_| | | | | (_| | | (__ (_) | | | | |_ (_| | | | | |  __/ |
  \_____|_|  \___|\__,_|\__|_|_| |_|\__, |  \___\___/|_| |_|\__\__,_|_|_| |_|\___|_|
                                     __/ |
                                    |___/

Creaing docker container
BcContainerHelper is version 6.0.9-preview1163
BcContainerHelper is not running as administrator
UsePsSession is True
Host is Microsoft Windows 11 Pro - 10.0.22631.3296
Docker Client Version is 25.0.3
Docker Server Version is 25.0.3
Removing entries from hosts
Removing scaptify from container hosts file
Removing scaptify-* from container hosts file
Removing Desktop shortcuts
Removing C:\ProgramData\BcContainerHelper\Extensions\scaptify
Fetching all docker images
Fetching all docker volumes
Using image mcr.microsoft.com/businesscentral:ltsc2022-dev
Creating Container scaptify
Style: sandbox
Multitenant: Yes
Version: 23.5.16502.17350
Platform: 23.0.17294.0
Generic Tag: 1.0.2.17-dev
Container OS Version: 10.0.20348.2340 (ltsc2022)
Host OS Version: 10.0.22631.3296 (23H2)
Using process isolation
Using locale en-US
Disabling the standard eventlog dump to container log every 2 seconds (use -dumpEventLog to enable)
Using license file https://xpr365fileshare.file.core.windows.net/bclic/4941796.bclicense
Downloading C:\ProgramData\BcContainerHelper\Extensions\scaptify\my\license.bclicense
Downloading using WebClient
Additional Parameters:
--volume "D:\Scapta\Scaptify:c:\sources"
--volume "D:/Scapta/Scaptify:c:\shared"
--env customNavSettings=EnableTaskScheduler=False
Files in C:\ProgramData\BcContainerHelper\Extensions\scaptify\my:
- AdditionalOutput.ps1
- HelperFunctions.ps1
- license.bclicense
- MainLoop.ps1
- SetupVariables.ps1
- updatehosts.ps1
Creating container scaptify from image mcr.microsoft.com/businesscentral:ltsc2022-dev
0a1bafaa6dd9e1b5a3cb277d46d0ea32d8621bbee696ffb2d11058c1d30e84e0
New-BcContainer Telemetry Correlation Id: 93f81e57-dd77-493a-bdda-74bfd56535f3
Run-AlPipeline Telemetry Correlation Id: 3a91690f-b649-4cb0-a6fa-4308a370cc88
**_Error: docker: Error response from daemon: hcs::CreateComputeSystem 0a1bafaa6dd9e1b5a3cb277d46d0ea32d8621bbee696ffb2d11058c1d30e84e0: The file system minifilter cannot attach to the developer volume.
ExitCode: 125
Commandline: docker run --volume "c:\bcartifacts.cache:c:\dl" --label nav= --env isBcSandbox=Y --label version=23.5.16502.17350 --label platform=23.0.17294.0 --label country=W1 --env artifactUrl=https://bcartifacts.azureedge.net/sandbox/23.5.16502.17350/base --env multitenant=Y --env licenseFile="c:\run\my\license.bclicense" --name scaptify --hostname scaptify --env auth=NavUserPassword --env username="admin" --env ExitOnError=N --env locale=en-US --env databaseServer="" --env databaseInstance="" --volume "C:\ProgramData\BcContainerHelper:C:\ProgramData\BcContainerHelper" --volume "C:\ProgramData\BcContainerHelper\Extensions\scaptify\my:C:\Run\my" --isolation process --restart unless-stopped --env filesOnly=False --memory 8G --env enableApiServices=Y --env useSSL=N --volume "c:\windows\system32\drivers\etc:C:\driversetc" --env securePassword=76492d1116743f0423413b16050a5345MgB8AEQATABHADMAVQByAGMATABuAFMAaQBOAEYAdQBiAHAAVABBAGIARABrAHcAPQA9AHwANgA2AGQAMAA2AGQAYQA3AGMAZAAxADEAYQA2AGMAOQA5ADUANAAzADQAZgAyAGIANgA2AGMAMQAyADgANQAwAA== --env passwordKeyFile="c:\run\my\aes.key" --env removePasswordKeyFile=Y --volume "D:\Scapta\Scaptify:c:\sources" --volume "D:/Scapta/Scaptify:c:\shared" --env customNavSettings=EnableTaskScheduler=False --env accept_eula=Y --env accept_outdated=Y --detach mcr.microsoft.com/businesscentral:ltsc2022-dev
Stacktrace: at DockerDo, C:\ProgramData\BcContainerHelper\6.0.9-preview1163\BcContainerHelper\HelperFunctions.ps1: line 272
at New-BcContainer, C:\ProgramData\BcContainerHelper\6.0.9-preview1163\BcContainerHelper\ContainerHandling\New-NavContainer.ps1: line 1970
at <ScriptBlock>, C:\ProgramData\BcContainerHelper\6.0.9-preview1163\BcContainerHelper\AppHandling\Run-AlPipeline.ps1: line 803
at <ScriptBlock>, C:\ProgramData\BcContainerHelper\6.0.9-preview1163\BcContainerHelper\AppHandling\Run-AlPipeline.ps1: line 1041
at <ScriptBlock>, C:\ProgramData\BcContainerHelper\6.0.9-preview1163\BcContainerHelper\AppHandling\Run-AlPipeline.ps1: line 970
at <ScriptBlock>, C:\ProgramData\BcContainerHelper\6.0.9-preview1163\BcContainerHelper\AppHandling\Run-AlPipeline.ps1: line 952
at Run-AlPipeline, C:\ProgramData\BcContainerHelper\6.0.9-preview1163\BcContainerHelper\AppHandling\Run-AlPipeline.ps1: line 914
at CreateDevEnv, C:\Users\FrankAuwers\AppData\Local\Temp\tmp16D6.tmp.ps1: line 1894
at <ScriptBlock>, D:\Scapta\Scaptify\.AL-Go\localDevEnv.ps1: line 128
at <ScriptBlock>, <No file>: line 1_**
FrankAuwers commented 8 months ago

Docker uninstalled and reinstalled. Still the same problem.

Creating a containter with New-BcContainter in powershell works still.

freddydk commented 8 months ago

If you try to add -additionalParameters @('--volume "D:\Scapta:c:\scapta"') to your working New-BcContainer then you can see whether you can attached a volume from D to a container. I am assuming that this isn't possible Is D a network drive?

FrankAuwers commented 8 months ago

Hi Freddy,

The D drive is a local dev drive. Do you know if we can't use this in combination with docker?

image

freddydk commented 8 months ago

See https://github.com/docker/for-win/issues/13719