0pdd: Github hook's handling fails with a 503 error

After fixing #567 I am able to see my puzzles again, but now 0pdd web service answers with HTTP code 503 to all the POST requests (Github hooks). The response body contains an HTML with the following error:

undefined method `rewind' for #<Rackup::Handler::WEBrick::Input:0x00007f119add5b28  // here is a huge wall of text, see attached TXT file

  request.body.rewind
              ^^^^^^^
	/app/0pdd.rb:353:in `block in <top (required)>'
	/app/vendor/bundle/ruby/3.1.0/gems/sinatra-4.0.0/lib/sinatra/base.rb:1804:in `call'
	/app/vendor/bundle/ruby/3.1.0/gems/sinatra-4.0.0/lib/sinatra/base.rb:1804:in `block in compile!'
	/app/vendor/bundle/ruby/3.1.0/gems/sinatra-4.0.0/lib/sinatra/base.rb:1071:in `block (3 levels) in route!'
	/app/vendor/bundle/ruby/3.1.0/gems/sinatra-4.0.0/lib/sinatra/base.rb:1089:in `route_eval'
	/app/vendor/bundle/ruby/3.1.0/gems/sinatra-4.0.0/lib/sinatra/base.rb:1071:in `block (2 levels) in route!'
	/app/vendor/bundle/ruby/3.1.0/gems/sinatra-4.0.0/lib/sinatra/base.rb:1120:in `block in process_route'
	/app/vendor/bundle/ruby/3.1.0/gems/sinatra-4.0.0/lib/sinatra/base.rb:1118:in `catch'
	/app/vendor/bundle/ruby/3.1.0/gems/sinatra-4.0.0/lib/sinatra/base.rb:1118:in `process_route'
	/app/vendor/bundle/ruby/3.1.0/gems/sinatra-4.0.0/lib/sinatra/base.rb:1069:in `block in route!'
	/app/vendor/bundle/ruby/3.1.0/gems/sinatra-4.0.0/lib/sinatra/base.rb:1066:in `each'
	/app/vendor/bundle/ruby/3.1.0/gems/sinatra-4.0.0/lib/sinatra/base.rb:1066:in `route!'
	/app/vendor/bundle/ruby/3.1.0/gems/sinatra-4.0.0/lib/sinatra/base.rb:1190:in `block in dispatch!'
	/app/vendor/bundle/ruby/3.1.0/gems/sinatra-4.0.0/lib/sinatra/base.rb:1161:in `catch'
	/app/vendor/bundle/ruby/3.1.0/gems/sinatra-4.0.0/lib/sinatra/base.rb:1161:in `invoke'
	/app/vendor/bundle/ruby/3.1.0/gems/sinatra-4.0.0/lib/sinatra/base.rb:1185:in `dispatch!'
	/app/vendor/bundle/ruby/3.1.0/gems/sinatra-4.0.0/lib/sinatra/base.rb:1001:in `block in call!'
	/app/vendor/bundle/ruby/3.1.0/gems/sinatra-4.0.0/lib/sinatra/base.rb:1161:in `catch'
	/app/vendor/bundle/ruby/3.1.0/gems/sinatra-4.0.0/lib/sinatra/base.rb:1161:in `invoke'
	/app/vendor/bundle/ruby/3.1.0/gems/sinatra-4.0.0/lib/sinatra/base.rb:1001:in `call!'
	/app/vendor/bundle/ruby/3.1.0/gems/sinatra-4.0.0/lib/sinatra/base.rb:990:in `call'
	/app/vendor/bundle/ruby/3.1.0/gems/rack-3.0.9/lib/rack/deflater.rb:47:in `call'
	/app/vendor/bundle/ruby/3.1.0/gems/rack-protection-4.0.0/lib/rack/protection/xss_header.rb:20:in `call'
	/app/vendor/bundle/ruby/3.1.0/gems/rack-protection-4.0.0/lib/rack/protection/path_traversal.rb:18:in `call'
	/app/vendor/bundle/ruby/3.1.0/gems/rack-protection-4.0.0/lib/rack/protection/json_csrf.rb:28:in `call'
	/app/vendor/bundle/ruby/3.1.0/gems/rack-protection-4.0.0/lib/rack/protection/base.rb:53:in `call'
	/app/vendor/bundle/ruby/3.1.0/gems/rack-protection-4.0.0/lib/rack/protection/base.rb:53:in `call'
	/app/vendor/bundle/ruby/3.1.0/gems/rack-protection-4.0.0/lib/rack/protection/frame_options.rb:33:in `call'
	/app/vendor/bundle/ruby/3.1.0/gems/rack-3.0.9/lib/rack/logger.rb:19:in `call'
	/app/vendor/bundle/ruby/3.1.0/gems/rack-3.0.9/lib/rack/common_logger.rb:43:in `call'
	/app/vendor/bundle/ruby/3.1.0/gems/sinatra-4.0.0/lib/sinatra/base.rb:266:in `call'
	/app/vendor/bundle/ruby/3.1.0/gems/sinatra-4.0.0/lib/sinatra/base.rb:259:in `call'
	/app/vendor/bundle/ruby/3.1.0/gems/rack-3.0.9/lib/rack/head.rb:15:in `call'
	/app/vendor/bundle/ruby/3.1.0/gems/rack-3.0.9/lib/rack/method_override.rb:28:in `call'
	/app/vendor/bundle/ruby/3.1.0/gems/sinatra-4.0.0/lib/sinatra/base.rb:224:in `call'
	/app/vendor/bundle/ruby/3.1.0/gems/sinatra-4.0.0/lib/sinatra/base.rb:2115:in `call'
	/app/vendor/bundle/ruby/3.1.0/gems/sinatra-4.0.0/lib/sinatra/base.rb:1674:in `block in call'
	/app/vendor/bundle/ruby/3.1.0/gems/sinatra-4.0.0/lib/sinatra/base.rb:1890:in `synchronize'
	/app/vendor/bundle/ruby/3.1.0/gems/sinatra-4.0.0/lib/sinatra/base.rb:1674:in `call'
	/app/vendor/bundle/ruby/3.1.0/gems/rackup-2.1.0/lib/rackup/handler/webrick.rb:111:in `service'
	/app/vendor/bundle/ruby/3.1.0/gems/webrick-1.8.1/lib/webrick/httpserver.rb:140:in `service'
	/app/vendor/bundle/ruby/3.1.0/gems/webrick-1.8.1/lib/webrick/httpserver.rb:96:in `run'
	/app/vendor/bundle/ruby/3.1.0/gems/webrick-1.8.1/lib/webrick/server.rb:310:in `block in start_thread'

So, right now no added/removed puzzle markers are handled for my project (https://github.com/nergal-perm/java-decita).

Attachments:

About this issue

  • Original URL
  • State: open
  • Created 3 years ago
  • Comments: 24 (12 by maintainers)

Commits related to this issue

Most upvoted comments

@nergal-perm workaround is to change content-type for webhook to application/json (and can return back rehttp). It will work in both cases, will check what happens with application/x-www-form-urlencoded message type, params are really not parsed

@yegor256 , it’s all the same, seems that problem is not in the rehttp service.

image

image

I’ve tried it both ways - manually and redelivering last unsuccessful Github webhook. Both gave that response.

I should try to push some commits to master branch and trigger the webhook in “usual” way, though.

@rultor release, tag is 0.31.11

@rultor release, tag is 0.31.11

@pnatashap maybe you can help?