Trying to sync a local mobile geodatabase to a feature server using ESRI C# SDK and WPF. The schemas match, there are no permission problems, the network is operational. Here's the code. Nothing revealed in the inner exceptions except vague messages that offer no insights. What's wrong with this code?
I do not see anything wrong with your code that could've led to this error. Just a suggestion (but likely not relevant to the error you're seeing) since you are awaiting the result of syncJob.GetResultAsync() already in a try-catch. There is no need to call syncJob.Start() or handle success/fail in JobChanged.
Based on the API name, I think you are using an older version of ArcGIS Maps SDK for .NET. One thing I would like to suggest (if you're able) is try the same request with latest 200.4. The equivalent event for JobChanged is StatusChanged. There is also a MessageAdded that could provide some insight at what stage this error happens (if it still happens).
There could be a number of things that could result to this generic server error. Are you able to inspect ArcGISWebException.Details property? According to this doc, one possibility is the replica GUID no longer exists on server. If you have access to the ArcGIS Server Logs, it may give more information on the GP Server error.
You can also see if you are hitting these support issues:
Another case that I've seen in my sync testing, it's possible for sync to fail to acquire the necessary lock to apply delta changes or have synchronization conflicts that need to be resolved.