Unable to synchronize replica issue in WPF application

1296
5
10-07-2020 04:42 AM
SailiTang1
New Contributor III

Hi,

 

I am using ArcGIS runtime SDK for .Net (V100.5) to develop a WPF application. The function for generating an offline geodatabase (xx.geodatabase) is working well, but synchronizing data always has an issue “Unable to synchronize replica.” Does anyone have any idea about this issue? My application’s feature service was published to ArcGIS online and it has one feature layer and a related table. Because the attributes of the feature layer were changed several times, I deleted this service and republished it several time recently, which is the reason which caused the issue? Thanks for your help.

Saili

Tags (1)
0 Kudos
5 Replies
JoeHershman
MVP Regular Contributor

If the schema does not match the schema of the replica when generated it will fail to sync.  So if you add fields this will likely cause failure.  Definitely removing a field will cause it to fail.

I am not clear from the initial post, but 100% for sure if you deleted a feature service after generating the offline data that replica will never sync.  When you create an offline replica it creates a replica endpoint (https://...../featureservice/replicas to list them).  If you delete a feature service those would be deleted, although I thought AGOL would not allow one to delete a service that has associated replicas.  If the replica endpoint is not there, the offline data cannot sync.

One thing you can do is after the sync fails, log out job.ToJson(), this will give you full details of the sync and may help debug the issue.

Thanks,
-Joe
SailiTang1
New Contributor III

Hi Joe,

Thank you so much for your reply! Every time, after I changed the schema (add/delete attributes), I republished the service as a new one (not overwrite an existing one) but its name was the same as the old one. And then I deleted the old offline geodatabase and generated a new one. So the schema of the offline geodatabase should be the same as the service's.

The other thing is that the new data collected by this WPF application was still able to be synchronized up to ArcGIS online although the error popped up. Do you know if there are any bad things happen if  Unable to synchronize replica.”? Thanks.

Saili

0 Kudos
JoeHershman
MVP Regular Contributor

It's hard to say, without knowing what is causing it to return that message.  There could be an issue on an individual layer if the service has multiple layers.  I really suggest trying to log out the job if you see an issue.  This gives the full communication between the server and client so you should be able to isolate where the problem occurs.

In AGOL it's tough because you cannot look at server logs like you could with on-premise AGS

Thanks,
-Joe
PalakPandey
New Contributor II

Hi, Did the issue get resolved? I am facing an issue of 'Create Replica' itself any suggestions on the same

0 Kudos
SailiTang1
New Contributor III

Sorry for the late reply. No, I didn't. I am wondering how you 'Create Replica'? You used ArcMap, Pro or Code?

0 Kudos