Troubleshooting
LS Central Packages
Unfortunately, Update Service can only be as good at installing software, as the software it's installing. This section will list common installation errors, explain why they could be happening and suggest possible solutions.
How to view the installation log
The installation log can offer more context to the error message, such as:
- Full list of packages and versions in the installation.
- What package failed and in which step.
- The arguments used during execution.
- The PowerShell execution log.
- Potentially more detailed error messages.
- The error stack trace.
To view the installation logs:
- In your management portal.
Or find the raw logs on the client in:
C:\ProgramData\LS Retail\GoCurrent\Client\Log
- Sort by date to find the latest log file.
- The log file names are as follows:
- The app or installers produce log files that start with LSRetail.GoCurrent.Client.Wizard.exe.
- The client service produces log files that start with LSRetail.GoCurrent.Client.Service.exe.
- Other log files are produced by PowerShell scripts.
How to view errors from a service tier
- From the Windows start menu, open Event Viewer.
- On the right side, expand Windows Logs and click on Application.
- In the main list, locate an Error of Source MicrosoftDynamicsNavServer$LSCentral.
- The error message is displayed below the main list.
Database backup already exists from a previous installation attempt (215a57a3-69e9-40ce-b2b2-fadeb46e5e6b). This indicates that installation nor rollback was successful. You must resolve manually and then remove the backup from the location "C:\ProgramData\LS Retail\GoCurrent\Client\Instances\INSTANCENAME\Upgrade\Database\database.bak" to try again.
This error occurs when a previous installation or an update failed and was not able to roll back successfully. When Update Service updates a Business Central instance, it creates a backup of the current database before performing the update and places it in the location detailed in the error message.
The backup process is as follows:
- The database backup is deleted on a successful installation.
- If the installation fails:
- The backup is restored in the rollback phase and then deleted.
- If the restore attempt fails, the backup is not deleted and the user must resolve the issue by hand.
Solution: You must evaluate if you want to restore the backup or try to continue with the existing database. Possible scenarios to consider:
- The POS device is still operational after the installation failure and could contain new transactions or data.
- You should be able to continue with the current database. Move the database backup from the location specified in the error message (C:\ProgramData\LS Retail\GoCurrent\Client\Instances\INSTANCENAME\Upgrade\Database\database.bak) to continue.
- The POS device is not operational after the failure and the current database contains no new transactions or data.
- Remove the current database and restore the database backup in its place. Move (or delete) the database backup from the location specified in the error message (C:\ProgramData\LS Retail\GoCurrent\Client\Instances\INSTANCENAME\Upgrade\Database\database.bak) to continue.
You might still need to resolve the issue that caused the error initially, you can view the initial error message in the Management Portal, take the Guid from the error message and replace it with the Guid in the following URL and open it in a browser: http://localhost:8030/telemetry/installs/215a57a3-69e9-40ce-b2b2-fadeb46e5e6b
The socket connection was aborted. This could be caused by an error processing your message or a receive timeout being exceeded by the remote host, or an underlying network resource issue. Local socket timeout was '10675199.02:48:05.4775807'.
Cause
You may receive this message if any of these conditions are true:
- Internal error occurred on the Business Central server.
- Not enough available memory, resulting in an internal error on the server.
Resolution
- Check internal error messages from service tier for further information.
- Free memory by closing memory-heavy applications, such browsers (Chrome, Edge, Firefox,...), VS Code, other Business Central services...
You do not have the following permissions on TableData Plan: Insert.
Cause
You may receive this message if any of these conditions are true:
- No license installed/imported.
- License does not include sufficient object range.
Resolution
To resolve this problem, use any one of the following methods, depending on the cause of the problem:
- Install or import a license with sufficient object range.
Could not publish app in package, due to compilation failed.
Cause
You may receive this message if any of these conditions are true:
- A more recent version of a dependency has changed in a non-backwards compatible way, such as:
- Function signiture has changed.
- Table or field has changed or removed.
- Object has changed or removed.
- Protection level has changed.
- Other changes.
A dependency can be another app or add-in.
Resolution
To resolve this problem, use any one of the following methods, depending on the cause of the problem:
- Revert breaking changes in dependency.
- Change target app to use new version of the dependency.
- Select a version of dependency that matches target dependency.
Example error messages: Missing event:
Extension compilation failed ExtCode/Pages/Simple%20Test%20Page%20JS.page.al(186,13): error AL0462: The publisher 'EventHandler' does not have any public events named 'OnModalResult' ExtCode/Pages/Simple%20Test%20Page%20JS.page.al(198,38): error AL0284: The type of the parameter 'evnt' on the event subscriber 'EventHandler::OnPosEvent' does not match the expected type 'Text'.
Changes in function signiture:
Extension compilation failed ExtCode/Codeunits/Hotel%20Activity%20Mgmt..codeunit.al(234,30): error AL0135: There is no argument given that corresponds to the required formal parameter 'ActivityNo' of 'Populate(Code[20], Code[20], Date, Integer, Boolean, Code[20])'
Changes in add-in assembly:
Extension compilation failed Base/dotnet.al(42,14): error AL0452: The type 'LSRetail.NAV.Utils.SerializationUtil' could not be found in assembly 'LSTools, Version=1.0.0.0, Culture=neutral, PublicKeyToken=194563f11b671d8c''
Extension compilation failed Base/Codeunits/Search%20Index.codeunit.al(836,25): error AL0132: 'DotNet "LSRetail.NAV.Search.Helpers"' does not contain a definition for 'JsonToDataContractObject' Base/Codeunits/Search%20Index.codeunit.al(843,25)
Protection level changed:
Extension compilation failed ExtCode/Pages/Room%20List.page.al(94,58): error AL0161: 'LSC ACT Attribute Functions' is inaccessible due to its protection level
Cannot install the extension EXTENSION NAME by PUBLISHER 1.0.0.0 because a newer version was already installed.
Cause
You may receive this message if any of these conditions are true:
- The same app, as being installed, is already installed in the Business Central database with a greater version.
- These are restrictions set in Business Central.
Resolution
To resolve this problem, use any one of the following methods, depending on the cause of the problem:
- Ensure all apps being installed have the same version number or greater than the apps in the database.
"Removing fields is not allowed." or "Removing tables is not allowed unless they are temporary or are being moved by migration to another app."
Cause
You may receive this message if any of these conditions are true:
- An app is doing destructive schema changes compared to a previous version, by removing or renaming fields or tables.
- By default, destructive schema changes are not allowed in Business Central.
Resolution
To resolve this problem, use any one of the following methods, depending on the cause of the problem:
- Allow destructive schema changes, see here for further information.
- If possible, revert the changes in the app.
Similar errors regarding destructive changes:
Table Customer Order Setup :: The field 'Refund Rounding Limit' cannot be located. Removing fields is not allowed.
Changing fields for the key 'Key1' is not allowed
"Service 'Microsoft Dynamics 365 Business Central Server [LSCentral] (MicrosoftDynamicsNavServer$LSCentral)' cannot be started due to the following error: Cannot start service MicrosoftDynamicsNavServer$LSCentral on computer '.'."
This error is usually followed with another error message that can be seen in the logs:
The service did not start due to a logon failure
Cause
- The user or password assigned to the service is incorrect.
Resolution:
- Check that the user and password is correct.
- You may need to type the user name in a different form, such as:
- domain\user
- user@domain.local
- user@domain.com
- .\user
- Check on the service, run->services.msc->Microsoft Dynamics 365 Business Central Server [LSCentral]
The service did not respond to the start or control request in a timely fashion.
Cause
- The servie tier did not start within acceptable timeframe.
- The service tier fails to start due to an internal error.
Resolution
- Check if further details on the error in the Windows Event Viewer.
- Make sure enough resources are available on the machine.
- Try again.
Other possible error messages:
- The system cannot find the file specified.
- The dependency service or group failed to start.
- The service cannot be started, either because it is disabled or because it has no enabled devices associated with it.
- Access is denied.
Failed to start service 'Microsoft Dynamics 365 Business Central Server [LSCentral] (MicrosoftDynamicsNavServer$LSCentral)'.
The service tier fails to start due to an internal error.
Cause
You may receive this message if any of these conditions are true:
- The user assigned to the service does not have privileges on the SQL server or database.
- The database does not exist.
- Configuration error.
- Unexpected error occurred in the Business Central service tier.
Resolution
To resolve this problem, use any one of the following methods, depending on the cause of the problem:
- Grant db_owner permission to the user assigned to the service.
- Check if the database exists and the connection string is correct.
- Check internal error messages from service tier for further information.
Running msiexec failed with exit code 1603 (Microsoft_Dynamics_NAV_SQL_DemoDatabase).
A more detailed error message may be found in the full installation log. Such as:
Error 26203. Failed to connect to SQL database. (-2147467259 master )
Cause
You may receive this message if any of these conditions are true:
- The selected SQL server does not exist.
- The user (running the install process) has insufficient privileges to the SQL server.
- Does not meet the minimum requirements for the Business Central database components.
Resolution
To resolve this problem, use any one of the following methods, depending on the cause of the problem:
- Verify that the SQL server exists or select a different SQL server.
- Verify that the user running the install process has the necessary privileges to the SQL server to install the Business Central database components.
- Verify that the machine meets the minimum requirements for the Business Central database components.
In the full installation log, right before the line with "Error 26203" you can check the SQL server that the installation process is trying to connect to. Also possible by searching on the installation log for "- ConnectionString: ". Something such as:
2023-09-06 10:57:30:955 0027 4 /Agent(9628): - Parameters:
2023-09-06 10:57:30:955 0026 4 /Agent(9628): - ConnectionString: Data Source=DESKTOP-EN00N89;Initial Catalog=POSMaster;Integrated Security=True
The SQL Connection String is configured in the Project.json file:
{
...
"DbConnectionString": "Data Source=${System.SqlServerInstance};Initial Catalog=${Package.InstanceName};Integrated Security=True",
...
}
Note
If, for instance, you have an instance configured on your SQL server, the data source on the connection string should include the instance name. For example, if you're using SQL Server Express, by default an instance called SQLEXPRESS is created and therefore the data source would be DESKTOP-EN00N89\SQLEXPRESS and the DbConnectionString in the Project.json file would be as follows:
{
...
"DbConnectionString": "Data Source=DESKTOP-EN00N89\SQLEXPRESS;Initial Catalog=${Package.InstanceName};Integrated Security=True",
...
}
Could not load file or assembly 'netstandard, Version=2.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51' or one of its dependencies. The system cannot find the file specified.
Cause
You may receive this message if any of these conditions are true:
- The machine has not been restarted after the .NET standard was installed.
- .NET standard is not installed.
Resolution
To resolve this problem, use any one of the following methods, depending on the cause of the problem:
- Restart the machine and try again.
- Install the .NET standard, restart the machine, and try again.
Method not found: 'Int64 System.GC.GetAllocatedBytesForCurrentThread()'
Cause
You may receive this message if any of these conditions are true:
- The machine has not been restarted after the .NET runtime was installed.
Resolution
To resolve this problem, use any one of the following methods, depending on the cause of the problem:
- Restart the machine and try again.
No license file has been uploaded to the server.
Cause
You may receive this message if any of these conditions are true:
- No license is provided with the installation.
- No license is present in the database.
Resolution
To resolve this problem, use any one of the following methods, depending on the cause of the problem:
- Create a license package and include it in your installation or update:
- Specify a license as an argument.
No version of package "cronus-app" satisfies range "-_ <=1.0.0 >1.0.1"
PS C:\LS Retail\My Project> .\UpdatePosMaster.ps1
Get-UscUpdates : No version of package "cronus-app" satisfies range "-_ <=1.0.0 >1.0.1"
Cause
You may receive this message if any of these conditions are true:
- The package, cronus-app, does not exist on any server registered on the client.
- The package, cronus-app exists, but not the specified version or a version in the range <=1.0.0 >1.0.1.
- The -Import flag was missing when creating a package in your project.
Resolution
To resolve this problem, use any one of the following methods, depending on the cause of the problem:
- Check if your server is registered on the client.
- Check your server's public hostname:
- Open your management portal.
- Click Settings
- Locate the Public Host property.
- This is displayed as hostname:port
- On the client machine, open C:\programdata\LS Retail\GoCurrent\Client\Servers.json
- Verify that an entry containing the hostname determined in step 1 exists.
- If no such entry exists, create an installer on your server, open it, do not install anything, and close it.
- Your server should appear in C:\programdata\LS Retail\GoCurrent\Client\Servers.json.
- Check your server's public hostname:
- Check if the package exists on your server.
- Open your management portal.
- Click Packages->cronus-app
- Check and see if version 1.0.0 exists (or which satisfies the range <=1.0.0 >1.0.1).
- To recreate and reimport a package from your project, run an appropriate script with both -Import and -Force:
powershell PS C:\LS Retail\My Project> .\NewAppPackages.ps1 -Import -Force PS C:\LS Retail\My Project> .\NewLicenseApp.ps1 -Import -Force PS C:\LS Retail\My Project> .\NewAppPackage.ps1 -Import -Force
- Select an existing version of the package cronus-app.
The specified module 'SqlServer' was not loaded because no module file was found in any module directory.
Cause
You may receive this message if any of these conditions are true:
- A SQL server or client is not installed on the machine.
Resolution
To resolve this problem, use any one of the following methods, depending on the cause of the problem:
Install a SQL client on the machine, by running this code snippet in PowerShell, as admin:
$SecurityProtocol = [Net.ServicePointManager]::SecurityProtocol [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12 Install-PackageProvider -Name NuGet -MinimumVersion 2.8.5.201 -Force Install-Module SqlServer -Force -AllowClobber Import-Module SqlServer -DisableNameChecking -Global [Net.ServicePointManager]::SecurityProtocol = $SecurityProtocol
This will install the SqlServer PowerShell module.
The data is invalid. (Exception from HRESULT: 0x8007000D)
Cause
You may receive this message if any of these conditions are true:
- Any other web client instance has a malformed navsettings.json file, not conforming to JSON format.
- The error occurs when running the Business Central cmdlet
New-NAVWebServerInstance
.
- The error occurs when running the Business Central cmdlet
Resolution
To resolve this problem, use any one of the following methods, depending on the cause of the problem:
Identify and fix or remove the malformed file. To identify the malformed file, run the following snippet in PowerShell, the snippet will write out all malformed files:
$ErrorActionPreference = 'stop' $Items = Get-ChildItem -Path 'C:\inetpub\wwwroot' $Found = $false foreach ($Item in $Items) { $Path = Join-Path $Item.FullName 'navsettings.json' if (Test-Path $Path) { Write-Verbose "Testing $Path" try { Get-Content -Path $Path | ConvertFrom-Json | Out-Null } catch { $Found = $true Write-Host "Invalid JSON format: $Path" -ForegroundColor Red } } } if (!$Found) { Write-Host 'All navsettings.json files are in a proper JSON format.' -ForegroundColor Green }
Business Central: Sorry, we can’t sign you in because the following apps don’t meet our Universal Code requirement
Cause
You may receive this message if any of these conditions are true:
- The machine is not connected to the internet and is operating a version of Business Central that has been identified to contain a known bug.
- For more information see here.
Resolution To resolve this problem, use any one of the following methods, depending on the cause of the problem:
Update the Business Central platform to the latest cumulative update, within the major version. You do not necessarily need to update the apps.
For example, if your current platform CU version is 21.5, update it to 21.7 or later.
If you have a scaffolded project, you can update the
BcPlatformVersion
property to the target version, in the Project.json file:{ "LsCentralVersion": "21.4.0", "BcPlatformVersion": "21.0.53597.53794", "BcAppVersion": "21.5.53619.53819", ...
to
{ "LsCentralVersion": "21.4.0", "BcPlatformVersion": "21.0.56004.0", "BcAppVersion": "21.5.53619.53819", ...
then follow from step 2. in Update POS Application and Platform.
Note: The platform version does not include the CU version, only the major version and a different version number X.0.BUILDNUMBER1.BUILDNUMBER2. See here how to determine the platform version from a specific CU.
An error occurred while applying changes from the object of type 'PageExtension' with ID '8700' in the 'Base Application by Microsoft 20.X.Y.K' app to the application object of type 'Page' with the ID '8700'.
Cause
You may receive this message if any of these conditions are true:
- If you are installing Business Central version 21.0 or higher, on a database with a lower version, such as 20.1, 19.4.
Resolution
To resolve this problem, use any one of the following methods, depending on the cause of the problem:
- To upgrade the database, first install the same version as the database, and then update to the target version.
- Note: You can prepare this step before creating the bundle package by including the updated database in the bundle.
Server and client cmdlet mismatch running NAV cmdlets
For example:
Client version: 23.0.12831
Server version: 23.0.14532
Cause
You may receive this message if any of these conditions are true:
- The Business Central server is running a different version than the Business Central cmdlets.
Resolution
To resolve this problem, use any one of the following methods, depending on the cause of the problem:
- To import the Business Central cmdlets that correspond to your Business Central service instance, run this PowerShell snippet and provide the name of your target instance.
- This is required because the Update Service has the capability to multiple versions of Business Central side-by-side, which is not supported by the Business Central Administration shell.
Packages
The term 'Package\Install-Package' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
Cause:
You may receive this message when you are creating a package that implements a specifc command but it does not exist in the script.
For example, you create a package that implements the Install and Update commands. They should be implemented in the Package.psm1 file, with the Install-Package
function:
$Package = @{
Id = 'example-app'
Name = 'Example App'
Version = '1.0.0'
Commands = @{
Install = 'Package.psm1:Install-Package'
Update = 'Package.psm1:Install-Package'
}
...
}
...
However, the Package.psm1 does not include a function called Install-Package
.
Resolution:
To resolve this problem, use any one of the following methods, depending on the cause of the problem:
- Make sure the Package.psm1 exists in the package.
- Make sure the Package.psm1 file has a function called Install-Package.
Server
Client
Could not load type 'System.ServiceModel.ServiceHost' from assembly 'System.ServiceModel, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'.
Cause
You may receive this message if any of these conditions are true:
- Running PowerShell cmdlets in PowerShell 7
Resolution
To resolve this problem, use any one of the following methods, depending on the cause of the problem:
- Run the cmdlets in PowerShell 5.