microsoft / navcontainerhelper

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

Creating container for BC17 - test Library install fails #1695

Closed MarkCWEV closed 3 years ago

MarkCWEV commented 3 years ago

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

Describe the issue Test Libraries fail to install

Scripts used to create container and cause the issue

$artifactUrl = Get-BCArtifactUrl -country us -select Latest
$user = ConvertTo-SecureString -String "admin" -AsPlainText -Force
$password = ConvertTo-SecureString -String "password" -AsPlainText -Force
$credential = New-Object PSCredential $user, $password
New-BCContainer -accept_eula -accept_outdated -updatehosts -dns '8.8.8.8' `
                -artifactUrl $artifactUrl `
                -containerName 'Dev17' `
                -assignPremiumPlan `
                -auth UserPassword -Credential $credential `
                -includeTestToolkit `
                -licenseFile 'c:\temp\devlicense.flf'

Full output of scripts


NavContainerHelper is version 0.7.0.26
NavContainerHelper is running as administrator
Host is Microsoft Windows 10 Pro - Unknown/Insider build
Docker Client Version is 19.03.13
Docker Server Version is 19.03.13
Fetching all docker images
Using image mcr.microsoft.com/dynamicsnav:10.0.19042.630-generic
Creating Container Dev17
Version: 17.4.21491.22004-US
Style: sandbox
Platform: 17.0.21485.21985
Generic Tag: 0.1.0.24
Container OS Version: 10.0.19042.630 (unknown)
Host OS Version: 10.0.19042.746 (Unknown/Insider build)
WARNING: The container operating system matches the host operating system, but the revision is different.
If you encounter issues, you might want to specify -isolation hyperv
Using locale en-US
Using process isolation
Disabling the standard eventlog dump to container log every 2 seconds (use -dumpEventLog to enable)
Using license file c:\temp\devlicense.flf
Files in C:\ProgramData\NavContainerHelper\Extensions\Dev17\my:
- AdditionalOutput.ps1
- license.flf
- MainLoop.ps1
- SetupNavUsers.ps1
- SetupVariables.ps1
- updatehosts.ps1
Creating container Dev17 from image mcr.microsoft.com/dynamicsnav:10.0.19042.630-generic
5980066ba88803998c8ba54d1123601a4e4849084f6cf19b4f975fd497110575
Waiting for container Dev17 to be ready
Using artifactUrl https://bcartifacts.azureedge.net/sandbox/17.4.21491.22004/us
Using installer from C:\Run\150-new
Installing Business Central
Installing from artifacts
Starting Local SQL Server
Starting Internet Information Server
Copying Service Tier Files
Copying PowerShell Scripts
Copying dependencies
Copying ReportBuilder
Importing PowerShell Modules
Determining Database Collation from c:\dl\sandbox\17.4.21491.22004\us\BusinessCentral-US.bak
Restoring CRONUS Demo Database
Modifying Business Central Service Tier Config File for Docker
Creating Business Central Service Tier
Installing SIP crypto provider: 'C:\Windows\System32\NavSip.dll'
Copying Web Client Files
Copying Client Files
Copying ModernDev Files
Copying additional files
Copying ConfigurationPackages
Copying Test Assemblies
Copying Extensions
Copying Applications
Copying Applications.US
Starting Business Central Service Tier
Importing license file
Stopping Business Central Service Tier
Installation took 134 seconds
Installation complete
Initializing...
Setting host.docker.internal to 192.168.86.46 in container hosts file (copy from host hosts file)
Setting gateway.docker.internal to 192.168.86.46 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.22.112.1 in container hosts file
Starting Container
Hostname is Dev17
PublicDnsName is Dev17
Using NavUserPassword Authentication
Creating Self Signed Certificate
Self Signed Certificate Thumbprint B60613563281E9EB2B067956D175B7F661DDC3F8
Modifying Service Tier Config File with Instance Specific Settings
Starting Service Tier
Registering event sources
Creating DotNetCore Web Server Instance
Enabling Financials User Experience
Using license file 'c:\run\my\license.flf'
Import License
Creating http download site
Setting SA Password and enabling SA
Creating System.Security.SecureString 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 SYSTEM.SECURITY.SECURESTRING
Container IP Address: 172.22.124.80
Container Hostname  : Dev17
Container Dns Name  : Dev17
Web Client          : http://Dev17/BC/
Dev. Server         : http://Dev17
Dev. ServerInstance : BC
Setting Dev17 to 172.22.124.80 in host hosts file

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

WARNING: You are running a container which is 92 days old.
Microsoft recommends that you always run the latest version of our containers.

Container Total Physical Memory is 31.9Gb
Container Free Physical Memory is 10.8Gb

Initialization took 48 seconds
Ready for connections!
Reading CustomSettings.config from Dev17
Creating Desktop Shortcuts for Dev17
Copy from container Dev17 (C:\Applications.US\Microsoft_Any_17.4.21491.22004.app) to C:\ProgramData\NavContainerHelper\Extensions\Dev17\_Microsoft_Any_17.4.21491.22004.app
Publishing C:\ProgramData\NavContainerHelper\Extensions\Dev17\_Microsoft_Any_17.4.21491.22004.app
Synchronizing Any on tenant default
Installing Any on tenant default
App successfully published
Copy from container Dev17 (C:\Applications.US\Microsoft_Library Assert_17.4.21491.22004.app) to C:\ProgramData\NavContainerHelper\Extensions\Dev17\_Microsoft_Library Assert_17.4.21491.22004.app
Publishing C:\ProgramData\NavContainerHelper\Extensions\Dev17\_Microsoft_Library Assert_17.4.21491.22004.app
Synchronizing Library Assert on tenant default
Installing Library Assert on tenant default
App successfully published
Copy from container Dev17 (C:\Applications.US\Microsoft_Library Variable Storage_17.4.21491.22004.app) to C:\ProgramData\NavContainerHelper\Extensions\Dev17\_Microsoft_Library Variable Storage_17.4.21
491.22004.app
Publishing C:\ProgramData\NavContainerHelper\Extensions\Dev17\_Microsoft_Library Variable Storage_17.4.21491.22004.app
Synchronizing Library Variable Storage on tenant default
Installing Library Variable Storage on tenant default
App successfully published
Copy from container Dev17 (C:\Applications.US\Microsoft_Test Runner_17.4.21491.22004.app) to C:\ProgramData\NavContainerHelper\Extensions\Dev17\_Microsoft_Test Runner_17.4.21491.22004.app
Publishing C:\ProgramData\NavContainerHelper\Extensions\Dev17\_Microsoft_Test Runner_17.4.21491.22004.app
**This Extension cannot be published as it has the same Publisher, Name, and Version as a previously published Extension.
at <ScriptBlock>, <No file>: line 12
This Extension cannot be published as it has the same Publisher, Name, and Version as a previously published Extension.
At C:\Program Files\WindowsPowerShell\Modules\navcontainerhelper\0.7.0.26\ContainerHandling\Invoke-ScriptInNavContainer.ps1:39 char:13
+             Invoke-Command -Session $session -ScriptBlock $scriptbloc ...
+             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidOperation: (:) [Publish-NAVApp], InvalidOperationException
    + FullyQualifiedErrorId : MicrosoftDynamicsNavServer$BC/nav-systemapplication,Microsoft.Dynamics.Nav.Apps.Management.Cmdlets.PublishNavApp
    + PSComputerName        : 5980066ba88803998c8ba54d1123601a4e4849084f6cf19b4f975fd497110575**
freddydk commented 3 years ago

I do not fix issues in NavContainerHelper any more.

remove all containers run: uninstall-module navcontainerhelper -allversions restart powershell install-module bccontainerhelper -force

if this is a pipeline, change the pipeline to use BcContainerHelper.