web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Small and medium business | Business Central, N...
Active Discussion

"Sync-NAVApp : Root element is missing" when upgrading to 20.x On-Premises from an earlier version

(4) ShareShare
ReportReport
Posted on by Microsoft Employee

When you upgrade to 20.x from an earlier version, you might stop when synchronizing base application with a strange error stating


Sync-NAVApp -ServerInstance BC200 -Name "Base Application" -Mode ForceSync

MicrosoftDynamicsNavServer$BC200/nav-systemapplication
Confirm synchronization of the extension in ForceSync mode
[Y] Yes  [N] No  [S] Suspend  [?] Help (default is "Y"): Y


Sync-NAVApp : Root element is missing.
At line:1 char:1
+ Sync-NAVApp -ServerInstance BC200 -Name "Base Application" -Mode Forc ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidOperation: (:) [Sync-NAVApp], InvalidOperationException
    + FullyQualifiedErrorId : MicrosoftDynamicsNavServer$BC200/nav-systemapplication,Microsoft.Dynamics.Nav.Apps.Management.Cmdlets.SyncNavApp

Using a SQL Profiler when performing the synchronization, you should be able to find out the last metadata object that was searched in the Object Metadata Snapshot table before the errors kick in.
In a specific case, it was table 6701 Web Part.

This is an old useless table that was not having any Metadata description (Base Metadata field) hence the procedure was trying to extract the content from Base Metadata field into XML format and parse it.
Since no XML data where inside the BLOB, that error surfaced: no root element for the XML Metadata.

Digging deeper, you might use Schema Hash field from Object Metadata Snapshot  table to determine which records had it with value 0, hence no Base Metadata.
See below a snippet of this as example (NOTE: there might be other records listed).

pastedimage1663075863375v1.png

Deleting all these records with Schema Hash field equal to 0, the synchronization of the Base Application will go through successfully.

Just to resume, then, by running


SELECT *
FROM [Object Metadata Snapshot]
WHERE [Schema Hash] = 0

You should be able to see if there are some hanging fruit in the affected environment that are preventing synchronization.
If there are some then try to delete them through

DELETE
FROM [Object Metadata Snapshot]
WHERE [Schema Hash] = 0

and continue the upgrade.

Be sure to test, test and re-test your application after the upgrade has been accomplished.

*This post is locked for comments

  • Marco Mels Profile Picture
    Microsoft Employee on at

    Thank you for sharing Duilio!

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Congratulations to our 2025 Community Spotlights

Thanks to all of our 2025 Community Spotlight stars!

Leaderboard > Small and medium business | Business Central, NAV, RMS

#1
OussamaSabbouh Profile Picture

OussamaSabbouh 1,840 Super User 2026 Season 1

#2
YUN ZHU Profile Picture

YUN ZHU 1,080 Super User 2026 Season 1

#3
Dhiren Nagar Profile Picture

Dhiren Nagar 846 Super User 2026 Season 1

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans