microsoft / navcontainerhelper

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

Performance Toolkit issue - Cannot open page 149002 #3592

Open piogalaska opened 2 months ago

piogalaska commented 2 months ago

I experience an issue with a local container with BC version 24.3.21374.21739 w1. When I try to run BCPT script to launch test from PowerShell console I get error like below:

C:\Users\username\Documents\AL\ALProject11> Run-BCPTTestsInBcContainer `

-containerName bc24w1bcptv2 `
-tenant default `
-companyName CRONUS%20International%20Ltd. `
-testPage 149002 `
-suiteCode 'BASIC' `
-credential $Credential `
-connectFromHost

mHostInvoke GET on http://172.25.207.199:7048/BC/api/v1.0/companies?$filter=name%20eq%20%27CRONUS%2520International%2520Ltd.%27&tenant=default Using Company ID Using testpage 149002 Using Suitecode BASIC Service Url http://bc24w1bcptv2/BC/cs/?tenant=default&company=CRONUS%2520International%2520Ltd. Running Performance Tests... Running performance test failed The passed path for -BCPTTestRunnerInternalFolderPath seem to be relative path, converting to absolute. Absolute path is C:\ProgramData\BcContainerHelper\Extensions\bc24w1bcptv2\my\TestRunner\Internal Importing AL Test Runner from C:\ProgramData\BcContainerHelper\Extensions\bc24w1bcptv2\my\TestRunner\Internal\BCPTTestRunnerInternal.psm1 WARNING: The names of some imported commands from the module 'ALTestRunnerInternal' include unapproved verbs that might make them less discoverable. To s with unapproved verbs, run the Import-Module command again with the Verbose parameter. For a list of approved verbs, type Get-Verb. Run-BCPTTestsInBcContainer Telemetry Correlation Id: b6c24430-1e67-409a-9bbe-e397257ea2c9 OperationStopped: C:\Users\username\OneDrive - IT.integro sp. z o.o\Dokumenty\PowerShell\Modules\bccontainerhelper\6.0.19\AppHandling\Run-BCPTTests1:159:13 Line | 159 | $job | Receive-Job | ~~~~~~ | Cannot open page 149002. Verify if the test tool and test objects are imported and can be opened manually.

Scripts used to create container and cause the issue

$containerName = 'bc24w1bcptv2'
>> $password = ‘HIDDEN’
>> $securePassword = ConvertTo-SecureString -String $password -AsPlainText -Force
>> $credential = New-Object pscredential 'admin', $securePassword
>> $auth = 'UserPassword'
>> $artifactUrl = Get-BcArtifactUrl -type 'Sandbox' -country 'w1' -select 'Latest'
>> $licenseFile = 'HIDDEN'
>> New-BcContainer `
>>     -accept_eula `
>>     -containerName $containerName `
>>     -credential $credential `
>>     -auth $auth `
>>     -artifactUrl $artifactUrl `
>>     -imageName 'bc24w1bcptv2' `
>>     -multitenant:$false `
>>     -includeTestToolkit `
>>     -includePerformanceToolkit `
>>     -assignPremiumPlan `
>>     -licenseFile $licenseFile `
>>     -dns '8.8.8.8' `
>>     -includeAL `
>>     -vsixFile (Get-LatestAlLanguageExtensionUrl) `
>>     -applicationInsightsKey "HIDDEN" `
>>     -updateHosts
>> Setup-BcContainerTestUsers -containerName $containerName -Password $credential.Password -credential $credential

Full output of scripts

BcContainerHelper is version 6.0.19
BcContainerHelper is running as administrator
HyperV is Enabled
Host is Microsoft Windows 10 Pro - 10.0.19045.4529
UsePsSession is True
UsePwshForBc24 is True
UseWinRmSession is never
UseSslForWinRmSession is True
Docker Client Version is 20.10.11
Docker Server Version is 20.10.11
Removing entries from hosts
Removing bc24w1bcptv2 from container hosts file
Removing bc24w1bcptv2-* from container hosts file
Removing Desktop shortcuts
Removing C:\ProgramData\BcContainerHelper\Extensions\bc24w1bcptv2
Fetching all docker images
Fetching all docker volumes
ArtifactUrl and ImageName specified
Image bc24w1bcptv2:sandbox-24.3.21374.21739-w1 already exists
Using image bc24w1bcptv2:sandbox-24.3.21374.21739-w1
Creating Container bc24w1bcptv2
Style: sandbox
Multitenant: No
Version: 24.3.21374.21739
Platform: 24.0.21667.0
Generic Tag: 1.0.2.38
Container OS Version: 10.0.17763.5936 (ltsc2019)
Host OS Version: 10.0.19045.4529 (22H2)
Using hyperv isolation
Using locale en-US
Disabling the standard eventlog dump to container log every 2 seconds (use -dumpEventLog to enable)
Downloading C:\ProgramData\BcContainerHelper\Extensions\bc24w1bcptv2\Microsoft.VisualStudio.Services.VSIXPackage.vsix
Using license file HIDDEN
Downloading C:\ProgramData\BcContainerHelper\Extensions\bc24w1bcptv2\my\license.bclicense
Files in C:\ProgramData\BcContainerHelper\Extensions\bc24w1bcptv2\my:
- AdditionalOutput.ps1
- HelperFunctions.ps1
- license.bclicense
- MainLoop.ps1
- SetupNavUsers.ps1
- SetupVariables.ps1
- updatehosts.ps1
Creating container bc24w1bcptv2 from image bc24w1bcptv2:sandbox-24.3.21374.21739-w1
ee482efca60a0b870be356dbe56c96a7d8cb647d2382fd468859f22840c26e27
Waiting for container bc24w1bcptv2 to be ready
Initializing...
Setting host.docker.internal to 192.168.1.88 in container hosts file (copy from host hosts file)
Setting gateway.docker.internal to 192.168.1.88 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.25.192.1 in container hosts file
Starting Container
Hostname is bc24w1bcptv2
PublicDnsName is bc24w1bcptv2
WARNING: Container starts with TimeZone = Środkowoeuropejski czas stand., which is not recognized in the list of TimeZones.
Using NavUserPassword Authentication
Starting Local SQL Server
Starting Internet Information Server
Creating Self Signed Certificate
Self Signed Certificate Thumbprint 9E7E63F27AED61027E9DDB8F762DFBC00051FA50
DNS identity bc24w1bcptv2
Modifying Service Tier Config File with Instance Specific Settings
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
Creating http download site
Setting SA Password and enabling SA
Creating admin as SQL User and add to sysadmin
WARNING: Caution: Your program license expires in 5 days.
Creating SUPER user
WARNING: Caution: Your program license expires in 5 days.
WARNING: Caution: Your program license expires in 5 days.
WARNING: Caution: Your program license expires in 5 days.
Assign Premium plan for ADMIN
Container IP Address: 172.25.207.199
Container Hostname  : bc24w1bcptv2
Container Dns Name  : bc24w1bcptv2
Web Client          : http://bc24w1bcptv2/BC/
Dev. Server         : http://bc24w1bcptv2
Dev. ServerInstance : BC
Setting bc24w1bcptv2 to 172.25.207.199 in host hosts file

Files:
http://bc24w1bcptv2:8080/Microsoft.VisualStudio.Services.VSIXPackage.vsix

Container Total Physical Memory is 8.5Gb
Container Free Physical Memory is 5.4Gb

Initialization took 197 seconds
Ready for connections!
Reading CustomSettings.config from bc24w1bcptv2
Creating Desktop Shortcuts for bc24w1bcptv2
Skipping app 'C:\Applications\TestFramework\TestLibraries\permissions mock\Microsoft_Permissions Mock.app' as it is already installed
Skipping app 'C:\Applications\TestFramework\TestRunner\Microsoft_Test Runner.app' as it is already installed
Skipping app 'C:\Applications\TestFramework\TestLibraries\any\Microsoft_Any.app' as it is already installed
Skipping app 'C:\Applications\TestFramework\TestLibraries\assert\Microsoft_Library Assert.app' as it is already installed
Skipping app 'C:\Applications\TestFramework\TestLibraries\permissions mock\Microsoft_Permissions Mock.app' as it is already installed
Skipping app 'C:\Applications\TestFramework\TestLibraries\variable storage\Microsoft_Library Variable Storage.app' as it is already installed
Skipping app 'C:\Applications\System Application\Test\Microsoft_System Application Test Library.app' as it is already installed
Skipping app 'C:\Applications\BusinessFoundation\Test\Microsoft_Business Foundation Test Libraries.app' as it is already installed
Skipping app 'C:\Applications\BaseApp\Test\Microsoft_Tests-TestLibraries.app' as it is already installed
Skipping app 'C:\Applications\System Application\Test\Microsoft_System Application Test.app' as it is already installed
Skipping app 'C:\Applications\BusinessFoundation\Test\Microsoft_Business Foundation Tests.app' as it is already installed
Skipping app 'C:\Applications\BaseApp\Test\Microsoft_Tests-Bank.app' as it is already installed
Skipping app 'C:\Applications\BaseApp\Test\Microsoft_Tests-Cash Flow.app' as it is already installed
Skipping app 'C:\Applications\BaseApp\Test\Microsoft_Tests-Cost Accounting.app' as it is already installed
Skipping app 'C:\Applications\BaseApp\Test\Microsoft_Tests-CRM integration.app' as it is already installed
Skipping app 'C:\Applications\BaseApp\Test\Microsoft_Tests-Data Exchange.app' as it is already installed
Skipping app 'C:\Applications\BaseApp\Test\Microsoft_Tests-Dimension.app' as it is already installed
Skipping app 'C:\Applications\BaseApp\Test\Microsoft_Tests-ERM.app' as it is already installed
Skipping app 'C:\Applications\BaseApp\Test\Microsoft_Tests-Fixed Asset.app' as it is already installed
Skipping app 'C:\Applications\BaseApp\Test\Microsoft_Tests-General Journal.app' as it is already installed
Skipping app 'C:\Applications\BaseApp\Test\Microsoft_Tests-Graph.app' as it is already installed
Skipping app 'C:\Applications\BaseApp\Test\Microsoft_Tests-Integration.app' as it is already installed
Skipping app 'C:\Applications\BaseApp\Test\Microsoft_Tests-Invoicing.app' as it is already installed
Skipping app 'C:\Applications\BaseApp\Test\Microsoft_Tests-Job.app' as it is already installed
Skipping app 'C:\Applications\BaseApp\Test\Microsoft_Tests-Local.app' as it is already installed
Skipping app 'C:\Applications\BaseApp\Test\Microsoft_Tests-Marketing.app' as it is already installed
Skipping app 'C:\Applications\BaseApp\Test\Microsoft_Tests-Misc.app' as it is already installed
Skipping app 'C:\Applications\BaseApp\Test\Microsoft_Tests-Monitor Sensitive Fields.app' as it is already installed
Skipping app 'C:\Applications\BaseApp\Test\Microsoft_Tests-Permissions.app' as it is already installed
Skipping app 'C:\Applications\BaseApp\Test\Microsoft_Tests-Physical Inventory.app' as it is already installed
Skipping app 'C:\Applications\BaseApp\Test\Microsoft_Tests-Prepayment.app' as it is already installed
Skipping app 'C:\Applications\BaseApp\Test\Microsoft_Tests-Rapid Start.app' as it is already installed
Skipping app 'C:\Applications\BaseApp\Test\Microsoft_Tests-Report.app' as it is already installed
Skipping app 'C:\Applications\BaseApp\Test\Microsoft_Tests-Resource.app' as it is already installed
Skipping app 'C:\Applications\BaseApp\Test\Microsoft_Tests-Reverse.app' as it is already installed
Skipping app 'C:\Applications\BaseApp\Test\Microsoft_Tests-SCM.app' as it is already installed
Skipping app 'C:\Applications\BaseApp\Test\Microsoft_Tests-SMB.app' as it is already installed
Skipping app 'C:\Applications\BaseApp\Test\Microsoft_Tests-Upgrade.app' as it is already installed
Skipping app 'C:\Applications\BaseApp\Test\Microsoft_Tests-User.app' as it is already installed
Skipping app 'C:\Applications\BaseApp\Test\Microsoft_Tests-VAT.app' as it is already installed
Skipping app 'C:\Applications\BaseApp\Test\Microsoft_Tests-Workflow.app' as it is already installed
Skipping app 'C:\Applications\TestFramework\PerformanceToolkit\Microsoft_Performance Toolkit.app' as it is already installed
Skipping app 'C:\Applications\TestFramework\PerformanceToolkit\Microsoft_Performance Toolkit Samples.app' as it is already installed
Skipping app 'C:\Applications\TestFramework\PerformanceToolkit\Microsoft_Performance Toolkit Tests.app' as it is already installed
TestToolkit successfully imported
Extracting C:\Applications\BaseApp\Source\Base Application.Source.zip
Cleanup old dotnet core assemblies
Creating .net Assembly Reference Folder
Copying DLLs from C:\Program Files\dotnet\Shared to assemblyProbingPath
Copying DLLs from C:\Program Files\Microsoft Dynamics NAV\240\Service to assemblyProbingPath
Copying DLLs from C:\Test Assemblies\Mock Assemblies to assemblyProbingPath
Removing dotnet Framework Assemblies
Container bc24w1bcptv2 successfully created

Use:
Get-BcContainerEventLog -containerName bc24w1bcptv2 to retrieve a snapshot of the event log from the container
Get-BcContainerDebugInfo -containerName bc24w1bcptv2 to get debug information about the container
Enter-BcContainer -containerName bc24w1bcptv2 to open a PowerShell prompt inside the container
Remove-BcContainer -containerName bc24w1bcptv2 to remove the container again
docker logs bc24w1bcptv2 to retrieve information about URL's again
Skipping app 'C:\Applications\TestFramework\TestLibraries\permissions mock\Microsoft_Permissions Mock.app' as it is already installed
Skipping app 'C:\Applications\TestFramework\TestRunner\Microsoft_Test Runner.app' as it is already installed
Skipping app 'C:\Applications\TestFramework\TestLibraries\any\Microsoft_Any.app' as it is already installed
Skipping app 'C:\Applications\TestFramework\TestLibraries\assert\Microsoft_Library Assert.app' as it is already installed
Skipping app 'C:\Applications\TestFramework\TestLibraries\permissions mock\Microsoft_Permissions Mock.app' as it is already installed
Skipping app 'C:\Applications\TestFramework\TestLibraries\variable storage\Microsoft_Library Variable Storage.app' as it is already installed
TestToolkit successfully imported
Downloading C:\Users\piotr.galazka\AppData\Local\Temp\cc8da476-9603-4125-9f11-1aaf03a2bf09\CreateTestUsers-main-TestApps-22.0.30.0.zip
Publishing C:\ProgramData\BcContainerHelper\Extensions\bc24w1bcptv2\60173d8e-a890-44a0-beba-3589dcce2db6\Microsoft_CreateTestUsers_22.0.30.0.app
Synchronizing CreateTestUsers on tenant default
Installing CreateTestUsers on tenant default
App Microsoft_CreateTestUsers_22.0.30.0.app successfully published
Invoke GET on http://172.25.207.199:7048/BC/api/v1.0/companies?$filter=name%20eq%20%27CRONUS%20International%20Ltd.%27&tenant=default
Invoke POST on http://172.25.207.199:7048/BC/api/Microsoft/Setup/beta/companies(c26ec99a-353e-ef11-8e53-6045bdc8a354)/testUsers?tenant=default
Uninstalling CreateTestUsers from tenant default
Unpublishing CreateTestUsers
App successfully unpublished

...

Screenshots image

Additional context

freddydk commented 1 month ago

Have you tried without specifying a license file? Is there any information in the eventlog to indicate what could go wrong?