microsoft / navcontainerhelper

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

NavSip.dll missing in SysWOW64 on business central 21.0 artifact #2598

Closed LeifurPals closed 2 years ago

LeifurPals commented 2 years ago

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

Describe the issue I get an error when SysWow64.dll is being copied

Scripts used to create container and cause the issue

 New-BcContainer 
     -locale: is 
      -includeTestToolkit: True 
      -containerName: dynamics-nav 
      -includeTestLibrariesOnly: True 
      -credential: System.Management.Automation.PSCredential 
      -useBestContainerOS: True 
      -memoryLimit: 6G 
      -runSandboxAsOnPrem: True 
      -accept_eula: True 
      -artifactUrl: https://bcinsider.azureedge.net/sandbox/21.0.43576.0/is?sv=2020-08-04&ss=b&srt=sco&spr=https&st=2022-03-15T00%3A0xxxxxxxxxxxxxxxxxxxxxxxxxxx
      -installCertificateOnHost: False 
      -useSSL: False -auth: UserPassword 
      -licenseFile: C:\fake\fakeFileName.flf 
      -updateHosts: True 
      -additionalParameters -e ACCEPT_OUTDATED=Y

Full output of scripts


C:\Run\my\ProjectDirectory\H3Laun.AL\H3Laun.Test\TestDocs\allTypes.txt(1,1): warning AL1025: The file at location 'C:\Run\my\ProjectDirectory\H3Laun.AL\H3Laun.Test\TestDocs\allTypes.txt' does not match any definition.
C:\Run\my\ProjectDirectory\H3Laun.AL\H3Laun.Test\TestDocs\launtest.txt(1,1): warning AL1025: The file at location 'C:\Run\my\ProjectDirectory\H3Laun.AL\H3Laun.Test\TestDocs\launtest.txt' does not match any definition.
C:\Run\my\ProjectDirectory\H3Laun.AL\H3Laun.Test\TestDocs\VendorAndCustomerSameNos.txt(1,1): warning AL1025: The file at location 'C:\Run\my\ProjectDirectory\H3Laun.AL\H3Laun.Test\TestDocs\VendorAndCustomerSameNos.txt' does not match any definition.

Compilation ended at '13:03:12.079'.

C:\ProgramData\BcContainerHelper\Extensions\dynamics-nav\My\ProjectDirectory\H3Laun.AL\H3Laun.Test\Rue de Net_H3 Laun.Test_22.6.0.27797.app successfully created in 23 seconds
C:\ProgramData\BcContainerHelper\Extensions\dynamics-nav\My\ProjectDirectory\H3Laun.AL\H3Laun.Test\Rue de Net_H3 Laun.Test_22.6.0.27797.app
Publishing Rue de Net_H3 Laun.Test_22.6.0.27797.app to http://172.21.126.188:7049/BC/dev/apps?SchemaUpdateMode=synchronize&tenant=default
App Rue de Net_H3 Laun.Test_22.6.0.27797.app successfully published
7/20/2022 1:03:15 PM : HEAD - ----------------------    Test-AlTranslationAreNotValid C:\agent\_work\187\s\H3Laun.AL\H3Laun.Test   ----------------------
7/20/2022 1:03:15 PM : HEAD - ----------------------    Test-AlTranslationAreNotValid - Skipping Verification for Test extension   ----------------------
Copy SIP crypto provider from container dynamics-nav
Copy from container dynamics-nav (C:\Windows\System32\NavSip.dll) to C:\Windows\System32\NavSip.dll
Copy from container dynamics-nav (C:\Windows\SysWow64\NavSip.dll) to C:\Windows\SysWow64\NavSip.dll
Cannot find path 'C:\Windows\SysWow64\NavSip.dll' because it does not exist.

Exception Script Stack Trace:
at Invoke-ScriptInBcContainer, C:\Program Files\WindowsPowerShell\Modules\BcContainerHelper\3.0.11\ContainerHandling\Invoke-ScriptInNavContainer.ps1: line 61
at Copy-FileFromBcContainer, C:\Program Files\WindowsPowerShell\Modules\BcContainerHelper\3.0.11\Misc\Copy-FileFromNavContainer.ps1: line 39
at Install-NAVSipCryptoProviderFromBcContainer, C:\Program Files\WindowsPowerShell\Modules\BcContainerHelper\3.0.11\AppHandling\Install-NAVSipCryptoProviderFromNavContainer.ps1: line 43
at Build-AL, C:\agent\_work\187\s\vsts-tools\buildscripts\BuildFunctions.ps1: line 758
at <ScriptBlock>, C:\agent\_work\187\s\vsts-tools\buildscripts\build.ps1: line 149
at <ScriptBlock>, C:\agent\_work\_temp\cddecbb2-f88f-40bd-aa55-4d1c131dfdeb.ps1: line 3
at <ScriptBlock>, <No file>: line 1

PowerShell Call Stack:
at Invoke-ScriptInBcContainer, C:\Program Files\WindowsPowerShell\Modules\BcContainerHelper\3.0.11\ContainerHandling\Invoke-ScriptInNavContainer.ps1: line 71
at Copy-FileFromBcContainer, C:\Program Files\WindowsPowerShell\Modules\BcContainerHelper\3.0.11\Misc\Copy-FileFromNavContainer.ps1: line 39
at Install-NAVSipCryptoProviderFromBcContainer, C:\Program Files\WindowsPowerShell\Modules\BcContainerHelper\3.0.11\AppHandling\Install-NAVSipCryptoProviderFromNavContainer.ps1: line 43
at Build-AL, C:\agent\_work\187\s\vsts-tools\buildscripts\BuildFunctions.ps1: line 758
at <ScriptBlock>, C:\agent\_work\187\s\vsts-tools\buildscripts\build.ps1: line 149
at <ScriptBlock>, C:\agent\_work\_temp\cddecbb2-f88f-40bd-aa55-4d1c131dfdeb.ps1: line 3
at <ScriptBlock>, <No file>: line 1

Container Free Physical Memory: 3.5Gb

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

Install-NAVSipCryptoProviderFromBcContainer Telemetry Correlation Id: 59f6e87d-df04-473b-971a-90c675243bea
Cannot find path 'C:\Windows\SysWow64\NavSip.dll' because it does not exist.
At C:\Program 
Files\WindowsPowerShell\Modules\BcContainerHelper\3.0.11\ContainerHandling\Invoke-ScriptInNavContainer.ps1:112 char:13
+             throw $errorMessage
+             ~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : OperationStopped: (Cannot find pat...does not exist.:String) [], RuntimeException
    + FullyQualifiedErrorId : Cannot find path 'C:\Windows\SysWow64\NavSip.dll' because it does not exist.

##[error]PowerShell exited with code '1'.

...

Additional context

freddydk commented 2 years ago

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

freddydk commented 2 years ago

Shipped in the latest prerelease

freddydk commented 2 years ago

Shipped in 4.0.3

DeFynancy commented 1 year ago

Hi Freddy, while trying to sign my App with Signtool.exe I get the error "File not recognized" I stumbled upon the "Install-NAVSipCryptoProviderFromBcContainer" command to copy "NavSip" locally. However I get the same Error as above.

I am running a Docker Container 22.1.55890.57331 and try to sign my App Files with a new (required) eSigner Service.

Do you have any idea?

Thank you so much for the help.

PS C:\Windows\system32> Install-NAVSipCryptoProviderFromBcContainer bcserver
Remove existing C:\Windows\System32\NavSip.dll
Copy SIP crypto provider from container bcserver
Copy from container bcserver (C:\Windows\System32\NavSip.dll) to C:\Windows\System32\NavSip.dll
Copy from container bcserver (C:\Windows\SysWow64\NavSip.dll) to C:\Windows\SysWow64\NavSip.dll
Cannot find path 'C:\Windows\SysWow64\NavSip.dll' because it does not exist.

Exception Script Stack Trace:
bei Invoke-ScriptInBcContainer, C:\Program Files\WindowsPowerShell\Modules\BcContainerHelper\4.0.16\ContainerHandling\Invoke-ScriptInNavContainer.ps1: Zeile 61
bei Copy-FileFromBcContainer, C:\Program Files\WindowsPowerShell\Modules\BcContainerHelper\4.0.16\Misc\Copy-FileFromNavContainer.ps1: Zeile 39
bei Install-NAVSipCryptoProviderFromBcContainer, C:\Program Files\WindowsPowerShell\Modules\BcContainerHelper\4.0.16\AppHandling\Install-NAVSipCryptoProviderFromNavContainer.ps1: Zeile 44
bei <ScriptBlock>, <Keine Datei>: Zeile 1

PowerShell Call Stack:
bei Invoke-ScriptInBcContainer, C:\Program Files\WindowsPowerShell\Modules\BcContainerHelper\4.0.16\ContainerHandling\Invoke-ScriptInNavContainer.ps1: Zeile 71
bei Copy-FileFromBcContainer, C:\Program Files\WindowsPowerShell\Modules\BcContainerHelper\4.0.16\Misc\Copy-FileFromNavContainer.ps1: Zeile 39
bei Install-NAVSipCryptoProviderFromBcContainer, C:\Program Files\WindowsPowerShell\Modules\BcContainerHelper\4.0.16\AppHandling\Install-NAVSipCryptoProviderFromNavContainer.ps1: Zeile 44
bei <ScriptBlock>, <Keine Datei>: Zeile 1

Container Free Physical Memory: 4.7Gb

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

C:\Windows\SysWow64\NavSip.dll doesn't exist.
C:\Windows\System32\NavSip.dll successfully registered.
freddydk commented 1 year ago

You are running 4.0.16, and it should be fixed there, but before I investigate, please install the latest ContainerHelper and try with that.

freddydk commented 1 year ago

Also, this issue is closed, please create a new issue if this persists with the latest containerhelper.

DeFynancy commented 1 year ago

@freddydk thank you :) Updated Container Helper and opened new issue: https://github.com/microsoft/navcontainerhelper/issues/3089