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

Notifications

Announcements

No record found.

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

(4) 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

I have the same question (0)
  • Marco Mels Profile Picture
    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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

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

#1
OussamaSabbouh Profile Picture

OussamaSabbouh 3,064

#2
Jainam M. Kothari Profile Picture

Jainam M. Kothari 1,568 Super User 2025 Season 2

#3
YUN ZHU Profile Picture

YUN ZHU 1,063 Super User 2025 Season 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans