Skip to main content
Community site session details

Community site session details

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

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

(3) ShareShare
ReportReport
Posted on by

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
    on at
    RE: "Sync-NAVApp : Root element is missing" when upgrading to 20.x On-Premises from an earlier version

    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

News and Announcements

Now Available: 2025 Release Wave 2

Quick Links

Ramesh Kumar – Community Spotlight

We are honored to recognize Ramesh Kumar as our July 2025 Community…

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

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

#1
Sohail Ahmed Profile Picture

Sohail Ahmed 2,655

#2
Mansi Soni Profile Picture

Mansi Soni 1,574

#3
YUN ZHU Profile Picture

YUN ZHU 1,453 Super User 2025 Season 1

Featured topics

Product updates

Dynamics 365 release plans