Cannot access repository page: "FrozenError"

Bug #1881733 reported by Simon Rettberg
26
This bug affects 6 people
Affects Status Importance Assigned to Milestone
redmine (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

On Focal, I cannot access any project's repository page (git), which results in an internal server error.

The log says:

---
Started GET "/projects/myproject-1/repository" for <IPADDRESS> at 2020-06-02 11:50:42 +0200
Processing by RepositoriesController#show as HTML
  Parameters: {"id"=>"myproject-1"}
  Current user: username01 (id=60)
Completed 500 Internal Server Error in 161ms (ActiveRecord: 78.3ms)

FrozenError (can't modify frozen String: ""):

lib/redmine/scm/adapters/abstract_adapter.rb:279:in `force_encoding'
lib/redmine/scm/adapters/abstract_adapter.rb:279:in `scm_iconv'
lib/redmine/scm/adapters/git_adapter.rb:136:in `entries'
app/models/repository/git.rb:98:in `scm_entries'
app/models/repository.rb:204:in `entries'
app/controllers/repositories_controller.rb:86:in `show'
lib/redmine/sudo_mode.rb:63:in `sudo_mode'
---

I found this issue in the redmine issue tracker which suggests this is an incompatibility with ruby 2.7 which is too new, and that redmine 4.1.x resolved the issue:

https://www.redmine.org/issues/33021

I tried applying the commit referenced towards the end of that issue locally, and unsurprisingly there were a bunch of conflicts, but it appears that the few files that actually got patched cleanly were enough to make the repository view work again, so maybe backporting the patch is the way to go.

Tags: focal
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in redmine (Ubuntu):
status: New → Confirmed
Revision history for this message
Veldkornet (veldkornet) wrote :

Will we be getting a fix for this?

Veldkornet (veldkornet)
tags: added: focal
Revision history for this message
Rumplestilzken (rumplestilzken) wrote :

Instead of using the debian package to install redmine install from subversion

https://www.redmine.org/projects/redmine/wiki/Download use 4.2.3

Using instructions here:

https://www.redmine.org/projects/redmine/wiki/redmineinstall

4.2 has support fully for ruby 2.7

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.