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 246 forks source link

new NextMinor and NextMajor builds are failing when publishing our app #2931

Closed amea20 closed 1 year ago

amea20 commented 1 year ago

Describe the issue When creating a nextminor or nextmajor container (Regardless of the country), publishing our app fails due to an internal websocket error.

Scripts used to create container and cause the issue

New-BCContainer -accept_eula `
                -Credential $credential `
                -licenseFile $licenseFileUri `
                -artifactUrl $artifactUrl `
                -containerName bc `
                -auth NavUserPassword `
                -doNotCheckHealth `
                -memoryLimit 20G `
                -updateHosts `
                -includeAL `
                -additionalParameters $additionalParameters `
                -useBestContainerOS

Publish-BcContainerApp -containerName bc -appFile 'C:\work\App\Company_App_1.0.0.0.app' -skipVerification

Full output of scripts

BcContainerHelper is version 4.0.14
BcContainerHelper is running as administrator
HyperV is Disabled
UsePsSession is True
Host is Microsoft Windows 10 Pro - 10.0.19044.2604
Docker Client Version is 20.10.21
Docker Server Version is 20.10.21
Removing Desktop shortcuts
Downloading application artifact /sandbox/22.0.53859.0/gb
https://bcinsider.azureedge.net/sandbox/22.0.53859.0/gb?sv=2021-06-08&ss=b&srt=sco&spr=https&st=2022-09-15T00%3A00%3A00Z&se=2023-04-01T00%3A00%3A00Z&sp=rl&sig=rBQiC8y0zbuWC66i2BJcVhy
dR3XD2aaz47aJ6q6zEss%3D
Downloading C:\Users\amea20\AppData\Local\Temp\8762f12d-d2ed-4fbe-bceb-49f636530eff.zip
Using WebClient
Unpacking application artifact to tmp folder using 7zip
Downloading platform artifact /sandbox/22.0.53859.0/platform
https://bcinsider.azureedge.net/sandbox/22.0.53859.0/platform?sv=2021-06-08&ss=b&srt=sco&spr=https&st=2022-09-15T00%3A00%3A00Z&se=2023-04-01T00%3A00%3A00Z&sp=rl&sig=rBQiC8y0zbuWC66i2
BJcVhydR3XD2aaz47aJ6q6zEss%3D
Downloading C:\Users\amea20\AppData\Local\Temp\0ef9e71b-bb1b-44ca-adb6-f4488ef61771.zip
Using WebClient
Unpacking platform artifact to tmp folder using 7zip
Downloading Prerequisite Components
Downloading c:\bcartifacts.cache\sandbox\22.0.53859.0\platform\Prerequisite Components\IIS URL Rewrite Module\rewrite_2.0_rtw_x64.msi
Using WebClient
Downloading c:\bcartifacts.cache\sandbox\22.0.53859.0\platform\Prerequisite Components\DotNetCore\DotNetCore.1.0.4_1.1.1-WindowsHosting.exe
Using WebClient
Fetching all docker images
Fetching all docker volumes
INFO: Windows 10 21H1/21H2 images are not yet available, using 2004 as these are found to work better than 20H2 on 21H1/21H2
Pulling image mcr.microsoft.com/businesscentral:10.0.19041.1415
10.0.19041.1415: Pulling from businesscentral
mcr.microsoft.com/businesscentral:10.0.19041.1415
Using image mcr.microsoft.com/businesscentral:10.0.19041.1415
Disabling Health Check (always report healthy)
Creating Container bc
Style: sandbox
Multitenant: Yes
Version: 22.0.53859.0
Platform: 22.0.53784.0
Generic Tag: 1.0.2.14
Container OS Version: 10.0.19041.1415 (2004)
Host OS Version: 10.0.19044.2604 (21H2)
WARNING: Host OS is Windows 10 21H1 or newer and Container OS is 2004, defaulting to process isolation. If you experience problems, add -isolation hyperv.
Using process isolation
Using locale en-GB
Disabling the standard eventlog dump to container log every 2 seconds (use -dumpEventLog to enable)
Using license file C:\App\Licenses\BC21-License.bclicense
Additional Parameters:
--volume "C:\work\App:C:\Agents"
Files in C:\ProgramData\BcContainerHelper\Extensions\bc\my:
- AdditionalOutput.ps1
- license.bclicense
- MainLoop.ps1
- SetupVariables.ps1
- updatehosts.ps1
Creating container bc from image mcr.microsoft.com/businesscentral:10.0.19041.1415
a1aea6e99d4439076e45db0116fc6ceca06964b0913cbbe77b2bf5d1c4cff587
Waiting for container bc to be ready
Using artifactUrl https://bcinsider.azureedge.net/sandbox/22.0.53859.0/gb
Using installer from C:\Run\210-new
Installing Business Central
Installing from artifacts
Starting Local SQL Server
Starting Internet Information Server
Copying Service Tier Files
c:\dl\sandbox\22.0.53859.0\platform\ServiceTier\Program Files
c:\dl\sandbox\22.0.53859.0\platform\ServiceTier\System64Folder
Copying PowerShell Scripts
c:\dl\sandbox\22.0.53859.0\platform\WindowsPowerShellScripts\Cloud\NAVAdministration
c:\dl\sandbox\22.0.53859.0\platform\WindowsPowerShellScripts\WebSearch
Copying Web Client Files
c:\dl\sandbox\22.0.53859.0\platform\WebClient\Microsoft Dynamics NAV
Copying ModernDev Files
c:\dl\sandbox\22.0.53859.0\platform
c:\dl\sandbox\22.0.53859.0\platform\ModernDev\program files\Microsoft Dynamics NAV
Copying additional files
Copying ConfigurationPackages
C:\dl\sandbox\22.0.53859.0\gb\ConfigurationPackages
Copying Test Assemblies
C:\dl\sandbox\22.0.53859.0\platform\Test Assemblies
Copying Extensions
C:\dl\sandbox\22.0.53859.0\gb\Extensions
Copying Applications
C:\dl\sandbox\22.0.53859.0\platform\Applications
Copying Applications.GB
C:\dl\sandbox\22.0.53859.0\gb\Applications.GB
Copying dependencies
Copying ReportBuilder
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 140 seconds
Installation complete
Initializing...
Setting host.docker.internal to 192.168.0.36 in container hosts file (copy from host hosts file)
Setting gateway.docker.internal to 192.168.0.36 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.112.1 in container hosts file
Starting Container
Hostname is bc
PublicDnsName is bc
Using NavUserPassword Authentication
Creating Self Signed Certificate
Self Signed Certificate Thumbprint FB8BB60E47B8CF3102BBE13A6AAFE752A2D5B837
DNS identity bc
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
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 bcadmin 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.
Container IP Address: 172.25.112.253
Container Hostname  : bc
Container Dns Name  : bc
Web Client          : http://bc/BC/?tenant=default
Dev. Server         : http://bc
Dev. ServerInstance : BC
Dev. Server Tenant  : default
Setting bc to 172.25.112.253 in host hosts file
Setting bc-default to 172.25.112.253 in host hosts file
Setting bc-default to 172.25.112.253 in container hosts file

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

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

Container Total Physical Memory is 63.7Gb
Container Free Physical Memory is 28.5Gb

Initialization took 23 seconds
Ready for connections!
Reading CustomSettings.config from bc
Creating Desktop Shortcuts for bc
Extracting C:\Applications.GB\Base Application.Source.zip
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\220\Service to assemblyProbingPath
Copying DLLs from C:\Test Assemblies\Mock Assemblies to assemblyProbingPath
Container bc successfully created

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

Publishing C:\ProgramData\BcContainerHelper\Extensions\bc\15afcf58-60c8-4d82-9bb5-2ff4e7b93a1d\Company_App_1.0.0.0.app
An internal WebSocket error occurred. Please see the innerException, if present, for more details. 

Exception Script Stack Trace:
at <ScriptBlock>, <No file>: line 41

PowerShell Call Stack:
at Invoke-ScriptInBcContainer, C:\Program Files\WindowsPowerShell\Modules\bccontainerhelper\4.0.14\ContainerHandling\Invoke-ScriptInNavContainer.ps1: line 71
at <ScriptBlock>, C:\Program Files\WindowsPowerShell\Modules\bccontainerhelper\4.0.14\AppHandling\Publish-NavContainerApp.ps1: line 293
at Publish-BcContainerApp, C:\Program Files\WindowsPowerShell\Modules\bccontainerhelper\4.0.14\AppHandling\Publish-NavContainerApp.ps1: line 144
at <ScriptBlock>, <No file>: line 1

Container Free Physical Memory: 26.6Gb

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

Publish-BcContainerApp Telemetry Correlation Id: 7fc20ed6-0a85-45d3-b003-b600a8080b8c
An internal WebSocket error occurred. Please see the innerException, if present, for more details. 
At C:\Program Files\WindowsPowerShell\Modules\bccontainerhelper\4.0.14\ContainerHandling\Invoke-ScriptInNavContainer.ps1:112 char:13
+             throw $errorMessage
+             ~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : OperationStopped: (An internal Web... more details. :String) [], RuntimeException
    + FullyQualifiedErrorId : An internal WebSocket error occurred. Please see the innerException, if present, for more details. 
...

Additional context

amea20 commented 1 year ago

I have tried a different approach to publishing by accessing the container and running the Publish-NAVApp command, which returns the following error message:

Publish-NAVApp : An internal WebSocket error occurred. Please see the innerException, if present, for more details.
At line:1 char:1
+ Publish-NAVApp -ServerInstance BC -Path '.\Company_App_ ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (0:Int32) [Publish-NAVApp], CommunicationException
    + FullyQualifiedErrorId : MicrosoftDynamicsNavServer$BC/nav-systemapplication,Microsoft.Dynamics.Nav.Apps.Manageme
   nt.Cmdlets.PublishNavApp

Publish-NAVApp : The communication object, System.ServiceModel.Channels.ServiceChannel, cannot be used for
communication because it is in the Faulted state.
At line:1 char:1
+ Publish-NAVApp -ServerInstance BC -Path '.\Company_App_ ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [Publish-NAVApp], CommunicationObjectFaultedException
    + FullyQualifiedErrorId : MicrosoftDynamicsNavServer$BC/nav-systemapplication,Microsoft.Dynamics.Nav.Apps.Manageme
   nt.Cmdlets.PublishNavApp
amea20 commented 1 year ago

Here are 2 errors reported in the event viewer:

Type: System.ServiceModel.CommunicationException
Message: An internal WebSocket error occurred. Please see the innerException, if present, for more details. 
StackTrace:

  Server stack trace: 
     at System.ServiceModel.Channels.WebSocketTransportDuplexSessionChannel.ThrowOnPendingException(Exception& pendingException)
     at System.ServiceModel.Channels.WebSocketTransportDuplexSessionChannel.WebSocketMessageSource.Receive(TimeSpan timeout)
     at System.ServiceModel.Channels.SynchronizedMessageSource.Receive(TimeSpan timeout)
     at System.ServiceModel.Channels.TransportDuplexSessionChannel.Receive(TimeSpan timeout)
     at System.ServiceModel.Channels.TransportDuplexSessionChannel.TryReceive(TimeSpan timeout, Message& message)
     at System.ServiceModel.Dispatcher.DuplexChannelBinder.Request(Message message, TimeSpan timeout)
     at System.ServiceModel.Channels.ServiceChannel.Call(String action, Boolean oneway, ProxyOperationRuntime operation, Object[] ins, Object[] outs, TimeSpan timeout)
     at System.ServiceModel.Channels.ServiceChannelProxy.InvokeService(IMethodCallMessage methodCall, ProxyOperationRuntime operation)
     at System.ServiceModel.Channels.ServiceChannelProxy.Invoke(IMessage message)

  Exception rethrown at [0]: 
     at Microsoft.Dynamics.Nav.Management.NavCommand.WriteError(Exception exception, ErrorCategory category, Object target, Boolean rethrow)
     at Microsoft.Dynamics.Nav.Management.NavCommand.WriteError(Exception exception)
     at Microsoft.Dynamics.Nav.Apps.Management.Cmdlets.PublishNavApp.PublishToService()
     at Microsoft.Dynamics.Nav.Apps.Management.Cmdlets.PublishNavApp.InternalProcessRecord()
     at Microsoft.Dynamics.Nav.Management.NavCommand.ProcessRecord()
Source: Microsoft.Dynamics.Nav.Management
HResult: -2146233087
StackTrace:

  Server stack trace: 
     at System.ServiceModel.Channels.WebSocketTransportDuplexSessionChannel.ThrowOnPendingException(Exception& pendingException)
     at System.ServiceModel.Channels.WebSocketTransportDuplexSessionChannel.WebSocketMessageSource.Receive(TimeSpan timeout)
     at System.ServiceModel.Channels.SynchronizedMessageSource.Receive(TimeSpan timeout)
     at System.ServiceModel.Channels.TransportDuplexSessionChannel.Receive(TimeSpan timeout)
     at System.ServiceModel.Channels.TransportDuplexSessionChannel.TryReceive(TimeSpan timeout, Message& message)
     at System.ServiceModel.Dispatcher.DuplexChannelBinder.Request(Message message, TimeSpan timeout)
     at System.ServiceModel.Channels.ServiceChannel.Call(String action, Boolean oneway, ProxyOperationRuntime operation, Object[] ins, Object[] outs, TimeSpan timeout)
     at System.ServiceModel.Channels.ServiceChannelProxy.InvokeService(IMethodCallMessage methodCall, ProxyOperationRuntime operation)
     at System.ServiceModel.Channels.ServiceChannelProxy.Invoke(IMessage message)

  Exception rethrown at [0]: 
     at Microsoft.Dynamics.Nav.Management.NavCommand.WriteError(Exception exception, ErrorCategory category, Object target, Boolean rethrow)
     at Microsoft.Dynamics.Nav.Management.NavCommand.WriteError(Exception exception)
     at Microsoft.Dynamics.Nav.Apps.Management.Cmdlets.PublishNavApp.PublishToService()
     at Microsoft.Dynamics.Nav.Apps.Management.Cmdlets.PublishNavApp.InternalProcessRecord()
     at Microsoft.Dynamics.Nav.Management.NavCommand.ProcessRecord()
----------------------------------
Type: System.Net.WebSockets.WebSocketException
ErrorCode: 0
WebSocketErrorCode: Success
NativeErrorCode: 0
Message: An internal WebSocket error occurred. Please see the innerException, if present, for more details. 
StackTrace:
     at System.Net.WebSockets.WebSocketBase.ThrowIfConvertibleException(String methodName, Exception exception, CancellationToken cancellationToken, Boolean aborted)
     at System.Net.WebSockets.WebSocketBase.<ReceiveAsyncCore>d__45.MoveNext()
  --- End of stack trace from previous location where exception was thrown ---
     at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
     at System.ServiceModel.Channels.WebSocketTransportDuplexSessionChannel.WebSocketMessageSource.<ReadBufferedMessageAsync>d__34.MoveNext()
Source: System
HResult: -2147467259
StackTrace:
     at System.Net.WebSockets.WebSocketBase.ThrowIfConvertibleException(String methodName, Exception exception, CancellationToken cancellationToken, Boolean aborted)
     at System.Net.WebSockets.WebSocketBase.<ReceiveAsyncCore>d__45.MoveNext()
  --- End of stack trace from previous location where exception was thrown ---
     at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
     at System.ServiceModel.Channels.WebSocketTransportDuplexSessionChannel.WebSocketMessageSource.<ReadBufferedMessageAsync>d__34.MoveNext()
----------------------------------
Type: System.Net.Sockets.SocketException
ErrorCode: 10054
Message: An existing connection was forcibly closed by the remote host
SocketErrorCode: ConnectionReset
NativeErrorCode: 10054
StackTrace:
     at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
     at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
     at System.Net.WebSockets.WebSocketConnectionStream.<ReadAsync>d__21.MoveNext()
  --- End of stack trace from previous location where exception was thrown ---
     at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
     at System.Net.WebSockets.WebSocketBase.WebSocketOperation.<Process>d__19.MoveNext()
  --- End of stack trace from previous location where exception was thrown ---
     at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
     at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
     at System.Net.WebSockets.WebSocketBase.<ReceiveAsyncCore>d__45.MoveNext()
Source: mscorlib
HResult: -2147467259
StackTrace:
     at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
     at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
     at System.Net.WebSockets.WebSocketConnectionStream.<ReadAsync>d__21.MoveNext()
  --- End of stack trace from previous location where exception was thrown ---
     at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
     at System.Net.WebSockets.WebSocketBase.WebSocketOperation.<Process>d__19.MoveNext()
  --- End of stack trace from previous location where exception was thrown ---
     at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
     at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
     at System.Net.WebSockets.WebSocketBase.<ReceiveAsyncCore>d__45.MoveNext()
Type: System.ServiceModel.CommunicationObjectFaultedException
Message: The communication object, System.ServiceModel.Channels.ServiceChannel, cannot be used for communication because it is in the Faulted state.
StackTrace:

  Server stack trace: 
     at System.ServiceModel.Channels.CommunicationObject.ThrowIfDisposedOrNotOpen()
     at System.ServiceModel.Channels.ServiceChannel.EnsureOpened(TimeSpan timeout)
     at System.ServiceModel.Channels.ServiceChannel.Call(String action, Boolean oneway, ProxyOperationRuntime operation, Object[] ins, Object[] outs, TimeSpan timeout)
     at System.ServiceModel.Channels.ServiceChannelProxy.InvokeService(IMethodCallMessage methodCall, ProxyOperationRuntime operation)
     at System.ServiceModel.Channels.ServiceChannelProxy.Invoke(IMessage message)

  Exception rethrown at [0]: 
     at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)
     at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)
     at Microsoft.BusinessCentral.AdminApi.IAdminService.CloseAdminConnection()
     at Microsoft.Dynamics.Nav.Management.ServerInstanceConnection.DoCloseAdminConnection(IAdminService adminService)
     at Microsoft.Dynamics.Nav.Management.ServerInstanceConnection.CloseAdminConnection()
     at Microsoft.Dynamics.Nav.Management.ServerInstanceConnection.InternalEndProcessing()
     at Microsoft.Dynamics.Nav.Apps.Management.Cmdlets.PublishNavApp.InternalEndProcessing()
     at Microsoft.Dynamics.Nav.Management.NavCommand.EndProcessing()
Source: mscorlib
HResult: -2146233087
StackTrace:

  Server stack trace: 
     at System.ServiceModel.Channels.CommunicationObject.ThrowIfDisposedOrNotOpen()
     at System.ServiceModel.Channels.ServiceChannel.EnsureOpened(TimeSpan timeout)
     at System.ServiceModel.Channels.ServiceChannel.Call(String action, Boolean oneway, ProxyOperationRuntime operation, Object[] ins, Object[] outs, TimeSpan timeout)
     at System.ServiceModel.Channels.ServiceChannelProxy.InvokeService(IMethodCallMessage methodCall, ProxyOperationRuntime operation)
     at System.ServiceModel.Channels.ServiceChannelProxy.Invoke(IMessage message)

  Exception rethrown at [0]: 
     at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)
     at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)
     at Microsoft.BusinessCentral.AdminApi.IAdminService.CloseAdminConnection()
     at Microsoft.Dynamics.Nav.Management.ServerInstanceConnection.DoCloseAdminConnection(IAdminService adminService)
     at Microsoft.Dynamics.Nav.Management.ServerInstanceConnection.CloseAdminConnection()
     at Microsoft.Dynamics.Nav.Management.ServerInstanceConnection.InternalEndProcessing()
     at Microsoft.Dynamics.Nav.Apps.Management.Cmdlets.PublishNavApp.InternalEndProcessing()
     at Microsoft.Dynamics.Nav.Management.NavCommand.EndProcessing()
freddydk commented 1 year ago

Could you try this with HyperV isolation?

amea20 commented 1 year ago

It errors with the same Powershell error messages and event log messages.

amea20 commented 1 year ago

Not sure if there's a timeout somewhere that can be configured to resolved this, because testing with a small app works without issues.

oscarfernandezkurago commented 1 year ago

In our case we´ve just found a workaround to solve this problem, it was related with one particular codeunit that has a case statement with 4000 expressions. I remembered that a couple of months ago the compiler of the container downloaded as major version gave us an stack overflow when compiling because of this codeunit, in the current major version the error is not at compilation time but at publish time, in this case splitting the case statement in four smaller case statements has solved our problem. Try to find if a particlar part of your code is provoking this error.

amea20 commented 1 year ago

Sadly, there were no compilation errors in NextMajor for the past few months, making it difficult to determine what changes are needed.

freddydk commented 1 year ago

@amea20 - could you email me a copy of your .app file, and a small script which creates a container and publishes the .app file to provoke this error - then i will try and troubleshoot.

amea20 commented 1 year ago

Thanks Freddy. Email has been sent to you including a script and the app file.

amea20 commented 1 year ago

Hi there Freddy,

Please provide an update concerning this matter.

freddydk commented 1 year ago

I think this problem was resolved in the public preview, did you try that?

amea20 commented 1 year ago

Thanks Freddy. I'm running it now with 4.0.15-preview921.

amea20 commented 1 year ago

Sadly, it still returned the same errors as above.

amea20 commented 1 year ago

Hi Freddy,

Please provide an update concerning this matter.

Kind regards, Ahmed

amea20 commented 1 year ago

Hello,

Closing this ticket as Microsoft are looking into this in a different support platform.

Thank you for your time.