Hello, Hangfire returns a serialization exception in the dashboard when we try to open a task that was created with a ContinueWith action:
Type specified in JSON 'Hangfire.ContinuationsSupportAttribute+Continuation, Hangfire.Core, Version=1.6.4.0, Culture=neutral, PublicKeyToken=null' is not compatible with 'Hangfire.Dashboard.Pages.JobDetailsPage+Continuation, Hangfire.Core, Version=1.6.4.0, Culture=neutral, PublicKeyToken=null'. Path '[0].$type', line 1, position 78.
This issue only happens when we set the serializer to Object mode (required for our project):
_Edit_ Here is the code sample used to trigger the issue:
``` c#
JobHelper.SetSerializerSettings(new JsonSerializerSettings { TypeNameHandling = TypeNameHandling.Objects });
...
var id = BackgroundJob.Enqueue(() => RunJob());
BackgroundJob.ContinueWith(id, () => JobComplete(), JobContinuationOptions.OnlyOnSucceededState);
public void RunJob()
{
Debug.WriteLine("hello Hangfire!");
}
public void JobComplete()
{
Debug.WriteLine("Job succeed");
}
```
Best regards,
@thurfir, thanks for reporting this, it's definitely a :beetle:. If you'd like to make a contribution, I'll be happy to merge the resulting PR! If not, you can just wait a bit for the next version :wink:
Much appreciated, i'll see if I can help :smile:
Have PR to fix this issue:
Awesome work, @MaksimSimkin!