Skip to content

GitLab

  • Menu
Projects Groups Snippets
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • G gitlabhq1
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 21
    • Issues 21
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 12
    • Merge requests 12
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Packages & Registries
    • Packages & Registries
    • Package Registry
    • Infrastructure Registry
  • Analytics
    • Analytics
    • CI/CD
    • Repository
    • Value stream
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • gpt
  • large_projects
  • gitlabhq1
  • Issues
  • #10326

Closed
Open
Created May 06, 2016 by Administrator@rootOwner

Error 500 when creating notes via API

Created by: bryanPFLiu

Gitlab version: 8.7.2 -213974bc

cUrl POST to create comment for merge request results in {"message":"500 Internal Server Error"}. The POST command worked when running against gitlab:8.6.6.

Error from log file:

Started POST "/api/v3/projects/4/merge_requests/6/notes" for 127.0.0.1 at 2016-05-05 16:22:28 +0530
NoMethodError (undefined method `valid?' for nil:NilClass):
/home/git/gitlab/lib/api/notes.rb:83:in `block (3 levels) in <class:Notes>'
/home/git/gitlab/vendor/bundle/ruby/2.1.0/gems/grape-0.13.0/lib/grape/endpoint.rb:51:in `call'
/home/git/gitlab/vendor/bundle/ruby/2.1.0/gems/grape-0.13.0/lib/grape/endpoint.rb:51:in `block (2 levels) in generate_api_method'
/home/git/gitlab/vendor/bundle/ruby/2.1.0/gems/activesupport-4.2.6/lib/active_support/notifications.rb:166:in `instrument'
/home/git/gitlab/vendor/bundle/ruby/2.1.0/gems/grape-0.13.0/lib/grape/endpoint.rb:50:in `block in generate_api_method'
/home/git/gitlab/vendor/bundle/ruby/2.1.0/gems/grape-0.13.0/lib/grape/endpoint.rb:254:in `call'
/home/git/gitlab/vendor/bundle/ruby/2.1.0/gems/grape-0.13.0/lib/grape/endpoint.rb:254:in `block in run'
/home/git/gitlab/vendor/bundle/ruby/2.1.0/gems/activesupport-4.2.6/lib/active_support/notifications.rb:166:in `instrument'
/home/git/gitlab/vendor/bundle/ruby/2.1.0/gems/grape-0.13.0/lib/grape/endpoint.rb:219:in `run'
/home/git/gitlab/vendor/bundle/ruby/2.1.0/gems/grape-0.13.0/lib/grape/endpoint.rb:201:in `block in call!'
/home/git/gitlab/vendor/bundle/ruby/2.1.0/gems/grape-0.13.0/lib/grape/middleware/base.rb:24:in `call'
/home/git/gitlab/vendor/bundle/ruby/2.1.0/gems/grape-0.13.0/lib/grape/middleware/base.rb:24:in `call!'
/home/git/gitlab/vendor/bundle/ruby/2.1.0/gems/grape-0.13.0/lib/grape/middleware/base.rb:18:in `call'
/home/git/gitlab/vendor/bundle/ruby/2.1.0/gems/grape-0.13.0/lib/grape/middleware/base.rb:24:in `call!'
/home/git/gitlab/vendor/bundle/ruby/2.1.0/gems/grape-0.13.0/lib/grape/middleware/base.rb:18:in `call'
/home/git/gitlab/vendor/bundle/ruby/2.1.0/gems/rack-oauth2-1.2.1/lib/rack/oauth2/server/resource.rb:20:in `call'
/home/git/gitlab/vendor/bundle/ruby/2.1.0/gems/rack-oauth2-1.2.1/lib/rack/oauth2/server/resource/bearer.rb:8:in `call'
/home/git/gitlab/vendor/bundle/ruby/2.1.0/gems/grape-0.13.0/lib/grape/middleware/error.rb:27:in `block in call!'
/home/git/gitlab/vendor/bundle/ruby/2.1.0/gems/grape-0.13.0/lib/grape/middleware/error.rb:26:in `catch'
/home/git/gitlab/vendor/bundle/ruby/2.1.0/gems/grape-0.13.0/lib/grape/middleware/error.rb:26:in `call!'
/home/git/gitlab/vendor/bundle/ruby/2.1.0/gems/grape-0.13.0/lib/grape/middleware/base.rb:18:in `call'
/home/git/gitlab/vendor/bundle/ruby/2.1.0/gems/rack-1.6.4/lib/rack/head.rb:13:in `call'
/home/git/gitlab/vendor/bundle/ruby/2.1.0/gems/rack-1.6.4/lib/rack/builder.rb:153:in `call'
/home/git/gitlab/vendor/bundle/ruby/2.1.0/gems/grape-0.13.0/lib/grape/endpoint.rb:202:in `call!'
/home/git/gitlab/vendor/bundle/ruby/2.1.0/gems/grape-0.13.0/lib/grape/endpoint.rb:190:in `call'
/home/git/gitlab/vendor/bundle/ruby/2.1.0/gems/rack-mount-0.8.3/lib/rack/mount/route_set.rb:152:in `block in call'
/home/git/gitlab/vendor/bundle/ruby/2.1.0/gems/rack-mount-0.8.3/lib/rack/mount/code_generation.rb:96:in `block in recognize'
/home/git/gitlab/vendor/bundle/ruby/2.1.0/gems/rack-mount-0.8.3/lib/rack/mount/code_generation.rb:145:in `optimized_each'
/home/git/gitlab/vendor/bundle/ruby/2.1.0/gems/rack-mount-0.8.3/lib/rack/mount/code_generation.rb:95:in `recognize'
/home/git/gitlab/vendor/bundle/ruby/2.1.0/gems/rack-mount-0.8.3/lib/rack/mount/route_set.rb:141:in `call'
/home/git/gitlab/vendor/bundle/ruby/2.1.0/gems/grape-0.13.0/lib/grape/api.rb:114:in `call'
/home/git/gitlab/vendor/bundle/ruby/2.1.0/gems/grape-0.13.0/lib/grape/api.rb:44:in `call!'
/home/git/gitlab/vendor/bundle/ruby/2.1.0/gems/grape-0.13.0/lib/grape/api.rb:39:in `call'
/home/git/gitlab/vendor/bundle/ruby/2.1.0/gems/actionpack-4.2.6/lib/action_dispatch/routing/mapper.rb:51:in `serve'
/home/git/gitlab/vendor/bundle/ruby/2.1.0/gems/actionpack-4.2.6/lib/action_dispatch/journey/router.rb:43:in `block in serve'
/home/git/gitlab/vendor/bundle/ruby/2.1.0/gems/actionpack-4.2.6/lib/action_dispatch/journey/router.rb:30:in `each'
/home/git/gitlab/vendor/bundle/ruby/2.1.0/gems/actionpack-4.2.6/lib/action_dispatch/journey/router.rb:30:in `serve'
/home/git/gitlab/vendor/bundle/ruby/2.1.0/gems/actionpack-4.2.6/lib/action_dispatch/routing/route_set.rb:817:in `call'
/home/git/gitlab/lib/gitlab/middleware/go.rb:16:in `call'
/home/git/gitlab/vendor/bundle/ruby/2.1.0/gems/rack-cors-0.4.0/lib/rack/cors.rb:80:in `call'
/home/git/gitlab/vendor/bundle/ruby/2.1.0/gems/rack-attack-4.3.1/lib/rack/attack.rb:106:in `call'
/home/git/gitlab/vendor/bundle/ruby/2.1.0/gems/warden-1.2.4/lib/warden/manager.rb:35:in `block in call'
/home/git/gitlab/vendor/bundle/ruby/2.1.0/gems/warden-1.2.4/lib/warden/manager.rb:34:in `catch'
/home/git/gitlab/vendor/bundle/ruby/2.1.0/gems/warden-1.2.4/lib/warden/manager.rb:34:in `call'
/home/git/gitlab/vendor/bundle/ruby/2.1.0/gems/rack-1.6.4/lib/rack/etag.rb:24:in `call'
/home/git/gitlab/vendor/bundle/ruby/2.1.0/gems/rack-1.6.4/lib/rack/conditionalget.rb:38:in `call'
/home/git/gitlab/vendor/bundle/ruby/2.1.0/gems/rack-1.6.4/lib/rack/head.rb:13:in `call'
/home/git/gitlab/vendor/bundle/ruby/2.1.0/gems/actionpack-4.2.6/lib/action_dispatch/middleware/params_parser.rb:27:in `call'
/home/git/gitlab/vendor/bundle/ruby/2.1.0/gems/actionpack-4.2.6/lib/action_dispatch/middleware/flash.rb:260:in `call'
/home/git/gitlab/vendor/bundle/ruby/2.1.0/gems/rack-1.6.4/lib/rack/session/abstract/id.rb:225:in `context'
/home/git/gitlab/vendor/bundle/ruby/2.1.0/gems/rack-1.6.4/lib/rack/session/abstract/id.rb:220:in `call'
/home/git/gitlab/vendor/bundle/ruby/2.1.0/gems/actionpack-4.2.6/lib/action_dispatch/middleware/cookies.rb:560:in `call'
/home/git/gitlab/vendor/bundle/ruby/2.1.0/gems/activerecord-4.2.6/lib/active_record/query_cache.rb:36:in `call'
/home/git/gitlab/vendor/bundle/ruby/2.1.0/gems/activerecord-4.2.6/lib/active_record/connection_adapters/abstract/connection_pool.rb:653:in `call'
/home/git/gitlab/vendor/bundle/ruby/2.1.0/gems/actionpack-4.2.6/lib/action_dispatch/middleware/callbacks.rb:29:in `block in call'
/home/git/gitlab/vendor/bundle/ruby/2.1.0/gems/activesupport-4.2.6/lib/active_support/callbacks.rb:88:in `__run_callbacks__'
/home/git/gitlab/vendor/bundle/ruby/2.1.0/gems/activesupport-4.2.6/lib/active_support/callbacks.rb:778:in `_run_call_callbacks'
/home/git/gitlab/vendor/bundle/ruby/2.1.0/gems/activesupport-4.2.6/lib/active_support/callbacks.rb:81:in `run_callbacks'
/home/git/gitlab/vendor/bundle/ruby/2.1.0/gems/actionpack-4.2.6/lib/action_dispatch/middleware/callbacks.rb:27:in `call'
/home/git/gitlab/vendor/bundle/ruby/2.1.0/gems/actionpack-4.2.6/lib/action_dispatch/middleware/remote_ip.rb:78:in `call'
/home/git/gitlab/vendor/bundle/ruby/2.1.0/gems/actionpack-4.2.6/lib/action_dispatch/middleware/debug_exceptions.rb:17:in `call'
/home/git/gitlab/vendor/bundle/ruby/2.1.0/gems/actionpack-4.2.6/lib/action_dispatch/middleware/show_exceptions.rb:30:in `call'
/home/git/gitlab/vendor/bundle/ruby/2.1.0/gems/railties-4.2.6/lib/rails/rack/logger.rb:38:in `call_app'
/home/git/gitlab/vendor/bundle/ruby/2.1.0/gems/railties-4.2.6/lib/rails/rack/logger.rb:20:in `block in call'
/home/git/gitlab/vendor/bundle/ruby/2.1.0/gems/activesupport-4.2.6/lib/active_support/tagged_logging.rb:68:in `block in tagged'
/home/git/gitlab/vendor/bundle/ruby/2.1.0/gems/activesupport-4.2.6/lib/active_support/tagged_logging.rb:26:in `tagged'
/home/git/gitlab/vendor/bundle/ruby/2.1.0/gems/activesupport-4.2.6/lib/active_support/tagged_logging.rb:68:in `tagged'
/home/git/gitlab/vendor/bundle/ruby/2.1.0/gems/railties-4.2.6/lib/rails/rack/logger.rb:20:in `call'
/home/git/gitlab/vendor/bundle/ruby/2.1.0/gems/request_store-1.3.0/lib/request_store/middleware.rb:9:in `call'
/home/git/gitlab/vendor/bundle/ruby/2.1.0/gems/actionpack-4.2.6/lib/action_dispatch/middleware/request_id.rb:21:in `call'
/home/git/gitlab/vendor/bundle/ruby/2.1.0/gems/rack-1.6.4/lib/rack/methodoverride.rb:22:in `call'
/home/git/gitlab/vendor/bundle/ruby/2.1.0/gems/rack-1.6.4/lib/rack/runtime.rb:18:in `call'
/home/git/gitlab/vendor/bundle/ruby/2.1.0/gems/rack-1.6.4/lib/rack/lock.rb:17:in `call'
/home/git/gitlab/vendor/bundle/ruby/2.1.0/gems/rack-1.6.4/lib/rack/sendfile.rb:113:in `call'
/home/git/gitlab/vendor/bundle/ruby/2.1.0/gems/sentry-raven-0.15.6/lib/raven/integrations/rack.rb:53:in `call'
/home/git/gitlab/vendor/bundle/ruby/2.1.0/gems/railties-4.2.6/lib/rails/engine.rb:518:in `call'
/home/git/gitlab/vendor/bundle/ruby/2.1.0/gems/railties-4.2.6/lib/rails/application.rb:165:in `call'
/home/git/gitlab/vendor/bundle/ruby/2.1.0/gems/railties-4.2.6/lib/rails/railtie.rb:194:in `public_send'
/home/git/gitlab/vendor/bundle/ruby/2.1.0/gems/railties-4.2.6/lib/rails/railtie.rb:194:in `method_missing'
/home/git/gitlab/vendor/bundle/ruby/2.1.0/gems/rack-1.6.4/lib/rack/urlmap.rb:66:in `block in call'
/home/git/gitlab/vendor/bundle/ruby/2.1.0/gems/rack-1.6.4/lib/rack/urlmap.rb:50:in `each'
/home/git/gitlab/vendor/bundle/ruby/2.1.0/gems/rack-1.6.4/lib/rack/urlmap.rb:50:in `call'
/home/git/gitlab/vendor/bundle/ruby/2.1.0/gems/unicorn-4.9.0/lib/unicorn/http_server.rb:580:in `process_client'
/home/git/gitlab/vendor/bundle/ruby/2.1.0/gems/unicorn-worker-killer-0.4.4/lib/unicorn/worker_killer.rb:52:in `process_client'
/home/git/gitlab/vendor/bundle/ruby/2.1.0/gems/unicorn-4.9.0/lib/unicorn/http_server.rb:674:in `worker_loop'
/home/git/gitlab/vendor/bundle/ruby/2.1.0/gems/unicorn-4.9.0/lib/unicorn/http_server.rb:529:in `spawn_missing_workers'
/home/git/gitlab/vendor/bundle/ruby/2.1.0/gems/unicorn-4.9.0/lib/unicorn/http_server.rb:540:in `maintain_worker_count'
/home/git/gitlab/vendor/bundle/ruby/2.1.0/gems/unicorn-4.9.0/lib/unicorn/http_server.rb:294:in `join'
/home/git/gitlab/vendor/bundle/ruby/2.1.0/gems/unicorn-4.9.0/bin/unicorn_rails:209:in `<top (required)>'
/home/git/gitlab/vendor/bundle/ruby/2.1.0/bin/unicorn_rails:23:in `load'
/home/git/gitlab/vendor/bundle/ruby/2.1.0/bin/unicorn_rails:23:in `<main>'
Assignee
Assign to
Time tracking