Error 500 creating System Hook - 11.4.0

I’m using gitlab 11.4.0 and when i try to create a System hook I get an error 500.

here are the logs:

==> /var/log/gitlab/gitlab-rails/production.log <==
Started POST "/admin/hooks" for 172.16.24.155 at 2018-10-23 11:18:29 +0000
Processing by Admin::HooksController#create as HTML
  Parameters: {"utf8"=>"✓", "authenticity_token"=>"[FILTERED]", "hook"=>"[FILTERED]"}
Completed 500 Internal Server Error in 15ms (ActiveRecord: 2.7ms)

ActiveRecord::StatementInvalid (PG::NotNullViolation: ERROR:  null value in column "issues_events" violates not-null constraint
DETAIL:  Failing row contains (1768, null, null, 2018-10-23 11:18:29.863447+00, 2018-10-23 11:18:29.863447+00, SystemHook, null, f, null, f, f, f, f, f, null, f, f, t, f, null, null, , null, vioqNuSUWLYrNTHOr23uEya2h2lwbVAsJIbsKpKRkHWFiiI+FDcbSW90+k9B
32A..., DMgFCOu7161/LZeH
).
: INSERT INTO "web_hooks" ("type", "enable_ssl_verification", "repository_update_events", "push_events", "tag_push_events", "merge_requests_events", "encrypted_token", "encrypted_url_iv", "encrypted_url", "created_at", "updated_at") VALUES ('SystemHook', 'f', 't', 'f', 'f', 'f', '', 'DMgFCOu7161/LZeH
', 'vioqNuSUWLYrNTHOr23uEya2h2lwbVAsJIbsKpKRkHWFiiI+FDcbSW90+k9B
32A=
', '2018-10-23 11:18:29.863447', '2018-10-23 11:18:29.863447') RETURNING "id"):
  config/initializers/active_record_locking.rb:11:in `_create_record'
  app/controllers/admin/hooks_controller.rb:16:in `create'
  lib/gitlab/i18n.rb:53:in `with_locale'
  lib/gitlab/i18n.rb:59:in `with_user_locale'
  app/controllers/application_controller.rb:415:in `set_locale'
  lib/gitlab/middleware/multipart.rb:101:in `call'
  lib/gitlab/request_profiler/middleware.rb:14:in `call'
  lib/gitlab/middleware/go.rb:17:in `call'
  lib/gitlab/etag_caching/middleware.rb:11:in `call'
  lib/gitlab/middleware/read_only/controller.rb:38:in `call'
  lib/gitlab/middleware/read_only.rb:16:in `call'
  lib/gitlab/middleware/basic_health_check.rb:25:in `call'
  lib/gitlab/request_context.rb:18:in `call'
  lib/gitlab/metrics/requests_rack_middleware.rb:27:in `call'
  lib/gitlab/middleware/release_env.rb:10:in `call'

The error also happened with prior version 11.3.6.

Anyone had the same error or knows how to solve it?

Thanks!

I have a similar problem with creating project hooks because there are no default values for the optional parameters…

@joan do you have a rather old installation of gitlab ?

For reference, this https://gitlab.com/gitlab-org/gitlab-ce/issues/36531#note_37651729 fixed my issue, similar to what was reported. Cheers,