Project

General

Profile

Actions

Defect #40921

closed

JSON API causes 500 Internal Server Error

Added by Egor Bolotov 2 days ago. Updated about 7 hours ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Category:
REST API
Target version:
-
Start date:
Due date:
% Done:

0%

Estimated time:
Resolution:
Invalid
Affected version:

Description

I use redmine 5.0.7 with https://github.com/redmine/redmine/commit/d909b82d32fd3deb3b2a01e253da7aa264ffc89c this official patch. When i try to access rest api in json format, i get the error below.
SystemStackError (stack level too deep):
lib/redmine/views/builders/structure.rb:49:in `method_missing'
.......
a lot of this string "lib/redmine/views/builders/structure.rb:69:in `method_missing'"
.......
lib/redmine/views/builders/structure.rb:69:in `method_missing'
app/views/timelog/index.api.rsb:3:in `block (3 levels) in smth'
app/views/timelog/index.api.rsb:2:in `each'
app/views/timelog/index.api.rsb:2:in `block (2 levels) in smth'
lib/redmine/views/builders/structure.rb:32:in `array'
app/views/timelog/index.api.rsb:1:in `block in smth'
lib/redmine/views/builders.rb:38:in `for'
app/views/timelog/index.api.rsb:1:in `smth'
lib/redmine/sudo_mode.rb:61:in `sudo_mode'

Without the patch, when i force to install old version of builder gem, rest api works.

Actions #1

Updated by Pavel Rosický 2 days ago

the patch is valid for the latest development version (Redmine 6). Backporting it to older versions might need more changes.

note that, Redmine 5.0 is still supported and this issue has been fixed and released as Redmine 5.0.9. Is anything blocking an upgrade to the official version, or why are you manually patching it?

if you can't upgrade for some reason, either use a patch for the right Redmine version
https://github.com/redmine/redmine/blob/5.0-stable/lib/redmine/views/builders/structure.rb
or alternatively, lock the gem version

gem 'builder', '~> 3.2.4'

Actions #2

Updated by Go MAEDA about 7 hours ago

  • Status changed from New to Closed
  • Resolution set to Invalid
Actions

Also available in: Atom PDF