Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error on invoking new-bccontainer when publishing Microsoft_Tests-TestLibraries #3758

Closed
ahenkel opened this issue Nov 12, 2024 · 3 comments
Closed
Assignees

Comments

@ahenkel
Copy link

ahenkel commented Nov 12, 2024

PLEASE DO NOT INCLUDE ANY PASSWORDS OR TOKENS IN YOUR ISSUE!!!

Describe the issue
A clear and concise description of what the issue is.

Scripts used to create container and cause the issue

$containerName = 'mycontainer'
$username = 'admin'
$password = ConvertTo-SecureString 'admin' -AsPlainText -Force
$credential = New-Object -TypeName System.Management.Automation.PSCredential -ArgumentList $username, $password
$auth = 'UserPassword'
$artifactUrl = Get-BcArtifactUrl -type 'Sandbox' -country 'de' -version '25.0'
New-BcContainer `
    -accept_eula `
    -containerName $containerName `
    -credential $credential `
    -auth $auth `
    -artifactUrl $artifactUrl `
    -memoryLimit 8G `
    -isolation hyperv `
    -updateHosts `
    -includeTestToolkit

Full output of scripts

BcContainerHelper is version 6.0.5
BcContainerHelper is running as administrator
HyperV is Enabled
UsePsSession is True
Host is Microsoft Windows 11 Enterprise - 10.0.22631.4391
Docker Client Version is 24.0.7
Docker Server Version is 24.0.7
Removing Session breedingcentral
Removing container breedingcentral
Removing entries from hosts
Removing breedingcentral from container hosts file
Removing breedingcentral-* from container hosts file
Removing Desktop shortcuts
Removing C:\ProgramData\BcContainerHelper\Extensions\breedingcentral
Fetching all docker images
Fetching all docker volumes
Using image mcr.microsoft.com/businesscentral:10.0.20348.2762
Creating Container breedingcentral
Style: sandbox
Multitenant: Yes
Version: 25.0.23364.26597
Platform: 25.0.26562.0
Generic Tag: 1.0.2.50
Container OS Version: 10.0.20348.2762 (ltsc2022)
Host OS Version: 10.0.22631.4391 (Unknown/Insider build)
Using hyperv isolation
Using locale de-DE
Disabling the standard eventlog dump to container log every 2 seconds (use -dumpEventLog to enable)
Files in C:\ProgramData\BcContainerHelper\Extensions\breedingcentral\my:
- AdditionalOutput.ps1
- MainLoop.ps1
- SetupVariables.ps1
- updatehosts.ps1
Creating container breedingcentral from image mcr.microsoft.com/businesscentral:10.0.20348.2762
36742494ff47611e2b269272d45a0a7b120b4c909d6d6795688e63a24d5712bb
Waiting for container breedingcentral to be ready
Using artifactUrl https://bcartifacts.azureedge.net/sandbox/25.0.23364.26597/de
Using installer from C:\Run\240
Installing Business Central: multitenant=True, installOnly=False, filesOnly=False, includeTestToolkit=False, includeTestLibrariesOnly=False, includeTestFrameworkOnly=False, includePerformanceToolkit=False, appArtifactPath=c:\dl\sandbox\25.0.23364.26597\de, platformArtifactPath=c:\dl\sandbox\25.0.23364.26597\platform, databasePath=c:\dl\sandbox\25.0.23364.26597\de\BusinessCentral-DE.bak, licenseFilePath=c:\dl\sandbox\25.0.23364.26597\de\Cronus.bclicense, rebootContainer=True
Installing from artifacts
Starting Local SQL Server
Starting Internet Information Server
Copying Service Tier Files
c:\dl\sandbox\25.0.23364.26597\platform\ServiceTier\Program Files
c:\dl\sandbox\25.0.23364.26597\platform\ServiceTier\System64Folder
Copying Web Client Files
c:\dl\sandbox\25.0.23364.26597\platform\WebClient\Microsoft Dynamics NAV
Copying ModernDev Files
c:\dl\sandbox\25.0.23364.26597\platform
c:\dl\sandbox\25.0.23364.26597\platform\ModernDev\program files\Microsoft Dynamics NAV
Copying additional files
Copying ConfigurationPackages
C:\dl\sandbox\25.0.23364.26597\de\ConfigurationPackages
Copying Test Assemblies
C:\dl\sandbox\25.0.23364.26597\platform\Test Assemblies
Copying Extensions
C:\dl\sandbox\25.0.23364.26597\de\Extensions
Copying Applications
C:\dl\sandbox\25.0.23364.26597\platform\Applications
Copying Applications.DE
C:\dl\sandbox\25.0.23364.26597\de\Applications.DE
Copying dependencies
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 115 seconds
Installation complete
Initializing...
Setting host.docker.internal to 172.31.64.156 in container hosts file (copy from host hosts file)
Setting gateway.docker.internal to 172.31.64.156 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.23.176.1 in container hosts file
Starting Container
Hostname is breedingcentral
PublicDnsName is breedingcentral
WARNING: Container starts with TimeZone = Mitteleuropäische Zeit, which is not recognized in the list of TimeZones.
Using NavUserPassword Authentication
Creating Self Signed Certificate
Self Signed Certificate Thumbprint EE54D83D23B03E5C8F6A09F7C0A6EB2C1DBC70E0
DNS identity breedingcentral
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
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.23.182.16
Container Hostname  : breedingcentral
Container Dns Name  : breedingcentral
Web Client          : http://breedingcentral/BC/?tenant=default
Dev. Server         : http://breedingcentral
Dev. ServerInstance : BC
Dev. Server Tenant  : default
Setting breedingcentral to 172.23.182.16 in host hosts file
Setting breedingcentral-default to 172.23.182.16 in host hosts file
Setting breedingcentral-default to 172.23.182.16 in container hosts file

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

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

Initialization took 27 seconds
Ready for connections!
Reading CustomSettings.config from breedingcentral
Creating Desktop Shortcuts for breedingcentral
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.DE\Microsoft_Permissions Mock_25.0.23364.26597.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\breedingcentral\5c01ea83-04b4-41dd-8a11-3cb7b2fca346\Microsoft_System Application Test Library_25.0.23364.26597.app
Synchronizing System Application Test Library on tenant default
Installing System Application Test Library on tenant default
App Microsoft_System Application Test Library_25.0.23364.26597.app successfully published
Publishing C:\ProgramData\BcContainerHelper\Extensions\breedingcentral\3eaf28a7-9123-4516-93e4-9934fb0cf85e\Microsoft_Tests-TestLibraries_25.0.23364.26597.app
Publish-NAVApp:
Line |
  15 |      $output = Publish-NAVApp @cmdletArgs;
     |                ~~~~~~~~~~~~~~~~~~~~~~~~~~
     | Extension compilation failed
error AL1024: A package with publisher 'Microsoft', name 'Business Foundation Test Libraries', and a version compatible with '25.0.0.0' could not be loaded. Symbols for the requested app Business Foundation Test Libraries by Microsoft 25.0.0.0 could not be found in the database.
LibraryUtility.Codeunit.al(19,26): error AL0185: Codeunit 'Library - No. Series' is missing


Container Free Physical Memory: 4.3Gb

Services in container breedingcentral:
- MicrosoftDynamicsNavServer$BC is Running
- MSSQL$SQLEXPRESS is Running


Relevant event log from container breedingcentral:
- 20241112 12:58:36 - MicrosoftDynamicsNavServer$BC

  Server instance: BC
  Category: Extensions
  ClientSessionId: 00000000-0000-0000-0000-000000000000
  ClientActivityId: 00000000-0000-0000-0000-000000000000
  ServerSessionUniqueId: 875f9be2-90c5-4ea6-8583-7d2cb0aa2a00
  ServerActivityId: 48842a4a-9acb-46e4-b7cc-7c844b26caf1
  EventTime: 11/12/2024 11:58:36
  Message Extension compilation failed
  error AL1024: A package with publisher 'Microsoft', name 'Business Foundation Test Libraries', and a version compatible with '25.0.0.0' could not be loaded. Symbols for the requested app Business Foundation Test Libraries by Microsoft 25.0.0.0 could not be found in the database.
  LibraryUtility.Codeunit.al(19,26): error AL0185: Codeunit 'Library - No. Series' is missing
  ProcessId: 504
  Tag: 00001YW
  ThreadId: 30
  ExecutionId: 174
  CounterInformation:

Publish-BcContainerApp Telemetry Correlation Id: 03aa9202-eb32-439a-ae9f-73b1a3430472
Import-TestToolkitToBcContainer Telemetry Correlation Id: 5d4041fc-6fb3-4447-a476-7e32d7d7ed86
New-BcContainer Telemetry Correlation Id: 680038dc-1a0b-4774-a623-01bcf9a996f4
Exception: C:\Users\user\OneDrive - MyCompany\Dokumente\PowerShell\Modules\BcContainerHelper\6.0.5\ContainerHandling\Invoke-ScriptInNavContainer.ps1:288
Line |
 288 |                          throw $errorMessage
     |                          ~~~~~~~~~~~~~~~~~~~
     | Publish-NAVApp:  Line |   15 |      $output = Publish-NAVApp @cmdletArgs;
     |      |                ~~~~~~~~~~~~~~~~~~~~~~~~~~
     |      | Extension compilation failed
     | error AL1024: A package with publisher 'Microsoft', name 'Business Foundation Test
     | Libraries', and a version compatible with '25.0.0.0' could not be loaded. Symbols for the requested app Business Foundation Test Libraries by Microsoft 25.0.0.0
     | could not be found in the database. LibraryUtility.Codeunit.al(19,26): error AL0185:
     | Codeunit 'Library - No. Series' is missing

ERROR

publishing C:\ProgramData\BcContainerHelper\Extensions\breedingcentral\3eaf28a7-9123-4516-93e4-9934fb0cf85e\Microsoft_Tests-TestLibraries_25.0.23364.26597.app
Publish-NAVApp:
Line |
  15 |      $output = Publish-NAVApp @cmdletArgs;
     |                ~~~~~~~~~~~~~~~~~~~~~~~~~~
     | Extension compilation failed
error AL1024: A package with publisher 'Microsoft', name 'Business Foundation Test Libraries', and a version compatible with '25.0.0.0' could not be loaded. Symbols for the requested app Business Foundation Test Libraries by Microsoft 25.0.0.0 could not be found in the database.
LibraryUtility.Codeunit.al(19,26): error AL0185: Codeunit 'Library - No. Series' is missing

Additional context
-- problem also occurs when invoking Import-TestToolkitToBcContainer

Copy link

We've found some similar issues:

If any of the above are duplicates, please consider closing this issue out and adding additional context in the original issue.

Note: You can give me feedback by 👍 or 👎 this comment.

@ahenkel
Copy link
Author

ahenkel commented Nov 13, 2024

I could resolve this by myself.

I did update Docker to the latest version (this is at this time 4.35.1) and flush the containerhelper cache by invoking Flush-ContainerHelperCache.

@ahenkel ahenkel closed this as completed Nov 13, 2024
@freddydk
Copy link
Contributor

I assume you also updated ContainerHelper, which probably is the reason.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants