Hangfire: Dashboard + ContinueWith + Serializer issue

Created on 12 Sep 2016  路  4Comments  路  Source: HangfireIO/Hangfire

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");
}
```

dashboard_issue.txt

Best regards,

help wanted bug

All 4 comments

@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:

Awesome work, @MaksimSimkin!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

osmanrahimi picture osmanrahimi  路  3Comments

cbmek picture cbmek  路  3Comments

jeffsugden picture jeffsugden  路  4Comments

shorbachuk picture shorbachuk  路  4Comments

dbones picture dbones  路  3Comments