suer / redmine_webhook

147 stars 81 forks source link

randomly wrong jsondata sent by the webhook #53

Closed caccwin closed 8 months ago

caccwin commented 8 months ago

hi,I'm using this plugin with redmine v5.0.6,and create two webhook send to different backend that's almost work but sometime the jsondata sent by the plugin can't parse image it looks linke the jsondata has extra "," course this error: image

is this plugin has problem work with the custom field?

yzzy commented 8 months ago

@caccwin These errors belongs to the same issue and/or to the same custom field (maybe in different issues)?

caccwin commented 8 months ago

@yzzy in same issue, the position of this "," won't change when the error happen, but change to different custom field in different issue

yzzy commented 8 months ago

custom_field_value_wrapper.rb.gz Try to gunzip the attachment and replace the file ${REDMINE_ROOT}/plugins/redmine_webhook/lib/redmine_webhook/custom_field_value_wrapper.rb, then restart Redmine and check again.

caccwin commented 8 months ago

@yzzy still get errors with "," ,but i notices this wrong "," isn't appeal in the custom field this time... image

yzzy commented 8 months ago

That's something really strange. These commas should not be there in any way. I've added some debug messages to webhook_listener.rb in the same directory. Replace this file from attachment, restart Redmine and look at ${REDMINE_ROOT}/log/production.log for !!! Webhook: and !!! Payload: lines. Please check if there are commas in payload. webhook_listener.rb.gz

caccwin commented 8 months ago

@yzzy very thanks for help, the redmine log shows the data sent has no wrong commas,it looks my nodejs program to receive the data has some problems...

yzzy commented 8 months ago

@caccwin don't forget to restore patched files and close this issue