microsoft / navcontainerhelper

Official Microsoft repository for BcContainerHelper, a PowerShell module, which makes it easier to work with Business Central Containers on Docker.
MIT License
376 stars 243 forks source link

Cannot open page 130455 - Problems since Thursday, beginning with 4.0.11 #2902

Closed MODUSCarstenScholling closed 1 year ago

MODUSCarstenScholling commented 1 year ago

Cannot open page 130455 - Problems since Thursday, beginning with 4.0.11

Description

Our pipelines started to raise ContainerHelper and/or container/image releated errors on 02-02-2023 around noon after BcContainerHelper was updated to version 4.0.11 in the process. The issue changed up to 4.0.14. We are running our pipelines on Azure DevOps Server, local agent machines with 2 agents each. Our pipeline code did not change in the last days. We usually test run against Sandbox images Minimum (min. application version), Current, NextMajor.

We did image cleanups in the middle to find issues, which caused new image creations with newer builds.

Cannot open page 130455

The final issue is that the test page cannot be opened, not only for NextMajor but for 20, 21, 22... Sometimes it works, most times this error is raised.

Running tests for App 06b17c18-e1b3-458b-8bbc-73846bf8883e in C:\BuildAgent\vsts-agent-win-x64-2.153.1\_work\2236\s\test
Connecting to http://localhost:80/BC/cs?tenant=default
Run-Tests, open page 130455
at Run-Tests, C:\ProgramData\BcContainerHelper\Extensions\s16160-de22-0-52814-0\PsTestTool\PsTestFunctions.ps1: line 537
at <ScriptBlock>, <No file>: line 75
Cannot open page 130455. You might need to import the test toolkit to the container and/or remove the folder C:\ProgramData\BcContainerHelper\Extensions\s16160-de22-0-52814-0\PsTestTool and retry. You might also have URL or Company name wrong.

Our release day is Wednesday this week, but we have no reliable builds, no reliable pipelines anymore. Even skipping NextMajor does not work anymore. My assumption is, it could be some timing issue, probably in the image scripts.

PLEASE HELP AND ASSIST.

Below I have outlined the way to this error, paved with other errors.

Parameters and overrides

$runAlPipelineParameters = @{
    'appSourceCopMandatoryAffixes'   = "M365";
    'appSourceCopSupportedCountries' = @("DE", "AT", "CH");
    "codeSignCertPfxFile"     = $config.codeSignCertPfxFile;
    "codeSignCertPfxPassword" = ($config.keyVault.codeSignCertPfxPassword | ConvertTo-SecureString);
}

$runAlPipelineParameters += @{
    'doNotRunTests'        = $false
    'testFolders'          = $testFolders
    'testResultsFormat'    = 'JUnit'
    'installTestFramework' = $true
    'installTestLibraries' = $true
};

[ScriptBlock]$newBcContainer = {
    param([hashtable]$runAlPipelineParameters)

    New-BcContainer @runAlPipelineParameters;
    $ensureEncryption.Invoke();

    # Copy .NET DLL and dependencies to Add-Ins folder
    # <Removed>
};

[ScriptBlock]$compileBcContainerApp = {
    param([hashtable]$compileBcContainerAppParameters)

    # Redirect outputTo
    # Handle copying current dependencies to packages folder, because Run-AlPipeline does not properly handle it (see https://github.com/microsoft/navcontainerhelper/issues/1906)
    # Update app.json, set preprocessor symbols

    $script:alcOutput = @();
    $lastError = $null;
    $appFile = $null;

    try
    {
        $appFile = Compile-AppInBcContainer -ErrorAction Stop -outputTo {
            param($line)

            $line = $line -ireplace 'MCP(\d{4})', 'MC$1';
            $script:alcOutput += $line;
        } `
            @compileBcContainerAppParameters;
    }

    catch
    {
        $lastError = $_;
    }

    Convert-AlcOutputToAzureDevOps -AlcOutput $script:alcOutput;

    $bcKey = "BC$($artifactTuple.Version.Major).$($artifactTuple.Version.Minor)";
    $alcIssues = @(Convert-AlcOutputToObject -alcOutput $script:alcOutput);

    # Handle alc issues

    return $appFile;
};

[ScriptBlock]$publishBcContainerApp = {
    param([hashtable]$publishBcContainerAppParameters)

    $appFile = $publishBcContainerAppParameters["appFile"];
    $appInfo = Get-CiCdAppManifest -config $config -path $appFile;

    if (($appInfo.AppName -ieq $config.buildAppName) -and ($appfile.Contains('.output')))
    {
        Write-CiCdHost -text "Publishing Current Dependent Apps";

        $artifacts = @(Get-ChildItem -Path $config.types.app.artifactsPath -Filter '*.app' -File);
        $artifacts += @(Get-ChildItem -Path $config.types.test.artifactsPath -Filter '*.app' -File);
        $artifacts = $artifacts | Select-Object -ExpandProperty 'FullName';

        if ($artifacts -and ($artifacts.Count -gt 0))
        {
            $artifacts = Sort-CiCdAppFiles -config $config -path $artifacts -unresolvedHandling 'Ignore' -sort Install;
            $installedArtifacts = Get-BcContainerAppInfo -containerName $script:currentBcArtifact.containerName -tenant 'default' -tenantSpecificProperties;

            $artifacts | ForEach-Object {
                $artifact = $_;
                $appInfo = Get-CiCdAppManifest -config $config -path $artifact;
                $installedArtifact = $installedArtifacts | Where-Object { ($_.AppId -ieq $appInfo.AppId) };

                if (!$installedArtifact -or ([System.Version]$installedArtifact.Version -lt $appInfo.AppVersion))
                {
                    Write-CiCdHost -text "Publishing $($appInfo.AppName) $($appInfo.AppVersion).";

                    $publishParameters = @{
                        "containerName"    = $script:currentBcArtifact.containerName;
                        "tenant"           = 'default';
                        "credential"       = $containerCredential;
                        "appFile"          = $artifact;
                        "skipVerification" = $true;
                        "sync"             = $true;
                        "syncMode"         = "ForceSync";
                        "install"          = !$installedArtifact;
                        "upgrade"          = ($installedArtifact -and ([System.Version]$installedArtifact.Version -lt $appInfo.AppVersion));
                    }

                    Publish-BcContainerApp @publishParameters;
                }
            };
        }
    }

    try
    {
        Publish-BcContainerApp -ErrorAction Stop @publishBcContainerAppParameters;
        $hasBeenPublished = $true;
    }
    catch
    {
        $hasBeenPublished = $false;

        if (!([bool]$config.pipelineVariables.escapeFromCops -or [bool]$config.pipelineVariables.escapeFromError))
        {
            throw $_;
        }
    }

    if (!$hasBeenPublished)
    {
        $publishBcContainerAppParameters["syncMode"] = "ForceSync";
        Publish-BcContainerApp -ErrorAction Stop @publishBcContainerAppParameters;
    }
};

Command


Run-AlPipeline `
    -pipelineName $config.pipelineName `
    -containerName $script:currentBcArtifact.containerName `
    -imageName $dockerImageName `
    -useGenericImage $genericImageName `
    -artifact $artifactUrl `
    -tenant 'default' `
    -baseFolder $config.buildSourcesPath `
    -sharedFolder $config.storagePath `
    -credential $containerCredential `
    -licenseFile $licenseFile `
    -vsixFile $config.alExtensionVsixPath `
    -previousApps $previousApps `
    -assignPremiumPlan `
    -buildArtifactFolder $config.artifactStagingPath `
    -rulesetFile $config.ruleSetFilePath `
    -testResultsFile $testResultsFile `
    -customCodeCops $script:customCodeCops `
    -NewBcContainer $newBcContainer `
    -CompileAppInBcContainer $compileBcContainerApp `
    -PublishBcContainerApp $publishBcContainerApp `
    @runAlPipelineParameters;

SKIPPED OTHER ISSUES DUE TO SIZE LIMIT

ISSUE 03-02-2023 0913 AGENT1 (FAILING)

We had several failing builds with this error. Then we recreated the agents, updated BCCC, Updated Docker.

BCCC 4.0.14 (Minimum, working)

PARAMETERS

Pipeline name                   M365DeliveryDateDetermination-PR_M365DeliveryDateDetermination_M365DeliveryDateDetermination
Container name                  s16160-de21-0-46256-52782
Image name                      sandbox:21.0.46256.52782-de-db
ArtifactUrl                     https://bcartifacts.azureedge.net/sandbox/21.0.46256.52782/de
[skipped]

PULLING GENERIC IMAGE

Pulling mcr.microsoft.com/businesscentral:10.0.17763.3887

Pulling generic image took 0 seconds

CREATING CONTAINER
WARNING: Container name should not exceed 15 characters
BcContainerHelper is version 4.0.14
BcContainerHelper is running as administrator
HyperV is Enabled
UsePsSession is True
Host is Microsoft Windows Server 2019 Datacenter - 10.0.17763.3887
Docker Client Version is 19.03.2
Docker Server Version is 19.03.2
Removing Desktop shortcuts
Downloading application artifact /sandbox/21.0.46256.52782/de
https://bcartifacts.azureedge.net/sandbox/21.0.46256.52782/de
Downloading C:\Users\MC-NAVServiceDeploy\AppData\Local\Temp\1cadd1da-6274-4d88-b8c6-05f0567d7dea.zip
Using WebClient
Unpacking application artifact to tmp folder using Expand-Archive
Downloading platform artifact /sandbox/21.0.46256.52782/platform
https://bcartifacts.azureedge.net/sandbox/21.0.46256.52782/platform
Downloading C:\Users\MC-NAVServiceDeploy\AppData\Local\Temp\12097317-ac7f-4f3e-a226-b8709bd8b439.zip
Using WebClient
Unpacking platform artifact to tmp folder using Expand-Archive
Downloading Prerequisite Components
Downloading c:\bcartifacts.cache\sandbox\21.0.46256.52782\platform\Prerequisite Components\IIS URL Rewrite Module\rewrite_2.0_rtw_x64.msi
Using WebClient
Downloading c:\bcartifacts.cache\sandbox\21.0.46256.52782\platform\Prerequisite Components\DotNetCore\DotNetCore.1.0.4_1.1.1-WindowsHosting.exe
Using WebClient
Fetching all docker images
Fetching all docker volumes
ArtifactUrl and ImageName specified
Building image sandbox:21.0.46256.52782-de-db based on mcr.microsoft.com/businesscentral:10.0.17763.3887 with https://bcartifacts.azureedge.net/sandbox/21.0.46256.52782/de
Pulling latest image mcr.microsoft.com/businesscentral:10.0.17763.3887
10.0.17763.3887: Pulling from businesscentral
Generic Tag: 1.0.2.13
Container OS Version: 10.0.17763.3887 (ltsc2019)
Host OS Version: 10.0.17763.3887 (ltsc2019)
Using process isolation
Using license file C:\BcBuild\MODUSSOLDEVAGT1\CiCdStorage\Licenses\BC21.bclicense
Files in c:\bcartifacts.cache\0llhgp30.mee\my:
Copying Platform Artifacts
c:\bcartifacts.cache\sandbox\21.0.46256.52782\platform
Copying Database
Copying Licensefile
Copying ConfigurationPackages
C:\bcartifacts.cache\sandbox\21.0.46256.52782\de\ConfigurationPackages
Copying Extensions
C:\bcartifacts.cache\sandbox\21.0.46256.52782\de\Extensions
Copying Applications.DE
C:\bcartifacts.cache\sandbox\21.0.46256.52782\de\Applications.DE
c:\bcartifacts.cache\0llhgp30.mee
Sending build context to Docker daemon  2.134GB

Step 1/6 : FROM mcr.microsoft.com/businesscentral:10.0.17763.3887
 ---> 23f5b3bb38d6
Step 2/6 : ENV DatabaseServer=localhost DatabaseInstance=SQLEXPRESS DatabaseName=CRONUS IsBcSandbox=Y artifactUrl=https://bcartifacts.azureedge.net/sandbox/21.0.46256.52782/de filesOnly=False
 ---> Running in 095eeb0fb780
Removing intermediate container 095eeb0fb780
 ---> 79360d347234
Step 3/6 : COPY my /run/
 ---> 1040ff28f759
Step 4/6 : COPY NAVDVD /NAVDVD/
 ---> 6b07a02baa08
Step 5/6 : RUN \Run\start.ps1 -installOnly -multitenant
 ---> Running in adf002edea9c
c:\run\my folder doesn't exist, creating it
Using installer from C:\Run\210-new
Installing Business Central
Installing from DVD
Starting Local SQL Server
Starting Internet Information Server
Copying Service Tier Files
C:\NAVDVD\ServiceTier\Program Files
C:\NAVDVD\ServiceTier\System64Folder
Copying PowerShell Scripts
C:\NAVDVD\WindowsPowerShellScripts\Cloud\NAVAdministration
C:\NAVDVD\WindowsPowerShellScripts\WebSearch
Copying Web Client Files
C:\NAVDVD\WebClient\Microsoft Dynamics NAV
Copying ModernDev Files
C:\NAVDVD
C:\NAVDVD\ModernDev\program files\Microsoft Dynamics NAV
Copying additional files
Copying ConfigurationPackages
C:\NAVDVD\ConfigurationPackages
Copying Test Assemblies
C:\NAVDVD\Test Assemblies
Copying Extensions
C:\NAVDVD\Extensions
Copying Applications
C:\NAVDVD\Applications
Copying Applications.DE
C:\NAVDVD\Applications.DE
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 CRONUS 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 226 seconds
Installation complete
Removing intermediate container adf002edea9c
 ---> 72e90b6be5b8
Step 6/6 : LABEL legal="http://go.microsoft.com/fwlink/?LinkId=837447"       created="202302030824"       nav=""       cu=""       multitenant="Y" country="DE"       version="21.0.46256.52782"       platform="21.0.46384.52757"
 ---> Running in 8d802ccf5016
Removing intermediate container 8d802ccf5016
 ---> 0ae3784b280c
Successfully built 0ae3784b280c
Successfully tagged sandbox:21.0.46256.52782-de-db
Building image took 436 seconds
Using image sandbox:21.0.46256.52782-de-db
Creating Container s16160-de21-0-46256-52782
Style: sandbox
Multitenant: Yes
Version: 21.0.46256.52782
Platform: 21.0.46384.52757
Generic Tag: 1.0.2.13
Container OS Version: 10.0.17763.3887 (ltsc2019)
Host OS Version: 10.0.17763.3887 (ltsc2019)
Using process isolation
Using locale de-DE
Disabling the standard eventlog dump to container log every 2 seconds (use -dumpEventLog to enable)
Using license file C:\BcBuild\MODUSSOLDEVAGT1\CiCdStorage\Licenses\BC21.bclicense
Additional Parameters:
--volume "C:\BuildAgent\vsts-agent-win-x64-2.153.1\_work\2236\s:c:\sources"
--volume "C:\BcBuild\MODUSSOLDEVAGT1\CiCdStorage:c:\shared"
--env customNavSettings=EnableTaskScheduler=False
Files in C:\ProgramData\BcContainerHelper\Extensions\s16160-de21-0-46256-52782\my:
- AdditionalOutput.ps1
- license.bclicense
- MainLoop.ps1
- SetupNavUsers.ps1
- SetupVariables.ps1
- updatehosts.ps1
Creating container s16160-de21-0-46256-52782 from image sandbox:21.0.46256.52782-de-db
915053bfe6b7570857dcd127285447074c34f081794cd9e00b954c79adeeacb0
Waiting for container s16160-de21-0-46256-52782 to be ready
Adding S16160-DE21-0-4 to hosts file
Initializing...
Setting host.containerhelper.internal to 172.20.144.1 in container hosts file
Starting Container
Hostname is s16160-de21-0-46256-52782
PublicDnsName is s16160-de21-0-46256-52782
Using NavUserPassword Authentication
Starting Local SQL Server
Starting Internet Information Server
Creating Self Signed Certificate
Self Signed Certificate Thumbprint 9C6A83F41973C50A18E68C954C081F2832BCF668
DNS identity s16160-de21-0-46256-52782
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
Using license file 'c:\run\my\license.bclicense'
Import License
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.
Assign Premium plan for ADMIN
Container IP Address: 172.20.155.86
Container Hostname  : s16160-de21-0-46256-52782
Container Dns Name  : s16160-de21-0-46256-52782
Web Client          : http://s16160-de21-0-46256-52782/BC/?tenant=default
Dev. Server         : http://s16160-de21-0-46256-52782
Dev. ServerInstance : BC
Dev. Server Tenant  : default
Setting s16160-de21-0-46256-52782 to 172.20.155.86 in host hosts file
Setting s16160-de21-0-46256-52782-default to 172.20.155.86 in host hosts file
Setting s16160-de21-0-46256-52782-default to 172.20.155.86 in container hosts file

Files:
http://s16160-de21-0-46256-52782:8080/ms-dynamics-smb-al-latest.vsix

Container Total Physical Memory is 18.0Gb
Container Free Physical Memory is 11.1Gb

Initialization took 56 seconds
Ready for connections!

[skipped]

BCCC 4.0.14 (Current, working)

PARAMETERS

Pipeline name                   M365DeliveryDateDetermination-PR_M365DeliveryDateDetermination_M365DeliveryDateDetermination
Container name                  s16160-de21-3-51409-52781
Image name                      sandbox:21.3.51409.52781-de-db
ArtifactUrl                     https://bcartifacts.azureedge.net/sandbox/21.3.51409.52781/de
[skipped]

BCCC 4.0.14 (NextMajor, FAILED)

PARAMETERS

Pipeline name                   M365DeliveryDateDetermination-PR_M365DeliveryDateDetermination_M365DeliveryDateDetermination
Container name                  s16160-de22-0-52814-0
Image name                      sandbox:22.0.52814.0-de-db
ArtifactUrl                     https://bcinsider.azureedge.net/sandbox/22.0.52814.0/de
[skipped]

PULLING GENERIC IMAGE

Pulling mcr.microsoft.com/businesscentral:10.0.17763.3887

Pulling generic image took 0 seconds

CREATING CONTAINER

WARNING: Container name should not exceed 15 characters
BcContainerHelper is version 4.0.14
BcContainerHelper is running as administrator
HyperV is Enabled
UsePsSession is True
Host is Microsoft Windows Server 2019 Datacenter - 10.0.17763.3887
Docker Client Version is 19.03.2
Docker Server Version is 19.03.2
Removing Desktop shortcuts
Fetching all docker images
Fetching all docker volumes
ArtifactUrl and ImageName specified
Building image sandbox:22.0.52814.0-de-db based on mcr.microsoft.com/businesscentral:10.0.17763.3887 with https://bcinsider.azureedge.net/sandbox/22.0.52814.0/de
Pulling latest image mcr.microsoft.com/businesscentral:10.0.17763.3887
10.0.17763.3887: Pulling from businesscentral
Generic Tag: 1.0.2.13
Container OS Version: 10.0.17763.3887 (ltsc2019)
Host OS Version: 10.0.17763.3887 (ltsc2019)
Using process isolation
Patching SetupConfiguration.ps1 due to issue #2874
Patching prompt.ps1 due to issue #2891
Base image is generic image 1.0.2.13 or below, installing dotnet 6.0.13
Downloading c:\bcartifacts.cache\f202d0ef.oea\my\SetupConfiguration.ps1
Using WebClient
Downloading c:\bcartifacts.cache\f202d0ef.oea\my\Prompt.ps1
Using WebClient
Downloading c:\bcartifacts.cache\f202d0ef.oea\my\dotnet-hosting-6.0.13-win.exe
Using WebClient
Using license file C:\BcBuild\MODUSSOLDEVAGT1\CiCdStorage\Licenses\BC21.bclicense
Files in c:\bcartifacts.cache\f202d0ef.oea\my:
- dotnet-hosting-6.0.13-win.exe
- Prompt.ps1
- SetupConfiguration.ps1
Copying Platform Artifacts
c:\bcartifacts.cache\sandbox\22.0.52814.0\platform
Copying Database
Copying Licensefile
Copying ConfigurationPackages
C:\bcartifacts.cache\sandbox\22.0.52814.0\de\ConfigurationPackages
Copying Extensions
C:\bcartifacts.cache\sandbox\22.0.52814.0\de\Extensions
Copying Applications.DE
C:\bcartifacts.cache\sandbox\22.0.52814.0\de\Applications.DE
c:\bcartifacts.cache\f202d0ef.oea
Sending build context to Docker daemon  2.493GB

Step 1/7 : FROM mcr.microsoft.com/businesscentral:10.0.17763.3887
 ---> 23f5b3bb38d6
Step 2/7 : ENV DatabaseServer=localhost DatabaseInstance=SQLEXPRESS DatabaseName=CRONUS IsBcSandbox=Y artifactUrl=https://bcinsider.azureedge.net/sandbox/22.0.52814.0/de?sv=2021-06-08&ss=b&srt=sco&spr=https&st=2022-09-15T00%3A00%3A00Z&se=2023-04-01T00%3A00%3A00Z&sp=rl&sig=rBQiC8y0zbuWC66i2BJcVhydR3XD2aaz47aJ6q6zEss%3D&lazy=0.0.0.150 filesOnly=False
 ---> Running in 8e47755140ef
Removing intermediate container 8e47755140ef
 ---> fea436d52f28
Step 3/7 : COPY my /run/
 ---> d3c90463dc98
Step 4/7 : COPY NAVDVD /NAVDVD/
 ---> e472b899f42b
Step 5/7 : RUN start-process -Wait -FilePath "c:\run\dotnet-hosting-6.0.13-win.exe" -ArgumentList /quiet
 ---> Running in 617c68982f73
Removing intermediate container 617c68982f73
 ---> 068750a87a98
Step 6/7 : RUN \Run\start.ps1 -installOnly -multitenant
 ---> Running in 3d3352616da9
c:\run\my folder doesn't exist, creating it
Using installer from C:\Run\210-new
Installing Business Central
Installing from DVD
Starting Local SQL Server
Starting Internet Information Server
Copying Service Tier Files
C:\NAVDVD\ServiceTier\Program Files
C:\NAVDVD\ServiceTier\System64Folder
Copying PowerShell Scripts
C:\NAVDVD\WindowsPowerShellScripts\Cloud\NAVAdministration
C:\NAVDVD\WindowsPowerShellScripts\WebSearch
Copying Web Client Files
C:\NAVDVD\WebClient\Microsoft Dynamics NAV
Copying ModernDev Files
C:\NAVDVD
C:\NAVDVD\ModernDev\program files\Microsoft Dynamics NAV
Copying additional files
Copying ConfigurationPackages
C:\NAVDVD\ConfigurationPackages
Copying Test Assemblies
C:\NAVDVD\Test Assemblies
Copying Extensions
C:\NAVDVD\Extensions
Copying Applications
C:\NAVDVD\Applications
Copying Applications.DE
C:\NAVDVD\Applications.DE
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 CRONUS 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 253 seconds
Installation complete
Removing intermediate container 3d3352616da9
 ---> 6302e80532c8
Step 7/7 : LABEL legal="http://go.microsoft.com/fwlink/?LinkId=837447"       created="202302030847"       nav=""       cu=""       multitenant="Y" country="DE"       version="22.0.52814.0"       platform="22.0.52718.0"
 ---> Running in ead486a8e4eb
Removing intermediate container ead486a8e4eb
 ---> f918c7c86a3e
Successfully built f918c7c86a3e
Successfully tagged sandbox:22.0.52814.0-de-db
Building image took 548 seconds
Using image sandbox:22.0.52814.0-de-db
Creating Container s16160-de22-0-52814-0
Style: sandbox
Multitenant: Yes
Version: 22.0.52814.0
Platform: 22.0.52718.0
Generic Tag: 1.0.2.13
Container OS Version: 10.0.17763.3887 (ltsc2019)
Host OS Version: 10.0.17763.3887 (ltsc2019)
Patching prompt.ps1 due to issue #2891
Using process isolation
Using locale de-DE
Disabling the standard eventlog dump to container log every 2 seconds (use -dumpEventLog to enable)
Downloading C:\ProgramData\BcContainerHelper\Extensions\s16160-de22-0-52814-0\my\Prompt.ps1
Using WebClient
Using license file C:\BcBuild\MODUSSOLDEVAGT1\CiCdStorage\Licenses\BC21.bclicense
Patching container to install dotnet 6.0.13
Downloading C:\ProgramData\BcContainerHelper\Extensions\s16160-de22-0-52814-0\my\dotnet-win.exe
Using WebClient
Additional Parameters:
--volume "C:\BuildAgent\vsts-agent-win-x64-2.153.1\_work\2236\s:c:\sources"
--volume "C:\BcBuild\MODUSSOLDEVAGT1\CiCdStorage:c:\shared"
--env customNavSettings=EnableTaskScheduler=False
Files in C:\ProgramData\BcContainerHelper\Extensions\s16160-de22-0-52814-0\my:
- AdditionalOutput.ps1
- dotnet-win.exe
- HelperFunctions.ps1
- license.bclicense
- MainLoop.ps1
- Prompt.ps1
- SetupNavUsers.ps1
- SetupVariables.ps1
- updatehosts.ps1
Creating container s16160-de22-0-52814-0 from image sandbox:22.0.52814.0-de-db
8c7524be9cb1be5672aa27886fb5c3b05631582f15cf752f1763192a2db16014
Waiting for container s16160-de22-0-52814-0 to be ready
Generic image is 1.0.2.13 or below, installing dotnet 6.0.13
Adding S16160-DE22-0-5 to hosts file
Initializing...
Setting host.containerhelper.internal to 172.20.144.1 in container hosts file
Starting Container
Hostname is s16160-de22-0-52814-0
PublicDnsName is s16160-de22-0-52814-0
Using NavUserPassword Authentication
Starting Local SQL Server
Starting Internet Information Server
Creating Self Signed Certificate
Self Signed Certificate Thumbprint 6BAF1567F092B80D3A0CA1BA7FB997A50FB72281
DNS identity s16160-de22-0-52814-0
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
Using license file 'c:\run\my\license.bclicense'
Import License
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
WARNING: This license is not compatible with this version of Business Central.
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.
WARNING: This license is not compatible with this version of Business Central.
WARNING: This license is not compatible with this version of Business Central.
WARNING: This license is not compatible with this version of Business Central.
Assign Premium plan for ADMIN
Container IP Address: 172.20.156.25
Container Hostname  : s16160-de22-0-52814-0
Container Dns Name  : s16160-de22-0-52814-0
Web Client          : http://s16160-de22-0-52814-0/BC/?tenant=default
Dev. Server         : http://s16160-de22-0-52814-0
Dev. ServerInstance : BC
Dev. Server Tenant  : default
Setting s16160-de22-0-52814-0 to 172.20.156.25 in host hosts file
Setting s16160-de22-0-52814-0-default to 172.20.156.25 in host hosts file
Setting s16160-de22-0-52814-0-default to 172.20.156.25 in container hosts file

Files:
http://s16160-de22-0-52814-0:8080/ms-dynamics-smb-al-latest.vsix

Container Total Physical Memory is 18.0Gb
Container Free Physical Memory is 11.0Gb

Initialization took 49 seconds
Ready for connections!

[skipped]

RUNNING TESTS

Running tests for App 06b17c18-e1b3-458b-8bbc-73846bf8883e in C:\BuildAgent\vsts-agent-win-x64-2.153.1\_work\2236\s\test
Connecting to http://localhost:80/BC/cs?tenant=default
Run-Tests, open page 130455
at Run-Tests, C:\ProgramData\BcContainerHelper\Extensions\s16160-de22-0-52814-0\PsTestTool\PsTestFunctions.ps1: line 537
at <ScriptBlock>, <No file>: line 75
Cannot open page 130455. You might need to import the test toolkit to the container and/or remove the folder C:\ProgramData\BcContainerHelper\Extensions\s16160-de22-0-52814-0\PsTestTool and retry. You might also have URL or Company name wrong.

Exception Script Stack Trace:
at Run-Tests, C:\ProgramData\BcContainerHelper\Extensions\s16160-de22-0-52814-0\PsTestTool\PsTestFunctions.ps1: line 537
at <ScriptBlock>, <No file>: line 75

PowerShell Call Stack:
at Invoke-ScriptInBcContainer, C:\Program Files\WindowsPowerShell\Modules\BcContainerHelper\4.0.14\ContainerHandling\Invoke-ScriptInNavContainer.ps1: line 71
at Run-TestsInBcContainer, C:\Program Files\WindowsPowerShell\Modules\BcContainerHelper\4.0.14\AppHandling\Run-TestsInNavContainer.ps1: line 377
at <ScriptBlock>, C:\Program Files\WindowsPowerShell\Modules\BcContainerHelper\4.0.14\AppHandling\Run-AlPipeline.ps1: line 710
at <ScriptBlock>, C:\Program Files\WindowsPowerShell\Modules\BcContainerHelper\4.0.14\AppHandling\Run-AlPipeline.ps1: line 2091
at <ScriptBlock>, C:\Program Files\WindowsPowerShell\Modules\BcContainerHelper\4.0.14\AppHandling\Run-AlPipeline.ps1: line 2033
at <ScriptBlock>, C:\Program Files\WindowsPowerShell\Modules\BcContainerHelper\4.0.14\AppHandling\Run-AlPipeline.ps1: line 1977
at <ScriptBlock>, C:\Program Files\WindowsPowerShell\Modules\BcContainerHelper\4.0.14\AppHandling\Run-AlPipeline.ps1: line 787
at Run-AlPipeline, C:\Program Files\WindowsPowerShell\Modules\BcContainerHelper\4.0.14\AppHandling\Run-AlPipeline.ps1: line 749
at <ScriptBlock>, C:\BcBuild\MODUSSOLDEVAGT1\execute.ps1: line 1037
at <ScriptBlock>, C:\BcBuild\MODUSSOLDEVAGT1\execute.ps1: line 717
at <ScriptBlock>, C:\BuildAgent\vsts-agent-win-x64-2.153.1\_work\_temp\811c05c4-c19d-4919-9c3d-beb56cd9aeb1.ps1: line 2
at <ScriptBlock>, <No file>: line 1

Container Free Physical Memory: 9.3Gb

Services in container s16160-de22-0-52814-0:
- MicrosoftDynamicsNavServer$BC is Running
- MSSQL$SQLEXPRESS is Running

at Invoke-ScriptInBcContainer, C:\Program Files\WindowsPowerShell\Modules\BcContainerHelper\4.0.14\ContainerHandling\Invoke-ScriptInNavContainer.ps1: line 112
at Run-TestsInBcContainer, C:\Program Files\WindowsPowerShell\Modules\BcContainerHelper\4.0.14\AppHandling\Run-TestsInNavContainer.ps1: line 377
at <ScriptBlock>, C:\Program Files\WindowsPowerShell\Modules\BcContainerHelper\4.0.14\AppHandling\Run-AlPipeline.ps1: line 710
at <ScriptBlock>, C:\Program Files\WindowsPowerShell\Modules\BcContainerHelper\4.0.14\AppHandling\Run-AlPipeline.ps1: line 2091
at <ScriptBlock>, C:\Program Files\WindowsPowerShell\Modules\BcContainerHelper\4.0.14\AppHandling\Run-AlPipeline.ps1: line 2033
at <ScriptBlock>, C:\Program Files\WindowsPowerShell\Modules\BcContainerHelper\4.0.14\AppHandling\Run-AlPipeline.ps1: line 1977
at <ScriptBlock>, C:\Program Files\WindowsPowerShell\Modules\BcContainerHelper\4.0.14\AppHandling\Run-AlPipeline.ps1: line 787
at Run-AlPipeline, C:\Program Files\WindowsPowerShell\Modules\BcContainerHelper\4.0.14\AppHandling\Run-AlPipeline.ps1: line 749
at <ScriptBlock>, C:\BcBuild\MODUSSOLDEVAGT1\execute.ps1: line 1037
at <ScriptBlock>, C:\BcBuild\MODUSSOLDEVAGT1\execute.ps1: line 717
at <ScriptBlock>, C:\BuildAgent\vsts-agent-win-x64-2.153.1\_work\_temp\811c05c4-c19d-4919-9c3d-beb56cd9aeb1.ps1: line 2
at <ScriptBlock>, <No file>: line 1
Run-TestsInBcContainer Telemetry Correlation Id: df6e0250-5e5a-46b7-abbf-096956a03600
Removing Session s16160-de22-0-52814-0
Removing container s16160-de22-0-52814-0
Removing entries from hosts
Removing s16160-de22-0-52814-0 from container hosts file
Removing s16160-de22-0-52814-0-* from container hosts file
Removing Desktop shortcuts
Removing C:\ProgramData\BcContainerHelper\Extensions\s16160-de22-0-52814-0
Run-AlPipeline Telemetry Correlation Id: 62a6181b-fa69-498e-8f22-85177c556503
Cannot open page 130455. You might need to import the test toolkit to the container and/or remove the folder C:\ProgramData\BcContainerHelper\Extensions\s16160-de22-0-52814-0\PsTestTool and retry. You might also have URL or Company name wrong. at Run-TestsInBcContainer, C:\Program Files\WindowsPowerShell\Modules\BcContainerHelper\4.0.14\AppHandling\Run-TestsInNavContainer.ps1: line 516
at <ScriptBlock>, C:\Program Files\WindowsPowerShell\Modules\BcContainerHelper\4.0.14\AppHandling\Run-AlPipeline.ps1: line 710
at <ScriptBlock>, C:\Program Files\WindowsPowerShell\Modules\BcContainerHelper\4.0.14\AppHandling\Run-AlPipeline.ps1: line 2091
at <ScriptBlock>, C:\Program Files\WindowsPowerShell\Modules\BcContainerHelper\4.0.14\AppHandling\Run-AlPipeline.ps1: line 2033
at <ScriptBlock>, C:\Program Files\WindowsPowerShell\Modules\BcContainerHelper\4.0.14\AppHandling\Run-AlPipeline.ps1: line 1977
at <ScriptBlock>, C:\Program Files\WindowsPowerShell\Modules\BcContainerHelper\4.0.14\AppHandling\Run-AlPipeline.ps1: line 787
at Run-AlPipeline, C:\Program Files\WindowsPowerShell\Modules\BcContainerHelper\4.0.14\AppHandling\Run-AlPipeline.ps1: line 749
at <ScriptBlock>, C:\BcBuild\MODUSSOLDEVAGT1\execute.ps1: line 1037
at <ScriptBlock>, C:\BcBuild\MODUSSOLDEVAGT1\execute.ps1: line 717
at <ScriptBlock>, C:\BuildAgent\vsts-agent-win-x64-2.153.1\_work\_temp\811c05c4-c19d-4919-9c3d-beb56cd9aeb1.ps1: line 2
at <ScriptBlock>, <No file>: line 1
##[error]Cannot open page 130455. You might need to import the test toolkit to the container and/or remove the folder 
C:\ProgramData\BcContainerHelper\Extensions\s16160-de22-0-52814-0\PsTestTool and retry. You might also have URL or 
Company name wrong.
At C:\Program Files\WindowsPowerShell\Modules\BcContainerHelper\4.0.14\AppHandling\Run-TestsInNavContainer.ps1:516 
char:17
+                 throw $_.Exception.Message
+                 ~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : OperationStopped: (Cannot open pag...any name wrong.:String) [], RuntimeException
    + FullyQualifiedErrorId : Cannot open page 130455. You might need to import the test toolkit to the container and/ 
   or remove the folder C:\ProgramData\BcContainerHelper\Extensions\s16160-de22-0-52814-0\PsTestTool and retry. You m  
  ight also have URL or Company name wrong.
freddydk commented 1 year ago

This only happens with NextMajor? Will have a look whether this is another dotnet 6 problem. Thanks for reporting.

MODUSCarstenScholling commented 1 year ago

Hi Freddy, no, it is not. It is general für all images at least beginning with 20.2, most likely lower.

I have implemented a 10 times loop, waiting 5 seconds each and trying to get the test $form in PsTestFunctions.ps1 But still after 50 seconds, the $form could not be created (Write-Warning is not shown, but it takes 50 seconds to process).

    $tries = 10;

    do
    {
        $form = $clientContext.OpenForm($testPage)

        if (!($form)) {
            Write-Warning -Message "Could not open page $($testPage). Retrying in 5 seconds.";
            Start-Sleep -Seconds 5;

            $tries -= 1;
        }
    }
    while(!$form -and ($tries -gt 0));

    if (!($form)) {
        throw "Cannot open page $testPage. You might need to import the test toolkit to the container and/or remove the folder $PSScriptRoot and retry. You might also have URL or Company name wrong."
    }
2023-02-06T09:05:13.8395047Z Compilation ended at '10:05:12.930'.
2023-02-06T09:05:13.8400052Z 
2023-02-06T09:05:13.9878003Z   _____                            _   _               _            _     _              _ _    _ _   
2023-02-06T09:05:13.9890237Z  |_   _|                          | | (_)             | |          | |   | |            | | |  (_) |  
2023-02-06T09:05:13.9901448Z    | |  _ __ ___  _ __   ___  _ __| |_ _ _ __   __ _  | |_ ___  ___| |_  | |_ ___   ___ | | | ___| |_ 
2023-02-06T09:05:13.9919428Z    | | | '_ ` _ \| '_ \ / _ \| '__| __| | '_ \ / _` | | __/ _ \/ __| __| | __/ _ \ / _ \| | |/ / | __|
2023-02-06T09:05:13.9936482Z   _| |_| | | | | | |_) | (_) | |  | |_| | | | | (_| | | ||  __/\__ \ |_  | || (_) | (_) | |   <| | |_ 
2023-02-06T09:05:13.9953356Z  |_____|_| |_| |_| .__/ \___/|_|   \__|_|_| |_|\__, |  \__\___||___/\__|  \__\___/ \___/|_|_|\_\_|\__|
2023-02-06T09:05:13.9970963Z                  | |                            __/ |                                                 
2023-02-06T09:05:13.9989375Z                  |_|                           |___/                                                  
2023-02-06T09:05:17.0478718Z Synchronizing Permissions Mock on default
2023-02-06T09:05:17.3269554Z App successfully synchronized
2023-02-06T09:05:17.3632716Z Installing Permissions Mock on default
2023-02-06T09:05:36.6053777Z App successfully installed
2023-02-06T09:05:36.6553507Z Synchronizing Test Runner on default
2023-02-06T09:05:37.1986779Z App successfully synchronized
2023-02-06T09:05:37.2134873Z Installing Test Runner on default
2023-02-06T09:05:37.9339340Z App successfully installed
2023-02-06T09:05:37.9830532Z Synchronizing Any on default
2023-02-06T09:05:38.0367530Z App successfully synchronized
2023-02-06T09:05:38.0508610Z Installing Any on default
2023-02-06T09:05:38.2544135Z App successfully installed
2023-02-06T09:05:38.3024361Z Synchronizing Library Assert on default
2023-02-06T09:05:38.3565039Z App successfully synchronized
2023-02-06T09:05:38.3732974Z Installing Library Assert on default
2023-02-06T09:05:38.5773439Z App successfully installed
2023-02-06T09:05:38.6223285Z Skipping app 'C:\Applications.DE\Microsoft_Permissions Mock_21.2.49946.52834.app' as it is already installed
2023-02-06T09:05:38.6707622Z Synchronizing Library Variable Storage on default
2023-02-06T09:05:38.7283196Z App successfully synchronized
2023-02-06T09:05:38.7426757Z Installing Library Variable Storage on default
2023-02-06T09:05:38.9774064Z App successfully installed
2023-02-06T09:05:48.5274371Z Publishing C:\ProgramData\BcContainerHelper\Extensions\s16220-de21-2-49946-52834\e2331b51-946d-4faf-b088-cfe180ff8cb1\Microsoft_System Application Test Library_21.2.49946.52834.app
2023-02-06T09:05:54.4178304Z Synchronizing System Application Test Library on tenant default
2023-02-06T09:05:55.2567032Z Installing System Application Test Library on tenant default
2023-02-06T09:05:57.9721930Z App Microsoft_System Application Test Library_21.2.49946.52834.app successfully published
2023-02-06T09:06:08.0213970Z Publishing C:\ProgramData\BcContainerHelper\Extensions\s16220-de21-2-49946-52834\aa51ae12-42e7-4b67-8652-0ad2f8277eab\Microsoft_Tests-TestLibraries_21.2.49946.52834.app
2023-02-06T09:06:17.9136434Z Synchronizing Tests-TestLibraries on tenant default
2023-02-06T09:06:19.2833481Z Installing Tests-TestLibraries on tenant default
2023-02-06T09:06:25.6515193Z App Microsoft_Tests-TestLibraries_21.2.49946.52834.app successfully published
2023-02-06T09:06:26.0971281Z TestToolkit successfully imported
2023-02-06T09:06:26.5539326Z 
2023-02-06T09:06:26.5557410Z Importing Test Toolkit took 73 seconds
2023-02-06T09:06:26.5574624Z    _____                      _ _ _               _           _                           
2023-02-06T09:06:26.5592913Z   / ____|                    (_) (_)             | |         | |                          
2023-02-06T09:06:26.5611075Z  | |     ___  _ __ ___  _ __  _| |_ _ __   __ _  | |_ ___ ___| |_    __ _ _ __  _ __  ___ 
2023-02-06T09:06:26.5628985Z  | |    / _ \| '_ ` _ \| '_ \| | | | '_ \ / _` | | __/ _ \ __| __|  / _` | '_ \| '_ \/ __|
2023-02-06T09:06:26.5646742Z  | |____ (_) | | | | | | |_) | | | | | | | (_| | | |_  __\__ \ |_  | (_| | |_) | |_) \__ \
2023-02-06T09:06:26.5664818Z   \_____\___/|_| |_| |_| .__/|_|_|_|_| |_|\__, |  \__\___|___/\__|  \__,_| .__/| .__/|___/
2023-02-06T09:06:26.5684166Z                        | |                 __/ |                         | |   | |        
2023-02-06T09:06:26.5702056Z                        |_|                |___/                          |_|   |_|        
2023-02-06T09:06:26.5713868Z 
2023-02-06T09:06:26.5732591Z Compiling C:\BuildAgents\MODUSSOLDEVAGT11\_work\10\s\test
2023-02-06T09:06:28.6871320Z             Updated C:\BuildAgents\MODUSSOLDEVAGT11\_work\10\s\test\app.json preprocessorSymbols to PROD, CLEAN12, CLEAN13, CLEAN14, CLEAN15, CLEAN16, CLEAN17, CLEAN18, BC12, BC13, BC14, BC15, BC16, BC17, BC18, BC19, BC20, BC21.
2023-02-06T09:06:28.6896808Z             Copying current dependencies to packages folder C:\BuildAgents\MODUSSOLDEVAGT11\_work\10\s\.packages.
2023-02-06T09:06:33.3587095Z Using Symbols Folder: C:\BuildAgents\MODUSSOLDEVAGT11\_work\10\s\.packages
2023-02-06T09:06:34.1341175Z Processing dependency Microsoft_Application_21.2.0.0 ()
2023-02-06T09:06:34.1364121Z Dependency App exists
2023-02-06T09:06:34.1383592Z Processing dependency Microsoft_System_21.0.0.0 ()
2023-02-06T09:06:34.1407448Z Dependency App exists
2023-02-06T09:06:34.1427699Z Processing dependency Microsoft_Tests-TestLibraries_21.2.0.0 (5d86850b-0d76-4eca-bd7b-951ad998e997)
2023-02-06T09:06:34.1466729Z Downloading symbols: Microsoft_Tests-TestLibraries_21.2.49946.52834.app
2023-02-06T09:06:34.1484420Z Url : http://172.20.147.44:7049/BC/dev/packages?appId=5d86850b-0d76-4eca-bd7b-951ad998e997&versionText=21.2.0.0&tenant=default
2023-02-06T09:06:34.1504796Z Using WebClient
2023-02-06T09:06:37.0460980Z Adding dependency to System Application Test Library from Microsoft
2023-02-06T09:06:37.0480739Z Adding dependency to Library Variable Storage from Microsoft
2023-02-06T09:06:37.0503022Z Adding dependency to Permissions Mock from Microsoft
2023-02-06T09:06:37.0523328Z Processing dependency MODUS Consult GmbH_MODUS M365 Furniture Base_21.2.0.0 (b52e4deb-ef6a-45ce-8f0e-95b24e270862)
2023-02-06T09:06:37.0548784Z Dependency App exists
2023-02-06T09:06:37.0567766Z Processing dependency MODUS Consult GmbH_MODUS M365 Base_20.2.22121402.22121402 (ba5e92a6-b5c1-471d-ad51-1f407e627c27)
2023-02-06T09:06:37.0591494Z Dependency App exists
2023-02-06T09:06:37.0611602Z Processing dependency MODUS Consult GmbH_MODUS M365 Base Test_20.2.22121402.22121402 (80ae93f1-8e1d-4e59-a265-0f8141ffe6af)
2023-02-06T09:06:37.0635948Z Dependency App exists
2023-02-06T09:06:37.0655362Z Processing dependency MODUS Consult GmbH_MODUS M365 Delivery Date Determination_20.2.22113001.0 (2d749fca-44f5-49fa-bb4d-c4dd55f5711e)
2023-02-06T09:06:37.0677105Z Dependency App exists
2023-02-06T09:06:37.0697051Z Processing dependency MODUS Consult GmbH_MODUS M365 Delivery Date Determination Test_20.2.22113001.0 (06b17c18-e1b3-458b-8bbc-73846bf8883e)
2023-02-06T09:06:37.0720539Z Dependency App exists
2023-02-06T09:06:37.0746035Z Processing dependency MODUS Consult GmbH_MODUS M365 Tests-TestLibraries_18.0.22100401.22100401 (64d70f09-c534-4b17-948c-0d06a83cc8a7)
2023-02-06T09:06:37.0772363Z Dependency App exists
2023-02-06T09:06:37.0787911Z Processing dependency Microsoft_System Application Test Library_21.2.0.0 (9856ae4f-d1a7-46ef-89bb-6ef056398228)
2023-02-06T09:06:37.0886520Z Downloading symbols: Microsoft_System Application Test Library_21.2.49946.52834.app
2023-02-06T09:06:37.0905283Z Url : http://172.20.147.44:7049/BC/dev/packages?appId=9856ae4f-d1a7-46ef-89bb-6ef056398228&versionText=21.2.0.0&tenant=default
2023-02-06T09:06:37.0924367Z Using WebClient
2023-02-06T09:06:38.7563521Z Adding dependency to System Application from Microsoft
2023-02-06T09:06:38.7584003Z Adding dependency to Any from Microsoft
2023-02-06T09:06:38.7603189Z Processing dependency Microsoft_Library Variable Storage_21.2.0.0 (5095f467-0a01-4b99-99d1-9ff1237d286f)
2023-02-06T09:06:38.7642080Z Downloading symbols: Microsoft_Library Variable Storage_21.2.49946.52834.app
2023-02-06T09:06:38.7660085Z Url : http://172.20.147.44:7049/BC/dev/packages?appId=5095f467-0a01-4b99-99d1-9ff1237d286f&versionText=21.2.0.0&tenant=default
2023-02-06T09:06:38.7681113Z Using WebClient
2023-02-06T09:06:40.4516527Z Adding dependency to Library Assert from Microsoft
2023-02-06T09:06:40.4537135Z Processing dependency Microsoft_Permissions Mock_21.2.0.0 (40860557-a18d-42ad-aecb-22b7dd80dc80)
2023-02-06T09:06:40.4576243Z Downloading symbols: Microsoft_Permissions Mock_21.2.49946.52834.app
2023-02-06T09:06:40.4594651Z Url : http://172.20.147.44:7049/BC/dev/packages?appId=40860557-a18d-42ad-aecb-22b7dd80dc80&versionText=21.2.0.0&tenant=default
2023-02-06T09:06:40.4615225Z Using WebClient
2023-02-06T09:06:43.1775943Z Processing dependency Microsoft_System Application_21.2.0.0 (63ca2fa4-4f03-4f2b-a480-172fef340d3f)
2023-02-06T09:06:43.1797613Z Dependency App exists
2023-02-06T09:06:43.1817614Z Processing dependency Microsoft_Any_21.2.0.0 (e7320ebb-08b3-4406-b1ec-b4927d3e280b)
2023-02-06T09:06:43.1914665Z Downloading symbols: Microsoft_Any_21.2.49946.52834.app
2023-02-06T09:06:43.1932192Z Url : http://172.20.147.44:7049/BC/dev/packages?appId=e7320ebb-08b3-4406-b1ec-b4927d3e280b&versionText=21.2.0.0&tenant=default
2023-02-06T09:06:43.1950709Z Using WebClient
2023-02-06T09:06:44.8313344Z Processing dependency Microsoft_Library Assert_21.2.0.0 (dd0be2ea-f733-4d65-bb34-a28f4624fb14)
2023-02-06T09:06:44.8354433Z Downloading symbols: Microsoft_Library Assert_21.2.49946.52834.app
2023-02-06T09:06:44.8371710Z Url : http://172.20.147.44:7049/BC/dev/packages?appId=dd0be2ea-f733-4d65-bb34-a28f4624fb14&versionText=21.2.0.0&tenant=default
2023-02-06T09:06:44.8392018Z Using WebClient
2023-02-06T09:06:46.5587186Z Compiling...
2023-02-06T09:06:46.5620707Z .\alc.exe /project:"c:\sources\test" /packagecachepath:"c:\sources\.packages" /out:"c:\sources\.output\MODUS Consult GmbH_MODUS M365 Furniture Base Test_21.2.23020601.0.app" /assemblyprobingpaths:"C:\Program Files\Microsoft Dynamics NAV\210\Service","C:\Program Files (x86)\Open XML SDK\V2.5\lib","c:\Windows\Microsoft.NET\Assembly","C:\Test Assemblies\Mock Assemblies"
2023-02-06T09:06:51.7001675Z C:\BuildAgents\MODUSSOLDEVAGT11\_work\10\s\.output\MODUS Consult GmbH_MODUS M365 Furniture Base Test_21.2.23020601.0.app successfully created in 23 seconds
2023-02-06T09:06:51.7058278Z MODUS Consult GmbH_MODUS M365 Furniture Base Test_21.2.23020601.0.app copied to C:\BuildAgents\MODUSSOLDEVAGT11\_work\10\s\.packages
2023-02-06T09:06:52.1607658Z Microsoft (R) AL Compiler version 10.4.11.25929
2023-02-06T09:06:52.1626791Z Copyright (C) Microsoft Corporation. All rights reserved
2023-02-06T09:06:52.1638504Z 
2023-02-06T09:06:52.1656825Z Compilation started for project 'MODUS M365 Furniture Base Test' containing '9' files at '10:06:46.831'.
2023-02-06T09:06:52.1668696Z 
2023-02-06T09:06:52.1680643Z 
2023-02-06T09:06:52.1698923Z Compilation ended at '10:06:51.647'.
2023-02-06T09:06:52.1710229Z 
2023-02-06T09:06:52.1953252Z 
2023-02-06T09:06:52.1971508Z Compiling apps, test apps and importing test toolkit took 184 seconds
2023-02-06T09:06:52.1990899Z   _____ _             _                                     
2023-02-06T09:06:52.2009867Z  / ____(_)           (_)                                    
2023-02-06T09:06:52.2027738Z  | (__  _  __ _ _ __  _ _ __   __ _    __ _ _ __  _ __  ___ 
2023-02-06T09:06:52.2045460Z  \___ \| |/ _` | '_ \| | '_ \ / _` |  / _` | '_ \| '_ \/ __|
2023-02-06T09:06:52.2063780Z  ____) | | (_| | | | | | | | | (_| | | (_| | |_) | |_) \__ \
2023-02-06T09:06:52.2082545Z |_____/|_|\__, |_| |_|_|_| |_|\__, |  \__,_| .__/| .__/|___/
2023-02-06T09:06:52.2100749Z            __/ |               __/ |       | |   | |        
2023-02-06T09:06:52.2119848Z           |___/               |___/        |_|   |_|        
2023-02-06T09:06:56.9252183Z Downloading Signing Tools
2023-02-06T09:06:57.1080746Z Installing Signing Tools
2023-02-06T09:07:02.5976666Z Signing c:\sources\.output\MODUS Consult GmbH_MODUS M365 Furniture Base_21.2.23020601.0.app
2023-02-06T09:07:03.2406865Z Done Adding Additional Store
2023-02-06T09:07:03.9808541Z Successfully signed: c:\sources\.output\MODUS Consult GmbH_MODUS M365 Furniture Base_21.2.23020601.0.app
2023-02-06T09:07:03.9825092Z 
2023-02-06T09:07:04.4295099Z 
2023-02-06T09:07:04.4313141Z Signing apps took 12 seconds
2023-02-06T09:07:04.4331104Z   _____           _        _ _ _                                    _                                         
2023-02-06T09:07:04.4350305Z  |_   _|         | |      | | (_)                                  (_)                                        
2023-02-06T09:07:04.4368661Z    | |  _ __  ___| |_ __ _| | |_ _ __   __ _   _ __  _ __ _____   ___  ___  _   _ ___    __ _ _ __  _ __  ___ 
2023-02-06T09:07:04.4386382Z    | | | '_ \/ __| __/ _` | | | | '_ \ / _` | | '_ \| '__/ _ \ \ / / |/ _ \| | | / __|  / _` | '_ \| '_ \/ __|
2023-02-06T09:07:04.4404789Z   _| |_| | | \__ \ || (_| | | | | | | | (_| | | |_) | | |  __/\ V /| | (_) | |_| \__ \ | (_| | |_) | |_) \__ \
2023-02-06T09:07:04.4423112Z  |_____|_| |_|___/\__\__,_|_|_|_|_| |_|\__, | | .__/|_|  \___| \_/ |_|\___/ \__,_|___/  \__,_| .__/| .__/|___/
2023-02-06T09:07:04.4440781Z                                         __/ | | |                                            | |   | |        
2023-02-06T09:07:04.4458277Z                                        |___/  |_|                                            |_|   |_|        
2023-02-06T09:07:12.4959791Z Publishing C:\ProgramData\BcContainerHelper\Extensions\s16220-de21-2-49946-52834\c888ffb4-a5e1-45c0-ac39-fa7dbbf0c3b9\MODUS Consult GmbH_MODUS M365 Foundation_20.0.23010403.23010501_app.app
2023-02-06T09:07:14.9086525Z Synchronizing MODUS M365 Foundation on tenant default
2023-02-06T09:07:15.4466133Z Installing MODUS M365 Foundation on tenant default
2023-02-06T09:07:17.3598886Z App MODUS Consult GmbH_MODUS M365 Foundation_20.0.23010403.23010501_app.app successfully published
2023-02-06T09:07:25.7427045Z Publishing C:\ProgramData\BcContainerHelper\Extensions\s16220-de21-2-49946-52834\9c936f66-a197-4eaa-897f-2b52e42163e1\MODUS Consult GmbH_MODUS M365 Base_20.2.22121402.22121402_app.app
2023-02-06T09:07:29.6439064Z Synchronizing MODUS M365 Base on tenant default
2023-02-06T09:07:39.4902259Z Installing MODUS M365 Base on tenant default
2023-02-06T09:08:10.3665336Z App MODUS Consult GmbH_MODUS M365 Base_20.2.22121402.22121402_app.app successfully published
2023-02-06T09:08:18.4211765Z Publishing C:\ProgramData\BcContainerHelper\Extensions\s16220-de21-2-49946-52834\33277b94-8e84-4332-947b-79988171e84b\MODUS Consult GmbH_MODUS M365 Packing Unit Management_20.2.22101302.22101302_app.app
2023-02-06T09:08:19.9881140Z Synchronizing MODUS M365 Packing Unit Management on tenant default
2023-02-06T09:08:21.3041644Z Installing MODUS M365 Packing Unit Management on tenant default
2023-02-06T09:08:24.5993786Z App MODUS Consult GmbH_MODUS M365 Packing Unit Management_20.2.22101302.22101302_app.app successfully published
2023-02-06T09:08:32.3635150Z Publishing C:\ProgramData\BcContainerHelper\Extensions\s16220-de21-2-49946-52834\76859c06-ad85-46fa-95f1-0a908f47e166\MODUS Consult GmbH_MODUS M365 Delivery Date Determination_21.0.23011102.23011102_app.app
2023-02-06T09:08:33.2092115Z Synchronizing MODUS M365 Delivery Date Determination on tenant default
2023-02-06T09:08:33.7298020Z Installing MODUS M365 Delivery Date Determination on tenant default
2023-02-06T09:08:35.5028045Z App MODUS Consult GmbH_MODUS M365 Delivery Date Determination_21.0.23011102.23011102_app.app successfully published
2023-02-06T09:08:43.4980283Z Publishing C:\ProgramData\BcContainerHelper\Extensions\s16220-de21-2-49946-52834\aec23b6e-b157-4805-9816-3167f399ecdf\MODUS Consult GmbH_MODUS M365 Furniture Base_21.2.23011201.23011201_app.app
2023-02-06T09:08:44.0812468Z Synchronizing MODUS M365 Furniture Base on tenant default
2023-02-06T09:08:49.0763211Z Installing MODUS M365 Furniture Base on tenant default
2023-02-06T09:08:55.7393382Z App MODUS Consult GmbH_MODUS M365 Furniture Base_21.2.23011201.23011201_app.app successfully published
2023-02-06T09:08:56.1997763Z 
2023-02-06T09:08:56.2016897Z Installing apps took 112 seconds
2023-02-06T09:08:56.2034858Z   _____       _     _ _     _     _                                     
2023-02-06T09:08:56.2052427Z  |  __ \     | |   | (_)   | |   (_)                                    
2023-02-06T09:08:56.2069784Z  | |__) |   _| |__ | |_ ___| |__  _ _ __   __ _    __ _ _ __  _ __  ___ 
2023-02-06T09:08:56.2088005Z  |  ___/ | | | '_ \| | / __| '_ \| | '_ \ / _` |  / _` | '_ \| '_ \/ __|
2023-02-06T09:08:56.2106828Z  | |   | |_| | |_) | | \__ \ | | | | | | | (_| | | (_| | |_) | |_) \__ \
2023-02-06T09:08:56.2124448Z  |_|    \__,_|_.__/|_|_|___/_| |_|_|_| |_|\__, |  \__,_| .__/| .__/|___/
2023-02-06T09:08:56.2142602Z                                            __/ |       | |   | |        
2023-02-06T09:08:56.2160564Z                                           |___/        |_|   |_|        
2023-02-06T09:08:57.6163261Z             Publishing Current Dependent Apps
2023-02-06T09:08:59.2787253Z VERBOSE: Collecting and processing apps...
2023-02-06T09:08:59.3641379Z VERBOSE: Calculating app dependencies...
2023-02-06T09:08:59.4649019Z VERBOSE: Added app MODUS M365 Foundation 20.0.23010403.23010501 MODUS Consult GmbH.
2023-02-06T09:08:59.4670071Z VERBOSE: Added app MODUS M365 Base 20.2.22121402.22121402 MODUS Consult GmbH.
2023-02-06T09:08:59.4922585Z VERBOSE: Added app MODUS M365 Packing Unit Management 20.2.22101302.22101302 MODUS Consult GmbH.
2023-02-06T09:08:59.4944481Z VERBOSE: Added app MODUS M365 Delivery Date Determination 21.0.23011102.23011102 MODUS Consult GmbH.
2023-02-06T09:08:59.5130082Z VERBOSE: Added app MODUS M365 Tests-TestLibraries 18.0.22100401.22100401 MODUS Consult GmbH.
2023-02-06T09:08:59.5485629Z VERBOSE: Added app MODUS M365 Base Test 20.2.22121402.22121402 MODUS Consult GmbH.
2023-02-06T09:08:59.5507929Z VERBOSE: Added app MODUS M365 Delivery Date Determination Test 21.0.23011102.23011102 MODUS Consult GmbH.
2023-02-06T09:09:02.6719113Z             Publishing MODUS M365 Tests-TestLibraries 18.0.22100401.22100401.
2023-02-06T09:09:09.9329314Z Publishing C:\ProgramData\BcContainerHelper\Extensions\s16220-de21-2-49946-52834\fe321726-c713-480f-81f3-a2e511830e90\MODUS Consult GmbH_MODUS M365 Tests-TestLibraries_18.0.22100401.22100401_app.app
2023-02-06T09:09:10.1725701Z Synchronizing MODUS M365 Tests-TestLibraries on tenant default
2023-02-06T09:09:10.2653059Z Installing MODUS M365 Tests-TestLibraries on tenant default
2023-02-06T09:09:11.1710217Z App MODUS Consult GmbH_MODUS M365 Tests-TestLibraries_18.0.22100401.22100401_app.app successfully published
2023-02-06T09:09:11.6936887Z             Publishing MODUS M365 Base Test 20.2.22121402.22121402.
2023-02-06T09:09:19.2845192Z Publishing C:\ProgramData\BcContainerHelper\Extensions\s16220-de21-2-49946-52834\6afc66b5-d0dd-46fd-ae3e-4059b9147bc9\MODUS Consult GmbH_MODUS M365 Base Test_20.2.22121402.22121402_app.app
2023-02-06T09:09:19.8141232Z Synchronizing MODUS M365 Base Test on tenant default
2023-02-06T09:09:19.9138449Z Installing MODUS M365 Base Test on tenant default
2023-02-06T09:09:20.4170296Z App MODUS Consult GmbH_MODUS M365 Base Test_20.2.22121402.22121402_app.app successfully published
2023-02-06T09:09:20.9669527Z             Publishing MODUS M365 Delivery Date Determination Test 21.0.23011102.23011102.
2023-02-06T09:09:28.2841277Z Publishing C:\ProgramData\BcContainerHelper\Extensions\s16220-de21-2-49946-52834\60700f50-2b1b-43ad-9e99-f99aa86fc93c\MODUS Consult GmbH_MODUS M365 Delivery Date Determination Test_21.0.23011102.23011102_app.app
2023-02-06T09:09:28.4934978Z Synchronizing MODUS M365 Delivery Date Determination Test on tenant default
2023-02-06T09:09:28.5965075Z Installing MODUS M365 Delivery Date Determination Test on tenant default
2023-02-06T09:09:28.9438243Z App MODUS Consult GmbH_MODUS M365 Delivery Date Determination Test_21.0.23011102.23011102_app.app successfully published
2023-02-06T09:09:36.8707339Z Publishing C:\ProgramData\BcContainerHelper\Extensions\s16220-de21-2-49946-52834\f4f73707-68da-4c98-9111-42d610e1cd86\MODUS Consult GmbH_MODUS M365 Furniture Base_21.2.23020601.0.app
2023-02-06T09:09:37.6680773Z Synchronizing MODUS M365 Furniture Base on tenant default
2023-02-06T09:09:38.8059462Z Upgrading MODUS M365 Furniture Base on tenant default
2023-02-06T09:09:41.0717058Z App MODUS Consult GmbH_MODUS M365 Furniture Base_21.2.23020601.0.app successfully published
2023-02-06T09:09:49.2319795Z Publishing C:\ProgramData\BcContainerHelper\Extensions\s16220-de21-2-49946-52834\a617e56f-01bc-4982-83d7-1053f30f154c\MODUS Consult GmbH_MODUS M365 Furniture Base Test_21.2.23020601.0.app
2023-02-06T09:09:49.4114083Z Synchronizing MODUS M365 Furniture Base Test on tenant default
2023-02-06T09:09:49.5225553Z Installing MODUS M365 Furniture Base Test on tenant default
2023-02-06T09:09:49.8556653Z App MODUS Consult GmbH_MODUS M365 Furniture Base Test_21.2.23020601.0.app successfully published
2023-02-06T09:09:50.3212532Z 
2023-02-06T09:09:50.3232723Z Publishing apps took 54 seconds
2023-02-06T09:09:50.3271753Z   _____                   _               _            _       
2023-02-06T09:09:50.3290504Z  |  __ \                 (_)             | |          | |      
2023-02-06T09:09:50.3309072Z  | |__) |   _ _ __  _ __  _ _ __   __ _  | |_ ___  ___| |_ ___ 
2023-02-06T09:09:50.3326788Z  |  _  / | | | '_ \| '_ \| | '_ \ / _` | | __/ _ \/ __| __/ __|
2023-02-06T09:09:50.3344967Z  | | \ \ |_| | | | | | | | | | | | (_| | | ||  __/\__ \ |_\__ \
2023-02-06T09:09:50.3363197Z  |_|  \_\__,_|_| |_|_| |_|_|_| |_|\__, |  \__\___||___/\__|___/
2023-02-06T09:09:50.3381898Z                                    __/ |                       
2023-02-06T09:09:50.3400326Z                                   |___/                        
2023-02-06T09:09:50.4103776Z Running tests for App a319f893-1a48-4200-87c2-5be63a4d1b7d in C:\BuildAgents\MODUSSOLDEVAGT11\_work\10\s\test
2023-02-06T09:09:58.1776506Z Connecting to http://localhost:80/BC/cs?tenant=default
2023-02-06T09:10:04.7696957Z Run-Tests, open page 130455
2023-02-06T09:10:55.1232005Z at Run-Tests, C:\ProgramData\BcContainerHelper\Extensions\s16220-de21-2-49946-52834\PsTestTool\PsTestFunctions.ps1: line 551
2023-02-06T09:10:55.1252947Z at <ScriptBlock>, <No file>: line 75
2023-02-06T09:10:55.1554864Z Cannot open page 130455. You might need to import the test toolkit to the container and/or remove the folder C:\ProgramData\BcContainerHelper\Extensions\s16220-de21-2-49946-52834\PsTestTool and retry. You might also have URL or Company name wrong.
2023-02-06T09:10:55.1568557Z 
MODUSCarstenScholling commented 1 year ago

Updated Information: Trying to open page 1 just before the test page fails too...

Running tests for App a319f893-1a48-4200-87c2-5be63a4d1b7d in C:\BuildAgents\MODUSSOLDEVAGT11\_work\10\s\test
Connecting to http://localhost:80/BC/cs?tenant=default
Run-Tests, open page 130455
Could not open page Company Information. What a worst!
Could not open page 130455. Retrying in 5 seconds.
Could not open page 130455. Retrying in 5 seconds.
Could not open page 130455. Retrying in 5 seconds.
Could not open page 130455. Retrying in 5 seconds.
Could not open page 130455. Retrying in 5 seconds.
Could not open page 130455. Retrying in 5 seconds.
Could not open page 130455. Retrying in 5 seconds.
Could not open page 130455. Retrying in 5 seconds.
Could not open page 130455. Retrying in 5 seconds.
Could not open page 130455. Retrying in 5 seconds.
at Run-Tests, C:\ProgramData\BcContainerHelper\Extensions\s16222-de21-4-52563-52836\PsTestTool\PsTestFunctions.ps1: line 557
freddydk commented 1 year ago

In this state? does the container work? can you open the webclient and open the page manually?

MODUSCarstenScholling commented 1 year ago

I can try, but as this is a pipeline process and the last two debug attempts worked and did not show the error, how would I hold the process? Hmm...

I will try to send an email as soon as the issue occurs and then go to sleep for 5 mins in the script. Let me check if that works.

freddydk commented 1 year ago

Or maybe - after the run-tests fails - download the event log from the container to see the reason. You can also try to downgrade containerhelper and the generic image to see whether this is a problem with a spceific version? Alternatively, if you could extract the script to a script I can run locally and troubleshoot - that would help.

vivek-jindal commented 1 year ago

I was also reported this issue in our Build pipelines.

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

Test Company Name () and/or TestCompany Datapack () missing for YTEMPL
Connecting to http://localhost:80/BC/cs?tenant=default
at Run-Tests, C:\ProgramData\BcContainerHelper\Extensions\cicd03-YWHSRF-current\PsTestTool\PsTestFunctions.ps1: line 537
at <ScriptBlock>, <No file>: line 75
Cannot open page 130455. You might need to import the test toolkit to the container and/or remove the folder C:\ProgramData\BcContainerHelper\Extensions\cicd03-YWHSRF-current\PsTestTool and retry. You might also have URL or Company name wrong.

Exception Script Stack Trace:
at Run-Tests, C:\ProgramData\BcContainerHelper\Extensions\cicd03-YWHSRF-current\PsTestTool\PsTestFunctions.ps1: line 537
at <ScriptBlock>, <No file>: line 75

PowerShell Call Stack:
at Invoke-ScriptInBcContainer, C:\Program Files\WindowsPowerShell\Modules\BcContainerHelper\4.0.14\ContainerHandling\Invoke-ScriptInNavContainer.ps1: line 71
at Run-TestsInBcContainer, C:\Program Files\WindowsPowerShell\Modules\BcContainerHelper\4.0.14\AppHandling\Run-TestsInNavContainer.ps1: line 377
at <ScriptBlock>, C:\Users\vmadmin\Downloads\vsts-agent-win-x64-2.210.1\_work\45\s\scripts\Run-AlPipelineINECTA.ps1: line 568
at <ScriptBlock>, C:\Users\vmadmin\Downloads\vsts-agent-win-x64-2.210.1\_work\45\s\scripts\Run-AlPipelineINECTA.ps1: line 1286
at <ScriptBlock>, C:\Users\vmadmin\Downloads\vsts-agent-win-x64-2.210.1\_work\45\s\scripts\Run-AlPipelineINECTA.ps1: line 1240
at <ScriptBlock>, C:\Users\vmadmin\Downloads\vsts-agent-win-x64-2.210.1\_work\45\s\scripts\Run-AlPipelineINECTA.ps1: line 1235
at <ScriptBlock>, C:\Users\vmadmin\Downloads\vsts-agent-win-x64-2.210.1\_work\45\s\scripts\Run-AlPipelineINECTA.ps1: line 616
at global:Run-AlPipelineINECTA, C:\Users\vmadmin\Downloads\vsts-agent-win-x64-2.210.1\_work\45\s\scripts\Run-AlPipelineINECTA.ps1: line 585
at <ScriptBlock>, C:\Users\vmadmin\Downloads\vsts-agent-win-x64-2.210.1\_work\45\s\scripts\DevOps-Pipeline2.ps1: line 150
at <ScriptBlock>, C:\Users\vmadmin\Downloads\vsts-agent-win-x64-2.210.1\_work\45\s\scripts\DevOps-Pipeline.ps1: line 48
at <ScriptBlock>, C:\Users\vmadmin\Downloads\vsts-agent-win-x64-2.210.1\_work\_temp\a9ce0b2f-5c1b-480a-b777-14fd67127ee4.ps1: line 4
at <ScriptBlock>, <No file>: line 1
vivek-jindal commented 1 year ago

I will provide more details as I dig in.

For now I can confirm that the toolkit was successfully imported.

Listng Apps before Test Toolkit Import iNECTA App: cicd02-YEXLOT-current : YIBASE - Base App 2023.1.15.1 Synchronizing Permissions Mock on default App successfully synchronized Installing Permissions Mock on default App successfully installed Synchronizing Test Runner on default App successfully synchronized Installing Test Runner on default App successfully installed Synchronizing Any on default App successfully synchronized Installing Any on default App successfully installed Synchronizing Library Assert on default App successfully synchronized Installing Library Assert on default App successfully installed Skipping app 'C:\Applications.US\Microsoft_Permissions Mock_21.4.52563.52939.app' as it is already installed Synchronizing Library Variable Storage on default App successfully synchronized Installing Library Variable Storage on default App successfully installed Publishing C:\ProgramData\BcContainerHelper\Extensions\cicd02-YEXLOT-current\9a24f175-78ef-410a-8553-1860a69c59b8\Microsoft_System Application Test Library_21.4.52563.52939.app Synchronizing System Application Test Library on tenant default Installing System Application Test Library on tenant default App Microsoft_System Application Test Library_21.4.52563.52939.app successfully published Publishing C:\ProgramData\BcContainerHelper\Extensions\cicd02-YEXLOT-current\3c1d2ca8-666a-4936-9fa6-e272b992e64b\Microsoft_Tests-TestLibraries_21.4.52563.52939.app Synchronizing Tests-TestLibraries on tenant default Installing Tests-TestLibraries on tenant default App Microsoft_Tests-TestLibraries_21.4.52563.52939.app successfully published TestToolkit successfully imported

MODUSCarstenScholling commented 1 year ago

@freddydk I was able to access the container when in failed state. The page was available through page=130455. I was also able to download the event log, but have problems to identify potential issues. Sending the full log by email. The login issues at the end (tenant stuff) was caused by me when logging in).

How would I force creating an image like on Tuesday? I know to downgrade BCCH but assume changes to the image causing the errors.

freddydk commented 1 year ago

@MODUSCarstenScholling - looking at the eventlog - you are still using the old image:

Generic Tag: 1.0.2.13

Looking in the eventlog - it looks like a tenant is not specified (which os strange because the url states ?tenant=default

Will try to repro the problem. Easiest thing was if you could extract the code from your pipeline and run it locally with the same result - then I can run with that script

MODUSCarstenScholling commented 1 year ago

Hmm, not sure from where exactly the generic tag comes, but all of our latest (failing) runs referencing the new one:

Multitenant: Yes
Version: 20.2.41144.51968
Platform: 20.0.41086.51784
Generic Tag: 1.0.2.14
Container OS Version: 10.0.17763.3887 (ltsc2019)
Host OS Version: 10.0.17763.3887 (ltsc2019)

it looks like a tenant is not specified

Was this on the top of the log? That was me, trying to login without a tenant.

I'll try to get this "working" within a simple script, hold on.

freddydk commented 1 year ago

Thanks - I have tried all kinds of settings in various AL-Go repos, but cannot repro this problem.

MODUSCarstenScholling commented 1 year ago

Well, unfortunately that was not quite as successful as expected. I am not able to recreate the problem outside of the Azure DevOps Agent. All attempts, both on Windows 11 and Windows Server 2019 were successful without errors. Even an "original call*" worked flawlessly several times. That means 10 runs with 3 containers each (21.2, 21.4, 22.0) on 3 computers, multiple times. I have done nothing else the entire day.

*Original call:

"C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe" -NoLogo -NoProfile -NonInteractive -ExecutionPolicy Unrestricted -Command ". 'C:\Temp\tests\run\start-run.ps1'"

However, the problem still occurs in the Azure DevOps Agent context, even after a downgrade to BCContainerHelper 4.0.10, with which it worked perfectly until Wednesday.

Doesn't this suggest that a change to the generic image is causing it? How can I test the old image with the generic tag: 1.0.2.13? How can I force it?

freddydk commented 1 year ago

You can use the setting genericImageName (which you can set in c:\programdata\bccontainerhelper\bccontainerhelper.config.json or in code:

$bcContainerHelperConfig.genericImageName = "mcr.microsoft.com/businesscentral:{0}-1.0.2.13"

then it will select 1.0.2.13 for you. The {0} will be replaced by the windows version

MODUSCarstenScholling commented 1 year ago

Oh, I was not aware of this particular notation. Thank you, will test and get back.

MODUSCarstenScholling commented 1 year ago

@vivek-jindal Were you able to gather more information regarding your issue?

vivek-jindal commented 1 year ago

Not yet but this is on my high priority list.

For me this issue is intermittent. I am not able to reproduce the issue always.

If I rerun the same pipeline multiple times it gets completed in third or fourth attempt.

MODUSCarstenScholling commented 1 year ago

Same here, except for the priority which is on top of the list. We are currently running on mcr.microsoft.com/businesscentral:{0}-1.0.2.13 and latest ContainerHelper 4.0.14. No unexpected issues so far. I have expected only BC 22 builds to fail, but have not seen errors yet.

MODUSCarstenScholling commented 1 year ago

@freddydk From what I can say after dozens of runs: All containers except newer .NET 6 BC22 containers work. BC22 with .NET 6 raises intermittent errors when calling any page from the client context. This is based on mcr.microsoft.com/businesscentral:{0}-1.0.2.13 generic image and the latest ContainerHelper 4.0.14.

Before, this applied to all images/containers containing the .NET 6 installation, independent of the used BC version 20, 21, 22. You see, only the installation itself causes the bug. We have around 60% fails (one of the 3 containers) in pipelines when .NET 6 is installed.

What can we do to avoid this? Unfortunately, this error only occurs in Azure DevOps context and started with the latest changes in BCContainerHelper and the generic image, without changing something in our scripts.

freddydk commented 1 year ago

So, you are saying if you use: mcr.microsoft.com/businesscentral:{0}-1.0.2.14 then everything fails? if you use mcr.microsoft.com/businesscentral:{0}-1.0.2.13 then 22.0 (next major) fails On Azure DevOps agents. Do you have dotnet6 on the agents?

MODUSCarstenScholling commented 1 year ago

That is correct regarding the generic images if started from the Azure DevOps agent service. But it is intermittent. It does not always fail, but if, then like you described above.

.NET 6 is not installed on the agent computers itself. I had thought of this, but dismissed the idea at first, as the problem does not always occur. But I will keep that in mind.

I would first like to pursue another idea that came to me while driving earlier: Run-AlPipeline runs with Isolation process. I would like to switch this to hyperv as a test and observe it for some runs. I'll keep you updated.

MODUSCarstenScholling commented 1 year ago

I am cautiously optimistic that the switch to hyperv isolation could solve the problem. No test page errors after 20 runs (3 containers each) since yesterday evening using generic image 1.0.2.14 for everything again.

freddydk commented 1 year ago

Maybe - when using process isolation - dotnet6 needs to be installed on the host? I mean when using process isolation, it uses the windows version on the host and not what's in the container.

vivek-jindal commented 1 year ago

I can no longer reproduce the issue using hyperv isolation.

Maybe - when using process isolation - dotnet6 needs to be installed on the host? The issue may be something else as it can't be reproduced all the time.

MODUSCarstenScholling commented 1 year ago

@freddydk I will test process isolation with installed .NET 6 after my vacation before the end of February and let you know the result.

MODUSCarstenScholling commented 1 year ago

@vivek-jindal Great, good to know.

freddydk commented 1 year ago

Maybe - when using process isolation - dotnet6 needs to be installed on the host? The issue may be something else as it can't be reproduced all the time.

Agree

freddydk commented 1 year ago

Looking for other people with the same problem and a consistent repro in order to investigate more.

MODUSCarstenScholling commented 1 year ago

What I see after 2 weeks now is that running with hyperv isolation makes the builds much more stable. No more timeout or other issues since the change. Probably worth thinking about an "isolation" parameter for Run-AlPipeline to make it easier to handle?

freddydk commented 1 year ago

Thanks for the feedback - will make sure to incorporate this somehow.

gunnargestsson commented 1 year ago

My customer was having this issue only on parallel builds. Just switched to hyperv and the problem is solved.

mmenninghaus commented 1 year ago

Our pipelines thus build vms are experiencing the same problem. After setting the generic image to mcr.microsoft.com/businesscentral:{0}-1.0.2.13 and installing the latest dotnet 6 the problem seems to be solved. Nonetheless we are looking forwared to a general solution.

freddydk commented 1 year ago

What I see after 2 weeks now is that running with hyperv isolation makes the builds much more stable. No more timeout or other issues since the change. Probably worth thinking about an "isolation" parameter for Run-AlPipeline to make it easier to handle?

The way to do this today is to use

$bcContainerHelperConfig.defaultNewContainerParameters = @{
    "isolation" = "hyperv"
}

or set this in the config file - then all new containers on that machine runs hyperv. I am running 4 agents per computer with everything default and haven't seen any issues. I use https://aka.ms/getbuildagent or the script listed here: https://github.com/microsoft/AL-Go/issues/518

If somebody have a consistent repro that you would like me to investigate, please ping me.

Closing this one

gunnargestsson commented 1 year ago

I added the hyperv isolation config to all my build machines some weeks ago and I have the same results.