Defect #23262
closedgit: unable to edit and delete from setting if extra_info is invalid
0%
Description
When opening the repository view in a project I get an internal server error with the following log entry
Psych::SyntaxError ((<unknown>): found unexpected end of stream while scanning a quoted scalar at line 1439 column 7): app/models/repository.rb:160:in `extra_info' app/models/repository/git.rb:46:in `extra_report_last_commit' app/models/repository/git.rb:97:in `scm_entries' app/models/repository.rb:205:in `entries' app/controllers/repositories_controller.rb:116:in `show' lib/redmine/sudo_mode.rb:63:in `sudo_mode'
Updated by Marco Descher over 8 years ago
The error occurs if https://github.com/elexis/elexis-3-core is defined as main repository. If I select a different one, the page opens as expected.
So I guess, that there has to be something within this repository that provokes the resp. error.
Updated by Toshi MARUYAMA over 8 years ago
- Status changed from New to Needs feedback
Please see submissions.
Updated by Marco Descher over 8 years ago
Environment:
Redmine version 3.2.3.stable
Ruby version 1.9.3-p194 (2012-04-20) [x86_64-linux]
Rails version 4.2.5.2
Environment production
Database adapter Mysql2
SCM:
Mercurial 3.1.2
Git 2.1.4
Filesystem
Redmine plugins:
redmine_agile 1.4.1
redmine_lightbox2 0.2.7
redmine_mylyn_connector 2.8.2.stable
redmine_xapian 1.6.5
Updated by Marco Descher over 8 years ago
Is there anything else I can provide? Rails etc. was satisfied with bundle install
as documented.
Updated by Toshi MARUYAMA over 8 years ago
Marco Descher wrote:
The error occurs if https://github.com/elexis/elexis-3-core is defined as main repository.
What do you mean?
Repository which Redmine use needs to be local bare repository.
Updated by Marco Descher over 8 years ago
Certainly, the given repository is configured in reference to a localy stored bare repository.
The problem is, that I am not even able to delete the repository or edit it
When calling https://xyz.foo.bar/repositories/18/edit for example (which is my config page for this repo), I get
Started GET "/repositories/18/edit" for 11.111.111.111 at 2016-07-07 07:18:22 +0200 Processing by RepositoriesController#edit as HTML Parameters: {"id"=>"18"} Current user: mmmmmmmm (id=1) Rendered repositories/_form.html.erb (7.3ms) Rendered repositories/edit.html.erb within layouts/base (7.8ms) Completed 500 Internal Server Error in 15ms (ActiveRecord: 1.8ms) Psych::SyntaxError ((<unknown>): found unexpected end of stream while scanning a quoted scalar at line 1439 column 7): app/models/repository.rb:160:in `extra_info' app/models/repository/git.rb:46:in `extra_report_last_commit' lib/redmine/views/labelled_form_builder.rb:34:in `check_box' app/helpers/repositories_helper.rb:187:in `git_field_tags' app/helpers/repositories_helper.rb:126:in `repository_field_tags' app/views/repositories/_form.html.erb:24:in `_app_views_repositories__form_html_erb___3399130854494555240_69874500697560' app/views/repositories/edit.html.erb:4:in `block in _app_views_repositories_edit_html_erb__413569635340657674_69874499119060' app/helpers/application_helper.rb:1031:in `labelled_form_for' app/views/repositories/edit.html.erb:3:in `_app_views_repositories_edit_html_erb__413569635340657674_69874499119060' lib/redmine/sudo_mode.rb:63:in `sudo_mode'
Updated by Marco Descher over 8 years ago
The same goes for delete
Started DELETE "/repositories/18" for 11.111.111.111 at 2016-07-07 07:21:10 +0200 Processing by RepositoriesController#destroy as HTML Parameters: {"authenticity_token"=>"mmmmmmmm/mmmmmmmm+mmmmmmmm==", "id"=>"18"} Current user: mmmmmmmm (id=1) Completed 500 Internal Server Error in 128ms (ActiveRecord: 110.8ms) Psych::SyntaxError ((<unknown>): found unexpected end of stream while scanning a quoted scalar at line 1439 column 7): app/models/repository.rb:160:in `extra_info' app/models/repository/git.rb:248:in `clear_extra_info_of_changesets' app/models/repository/git.rb:260:in `clear_changesets' app/controllers/repositories_controller.rb:109:in `destroy' lib/redmine/sudo_mode.rb:63:in `sudo_mode'
Updated by Toshi MARUYAMA over 8 years ago
- Subject changed from Psych::SyntaxError ((<unknown>): found unexpected end of stream while scanning a quoted scalar to git: unable to delete from setting if extra_info is invalid
- Status changed from Needs feedback to New
Updated by Toshi MARUYAMA over 8 years ago
- Subject changed from git: unable to delete from setting if extra_info is invalid to git: unable to edit and delete from setting if extra_info is invalid
Updated by Toshi MARUYAMA over 8 years ago
I don't know why extra_info had broken.
Try "Repsotiry.find(18).clear_extra_info_of_changesets" from rails console.
Or clear extra_info from MySQL console.
Updated by Marco Descher over 8 years ago
- Status changed from New to Resolved
Thanks for your help. I deleted the extra_info table in the MySQL database and re-executed the git indexing. Now the problem is gone!
Updated by Toshi MARUYAMA over 8 years ago
- Status changed from Resolved to Closed
Thank you for your feedback.