添加链接
link管理
链接快照平台
  • 输入网页链接,自动生成快照
  • 标签化管理网页链接

Hi all,

I’m trying out Hangfire Core with postgresql on .net Core 3.1. I use the latest versions of Hangfire and Hangfire.PostgreSql. I didn’t create a new database for this; instead, I connect Hangfire to an existing postgres db which is in version 13.8.

I followed the instruction steps listed in the Getting Started > Asp.net Core App section. The Hangfire related tables were created successfully under new “Hangfire” schema and I was able to get the Dashboard to display fine. However, as soon as I added the line to queue a background job (Console.WriteLine command), I got this error:

Hangfire.BackgroundJobClientException: Background job creation failed. See inner exception for details.
 ---> Npgsql.PostgresException (0x80004005): 42804: column "invocationdata" is of type jsonb but expression is of type text.
image1418×310 19.8 KB
I also noticed other similar error in my VS output panel but on a different column.
Npgsql.PostgresException (0x80004005): 42804: column "data" is of type jsonb but expression is of type text

I also tried using older versions Hangfire 1.7.31 & Hangfire.PostgreSql 1.8.6, but I ran into the same exception as well.

Had anyone run into the same issue and how to solve it?

Please advise.

Thank you in advance!

so… I think it was because I did not use a proper db user when Hangfire schema was created.
I removed the old schema and let Hangfire re-create it and it works fine now.