When Overwriting a Feature Layer on ArcGIS Online via Pro the corresponding WebHooks become unusable.
I published a hosted feature layer on AGOL using a fGDB as the source. Some WebHooks were created off the AGOL service. They functioned as expected. Later, I user ArcGIS Pro to Overwrite this service (Share Tab -> Web Layer -> Overwrite Web Layer). The Map I used held the same file geodatabase used to initially publish the service. The WebHook then stopped sending payloads. When I attempted to edit them, I received this error: 'Object reference not set to an instance of an object'. I am also unable to delete.
Pro Version: 2.6.0
fGDB version: 10.0
Thanks for the quick reply. I am trying to automate the update of a hosted feature service with a webhook. It seems like when I overwrite the SD file, it turns off "Keep track of created and updated features." And the webhook is deleted, or at least no longer accessible, because if I create another webhook. It's ID is the next sequential number.
In the script I am overwriting the sd draft. There is not a parameter in the CreateWebLayerSDDraft tool to turn tracking on like editing and syncing. I thought I had a work around by creating a view. This post mentioned views when having editing issues on layers with webhooks. Now my script is failing when "keep track" is enabled on the view, when it is disabled, the script runs fine. I am going to escalate this with ESRI, and see if they are aware of the bug. If I get anywhere I will send an update.
I opted to Truncate/Append in code. This might help overcome the issue you describe. What version of Pro are you running.
Beware of BUG-000145215. In either update method (Pro/Python), your first edit on the layer will be reported in the webhook as an empty array.