Error on Issue CSV Export

Added by Robert Morbitzer about 1 year ago

If I want to export my Issues with the CSV Option on the right bottom, it opens the properties for the export.

After that, regardless what I choose as options and click on "Export" I got an Internal Error.

Error from production Log:

Started GET "/redmine/projects/test/issues.csv?utf8=%E2%9C%93&set_filter=1&f%5B%5D=status_id&op%5Bstatus_id%5D=o&v%5Bstatus_id%5D%5B%5D=&c%5B%5D=id&c%5B%5D=tracker&c%5B%5D=project&c%5B%5D=status&c%5B%5D=subject&c%5B%5D=assigned_to&c%5B%5D=cf_16&c%5B%5D=cf_18&sort=id%3Adesc&c%5B%5D=&encoding=ISO-8859-1" for x.x.x.x at 2020-08-07 10:48:39 +0200
Processing by IssuesController#index as CSV
Parameters: {"utf8"=>"✓", "set_filter"=>"1", "f"=>["status_id"], "op"=>{"status_id"=>"o"}, "v"=>{"status_id"=>[""]}, "c"=>["id", "tracker", "project", "status", "subject", "assigned_to", "cf_16", "cf_18", ""], "sort"=>"id:desc", "encoding"=>"ISO-8859-1", "project_id"=>"test"}
Current user: robert.morbitzer (id=75)
Completed 500 Internal Server Error in 26ms (ActiveRecord: 7.1ms)

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

lib/redmine/codeset_util.rb:59:in `force_encoding'
lib/redmine/codeset_util.rb:59:in `from_utf8'
lib/redmine/export/csv.rb:52:in `block in <<'
lib/redmine/export/csv.rb:49:in `map'
lib/redmine/export/csv.rb:49:in `<<'
app/helpers/queries_helper.rb:283:in `block (2 levels) in query_to_csv'
app/helpers/queries_helper.rb:282:in `each'
app/helpers/queries_helper.rb:282:in `block in query_to_csv'
lib/redmine/export/csv.rb:44:in `generate'
lib/redmine/export/csv.rb:26:in `generate'
app/helpers/queries_helper.rb:278:in `query_to_csv'
app/controllers/issues_controller.rb:67:in `block (2 levels) in index'
app/controllers/issues_controller.rb:47:in `index'
lib/redmine/sudo_mode.rb:63:in `sudo_mode'

My system:

Environment:
Redmine version 4.0.6.stable
Ruby version 2.7.0-p0 (2019-12-25) [x86_64-linux-gnu]
Rails version 5.2.4.3
Environment production
Database adapter Mysql2
Mailer queue ActiveJob::QueueAdapters::AsyncAdapter
Mailer delivery smtp
SCM:
Git 2.25.1
Filesystem
Redmine plugins:
redmine_checklists 3.1.16
redmine_contacts 4.3.1
redmine_contacts_helpdesk 4.1.9
redmine_contacts_invoices 4.2.3
redmine_favorite_projects 2.1.0
redmine_timesheet_plugin 0.7.0

I would appreciate any help. I searched many forums for a solution so far.

Replies (8)

RE: Error on Issue CSV Export - Added by Robert Morbitzer about 1 year ago

Hey guys,

I installed a new Redmine Instance, where I use MySQL 5.7 and Ruby 2.6.5. I created the Passenger Module for Apache with the Ruby Gem for Passenger.

After that, all works as expected.

Best Regards
Robert

RE: Error on Issue CSV Export - Added by Darko Palic 5 months ago

I am having exactly the same issue on Ubuntu 20.04 and the default redmine setup 4.0.6 with ruby 2.7.0p0

did someone solve the installation on Ubuntu 20.04?

RE: Error on Issue CSV Export - Added by Darko Palic 5 months ago

cannot say for sure since stacktrace is missing.
But I can say I am not using redmineUP so probably it is something else. My stacktrace looks like the posted one on this thread.

RE: Error on Issue CSV Export - Added by Robert Morbitzer 5 months ago

Darko Palic wrote:

I am having exactly the same issue on Ubuntu 20.04 and the default redmine setup 4.0.6 with ruby 2.7.0p0

did someone solve the installation on Ubuntu 20.04?

Redmine 4.0.6 does not support Ruby 2.7.0p0 as described here https://www.redmine.org/projects/redmine/wiki/RedmineInstall.
Only Ruby 2.6.0 is supported.

I'm using this working environment:

Redmine version                4.1.1.stable.19939
Ruby version 2.6.5-p114 (2019-10-01) [x86_64-linux]
Rails version 5.2.4.2

RE: Error on Issue CSV Export - Added by Darko Palic 5 months ago

what is funny, since redmine is provided by ubuntu
https://packages.ubuntu.com/focal/redmine and it is provided by ruby 2.7

RE: Error on Issue CSV Export - Added by Robert Morbitzer 5 months ago

I had problems with the redmine package provided by the ubuntu repositories.

So i installed the Package from the Redmine Page.

Also the passenger version in the repositories causes me problems.

Passenger is a Ruby gem in my environment.

RE: Error on Issue CSV Export - Added by Darko Palic about 1 month ago

Robert Morbitzer wrote:

I had problems with the redmine package provided by the ubuntu repositories.

So i installed the Package from the Redmine Page.

Also the passenger version in the repositories causes me problems.

Passenger is a Ruby gem in my environment.

do you have a manual how to install it on ubuntu like you did?
I am also about to get rid of ubuntu managed redmine, but unclear what I need to do in ubuntu

(1-8/8)