Select to view content in your preferred language

Extract Changes always gives Replica Errors

1238
4
01-19-2021 08:29 AM
MikeSlattery
Regular Contributor

I have a webhook on a feature layer/table collection that delivers extract changes information in its payload.   I always get back a replica error.

It doesn't seem to matter how I make the request or if the request contains updates/deletes/etc.

I followed this article

https://www.esri.com/arcgis-blog/products/arcgis-online/sharing-collaboration/how-to-create-a-hosted...

to try to use the URL from the payload (which does not contain the layer id, but that didn't make a difference either).  The collection and the layer and table all have "Create,Delete,Query,Update,Editing,Extract,Sync,ChangeTracking" on.

Unless there is another way to keep atomic change records, I need this to work.  Any clues about the layer config or URLs/args would be appreciated.

0 Kudos
4 Replies
MikeSlattery
Regular Contributor

I think my problem is with this particular FeatureLayerCollection, or one of its parts.   I assembled a prototype using python and lots of add_to_definition(), then I cloned it to make this item.    The webhooks work and the relationships seem to work too.

0 Kudos
MikeSlattery
Regular Contributor

I created the layer in the UI and added fields and a table using python.     Now extract_changes works for the layer, but not for the table (which is layers[1] in the calls but tables[0] in properties.   The table has all the edit tracking fields that the layer does.

I see no serverGens being made in the table definition, even though the webhook is sending alerts and serverGen values when the table is edited, with layerID 1.

The table has a relationship to the layer - so are all changes then reflected on layer 0?    If I use layer zero and the serverGen value on layer 0 it works for the features.   But I get 'Invalid syncLayer parameters' with the table.  Am I getting this call wrong or was there something missing with the manual table addition?  There is a new LayerOverrides section which does include 'capabilities' that worries me...   Thanks all.

xdict=flc_obj.extract_changes(layers=[1],
servergen=[{ "id" : 1, "serverGen" : 1432995 }],
return_ids_only=False,
return_inserts=True,
return_updates=True,
return_deletes=True)

 

also the layer collection has what looks like perLayer configs on

"syncEnabled" : true,
"syncCapabilities" : {
"supportsAsync" : true,
"supportsRegisteringExistingData" : true,
"supportsSyncDirectionControl" : true,
"supportsPerLayerSync" : true,
"supportsPerReplicaSync" : true,
"supportsSyncModelNone" : true,
"supportsRollbackOnFailure" : true,
"supportsAttachmentsSyncDirection" : true,
"supportsBiDirectionalSyncForServer" : true
}

0 Kudos
TylerBragg2
Frequent Contributor

@MikeSlattery 

Unfortunately, my response to this post is not an answer to your question, but rather is support for your initial problem.  I, too, am receiving replica errors when running the same process in Integromat, built from the same guide you referenced above.  Specifically, my error is coming in when making a request to the StatusURL, and my error reads as follows: "Unable to synchronize replica...Error in processing replica sync request"

 In my situation, my webhook is set up on a Workforce assignments layer (which is Sync enabled).  I need to extract attributes from a workforce assignment once it is marked as "complete" for further processing and report generation.  This wasn't an issue with the previous version of Workforce, but since they upgraded to the "offline compatible" sync-enabled version I'm experiencing this issue.  I can't seem to get past this in order to extract the needed attributes for my process.  Since your last post on this was in January, I'm curious if you found a solution to the problem?  If not, hopefully someone else can chime in with some guidance.  

Tyler

0 Kudos
MichaelSnook
Frequent Contributor

Chiming in here as well.  I have the same issue with, from what I can tell, is a properly configured hosted feature layer.  The only small wrinkle with this particular layer is that it is participating in a distributed collaboration.  I have other web hooks that are working fine, this one repeatedly  returns 'Error in processing replica sync request.' on the extractChanges check.  Any help would be great!

ESRI?

Thanks!

0 Kudos