1

What is Issue?

When I push a link of the commit which invlolves a binary file from Commits view of a project on Gitlab, I recieve an Internal error ,"500 Whoops, something went wrong on our end."
This issue also appears when creating Merge Request whose origin is the same commit above. Production.log says,


Started GET "/TempTest/bsp/commit/3098a49f2fd1c77be0c383994aa6655f5d15ebf8" for 127.0.0.1 at 2016-05-30 16:17:15 +0900
Processing by Projects::CommitController#show as HTML
  Parameters:{"namespace_id"=>"TempTest", "project_id"=>"bsp", "id"=>"3098a49f2fd1c77be0c383994aa6655f5d15ebf8"}

Encoding::CompatibilityError (incompatible character encodings: UTF-8 and ASCII-8BIT):
  app/views/projects/diffs/_file.html.haml:54:in `_app_views_projects_diffs__file_html_haml__1070266479743635718_49404820'
  app/views/projects/diffs/_diffs.html.haml:22:in `block in _app_views_projects_diffs__diffs_html_haml__2984561770205002953_48487320'
  app/views/projects/diffs/_diffs.html.haml:17:in `each_with_index'
  app/views/projects/diffs/_diffs.html.haml:17:in `_app_views_projects_diffs__diffs_html_haml__2984561770205002953_48487320'
  app/views/projects/commit/show.html.haml:12:in `_app_views_projects_commit_show_html_haml__3333221152053087461_45612480'
  app/controllers/projects/commit_controller.rb:30:in `show'
  lib/gitlab/middleware/go.rb:16:in `call'

Completed 500 Internal Server Error in 210ms (Views: 8.7ms | ActiveRecord: 10.5ms)

Gtilab seems to misdetect binary file with text file.
So HTML formatting engine seems to meet an error.("Encoding::CompatibilityError")

It's ok for me that Gitlab sometimes misdetects binary file with text file, but problem is that Gitlab server stops the transaction by Internal Error when such a misdetects occurs.

Could anyone tell me how to continue server transaction even if such a misjudge occurs?
For example, I assume the following answer.

  • e.g.1) Force to recognize a file to be a binary.
  • e.g.2) Bypass a HTML transforming when such a error occurs.

What I tried to resolve.

I added the description '*.XXX binary' to .gitattribute to confirm whether I can let a certain file recognize that it was binary file for Gitlab forcibly. The Git client recognized the file to be binary file, and the diff did not output a text. However, there was no effect in Gitlab even if I did push it.

versions info

  • I faced this issue at first on Gitlab 8.6.2, but same issue occurs on 8.8.3.
  • I use git-2.7.2

Thank you.

0 Answers0