Project

General

Profile

Actions

Defect #35430

closed

Internal error when viewing revisions diff

Added by salman mp over 3 years ago. Updated 8 months ago.

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

0%

Estimated time:
Resolution:
Cant reproduce
Affected version:

Description

When I want to view revisions diff in the one project repository tab, in the first try it is OK, but after refresh or try another revisions diff it throw internal server error 500.
I found that is because of using any deface on 'layout/base'.

Actions #1

Updated by Holger Just over 3 years ago

  • Status changed from New to Needs feedback

Please see Submissions.

When reporting a bug, we need details about your environment and a full stack trace. If you are using any plugins. please confirm that the issue is caused by Redmine core and is still observable after you have removed all plugins.

Actions #2

Updated by salman mp over 3 years ago

This is my "info":

Environment:
  Redmine version                4.1.1.stable
  Ruby version                   2.5.7-p206 (2019-10-01) [x86_64-linux]
  Rails version                  5.2.4.2
  Environment                    production
  Database adapter               PostgreSQL
  Mailer queue                   ActiveJob::QueueAdapters::AsyncAdapter
  Mailer delivery                sendmail
SCM:
  Subversion                     1.13.0
  Mercurial                      5.3.1
  Git                            2.25.1
  Filesystem                     
Redmine plugins:
  redmine_scm                    0.6.0
  my_plugin                      0.0.1 (Using Deface to change layout/base)

and production log:

Processing by RepositoriesController#diff as HTML
  Parameters: {"utf8"=>"✓", "rev_to"=>"1a484b55d58e9c06ff497e0459bd9a4e5ec6c599", "type"=>"inline", "repository_id"=>"5", "rev"=>"334c0372bd11c4677a16bfd3f8d83106c0dfc5f4"}
  Current user: redmine (id=1)
  Rendering repositories/diff.html.erb within layouts/base
  Rendered repositories/diff.html.erb within layouts/base (14.0ms)
Completed 500 Internal Server Error in 405ms (ActiveRecord: 21.1ms)

ActionView::Template::Error (undefined method `encoding' for nil:NilClass):

Actions #3

Updated by Go MAEDA over 3 years ago

Does the error occur without plugins?

Actions #4

Updated by Liane Hampe over 3 years ago

I have observed the same error but could figure out that the reason is located in gem deface.

As long as we use Rails 5.2 we need to use deface 1.6.2 because higher versions consider some changes in Rails 6. Although the deface people try to be backward compatible there seems to be an edge case in combination with the diff template.

Actions #5

Updated by salman mp over 3 years ago

Go MAEDA wrote:

Does the error occur without plugins?

No, even when using plugins without any deface on 'layout/base', there is no problem.

Actions #6

Updated by Mischa The Evil over 3 years ago

salman mp wrote:

Go MAEDA wrote:

Does the error occur without plugins?

No, even when using plugins without any deface on 'layout/base', there is no problem.

This does not exclude the 'redmine_scm' plugin from being the culprit of your problem. You should check if your problem persists when Redmine is running without any plugins.

Actions #7

Updated by salman mp over 3 years ago

Mischa The Evil wrote:

salman mp wrote:

Go MAEDA wrote:

Does the error occur without plugins?

No, even when using plugins without any deface on 'layout/base', there is no problem.

This does not exclude the 'redmine_scm' plugin from being the culprit of your problem. You should check if your problem persists when Redmine is running without any plugins.

If I understand what you mean, I have to admit, since I do not have the SVN code repository available, I can only test with this redmine_scm plugin. However, I only get an error if a plugin defaced 'layout/base' and Redmine is running in production mode.

Actions #8

Updated by Eugen Schmidt over 1 year ago

I have the same problem. What I did, but when viewing the difference, I get the error Internal Error

Actions #9

Updated by Holger Just 8 months ago

  • Status changed from Needs feedback to Closed
  • Resolution set to Cant reproduce

The original issue seemed to be caused by a plugin. As such, please contact the plugin author(s) for help.

Actions

Also available in: Atom PDF