microsoft / AL-Go

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

[Bug]: Setup local dev Environment for Contribution #824

Closed JohnnyUndercover closed 10 months ago

JohnnyUndercover commented 11 months ago

Describe the issue

I am currently having problems creating a local development environment for BCApps.

In the CompilingApps step, the script runs into the following error:


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

Using custom ruleset
Running custom pre-compilation script...

Compiling C:\Users\juga\AL\Microsoft\JohnnyUndercover\BCApps\src\System Application\App
Copying DLLs from C:\Program Files\Microsoft Dynamics NAV\240\Service to assemblyProbingPath
Removing dotnet Framework Assemblies
Using Symbols Folder: C:\Users\juga\AL\Microsoft\JohnnyUndercover\BCApps\src\System Application\App\.alPackages
Processing dependency Microsoft_System_24.0.0.0 ()
Downloading symbols: Microsoft_System_24.0.13843.0.app
Url : http://172.31.46.189:7049/BC/dev/packages?publisher=Microsoft&appName=System&versionText=24.0.0.0&tenant=default
Downloading using HttpClient
ERROR Exception calling "GetResult" with "0" argument(s): "Ein Verbindungsversuch ist fehlgeschlagen, da die Gegenstelle nach einer bestimmten Zeitspanne nicht richtig reagiert hat, oder die hergestellte Verbindung war fehlerhaft, da der verbundene Host nicht reagiert hat. (172.31.46.189:7049)"
Compile-AppInBcContainer Telemetry Correlation Id: c94feaef-cf07-42ec-ac7b-ce8e470c3f94
Run-AlPipeline Telemetry Correlation Id: ef120d3e-0d79-472d-90b5-7702d353aa0f
Error: Exception calling "GetResult" with "0" argument(s): "Ein Verbindungsversuch ist fehlgeschlagen, da die Gegenstelle nach einer bestimmten Zeitspanne nicht richtig reagiert hat, oder die hergestellte Verbindung war fehlerhaft, da der verbundene Host nicht reagiert hat. (172.31.46.189:7049)"
Ein Verbindungsversuch ist fehlgeschlagen, da die Gegenstelle nach einer bestimmten Zeitspanne nicht richtig reagiert hat, oder die hergestellte Verbindung war fehlerhaft, da der verbundene Host nicht reagiert hat. (172.31.46.189:7049)
Ein Verbindungsversuch ist fehlgeschlagen, da die Gegenstelle nach einer bestimmten Zeitspanne nicht richtig reagiert hat, oder die hergestellte Verbindung war fehlerhaft, da der verbundene Host nicht reagiert hat.
Stacktrace: at Compile-AppInBcContainer, C:\ProgramData\BcContainerHelper\6.0.1-preview1086\BcContainerHelper\AppHandling\Compile-AppInNavContainer.ps1: line 486
at <ScriptBlock>, C:\ProgramData\BcContainerHelper\6.0.1-preview1086\BcContainerHelper\AppHandling\Run-AlPipeline.ps1: line 779
at <ScriptBlock>, C:\ProgramData\BcContainerHelper\6.0.1-preview1086\BcContainerHelper\AppHandling\Run-AlPipeline.ps1: line 1900
at <ScriptBlock>, C:\ProgramData\BcContainerHelper\6.0.1-preview1086\BcContainerHelper\AppHandling\Run-AlPipeline.ps1: line 1447
at <ScriptBlock>, C:\ProgramData\BcContainerHelper\6.0.1-preview1086\BcContainerHelper\AppHandling\Run-AlPipeline.ps1: line 1440
at <ScriptBlock>, C:\ProgramData\BcContainerHelper\6.0.1-preview1086\BcContainerHelper\AppHandling\Run-AlPipeline.ps1: line 904
at Run-AlPipeline, C:\ProgramData\BcContainerHelper\6.0.1-preview1086\BcContainerHelper\AppHandling\Run-AlPipeline.ps1: line 866
at CreateDevEnv, C:\Users\juga\AppData\Local\Temp\tmp2D.tmp.ps1: line 1844
at <ScriptBlock>, C:\Users\juga\AL\Microsoft\JohnnyUndercover\BCApps\build\projects\System Application\.AL-Go\localDevEnv.ps1: line 128
at <ScriptBlock>, C:\Users\juga\AL\Microsoft\JohnnyUndercover\BCApps\build.ps1: line 38
at <ScriptBlock>, <No file>: line 1

Maybe I am doing something wrong. Or maybe it's a bug. In any case, it would be helpful if a section were added to the CONTRIBUTION.md file on how to set up a local development environment.

Expected behavior

A functioning Docker is expected that can be used for development.

Steps to reproduce

  1. Clone the Repo
  2. Start PowerShell and change the Directory to your locally cloned Repo (For example: C:\Users\juga\AL\Microsoft\JohnnyUndercover\BCApps)
  3. Run: .\build.ps1 -ALGoProject "System Application"

Additional context

Complete Output:

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

Downloading GitHub Helper module from https://raw.githubusercontent.com/microsoft/AL-Go-Actions/v4.0/Github-Helper.psm1
Downloading AL-Go Helper script from https://raw.githubusercontent.com/microsoft/AL-Go-Actions/v4.0/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 C:\Users\juga\AL\Microsoft\JohnnyUndercover\BCApps\.github\AL-Go-Settings.json
Applying settings from C:\Users\juga\AL\Microsoft\JohnnyUndercover\BCApps\build\projects\System Application\.AL-Go\settings.json
No settings found in C:\Users\juga\AL\Microsoft\JohnnyUndercover\BCApps\.github\localDevEnv.settings.json
No settings found in C:\Users\juga\AL\Microsoft\JohnnyUndercover\BCApps\build\projects\System Application\.AL-Go\localDevEnv.settings.json
No settings found in C:\Users\juga\AL\Microsoft\JohnnyUndercover\BCApps\build\projects\System Application\.AL-Go\juga.settings.json
Checking System Requirements

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

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

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

PowerShell credential request
Please enter username and password for your container
Password for user admin: *****

LicenseFileUrl
--------------
When developing PTEs, you can optionally specify a developer licensefile with permissions to object IDs of your dependant apps

Local path or a secure download URL to license file  (default none)
none selected

Using BcContainerHelper preview version
Downloading BcContainerHelper preview version from Blob Storage
Using 7zip
Import from C:\ProgramData\BcContainerHelper\6.0.1-preview1086\BcContainerHelper\BcContainerHelper.ps1
BcContainerHelper version 6.0.1-preview1086
Setting PartnerTelemetryConnectionString = InstrumentationKey=403ba4d3-ad2b-4ca1-8602-b7746de4c048;IngestionEndpoint=https://swedencentral-0.in.applicationinsights.azure.com/
Setting usePsSession = False
BC.HelperFunctions emits usage statistics telemetry to Microsoft
Running on PowerShell 7
Applying settings from C:\Users\juga\AL\Microsoft\JohnnyUndercover\BCApps\.github\AL-Go-Settings.json
Applying settings from C:\Users\juga\AL\Microsoft\JohnnyUndercover\BCApps\build\projects\System Application\.AL-Go\settings.json
No settings found in C:\Users\juga\AL\Microsoft\JohnnyUndercover\BCApps\.github\localDevEnv.settings.json
No settings found in C:\Users\juga\AL\Microsoft\JohnnyUndercover\BCApps\build\projects\System Application\.AL-Go\localDevEnv.settings.json
No settings found in C:\Users\juga\AL\Microsoft\JohnnyUndercover\BCApps\build\projects\System Application\.AL-Go\juga.settings.json
Checking type
Checking appFolders, testFolders and bcptTestFolders
Application Dependency 18.0.0.0
Checking artifact setting for project
Get-BCArtifactUrl Telemetry Correlation Id: f4bfe5ee-e707-4425-bcd5-dc4b78bc2197
Downloading artifacts from https://bcinsider.azureedge.net/sandbox/24.0.13888.0/base
Download-Artifacts Telemetry Correlation Id: 94709e6c-17ac-4e29-a454-d0c82b36c34f
Updating app- and test Dependencies
Analyzing Test App Dependencies
No performance test apps found in bcptTestFolders in .AL-Go\settings.json
Checking appDependencyProbingPaths
Press ENTER to accept the Business Central insider EULA (https://go.microsoft.com/fwlink/?linkid=2245051) or break the script to cancel:

Add override for PreCompileApp
  _____                               _
 |  __ \                             | |
 | |__) |_ _ _ __ __ _ _ __ ___   ___| |_ ___ _ __ ___
 |  ___/ _` | '__/ _` | '_ ` _ \ / _ \ __/ _ \ '__/ __|
 | |  | (_| | | | (_| | | | | | |  __/ |_  __/ |  \__ \
 |_|   \__,_|_|  \__,_|_| |_| |_|\___|\__\___|_|  |___/

Pipeline name                   localDevEnv
Container name                  bcserver
Image name
ArtifactUrl                     https://bcinsider.azureedge.net/sandbox/24.0.13888.0/base
SasToken                        Not Specified
BcAuthContext                   Not Specified
Environment
ReUseContainer                  False
KeepContainer                   True
useCompilerFolder               False
artifactCachePath
useDevEndpoint                  True
Auth                            UserPassword
Credential                      Specified
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                   True
enableAppSourceCop              True
enableUICop                     True
enablePerTenantExtensionCop     True
doNotPerformUpgrade             False
doNotPublishApps                False
uninstallRemovedApps            False
escapeFromCops                  False
doNotBuildTests                 False
doNotRunTests                   True
doNotRunBcptTests               True
useDefaultAppSourceRuleSet      False
rulesetFile                     C:\Users\juga\AL\Microsoft\JohnnyUndercover\BCApps\src\rulesets\ruleset.json
enableExternalRulesets          False
azureDevOps                     False
gitLab                          False
gitHubActions                   False
vsixFile
License file                    Not specified
CodeSignCertPfxFile             Not specified
CodeSignCertPfxPassword         Not specified
CodeSignCertIsSelfSigned        False
KeyVaultCertPfxFile             Not specified
KeyVaultCertPfxPassword         Not specified
KeyVaultClientId
BuildOutputFile
ContainerEventLogFile
TestResultsFile                 C:\Users\juga\AL\Microsoft\JohnnyUndercover\BCApps\build\projects\System Application\TestResults.xml
BcptTestResultsFile             C:\Users\juga\AL\Microsoft\JohnnyUndercover\BCApps\build\projects\System Application\bcptTestResults.json
TestResultsFormat               JUnit
AdditionalCountries
PackagesFolder                  .packages
OutputFolder
BuildArtifactFolder
CreateRuntimePackages           False
AppVersion
AppBuild                        0
AppRevision                     0
SourceRepositoryUrl
SourceCommit
BuildBy                         BcContainerHelper,6.0.1-preview1086
BuildUrl
Mandatory Affixes
Supported Countries
ObsoleteTagMinAllowedMajorMinor
Install Apps
- None
Install Test Apps
- None
Previous Apps
- None
Application folders
- C:\Users\juga\AL\Microsoft\JohnnyUndercover\BCApps\src\System Application\App
Test application folders
- None
BCPT Test application folders
- None
BCPT Test suites
- None
Custom CodeCops
- None
Custom pre-compilation script defined.
Param(
    [string] $appType,
    [ref] $compilationParams
)

$scriptPath = Join-Path $PSScriptRoot "../../../scripts/PreCompileApp.ps1" -Resolve
$projectFolder = Join-Path $PSScriptRoot "../../System Application"

. $scriptPath -parameters $compilationParams -currentProjectFolder $projectFolder -appType $appType

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

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

Pulling generic image took 1 seconds

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

Creaing docker container
BcContainerHelper is version 6.0.1-preview1086
BcContainerHelper is running as administrator
HyperV is Enabled
UsePsSession is False
Host is Microsoft Windows 11 Enterprise - 10.0.22621.2428
Docker Client Version is 24.0.6
Docker Server Version is 24.0.6
Removing Desktop shortcuts
Download-Artifacts Telemetry Correlation Id: a14d07c6-433d-45f8-be06-6083a5d74067
Fetching all docker images
Fetching all docker volumes
Using image mcr.microsoft.com/businesscentral:10.0.20348.2031-dev
Download-Artifacts Telemetry Correlation Id: 5727e629-d506-4c4f-b270-f5093869ff8f
Creating Container bcserver
Style: sandbox
Multitenant: Yes
Version: 24.0.13888.0
Platform: 24.0.13843.0
Generic Tag: 1.0.2.14-dev
Container OS Version: 10.0.20348.2031 (ltsc2022)
Host OS Version: 10.0.22621.2428 (22H2)
Using process isolation
Using locale en-US
Disabling the standard eventlog dump to container log every 2 seconds (use -dumpEventLog to enable)
Additional Parameters:
--volume "C:\Users\juga\AL\Microsoft\JohnnyUndercover\BCApps\build\projects\System Application:c:\sources"
--volume "C:/Users/juga/AL/Microsoft/JohnnyUndercover/BCApps:c:\shared"
--env customNavSettings=EnableTaskScheduler=False
Files in C:\ProgramData\BcContainerHelper\Extensions\bcserver\my:
- AdditionalOutput.ps1
- MainLoop.ps1
- SetupVariables.ps1
- updatehosts.ps1
Creating container bcserver from image mcr.microsoft.com/businesscentral:10.0.20348.2031-dev
ad411b968ebb1d6d7114d4c42593e818efab3243f2e62bb6e738cf0a5b3429af
Waiting for container bcserver to be ready
Using artifactUrl https://bcinsider.azureedge.net/sandbox/24.0.13888.0/base
Using installer from C:\Run\210-new
Installing Business Central
Installing from artifacts
Starting Local SQL Server
Starting Internet Information Server
Copying Service Tier Files
c:\dl\sandbox\24.0.13888.0\platform\ServiceTier\Program Files
c:\dl\sandbox\24.0.13888.0\platform\ServiceTier\System64Folder
Copying PowerShell Scripts
c:\dl\sandbox\24.0.13888.0\platform\WindowsPowerShellScripts\Cloud\NAVAdministration
c:\dl\sandbox\24.0.13888.0\platform\WindowsPowerShellScripts\WebSearch
Copying Web Client Files
c:\dl\sandbox\24.0.13888.0\platform\WebClient\Microsoft Dynamics NAV
Copying ModernDev Files
c:\dl\sandbox\24.0.13888.0\platform
c:\dl\sandbox\24.0.13888.0\platform\ModernDev\program files\Microsoft Dynamics NAV
Copying additional files
Copying ConfigurationPackages
C:\dl\sandbox\24.0.13888.0\platform\ConfigurationPackages
Copying Test Assemblies
C:\dl\sandbox\24.0.13888.0\platform\Test Assemblies
Copying Applications
C:\dl\sandbox\24.0.13888.0\platform\Applications
Copying dependencies
Copying ReportBuilder
Importing PowerShell Modules
Restoring CRONUS Demo Database
Setting CompatibilityLevel for tenant on localhost\SQLEXPRESS
Exporting Application to CRONUS
Removing Application from tenant
Modifying Business Central Service Tier Config File for Docker
Creating Business Central Service Tier
Installing SIP crypto provider: 'C:\Windows\System32\NavSip.dll'
Starting Business Central Service Tier
Importing license file
Copying Database on localhost\SQLEXPRESS from tenant to default
Taking database tenant offline
Copying database files
Attaching files as new Database default
Putting database tenant back online
Mounting tenant database
Mounting Database for default on server localhost\SQLEXPRESS with AllowAppDatabaseWrite = False
Sync'ing Tenant
Tenant is Operational
Stopping Business Central Service Tier
Installation took 424 seconds
Installation complete
Initializing...
Setting host.docker.internal to 192.168.178.68 in container hosts file (copy from host hosts file)
Setting gateway.docker.internal to 192.168.178.68 in container hosts file (copy from host hosts file)
Setting kubernetes.docker.internal to 127.0.0.1 in container hosts file (copy from host hosts file)
Setting host.containerhelper.internal to 172.31.32.1 in container hosts file
Starting Container
Hostname is bcserver
PublicDnsName is bcserver
Using NavUserPassword Authentication
Creating Self Signed Certificate
Self Signed Certificate Thumbprint 44F6289A1A443FC5072AE74A6CA39EF07018ED35
DNS identity bcserver
Modifying Service Tier Config File with Instance Specific Settings
Modifying Service Tier Config File with settings from environment variable
Setting EnableTaskScheduler to False
Starting Service Tier
Registering event sources
Creating DotNetCore Web Server Instance
Using application pool name: BC
Using default container name: NavWebApplicationContainer
Copy files to WWW root C:\inetpub\wwwroot\BC
Create the application pool BC
Create website: NavWebApplicationContainer without SSL
Update configuration: navsettings.json
Done Configuring Web Client
Enabling Financials User Experience
Dismounting Tenant
Mounting Tenant
Mounting Database for default on server localhost\SQLEXPRESS with AllowAppDatabaseWrite = False
Sync'ing Tenant
Tenant is Operational
Creating http download site
Setting SA Password and enabling SA
Creating admin as SQL User and add to sysadmin
Creating SUPER user
WARNING: The password that you entered does not meet the minimum requirements.
It should be at least 8 characters long and contain at least one uppercase
letter, one lowercase letter, and one number.
Container IP Address: 172.31.46.189
Container Hostname  : bcserver
Container Dns Name  : bcserver
Web Client          : http://bcserver/BC/?tenant=default
Dev. Server         : http://bcserver
Dev. ServerInstance : BC
Dev. Server Tenant  : default
Setting bcserver to 172.31.46.189 in host hosts file
Setting bcserver-default to 172.31.46.189 in host hosts file
Setting bcserver-default to 172.31.46.189 in container hosts file

Files:
http://bcserver:8080/ALLanguage.vsix

Container Total Physical Memory is 31.7Gb
Container Free Physical Memory is 13.7Gb

Initialization took 66 seconds
Ready for connections!
Reading CustomSettings.config from bcserver
Creating Desktop Shortcuts for bcserver
Cleanup old dotnet core assemblies
Container bcserver successfully created

Use:
Get-BcContainerEventLog -containerName bcserver to retrieve a snapshot of the event log from the container
Get-BcContainerDebugInfo -containerName bcserver to get debug information about the container
Enter-BcContainer -containerName bcserver to open a PowerShell prompt inside the container
Remove-BcContainer -containerName bcserver to remove the container again
docker logs bcserver to retrieve information about URL's again
New-BcContainer Telemetry Correlation Id: e0755144-31fd-4131-b8d4-fb5813279149

Creating container took 510 seconds

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

Sorted App folders
- C:\Users\juga\AL\Microsoft\JohnnyUndercover\BCApps\src\System Application\App
External dependencies
- None
Sorted TestApp folders
- None

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

Using custom ruleset
Running custom pre-compilation script...

Compiling C:\Users\juga\AL\Microsoft\JohnnyUndercover\BCApps\src\System Application\App
Copying DLLs from C:\Program Files\Microsoft Dynamics NAV\240\Service to assemblyProbingPath
Removing dotnet Framework Assemblies
Using Symbols Folder: C:\Users\juga\AL\Microsoft\JohnnyUndercover\BCApps\src\System Application\App\.alPackages
Processing dependency Microsoft_System_24.0.0.0 ()
Downloading symbols: Microsoft_System_24.0.13843.0.app
Url : http://172.31.46.189:7049/BC/dev/packages?publisher=Microsoft&appName=System&versionText=24.0.0.0&tenant=default
Downloading using HttpClient
ERROR Exception calling "GetResult" with "0" argument(s): "Ein Verbindungsversuch ist fehlgeschlagen, da die Gegenstelle nach einer bestimmten Zeitspanne nicht richtig reagiert hat, oder die hergestellte Verbindung war fehlerhaft, da der verbundene Host nicht reagiert hat. (172.31.46.189:7049)"
Compile-AppInBcContainer Telemetry Correlation Id: c94feaef-cf07-42ec-ac7b-ce8e470c3f94
Run-AlPipeline Telemetry Correlation Id: ef120d3e-0d79-472d-90b5-7702d353aa0f
Error: Exception calling "GetResult" with "0" argument(s): "Ein Verbindungsversuch ist fehlgeschlagen, da die Gegenstelle nach einer bestimmten Zeitspanne nicht richtig reagiert hat, oder die hergestellte Verbindung war fehlerhaft, da der verbundene Host nicht reagiert hat. (172.31.46.189:7049)"
Ein Verbindungsversuch ist fehlgeschlagen, da die Gegenstelle nach einer bestimmten Zeitspanne nicht richtig reagiert hat, oder die hergestellte Verbindung war fehlerhaft, da der verbundene Host nicht reagiert hat. (172.31.46.189:7049)
Ein Verbindungsversuch ist fehlgeschlagen, da die Gegenstelle nach einer bestimmten Zeitspanne nicht richtig reagiert hat, oder die hergestellte Verbindung war fehlerhaft, da der verbundene Host nicht reagiert hat.
Stacktrace: at Compile-AppInBcContainer, C:\ProgramData\BcContainerHelper\6.0.1-preview1086\BcContainerHelper\AppHandling\Compile-AppInNavContainer.ps1: line 486
at <ScriptBlock>, C:\ProgramData\BcContainerHelper\6.0.1-preview1086\BcContainerHelper\AppHandling\Run-AlPipeline.ps1: line 779
at <ScriptBlock>, C:\ProgramData\BcContainerHelper\6.0.1-preview1086\BcContainerHelper\AppHandling\Run-AlPipeline.ps1: line 1900
at <ScriptBlock>, C:\ProgramData\BcContainerHelper\6.0.1-preview1086\BcContainerHelper\AppHandling\Run-AlPipeline.ps1: line 1447
at <ScriptBlock>, C:\ProgramData\BcContainerHelper\6.0.1-preview1086\BcContainerHelper\AppHandling\Run-AlPipeline.ps1: line 1440
at <ScriptBlock>, C:\ProgramData\BcContainerHelper\6.0.1-preview1086\BcContainerHelper\AppHandling\Run-AlPipeline.ps1: line 904
at Run-AlPipeline, C:\ProgramData\BcContainerHelper\6.0.1-preview1086\BcContainerHelper\AppHandling\Run-AlPipeline.ps1: line 866
at CreateDevEnv, C:\Users\juga\AppData\Local\Temp\tmp2D.tmp.ps1: line 1844
at <ScriptBlock>, C:\Users\juga\AL\Microsoft\JohnnyUndercover\BCApps\build\projects\System Application\.AL-Go\localDevEnv.ps1: line 128
at <ScriptBlock>, C:\Users\juga\AL\Microsoft\JohnnyUndercover\BCApps\build.ps1: line 38
at <ScriptBlock>, <No file>: line 1
PS C:\Users\juga\AL\Microsoft\JohnnyUndercover\BCApps\build\projects\System Application>
mazhelez commented 11 months ago

Hey @JohnnyUndercover thanks for reporting this issue.

We are, in fact, aware that it doesn't work properly and we're working on addressing it.

A workaround would be to use the docker container (created by localDevEnv) for manually compiling the apps in the right order.

JohnnyUndercover commented 11 months ago

@mazhelez thanks for the fast response. I dont think the workaround will work, because the container is not accessable after running into the error.

pri-kise commented 11 months ago

I'm using the following script, but this results in another error:

$containerName = "kise-bcapps2"
# Define clear text string for username and password
[string]$userName = 'admin'
[string]$userPassword = 'admin'
# Convert to SecureString
[securestring]$secStringPassword = ConvertTo-SecureString $userPassword -AsPlainText -Force
[pscredential]$credential = New-Object System.Management.Automation.PSCredential ($userName, $secStringPassword)

. "C:\Users\kise\source\AL\Microsoft\BCApps\build\projects\System Application\.AL-Go\localDevEnv.ps1" -containerName $containerName -auth "UserPassword" -credential $credential -accept_insiderEula -licenseFileUrl "none"

Could it be, that the script doesn't update the app.json files and therefore is unable to publish?

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

Downloading GitHub Helper module from https://raw.githubusercontent.com/microsoft/AL-Go-Actions/v4.0/Github-Helper.psm1
Downloading AL-Go Helper script from https://raw.githubusercontent.com/microsoft/AL-Go-Actions/v4.0/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 C:\Users\kise\source\AL\Microsoft\BCApps\.github\AL-Go-Settings.json
Applying settings from C:\Users\kise\source\AL\Microsoft\BCApps\build\projects\System Application\.AL-Go\settings.json
No settings found in C:\Users\kise\source\AL\Microsoft\BCApps\.github\localDevEnv.settings.json
No settings found in C:\Users\kise\source\AL\Microsoft\BCApps\build\projects\System Application\.AL-Go\localDevEnv.settings.json
No settings found in C:\Users\kise\source\AL\Microsoft\BCApps\build\projects\System Application\.AL-Go\kise.settings.json
Checking System Requirements

Using BcContainerHelper preview version
Import from C:\ProgramData\BcContainerHelper\6.0.1-preview1086\BcContainerHelper\BcContainerHelper.ps1
BcContainerHelper version 6.0.1-preview1086
Setting PartnerTelemetryConnectionString = InstrumentationKey=403ba4d3-ad2b-4ca1-8602-b7746de4c048;IngestionEndpoint=https://swedencentral-0.in.applicationinsights.azure.com/
Setting usePsSession = False
BC.HelperFunctions emits usage statistics telemetry to Microsoft
Applying settings from C:\Users\kise\source\AL\Microsoft\BCApps\.github\AL-Go-Settings.json
Applying settings from C:\Users\kise\source\AL\Microsoft\BCApps\build\projects\System Application\.AL-Go\settings.json
No settings found in C:\Users\kise\source\AL\Microsoft\BCApps\.github\localDevEnv.settings.json
No settings found in C:\Users\kise\source\AL\Microsoft\BCApps\build\projects\System Application\.AL-Go\localDevEnv.settings.json
No settings found in C:\Users\kise\source\AL\Microsoft\BCApps\build\projects\System Application\.AL-Go\kise.settings.json
Checking type
Checking appFolders, testFolders and bcptTestFolders
Application Dependency 18.0.0.0
Checking artifact setting for project
Get-BCArtifactUrl Telemetry Correlation Id: ef6c09ee-f8e5-4953-a954-78352abb6789
Downloading artifacts from https://bcinsider.azureedge.net/sandbox/24.0.13849.0/base
Download-Artifacts Telemetry Correlation Id: 1bc97cdf-bf83-4b4b-a8a8-09e2fbc37885
Updating app- and test Dependencies
Analyzing Test App Dependencies
No performance test apps found in bcptTestFolders in .AL-Go\settings.json
Checking appDependencyProbingPaths
Add override for PreCompileApp
  _____                               _                
 |  __ \                             | |               
 | |__) |_ _ _ __ __ _ _ __ ___   ___| |_ ___ _ __ ___ 
 |  ___/ _` | '__/ _` | '_ ` _ \ / _ \ __/ _ \ '__/ __|
 | |  | (_| | | | (_| | | | | | |  __/ |_  __/ |  \__ \
 |_|   \__,_|_|  \__,_|_| |_| |_|\___|\__\___|_|  |___/

Pipeline name                   localDevEnv
Container name                  kise-bcapps2
Image name                      
ArtifactUrl                     https://bcinsider.azureedge.net/sandbox/24.0.13849.0/base
SasToken                        Not Specified
BcAuthContext                   Not Specified
Environment                     
ReUseContainer                  False
KeepContainer                   True
useCompilerFolder               False
artifactCachePath               
useDevEndpoint                  True
Auth                            UserPassword
Credential                      Specified
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                   True
enableAppSourceCop              True
enableUICop                     True
enablePerTenantExtensionCop     True
doNotPerformUpgrade             False
doNotPublishApps                False
uninstallRemovedApps            False
escapeFromCops                  False
doNotBuildTests                 False
doNotRunTests                   True
doNotRunBcptTests               True
useDefaultAppSourceRuleSet      False
rulesetFile                     C:\Users\kise\source\AL\Microsoft\BCApps\src\rulesets\ruleset.json
enableExternalRulesets          False
azureDevOps                     False
gitLab                          False
gitHubActions                   False
vsixFile                        
License file                    Not specified
CodeSignCertPfxFile             Not specified
CodeSignCertPfxPassword         Not specified
CodeSignCertIsSelfSigned        False
KeyVaultCertPfxFile             Not specified
KeyVaultCertPfxPassword         Not specified
KeyVaultClientId                
BuildOutputFile                 
ContainerEventLogFile           
TestResultsFile                 C:\Users\kise\source\AL\Microsoft\BCApps\build\projects\System Application\TestResults.xml
BcptTestResultsFile             C:\Users\kise\source\AL\Microsoft\BCApps\build\projects\System Application\bcptTestResults.json
TestResultsFormat               JUnit
AdditionalCountries             
PackagesFolder                  .packages
OutputFolder                    
BuildArtifactFolder             
CreateRuntimePackages           False
AppVersion                      
AppBuild                        0
AppRevision                     0
SourceRepositoryUrl             
SourceCommit                    
BuildBy                         BcContainerHelper,6.0.1-preview1086
BuildUrl                        
Mandatory Affixes               
Supported Countries             
ObsoleteTagMinAllowedMajorMinor 
Install Apps
- None
Install Test Apps
- None
Previous Apps
- None
Application folders
- C:\Users\kise\source\AL\Microsoft\BCApps\src\System Application\App
Test application folders
- None
BCPT Test application folders
- None
BCPT Test suites
- None
Custom CodeCops
- None
Custom pre-compilation script defined.
Param(
    [string] $appType,
    [ref] $compilationParams
)

$scriptPath = Join-Path $PSScriptRoot "../../../scripts/PreCompileApp.ps1" -Resolve
$projectFolder = Join-Path $PSScriptRoot "../../System Application"

. $scriptPath -parameters $compilationParams -currentProjectFolder $projectFolder -appType $appType

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

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

Pulling generic image took 2 seconds

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

Creaing docker container
BcContainerHelper is version 6.0.1-preview1086
BcContainerHelper is running as administrator
HyperV is Enabled
UsePsSession is False
Host is Microsoft Windows 11 Enterprise - 10.0.22621.2428
Docker Client Version is 24.0.5
Docker Server Version is 24.0.5
Removing Desktop shortcuts
Download-Artifacts Telemetry Correlation Id: 4c8290bd-a672-4eb4-8393-c3b750fa040a
Fetching all docker images
Fetching all docker volumes
Using image mcr.microsoft.com/businesscentral:10.0.20348.2031-dev
Download-Artifacts Telemetry Correlation Id: a5fd497d-3434-4172-abf5-d22ad9e0c832
Creating Container kise-bcapps2
Style: sandbox
Multitenant: Yes
Version: 24.0.13849.0
Platform: 24.0.13836.0
Generic Tag: 1.0.2.14-dev
Container OS Version: 10.0.20348.2031 (ltsc2022)
Host OS Version: 10.0.22621.2428 (22H2)
Using process isolation
Using locale en-US
Disabling the standard eventlog dump to container log every 2 seconds (use -dumpEventLog to enable)
Additional Parameters:
--volume "C:\Users\kise\source\AL\Microsoft\BCApps\build\projects\System Application:c:\sources"
--volume "C:/Users/kise/source/AL/Microsoft/BCApps:c:\shared"
--env customNavSettings=EnableTaskScheduler=False
Files in C:\ProgramData\BcContainerHelper\Extensions\kise-bcapps2\my:
- AdditionalOutput.ps1
- MainLoop.ps1
- SetupVariables.ps1
- updatehosts.ps1
Creating container kise-bcapps2 from image mcr.microsoft.com/businesscentral:10.0.20348.2031-dev
1605d8ba89a19c8662719b8e3b48b3006f104bccd8d38b475b7f435c7290b609
Waiting for container kise-bcapps2 to be ready
Using artifactUrl https://bcinsider.azureedge.net/sandbox/24.0.13849.0/base
Using installer from C:\Run\210-new
Installing Business Central
Installing from artifacts
Starting Local SQL Server
Starting Internet Information Server
Copying Service Tier Files
c:\dl\sandbox\24.0.13849.0\platform\ServiceTier\Program Files
c:\dl\sandbox\24.0.13849.0\platform\ServiceTier\System64Folder
Copying PowerShell Scripts
c:\dl\sandbox\24.0.13849.0\platform\WindowsPowerShellScripts\Cloud\NAVAdministration
c:\dl\sandbox\24.0.13849.0\platform\WindowsPowerShellScripts\WebSearch
Copying Web Client Files
c:\dl\sandbox\24.0.13849.0\platform\WebClient\Microsoft Dynamics NAV
Copying ModernDev Files
c:\dl\sandbox\24.0.13849.0\platform
c:\dl\sandbox\24.0.13849.0\platform\ModernDev\program files\Microsoft Dynamics NAV
Copying additional files
Copying ConfigurationPackages
C:\dl\sandbox\24.0.13849.0\platform\ConfigurationPackages
Copying Test Assemblies
C:\dl\sandbox\24.0.13849.0\platform\Test Assemblies
Copying Applications
C:\dl\sandbox\24.0.13849.0\platform\Applications
Copying dependencies
Copying ReportBuilder
Importing PowerShell Modules
Restoring CRONUS Demo Database
Setting CompatibilityLevel for tenant on localhost\SQLEXPRESS
Exporting Application to CRONUS
Removing Application from tenant
Modifying Business Central Service Tier Config File for Docker
Creating Business Central Service Tier
Installing SIP crypto provider: 'C:\Windows\System32\NavSip.dll'
Starting Business Central Service Tier
Importing license file
Copying Database on localhost\SQLEXPRESS from tenant to default
Taking database tenant offline
Copying database files
Attaching files as new Database default
Putting database tenant back online
Mounting tenant database
Mounting Database for default on server localhost\SQLEXPRESS with AllowAppDatabaseWrite = False
Sync'ing Tenant
Tenant is Operational
Stopping Business Central Service Tier
Installation took 198 seconds
Installation complete
Initializing...
Setting host.docker.internal to 172.29.5.57 in container hosts file (copy from host hosts file)
Setting gateway.docker.internal to 172.29.5.57 in container hosts file (copy from host hosts file)
Setting kubernetes.docker.internal to 127.0.0.1 in container hosts file (copy from host hosts file)
Setting host.containerhelper.internal to 172.29.0.1 in container hosts file
Starting Container
Hostname is kise-bcapps2
PublicDnsName is kise-bcapps2
Using NavUserPassword Authentication
Creating Self Signed Certificate
Self Signed Certificate Thumbprint F1EB92C550C5236F180216ED3751BF3D7562B315
DNS identity kise-bcapps2
Modifying Service Tier Config File with Instance Specific Settings
Modifying Service Tier Config File with settings from environment variable
Setting EnableTaskScheduler to False
Starting Service Tier
Registering event sources
Creating DotNetCore Web Server Instance
Using application pool name: BC
Using default container name: NavWebApplicationContainer
Copy files to WWW root C:\inetpub\wwwroot\BC
Create the application pool BC
Create website: NavWebApplicationContainer without SSL
Update configuration: navsettings.json
Done Configuring Web Client
Enabling Financials User Experience
Dismounting Tenant
Mounting Tenant
Mounting Database for default on server localhost\SQLEXPRESS with AllowAppDatabaseWrite = False
Sync'ing Tenant
Tenant is Operational
Creating http download site
Setting SA Password and enabling SA
Creating admin as SQL User and add to sysadmin
Creating SUPER user
WARNING: The password that you entered does not meet the minimum requirements. 
It should be at least 8 characters long and contain at least one uppercase 
letter, one lowercase letter, and one number.
Container IP Address: 172.29.0.109
Container Hostname  : kise-bcapps2
Container Dns Name  : kise-bcapps2
Web Client          : http://kise-bcapps2/BC/?tenant=default
Dev. Server         : http://kise-bcapps2
Dev. ServerInstance : BC
Dev. Server Tenant  : default
Setting kise-bcapps2 to 172.29.0.109 in host hosts file
Setting kise-bcapps2-default to 172.29.0.109 in host hosts file
Setting kise-bcapps2-default to 172.29.0.109 in container hosts file

Files:
http://kise-bcapps2:8080/ALLanguage.vsix

Container Total Physical Memory is 31.2Gb
Container Free Physical Memory is 7.2Gb

Initialization took 33 seconds
Ready for connections!
Reading CustomSettings.config from kise-bcapps2
Creating Desktop Shortcuts for kise-bcapps2
Cleanup old dotnet core assemblies
Container kise-bcapps2 successfully created

Use:
Get-BcContainerEventLog -containerName kise-bcapps2 to retrieve a snapshot of the event log from the container
Get-BcContainerDebugInfo -containerName kise-bcapps2 to get debug information about the container
Enter-BcContainer -containerName kise-bcapps2 to open a PowerShell prompt inside the container
Remove-BcContainer -containerName kise-bcapps2 to remove the container again
docker logs kise-bcapps2 to retrieve information about URL's again
New-BcContainer Telemetry Correlation Id: 4d9ec19c-5085-49af-8bca-2b412b404659

Creating container took 251 seconds

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

Sorted App folders
- C:\Users\kise\source\AL\Microsoft\BCApps\src\System Application\App
External dependencies
- None
Sorted TestApp folders
- None

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

Using custom ruleset
Running custom pre-compilation script...

Compiling C:\Users\kise\source\AL\Microsoft\BCApps\src\System Application\App
Copying DLLs from C:\Program Files\Microsoft Dynamics NAV\240\Service to assemblyProbingPath
Removing dotnet Framework Assemblies
Using Symbols Folder: C:\Users\kise\source\AL\Microsoft\BCApps\src\System Application\App\.alPackages
Processing dependency Microsoft_System_24.0.0.0 ()
Dependency App exists
Compiling...
.\alc.exe /project:"c:\shared\src\System Application\App" /packagecachepath:"c:\shared\src\System Application\App\.alPackages" /out:"c:\shared\src\System Application\App\Microsoft_System Application_24.0.0.0.app" /analyzer:C:\build\vsix\extension\bin\Analyze
rs\Microsoft.Dynamics.Nav.CodeCop.dll /analyzer:C:\build\vsix\extension\bin\Analyzers\Microsoft.Dynamics.Nav.AppSourceCop.dll /analyzer:C:\build\vsix\extension\bin\Analyzers\Microsoft.Dynamics.Nav.PerTenantExtensionCop.dll /analyzer:C:\build\vsix\extension\b
in\Analyzers\Microsoft.Dynamics.Nav.UICop.dll /ruleset:c:\shared\src\rulesets\ruleset.json /BuildBy:"BcContainerHelper,6.0.1-preview1086" /assemblyprobingpaths:"C:\Program Files\dotnet\shared","C:\ProgramData\BcContainerHelper\Extensions\kise-bcapps2\.netPac
kages\Service" /features:generateCaptions,lcgtranslationfile
Microsoft (R) AL Compiler version 13.0.13.45434
Copyright (C) Microsoft Corporation. All rights reserved

Compilation started for project 'System Application' containing '1054' files at '15:39:13.175'.

c:\shared\src\System Application\App\Data Administration\src\MediaCleanupFactbox.Page.al(23,33): warning AW0009: Using a Blob with subtype Bitmap on a page field is deprecated. Instead use the Media/MediaSet data types.
c:\shared\src\System Application\App\Email\src\Account\EmailAccountWizard.Page.al(132,33): warning AW0009: Using a Blob with subtype Bitmap on a page field is deprecated. Instead use the Media/MediaSet data types.
c:\shared\src\System Application\App\Email\src\Account\EmailAccounts.Page.al(39,34): warning AW0009: Using a Blob with subtype Bitmap on a page field is deprecated. Instead use the Media/MediaSet data types.
c:\shared\src\System Application\App\Web Service Management\src\WebServiceManagementImpl.Codeunit.al(312,9): warning AS0059: The table 'Web Service Aggregate' cannot be modified because it is part of the read-only application database or because it will resu
lt in undefined behavior.
c:\shared\src\System Application\App\Web Service Management\src\WebServiceManagementImpl.Codeunit.al(319,17): warning AS0059: The table 'Web Service Aggregate' cannot be modified because it is part of the read-only application database or because it will res
ult in undefined behavior.
c:\shared\src\System Application\App\Web Service Management\src\WebServiceManagementImpl.Codeunit.al(336,25): warning AS0059: The table 'Web Service Aggregate' cannot be modified because it is part of the read-only application database or because it will res
ult in undefined behavior.

Compilation ended at '15:39:56.320'.

C:\Users\kise\source\AL\Microsoft\BCApps\src\System Application\App\Microsoft_System Application_24.0.0.0.app successfully created in 116 seconds
Compile-AppInBcContainer Telemetry Correlation Id: 81c50751-76d8-4ef6-9560-8a1d0b5c4b7f
Publishing Microsoft_System Application_24.0.0.0.app to http://172.29.0.109:7049/BC/dev/apps?SchemaUpdateMode=synchronize&tenant=default
Ausnahme beim Aufrufen von "GetResult" mit 0 Argument(en):  "Fehler beim Senden der Anforderung."
Fehler beim Senden der Anforderung.
Die Verbindung mit dem Remoteserver kann nicht hergestellt werden.
Publish-BcContainerApp Telemetry Correlation Id: 15ca23cc-90fc-407d-a1ca-a7137c3f571c
Run-AlPipeline Telemetry Correlation Id: 1789b9c5-face-454c-9fb3-1fa18279d2cc
Error: Ausnahme beim Aufrufen von "GetResult" mit 0 Argument(en):  "Fehler beim Senden der Anforderung."
Stacktrace: bei <ScriptBlock>, C:\ProgramData\BcContainerHelper\6.0.1-preview1086\BcContainerHelper\AppHandling\Publish-NavContainerApp.ps1: Zeile 272
bei Publish-BcContainerApp, C:\ProgramData\BcContainerHelper\6.0.1-preview1086\BcContainerHelper\AppHandling\Publish-NavContainerApp.ps1: Zeile 157
bei <ScriptBlock>, C:\ProgramData\BcContainerHelper\6.0.1-preview1086\BcContainerHelper\AppHandling\Run-AlPipeline.ps1: Zeile 800
bei <ScriptBlock>, C:\ProgramData\BcContainerHelper\6.0.1-preview1086\BcContainerHelper\AppHandling\Run-AlPipeline.ps1: Zeile 1950
bei <ScriptBlock>, C:\ProgramData\BcContainerHelper\6.0.1-preview1086\BcContainerHelper\AppHandling\Run-AlPipeline.ps1: Zeile 1447
bei <ScriptBlock>, C:\ProgramData\BcContainerHelper\6.0.1-preview1086\BcContainerHelper\AppHandling\Run-AlPipeline.ps1: Zeile 1440
bei <ScriptBlock>, C:\ProgramData\BcContainerHelper\6.0.1-preview1086\BcContainerHelper\AppHandling\Run-AlPipeline.ps1: Zeile 904
bei Run-AlPipeline, C:\ProgramData\BcContainerHelper\6.0.1-preview1086\BcContainerHelper\AppHandling\Run-AlPipeline.ps1: Zeile 866
bei CreateDevEnv, C:\Users\kise\AppData\Local\Temp\tmp2695.tmp.ps1: Zeile 1844
bei <ScriptBlock>, C:\Users\kise\source\AL\Microsoft\BCApps\build\projects\System Application\.AL-Go\localDevEnv.ps1: Zeile 128
bei <ScriptBlock>, <Keine Datei>: Zeile 9

PS C:\Users\kise\source\AL\Microsoft\BCApps\build\projects\System Application> 
mazhelez commented 11 months ago

My latest attempt also failed the same way. Looks like an AL-Go issue. The created container shouldn't have "System Application" to begin with. I suppose that's only reproducible for BCApps, as here are the apps that are on the container by default.

I might think of a "hack" but a proper solution would be for localDevEnv to support "NewBCContainer" for when useCompilerFolder is used.

pri-kise commented 10 months ago

It should be the same for the BaseApp Pilot on BusinessCentralApps, since the BaseApp and all Test-Apps are already published there, too. The last time I tried this script there, there was an step, where all app.json files were updated before publishing.

mazhelez commented 10 months ago

Yes, that's true for when the apps are compiled in a containers. AL-Go/BCContainerHelper provide a way to create a "custom" container (using NewBcContainer.ps1).

However, when utilizing useCompilerFolder, no container is created.

The actual issue is that localDevEnv disregards the useCompilerFolder setting and creates a default container. We'll need a fix for this.