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

Cannot log in into current BCv20/NextMajor insider build #2288

Closed SHermann73 closed 2 years ago

SHermann73 commented 2 years ago

Describe the issue After successfully creating a container with the current nextmajor insider build (BCv20), I'm unable to log in into the environment.

Scripts used to create container and cause the issue

$artifactUrl = Get-BCArtifactUrl -select nextmajor -country 'base' -sasToken $sasToken
$ContainerName = 'BCv20Test'
$ImageName = 'BCv20Test'
$UserName = 'admin'
$Password = ConvertTo-SecureString '**secret**' -AsPlainText -Force
$Credential = New-Object System.Management.Automation.PSCredential ($UserName,$Password)

New-BcContainer `
    -accept_eula `
    -accept_outdated `
    -containerName $ContainerName `
    -artifactUrl $artifactUrl `
    -imageName $ImageName `
    -auth NavUserPassword `
    -Credential $Credential `
    -useBestContainerOS `
    -doNotExportObjectsToText `
    -PublishPorts @(80,8080,7045,7046,7047,7048,7049) `
    -assignPremiumPlan

Full output of scripts

BcContainerHelper is version 3.0.1
BcContainerHelper is running as administrator
Host is Microsoft Windows Server 2016 Standard - ltsc2016
Docker Client Version is 20.10.4
Docker Server Version is 20.10.4
Removing C:\ProgramData\BcContainerHelper\Extensions\BCv20Test
Fetching all docker images
Fetching all docker volumes
ArtifactUrl and ImageName specified
Building multitenant image bcv20test:sandbox-20.0.35644.0-base-mt based on mcr.microsoft.com/businesscentral:10.0.14393.3144 with https://bcinsider.azureedge.net/sandbox/20.0.35644.0/base
Pulling latest image mcr.microsoft.com/businesscentral:10.0.14393.3144
10.0.14393.3144: Pulling from businesscentral
Digest: sha256:fe61c499d7a3e51e02f3cda15ee55ddd982519608461a709150463130018b0ba
Status: Image is up to date for mcr.microsoft.com/businesscentral:10.0.14393.3144
Generic Tag: 1.0.2.1
Container OS Version: 10.0.14393.3144 (ltsc2016)
Host OS Version: 10.0.14393.3115 (ltsc2016)
WARNING: Host OS and Base Image Container OS doesn't match and Hyper-V is not installed. If you encounter issues, you could try to install Hyper-V.
Using process isolation
Files in c:\bcartifacts.cache\e0da2p2b.jwa\my:
Copying Platform Artifacts
c:\bcartifacts.cache\sandbox\20.0.35644.0\platform
Copying Database
Copying Licensefile
c:\bcartifacts.cache\e0da2p2b.jwa
Sending build context to Docker daemon  1.638GB

Step 1/6 : FROM mcr.microsoft.com/businesscentral:10.0.14393.3144
 ---> 7249a899fdaa
Step 2/6 : ENV DatabaseServer=localhost DatabaseInstance=SQLEXPRESS DatabaseName=CRONUS IsBcSandbox=Y artifactUrl=https://bcinsider.azureedge.net/sandbox/20.0.35644.0/base
 ---> Running in 16bf4aa47110
Removing intermediate container 16bf4aa47110
 ---> adb35c9cd590
Step 3/6 : COPY my /run/
 ---> 558052737cb0
Step 4/6 : COPY NAVDVD /NAVDVD/
 ---> a03c826c3c2e
Step 5/6 : RUN \Run\start.ps1 -installOnly -multitenant
 ---> Running in 7e8afb97b2d0
Using installer from C:\Run\150-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 dependencies
Copying ReportBuilder
Importing PowerShell Modules
Determining Database Collation
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'
Copying Web Client Files
C:\NAVDVD\WebClient\Microsoft Dynamics NAV
Copying Client Files
C:\NAVDVD\LegacyDlls\program files\Microsoft Dynamics NAV
C:\NAVDVD\LegacyDlls\program files\Microsoft Dynamics NAV
C:\NAVDVD\LegacyDlls\systemFolder
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 Applications
C:\NAVDVD\Applications
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 128 seconds
Installation complete
Removing intermediate container 7e8afb97b2d0
 ---> ddd1698b9af1
Step 6/6 : LABEL legal="http://go.microsoft.com/fwlink/?LinkId=837447"       created="202202021054"       nav=""       cu=""       multitenant="Y" country="W1"       version="20.0.35644.0"       platf
orm="20.0.35590.0"
 ---> Running in 16ea6688625b
Removing intermediate container 16ea6688625b
 ---> 00383db8bd33
Successfully built 00383db8bd33
Successfully tagged bcv20test:sandbox-20.0.35644.0-base-mt
Building image took 274 seconds
Using image bcv20test:sandbox-20.0.35644.0-base-mt
Publishing port 80
Publishing port 8080
Publishing port 7045
Publishing port 7046
Publishing port 7047
Publishing port 7048
Publishing port 7049
Creating Container BCv20Test
Style: sandbox
Multitenant: Yes
Version: 20.0.35644.0
Platform: 20.0.35590.0
Generic Tag: 1.0.2.1
Container OS Version: 10.0.14393.3144 (ltsc2016)
Host OS Version: 10.0.14393.3115 (ltsc2016)
WARNING: Host OS and Base Image Container OS doesn't match and Hyper-V is not installed. If you encounter issues, you could try to install Hyper-V.
Using process isolation
Using locale en-US
Disabling the standard eventlog dump to container log every 2 seconds (use -dumpEventLog to enable)
Files in C:\ProgramData\BcContainerHelper\Extensions\BCv20Test\my:
- AdditionalOutput.ps1
- MainLoop.ps1
- SetupNavUsers.ps1
- SetupVariables.ps1
- updatecontainerhosts.ps1
Creating container BCv20Test from image bcv20test:sandbox-20.0.35644.0-base-mt
d593f12e839e65907bfb00e3f2c59e63f4f7f2a6d631ac292cb8872a46c3d046
Waiting for container BCv20Test to be ready
Initializing...
Setting host.containerhelper.internal to 172.20.192.1 in container hosts file
Starting Container
Hostname is BCv20Test
PublicDnsName is BCv20Test
Using NavUserPassword Authentication
Starting Local SQL Server
Starting Internet Information Server
Creating Self Signed Certificate
Self Signed Certificate Thumbprint 6AE2E6F2D3437D7CE254ACB37308245CF785D294
DNS identity BCv20Test
Modifying Service Tier Config File with Instance Specific Settings
Starting Service Tier
Registering event sources
Creating DotNetCore Web Server Instance
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
WARNING: This license is not compatible with this version of Business Central.
Creating SUPER user
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.193.122
Container Hostname  : BCv20Test
Container Dns Name  : BCv20Test
Web Client          : http://BCv20Test/BC/?tenant=default
Dev. Server         : http://BCv20Test
Dev. ServerInstance : BC
Dev. Server Tenant  : default
Setting BCv20Test-default to 127.0.0.1 in container hosts file

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

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

Container Total Physical Memory is 12.0Gb
Container Free Physical Memory is 8.0Gb

Initialization took 34 seconds
Ready for connections!
Reading CustomSettings.config from BCv20Test
Creating Desktop Shortcuts for BCv20Test
Container BCv20Test successfully created

Use:
Get-BcContainerEventLog -containerName BCv20Test to retrieve a snapshot of the event log from the container
Get-BcContainerDebugInfo -containerName BCv20Test to get debug information about the container
Enter-BcContainer -containerName BCv20Test to open a PowerShell prompt inside the container
Remove-BcContainer -containerName BCv20Test to remove the container again
docker logs BCv20Test to retrieve information about URL's again

Screenshots image

Additional context Get-BcContainerEventLog -containerName BCv20Test: BCv20Test 2022-02-02 14.03.32.zip

Get-BcContainerDebugInfo -containerName BCv20Test:

{
    "container.logs":  [
                           "Initializing...",
                           "Setting host.containerhelper.internal to 172.20.192.1 in container hosts file",
                           "Starting Container",
                           "Hostname is BCv20Test",
                           "PublicDnsName is BCv20Test",
                           "Using NavUserPassword Authentication",
                           "Starting Local SQL Server",
                           "Starting Internet Information Server",
                           "Creating Self Signed Certificate",
                           "Self Signed Certificate Thumbprint 6AE2E6F2D3437D7CE254ACB37308245CF785D294",
                           "DNS identity BCv20Test",
                           "Modifying Service Tier Config File with Instance Specific Settings",
                           "Starting Service Tier",
                           "Registering event sources",
                           "Creating DotNetCore Web Server Instance",
                           "Enabling Financials User Experience",
                           "Dismounting Tenant",
                           "Mounting Tenant",
                           "Mounting Database for default on server localhost\\SQLEXPRESS with AllowAppDatabaseWrite = False",
                           "Sync\u0027ing 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: 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.193.122",
                           "Container Hostname  : BCv20Test",
                           "Container Dns Name  : BCv20Test",
                           "Web Client          : http://BCv20Test/BC/?tenant=default",
                           "Dev. Server         : http://BCv20Test",
                           "Dev. ServerInstance : BC",
                           "Dev. Server Tenant  : default",
                           "Setting BCv20Test-default to 127.0.0.1 in container hosts file",
                           "",
                           "Files:",
                           "http://BCv20Test:8080/ALLanguage.vsix",
                           "",
                           "WARNING: You are running a container which is 437 days old.",
                           "Microsoft recommends that you always run the latest version of our containers.",
                           "",
                           "Container Total Physical Memory is 12.0Gb",
                           "Container Free Physical Memory is 8.0Gb",
                           "",
                           "Initialization took 34 seconds",
                           "Ready for connections!"
                       ],
    "docker.info":  [
                        "Client:",
                        " Context:    default",
                        " Debug Mode: false",
                        " Plugins:",
                        "  app: Docker Application (Docker Inc., v0.8.0)",
                        "  cluster: Manage Mirantis Container Cloud clusters (Mirantis Inc., v1.9.0)",
                        "  registry: Manage Docker registries (Docker Inc., 0.1.0)",
                        "",
                        "Server:",
                        " Containers: 6",
                        "  Running: 1",
                        "  Paused: 0",
                        "  Stopped: 5",
                        " Images: 33",
                        " Server Version: 20.10.4",
                        " Storage Driver: windowsfilter",
                        "  Windows: ",
                        " Logging Driver: json-file",
                        " Plugins:",
                        "  Volume: local",
                        "  Network: ics internal l2bridge l2tunnel nat null overlay private transparent",
                        "  Log: awslogs etwlogs fluentd gcplogs gelf json-file local logentries splunk syslog",
                        " Swarm: inactive",
                        " Default Isolation: process",
                        " Kernel Version: 10.0 14393 (14393.3115.amd64fre.rs1_release_1.190708-1703)",
                        " Operating System: Windows Server 2016 Standard Version 1607 (OS Build 14393.3115)",
                        " OSType: windows",
                        " Architecture: x86_64",
                        " CPUs: 2",
                        " Total Memory: 12GiB",
                        " Name: WIN-GQ2SPQ6FGT4",
                        " ID: YEHA:Z3GT:6VCW:5C6A:QT4Y:S3OI:YE2Y:CJB2:W25U:NKJZ:M5AZ:NFCN",
                        " Docker Root Dir: C:\\ProgramData\\docker",
                        " Debug Mode: false",
                        " Registry: https://index.docker.io/v1/",
                        " Labels:",
                        " Experimental: false",
                        " Insecure Registries:",
                        "  127.0.0.0/8",
                        " Live Restore Enabled: false",
                        ""
                    ],
    "container.labels":  {
                             "country":  "W1",
                             "created":  "202202021054",
                             "cu":  "",
                             "eula":  "https://go.microsoft.com/fwlink/?linkid=861843",
                             "legal":  "http://go.microsoft.com/fwlink/?LinkId=837447",
                             "maintainer":  "Dynamics SMB",
                             "multitenant":  "Y",
                             "nav":  "",
                             "osversion":  "10.0.14393.3144",
                             "platform":  "20.0.35590.0",
                             "tag":  "1.0.2.1",
                             "version":  "20.0.35644.0"
                         },
    "container.ping":  [
                           "",
                           "Pinging BCv20Test [fe80::4ccf:92aa:7f78:e828%6] with 32 bytes of data:",
                           "Reply from fe80::4ccf:92aa:7f78:e828%6: time\u003c1ms ",
                           "Reply from fe80::4ccf:92aa:7f78:e828%6: time\u003c1ms ",
                           "Reply from fe80::4ccf:92aa:7f78:e828%6: time\u003c1ms ",
                           "Reply from fe80::4ccf:92aa:7f78:e828%6: time\u003c1ms ",
                           "",
                           "Ping statistics for fe80::4ccf:92aa:7f78:e828%6:",
                           "    Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),",
                           "Approximate round trip times in milli-seconds:",
                           "    Minimum = 0ms, Maximum = 0ms, Average = 0ms"
                       ],
    "container.env":  [
                          "multitenant=Y",
                          "licenseFile=\u003cspecified\u003e",
                          "auth=NavUserPassword",
                          "username=admin",
                          "databaseInstance=",
                          "enableApiServices=Y",
                          "databaseServer=",
                          "filesOnly=False",
                          "useSSL=N",
                          "passwordKeyFile=c:\\run\\my\\aes.key",
                          "securePassword=\u003cspecified\u003e",
                          "removePasswordKeyFile=Y",
                          "ExitOnError=N",
                          "locale=en-US",
                          "accept_eula=Y",
                          "accept_outdated=Y",
                          "COMPLUS_NGenProtectedProcess_FeatureEnabled=0",
                          "DatabaseName=CRONUS",
                          "IsBcSandbox=Y",
                          "artifactUrl=https://bcinsider.azureedge.net/sandbox/20.0.35644.0/base"
                      ]
}
freddydk commented 2 years ago

What URL are you using to open the WebClient? Are you opening the Web Client on the local computer or from a different computer?

Could you try to simplify your script and use:

New-BcContainer `
    -accept_eula `
    -containerName $ContainerName `
    -artifact $artifactUrl `
    -auth NavUserPassword `
    -Credential $Credential

and see if that gives the same problem?

SHermann73 commented 2 years ago

I'm using the following URL: http://BCv20Test/BC/?tenant=default Everything happens inside of a VMware virtual machine. Container and browser (Chrome) are inside of the VM.

I used the simplified command and get the same problem.

freddydk commented 2 years ago

Did you try with hyperv isolation as suggested in the output?

freddydk commented 2 years ago

Looking at the event log, you could also try to add -updatehosts to the new-bccontainer command.

freddydk commented 2 years ago

Did you manage to make this work?

SHermann73 commented 2 years ago

Hi Freddy Unfortunately not yet. I got some issues with my environment (corrupted layers/file integrities failed) while testing, so I first need to sort these out before giving proper feedback to this issue. But -updatehosts did not help. I also updated the host ( Yes, this is something completely different ;-) ) as well to the latest available updates, but this did not help either. When everything is up and running again, I will give it a try with hyperv isolation. I will keep you updated here.

freddydk commented 2 years ago

The tool described in this blog post: https://freddysblog.com/2018/12/11/clean-up-after-yourself-docker-your-mom-isnt-here/ might be able to help you reset your docker file storage area if that is the problem.

SHermann73 commented 2 years ago

Hi Freddy I have the system up and running again and have built another system for additional tests. Unfortunately without luck and on all systems the same issue. I have two environments: a) Windows Server 2016 (the old one were I had the issue the first time) b) Windows Server 2019 (a newly set up system) In both environments I am running docker installed via

Install-Package -Name docker -ProviderName DockerMsftProvider

So, I am not running Docker Desktop. I ran the BCv20 container on both systems with process isolation and with hyperv isolation. I tried it with base, w1 and gb In none of these cases I was able to log in. All the event logs show the similar errors when I try to log in. Have a look at this one: BCv20Base 2022-02-09 21.40.40.zip With every try, four errors are logged. The first error looks somewhat similar to the one in #2301 (no clue why they are in german because the system is english)

Fehler beim Zugriff auf die Website BC
Type: Microsoft.Dynamics.Nav.Types.NavServerNotFoundException
ErrorCode: -1
SuppressMessage: False
ContainsPersonalOrRestrictedInformation: True
DiagnosticsSuppress: False
DiagnosticsMessage: Message not shown because the NavBaseException constructor was used without privacy classification
MessageWithoutPrivateInformation: Message not shown because the NavBaseException constructor was used without privacy classification
SuppressExceptionCreatedEvent: False
FatalityScope: None
ErrorLevel: Error
Message: Fehler bei der Identitätsprüfung für eine ausgehende Nachricht. Die erwartete DNS-Identität des Remoteendpunkts war "", aber der Remoteendpunkt hat den DNS-Anspruch "BCv20Base" bereitgestellt. Wenn es sich hierbei um einen zulässigen Remoteendpunkt handelt, können Sie das Problem beheben, indem Sie ausdrücklich die DNS-Identität "BCv20Base" als Identity-Eigenschaft von EndpointAddress angeben, wenn Sie einen Kanalproxy erstellen. Unter 'net.tcp://localhost:7046/BC/Service' wurde kein Server gefunden. Möglicherweise ist die URL falsch, oder der Server ist zurzeit nicht verfügbar.
Source: Microsoft.Dynamics.Nav.Client.ServiceConnection
HResult: -2146233088
StackTrace:
     at Microsoft.Dynamics.Nav.Client.ConnectionEstablisher.ReportConnectFailed(ConnectFailedEventArgs connectFailedArgs, Exception exception) in s:\repo\src\Platform\Client\Shared\Prod.Client.ServiceConnection\ConnectionEstablisher.cs:line 641

One notable specialty: In seldom cases there is one additonal error logged.

Category: Microsoft.AspNetCore.Antiforgery.DefaultAntiforgery
EventId: 7
ConnectionId: 0HMFC1H38VR6P
RequestId: 0HMFC1H38VR6P:00000003
RequestPath: /BC/SignIn
ActionId: 8cacf731-d14b-474c-822b-cb640be2caf7
ActionName: Microsoft.Dynamics.Nav.WebClient.Controllers.AuthenticationController.SignIn (Prod.Client.WebCoreApp)

An exception was thrown while deserializing the token.

Exception: 
Microsoft.AspNetCore.Antiforgery.AntiforgeryValidationException: The antiforgery token could not be decrypted.
 ---> System.Security.Cryptography.CryptographicException: The key {3a48154a-7808-46da-b6c6-30ca655f2761} was not found in the key ring. For more information go to http://aka.ms/dataprotectionwarning

Not sure if this is connected to the issue above or in general. Let me know if I can help with any further infos.

freddydk commented 2 years ago

I don't think DockerMsftProvider is supported anymore, not sure which Docker version you get out of that. I use Docker Engine, installed the way I describe here: https://freddysblog.com/2021/10/30/docker-and-business-central/ - on both server and desktop. Having said that, I don't think that is the issue here. We are aware of a bug in the BC Service Tier runtime, which causes the Service Tier to crash, which would lead to the NavServerNotFoundException (issue #2298) We are working on a fix for this and I would wait for that before troubleshooting further on this issue. I expect an insider with a fix for this one of the next days.

yzheng94 commented 2 years ago

hello, we have the same issue. we have been using the Docker Engine for a long time to download Next Major version of BC. From 2/7 we can not login the BC20 any more with the error "cannot sign in due to a technical problem. Contact your system administrator."(I translated the error message from Japanese) but from VsCode, we can Download Symbols normally.

freddydk commented 2 years ago

I expect this to be solved with #2298, which should be fixed later today. Will let you know when there is a new insider build, that solves the issue. If this error persists after that, I will troubleshoot

freddydk commented 2 years ago

Please retry this with insider build 20.0.36207.0 or later, thanks

yzheng94 commented 2 years ago

I got the "20.0.36210.0", and failed to login again.

freddydk commented 2 years ago

@yzheng94 - please share full script (no tokens), full output and url used to open webclient, thanks.

freddydk commented 2 years ago

@yzheng94 - what local version are you running and what language are you running in your browser?

freddydk commented 2 years ago

Strangest bug ever - it only fails when you connect using German language (culture) and maybe some other - but not using English, Danish, Finnish f.ex. Will investigate further, the bug must be in BC (and is not docker related)

yzheng94 commented 2 years ago

@freddydk Thank you for your reply. My BCContainerHelper is the newest version, and OS is Japanese. Here is my full script:

=====================================================
PS C:\WINDOWS\system32> C:\Users\yzheng\Documents\docker\NextMajor step1 Image DL.ps1
INFO: Windows 10 21H1/21H2 images are not yet available, using 2004 as these are found to work better than 20H2 on 21H1/21H2
WARNING: Unable to find matching generic image for your host OS. Using mcr.microsoft.com/businesscentral:10.0.19041.1415
Downloading application artifact /sandbox/20.0.36247.0/jp
Downloading C:\Users\yzheng\AppData\Local\Temp\5c950181-e461-4e38-bb98-8260fef0a9b0.zip
Unpacking application artifact to tmp folder using Expand-Archive
Downloading platform artifact /sandbox/20.0.36247.0/platform
Downloading C:\Users\yzheng\AppData\Local\Temp\d7d70c41-f8b0-489e-94ce-252c1b32277a.zip
Unpacking platform artifact to tmp folder using Expand-Archive
Downloading Prerequisite Components
Downloading c:\bcartifacts.cache\sandbox\20.0.36247.0\platform\Prerequisite Components\Open XML SDK 2.5 for Microsoft Office\OpenXMLSDKv25.msi
Downloading c:\bcartifacts.cache\sandbox\20.0.36247.0\platform\Prerequisite Components\IIS URL Rewrite Module\rewrite_2.0_rtw_x64.msi
Downloading c:\bcartifacts.cache\sandbox\20.0.36247.0\platform\Prerequisite Components\DotNetCore\DotNetCore.1.0.4_1.1.1-WindowsHosting.exe
bcnextmajorimage:latest
Building image bcnextmajorimage:latest based on mcr.microsoft.com/businesscentral:10.0.19041.1415 with https://bcinsider.azureedge.net/sandbox/20.0.36247.0/jp
Pulling latest image mcr.microsoft.com/businesscentral:10.0.19041.1415
10.0.19041.1415: Pulling from businesscentral
295f12394c4f: Pulling fs layer
24b98dd3fbc4: Pulling fs layer
569a4c4f5ea8: Pulling fs layer
00dc665dbda6: Pulling fs layer
aaf3273dc827: Pulling fs layer
00dc665dbda6: Waiting
aaf3273dc827: Waiting
f41023807335: Pulling fs layer
460aa8911891: Pulling fs layer
f41023807335: Waiting
a2349b510e8a: Pulling fs layer
460aa8911891: Waiting
0b427082a124: Pulling fs layer
a2349b510e8a: Waiting
0b427082a124: Waiting
25eb93c9f28e: Pulling fs layer
57bff3dcea37: Pulling fs layer
24614bd5f528: Pulling fs layer
54907cd66c27: Pulling fs layer
6263d1d13367: Pulling fs layer
38b6e8b57be7: Pulling fs layer
25eb93c9f28e: Waiting
57bff3dcea37: Waiting
24614bd5f528: Waiting
54907cd66c27: Waiting
6263d1d13367: Waiting
38b6e8b57be7: Waiting
569a4c4f5ea8: Verifying Checksum
569a4c4f5ea8: Download complete
00dc665dbda6: Verifying Checksum
00dc665dbda6: Download complete
aaf3273dc827: Verifying Checksum
aaf3273dc827: Download complete
f41023807335: Verifying Checksum
f41023807335: Download complete
460aa8911891: Verifying Checksum
460aa8911891: Download complete
a2349b510e8a: Verifying Checksum
a2349b510e8a: Download complete
0b427082a124: Verifying Checksum
0b427082a124: Download complete
25eb93c9f28e: Verifying Checksum
25eb93c9f28e: Download complete
24b98dd3fbc4: Verifying Checksum
24b98dd3fbc4: Download complete
24614bd5f528: Verifying Checksum
24614bd5f528: Download complete
54907cd66c27: Verifying Checksum
6263d1d13367: Verifying Checksum
6263d1d13367: Download complete
38b6e8b57be7: Verifying Checksum
38b6e8b57be7: Download complete
57bff3dcea37: Verifying Checksum
57bff3dcea37: Download complete
295f12394c4f: Verifying Checksum
295f12394c4f: Download complete
295f12394c4f: Pull complete
24b98dd3fbc4: Pull complete
569a4c4f5ea8: Pull complete
00dc665dbda6: Pull complete
aaf3273dc827: Pull complete
f41023807335: Pull complete
460aa8911891: Pull complete
a2349b510e8a: Pull complete
0b427082a124: Pull complete
25eb93c9f28e: Pull complete
57bff3dcea37: Pull complete
24614bd5f528: Pull complete
54907cd66c27: Pull complete
6263d1d13367: Pull complete
38b6e8b57be7: Pull complete
Digest: sha256:8eea46031615e6445adb3bc3747cb49544d0d9fd0b79905cec9ed433a6834cac
Status: Downloaded newer image for mcr.microsoft.com/businesscentral:10.0.19041.1415
mcr.microsoft.com/businesscentral:10.0.19041.1415
Generic Tag: 1.0.2.1
Container OS Version: 10.0.19041.1415 (2004)
Host OS Version: 10.0.19043.1526 (21H1)
WARNING: Host OS is 21H1 and Container OS is 2004, defaulting to process isolation. If you experience problems, add -isolation hyperv.
Using process isolation
Files in c:\bcartifacts.cache\1sxzmnyg.aiv\my:
Copying Platform Artifacts
c:\bcartifacts.cache\sandbox\20.0.36247.0\platform
Copying Database
Copying Licensefile
Copying Extensions
C:\bcartifacts.cache\sandbox\20.0.36247.0\jp\Extensions
c:\bcartifacts.cache\1sxzmnyg.aiv
Sending build context to Docker daemon  1.842GB

Step 1/6 : FROM mcr.microsoft.com/businesscentral:10.0.19041.1415
 ---> 79c82ae35223
Step 2/6 : ENV DatabaseServer=localhost DatabaseInstance=SQLEXPRESS DatabaseName=CRONUS IsBcSandbox=Y artifactUrl=https://bcinsider.azureedge.net/sandbox/20.0.36247.0/jp?sv=2019-07-07&sig=Z4aOlpmCfLvCDd%2BGDmMCqGWJZtZl40PY0ADUoWHWHEo%
3D&spr=https&st=2021-09-15T00%3A00%3A00Z&se=2022-04-01T00%3A00%3A00Z&srt=sco&ss=b&sp=rl filesOnly=False
 ---> Running in a4fbe40c3e50
Removing intermediate container a4fbe40c3e50
 ---> e1cab87ebf59
Step 3/6 : COPY my /run/
 ---> 5410472b63cf
Step 4/6 : COPY NAVDVD /NAVDVD/
 ---> a374d69674ae
Step 5/6 : RUN \Run\start.ps1 -installOnly -multitenant
 ---> Running in 81f5f70b9aa2
Using installer from C:\Run\150-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 dependencies
Copying ReportBuilder
Importing PowerShell Modules
Determining Database Collation
Changing Database Server Collation to Japanese_XJIS_100_CI_AS
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'
Copying Web Client Files
C:\NAVDVD\WebClient\Microsoft Dynamics NAV
Copying Client Files
C:\NAVDVD\LegacyDlls\program files\Microsoft Dynamics NAV
C:\NAVDVD\LegacyDlls\program files\Microsoft Dynamics NAV
C:\NAVDVD\LegacyDlls\systemFolder
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
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 166 seconds
Installation complete
Removing intermediate container 81f5f70b9aa2
 ---> 357e1db356c7
Step 6/6 : LABEL legal="http://go.microsoft.com/fwlink/?LinkId=837447"       created="202202152341"       nav=""       cu=""       multitenant="Y" country="JP"       version="20.0.36247.0"       platform="20.0.36169.0"
 ---> Running in 30f0104506e6
Removing intermediate container 30f0104506e6
 ---> 80791bb0d268
Successfully built 80791bb0d268
Successfully tagged bcnextmajorimage:latest
Building image took 2725 seconds

PS C:\WINDOWS\system32> C:\Users\yzheng\Documents\docker\NextMajor step2 Container Create.ps1
BcContainerHelper is version 3.0.2
BcContainerHelper is running as administrator
Host is Microsoft Windows 10 Pro - 21H1
Docker Client Version is 20.10.12
Docker Server Version is 20.10.12
Fetching all docker images
Fetching all docker volumes
Using image bcnextmajorimage:latest
Creating Container D365BC20
Style: sandbox
Multitenant: No
Version: 20.0.36247.0
Platform: 20.0.36169.0
Generic Tag: 1.0.2.1
Container OS Version: 10.0.19041.1415 (2004)
Host OS Version: 10.0.19043.1526 (21H1)
WARNING: Host OS is 21H1 and Container OS is 2004, defaulting to process isolation. If you experience problems, add -isolation hyperv.
Using process isolation
Using locale 
Disabling the standard eventlog dump to container log every 2 seconds (use -dumpEventLog to enable)
Using license file C:\intaller\licence\BC19W1_20220313.flf
Files in C:\ProgramData\BcContainerHelper\Extensions\D365BC20\my:
- AdditionalOutput.ps1
- license.flf
- MainLoop.ps1
- SetupNavUsers.ps1
- SetupVariables.ps1
- updatehosts.ps1
Creating container D365BC20 from image bcnextmajorimage:latest
111985d4af586df3346fb7b6d7a8823442b3d088f6e2347d9cabf0c037dffc2b
Waiting for container D365BC20 to be ready
Initializing...
Setting host.docker.internal to 192.168.1.110 in container hosts file (copy from host hosts file)
Setting gateway.docker.internal to 192.168.1.110 in container hosts file (copy from host hosts file)
Setting kubernetes.docker.internal to 127.0.0.1 in container hosts file (copy from host hosts file)
Setting host.containerhelper.internal to 172.31.144.1 in container hosts file
Starting Container
Hostname is D365BC20
PublicDnsName is D365BC20
WARNING: DNS resolution not working from within the container.
Using NavUserPassword Authentication
Starting Local SQL Server
Starting Internet Information Server
Creating Self Signed Certificate
Self Signed Certificate Thumbprint 300D10CABDD29A3B2B1C328285B07A9D2A2D419E
DNS identity D365BC20
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
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: 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.31.158.51
Container Hostname  : D365BC20
Container Dns Name  : D365BC20
Web Client          : http://D365BC20/BC/?tenant=default
Dev. Server         : http://D365BC20
Dev. ServerInstance : BC
Dev. Server Tenant  : default
Setting D365BC20 to 172.31.158.51 in host hosts file
Setting D365BC20-default to 172.31.158.51 in host hosts file
Setting D365BC20-default to 172.31.158.51 in container hosts file

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

Container Total Physical Memory is 15.9Gb
Container Free Physical Memory is 5.3Gb

Initialization took 102 seconds
Ready for connections!
Reading CustomSettings.config from D365BC20
Creating Desktop Shortcuts for D365BC20
Creating .net Assembly Reference Folder for VS Code
Copying DLLs from C:\Windows\assembly to assemblyProbingPath
Copying DLLs from C:\Windows\Microsoft.NET\assembly to assemblyProbingPath
Copying DLLs from C:\Program Files\Microsoft Dynamics NAV\200\Service to assemblyProbingPath
Copying DLLs from C:\Program Files (x86)\Microsoft Dynamics NAV\200\RoleTailored Client to assemblyProbingPath
Copying DLLs from C:\Test Assemblies\Mock Assemblies to assemblyProbingPath
Copying DLLs from C:\Program Files (x86)\Open XML SDK to assemblyProbingPath
Container D365BC20 successfully created

Use:
Get-BcContainerEventLog -containerName D365BC20 to retrieve a snapshot of the event log from the container
Get-BcContainerDebugInfo -containerName D365BC20 to get debug information about the container
Enter-BcContainer -containerName D365BC20 to open a PowerShell prompt inside the container
Remove-BcContainer -containerName D365BC20 to remove the container again
docker logs D365BC20 to retrieve information about URL's again
=====================================================
freddydk commented 2 years ago

Apparently, Japanese also fails, which can also be shown by trying to call run-tests against any 20 container with japanese culture: image English, Danish, Finnish (and most other languages) works fine (as you can see in the screen shot too)

I have reported this bug to the Web Client team. Until then, if you switch to English, your container will probably work (not a durable solution of course)

yzheng94 commented 2 years ago

We tried to download the German, Danish, and failed to sign in as well.

freddydk commented 2 years ago

It is not the localization in the container - it is the language setting in the browser.

yzheng94 commented 2 years ago

by the way , our tested URL: artifactUrl=https://bcinsider.azureedge.net/sandbox/20.0.36247.0/jp artifactUrl=https://bcinsider.azureedge.net/sandbox/20.0.36250.0/dk

freddydk commented 2 years ago

Again - any container works if the language in the browser is English.

yzheng94 commented 2 years ago

@freddydk I can sign in now with the English browser. Thank you very much.

but I have another issue, when we sign in for the first time, we're bound to fail, after that, if reinput the URL in the browser , It can sign in successfully.

On the other hand, I think it would be better if the sign-in did not depend on the language of the environment.

freddydk commented 2 years ago

The bug will be fixed in the platform - the R&D team has a repro now. I think the The Web Client uses the language to default the settings for the user or like - I don't think we can just ignore that.

I will let you know when there is a build with a fix.

SHermann73 commented 2 years ago

Hi Freddy Thanks for your efforts. I can confirm that I still get the error after login with the version 20.0.36273.0 and the UI language of Chrome set to German. After changeing the language to English, I can successfully log in.

freddydk commented 2 years ago

As a workaround, you should be able to add:

 -additionalParameters @("--env customWebSettings=AuthenticateServer=false")

to the New-BcContainer call, then the problem should go away.

You can also specify this in the BcContainerhelper.config.json for all sessions on that machine:

    "defaultNewContainerParameters":  {
                                          "additionalParameters":  [
                                                                       "--env customWebSettings=AuthenticateServer=false"
                                                                   ]
                                      }

or set the variable for one session:

$bccontainerhelperconfig.defaultNewContainerParameters = @{ "additionalParameters" = @("--env customWebSettings=AuthenticateServer=false") }

All should work.

freddydk commented 2 years ago

this should now be fixed in next major, please reopen if the issue persists.

SHermann73 commented 2 years ago

Hi Freddy Thanks for the update! I can confirm that I'm able to log in again. Tested with both UI language settings of Chrome (English & German) & BC build 20.0.36709.0.

Unfortunately I'm not able to access the question mark menu from the top right to check the BC version inside of the UI. I tested this with both language settings of Chrome as well, so I guess this is a general issue. When checking the Chrome debugger, I get the following error:

2020-03-01 - BCv20 Issue with question mark menu

As this is most probably not related to the BCContainerHelper, can you forward this or let me know where the best place would be to report an issue with the NextMajor?

freddydk commented 2 years ago

If you can create a new issue with this issue, then I can ask one from the Web Client platform team to have a look at it.

Thanks.

SHermann73 commented 2 years ago

Hi Freddy Done See #2331