The error "An error occurred while loading the file" happens when the user try to resolve conflicts on merge request that contains non-English filename.
Summary
The error "An error occurred while loading the file" happens in the "Resolve Conflicts".
This issue happens when the filename or directory contains the characters from specific non-English language. Currently, known affected languages are Japanese and Korean, but there may be other languages affected.
This issue affects the basic function of resolving conflicts in Merge Requests. And while Git command (CLI) can be used to resolve conflicts without issues even filename contains Japanese character. However, there is no known workaround using GitLab's functionality at this point.
Support ticket from customer (Internal): https://gitlab.zendesk.com/agent/tickets/457269
Steps to reproduce
- Commit a file that contains Japanese character in its filename (e.g.
テスト.txt
) - Edit the same part of the file in multiple branches (in short, create a conflict)
- Open a merge request.
- Click the "Resolve Conflict" button
Example Project (GitLab internal)
Project: https://gitlab.com/kkamiya_gl_premium_group
Example MR (Filename contains Japanese character): https://gitlab.com/kkamiya_gl_premium_group/457269-test/-/merge_requests/6
Example MR (Directory name contains Japanese character): https://gitlab.com/kkamiya_gl_premium_group/457269-test/-/merge_requests/3
Example MR (Directory name and filename contains Korean character): https://gitlab.com/kkamiya_gl_premium_group/457269-test/-/merge_requests/2
What is the current bug behavior?
- The error message "An error occurred while loading the file" happens
- The user can not resolve conflict in GitLab UI (Git command line tool can do it)
What is the expected correct behavior?
- No error happens.
- The user can resolve conflict in GitLab UI
Relevant logs and/or screenshots
- Bug behavior
- Expected behavior
This issue happens both GitLab.com and Self-managed.
Above screenshots were taken on the GitLab.com. And attached GitLabSOS was taken on another self-managed instance.
gitlabsos.ip-172-31-60-75.ec2.internal_20231006094131.tar.gz
{"component":"gitaly.UnaryServerInterceptor","correlation_id":"01HC25SANZSJNME119K5HT1ARE","error":"merge: there are conflicting files","grpc.meta.auth_version":"v2","grpc.meta.client_name":"gitlab-sidekiq","grpc.meta.deadline_type":"unknown","grpc.meta.method_operation":"mutator","grpc.meta.method_scope":"repository","grpc.meta.method_type":"unary","grpc.method":"UserMergeToRef","grpc.request.deadline":"2023-10-06T15:41:08.058","grpc.request.fullMethod":"/gitaly.OperationService/UserMergeToRef","grpc.request.glProjectPath":"test/457269","grpc.request.glRepository":"project-83","grpc.request.repoPath":"@hashed/bb/b9/bbb965ab0c80d6538cf2184babad2a564a010376712012bd07b0af92dcd3097d.git","grpc.request.repoStorage":"default","grpc.service":"gitaly.OperationService","grpc.start_time":"2023-10-06T09:41:08.058","level":"error","msg":"unable to create merge commit","peer.address":"@","pid":3455,"remote_ip":"113.32.144.145","source_sha":"3e11d604c79021a28df7073f84e18e6f89a0417f","span.kind":"server","system":"grpc","target_ref":"refs/merge-requests/1/merge","target_sha":"4a6a569449df344dd267e9cdb4d827ca01416b76","time":"2023-10-06T09:41:08.082Z","user_id":"1","username":"root"}
172.31.27.208 - - [06/Oct/2023:09:41:19 +0000] "GET /assets/page_bundles/merge_conflicts-729e240d5cb5dfd7d2cd79da900a0b32b04b8aa795968e8b7829c716f2e2d8b1.css HTTP/1.1" 200 1661 "https://gitlab.kosk1011.tokyo/test/457269/-/merge_requests/1/conflicts" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/117.0.0.0 Safari/537.36" -
172.31.27.208 - - [06/Oct/2023:09:41:19 +0000] "GET /assets/webpack/pages.projects.merge_requests.conflicts.2f2223da.chunk.js HTTP/1.1" 200 295 "https://gitlab.kosk1011.tokyo/test/457269/-/merge_requests/1/conflicts" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/117.0.0.0 Safari/537.36" 1.18
172.31.27.208 - - [06/Oct/2023:09:41:19 +0000] "GET /assets/webpack/commons-pages.projects.merge_conflicts-pages.projects.merge_requests.conflicts.5cb206b4.chunk.js HTTP/1.1" 200 39450 "https://gitlab.kosk1011.tokyo/test/457269/-/merge_requests/1/conflicts" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/117.0.0.0 Safari/537.36" -
172.31.53.30 - - [06/Oct/2023:09:41:19 +0000] "GET /-/cable HTTP/1.1" 101 12021 "" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/117.0.0.0 Safari/537.36" -
172.31.27.208 - - [06/Oct/2023:09:41:19 +0000] "GET /-/manifest.json HTTP/1.1" 304 0 "https://gitlab.kosk1011.tokyo/test/457269/-/merge_requests/1/conflicts" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/117.0.0.0 Safari/537.36" -
172.31.27.208 - - [06/Oct/2023:09:41:20 +0000] "GET /test/457269/-/merge_requests/1/conflicts.json HTTP/1.1" 200 328 "https://gitlab.kosk1011.tokyo/test/457269/-/merge_requests/1/conflicts" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/117.0.0.0 Safari/537.36" 1.78
172.31.27.208 - - [06/Oct/2023:09:41:20 +0000] "GET /assets/webpack/commons-SourceEditor-pages.ide-pages.projects.ci.lints.show-pages.projects.ci.pipeline_editor.show-p-076f72a2.490add4f.chunk.js HTTP/1.1" 200 12951 "https://gitlab.kosk1011.tokyo/test/457269/-/merge_requests/1/conflicts" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/117.0.0.0 Safari/537.36" -
172.31.27.208 - - [06/Oct/2023:09:41:20 +0000] "GET /assets/webpack/vendors-SourceEditor-policy_yaml_editor.1b02945f.chunk.js HTTP/1.1" 200 10418 "https://gitlab.kosk1011.tokyo/test/457269/-/merge_requests/1/conflicts" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/117.0.0.0 Safari/537.36" -
172.31.27.208 - - [06/Oct/2023:09:41:20 +0000] "GET /assets/webpack/SourceEditor.2977b085.chunk.js HTTP/1.1" 200 413 "https://gitlab.kosk1011.tokyo/test/457269/-/merge_requests/1/conflicts" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/117.0.0.0 Safari/537.36" -
172.31.27.208 - - [06/Oct/2023:09:41:20 +0000] "GET /test/457269/-/merge_requests/1/conflict_for_path?new_path=%E3%83%86%E3%82%B9%E3%83%88.txt&old_path=%E3%83%86%E3%82%B9%E3%83%88.txt HTTP/1.1" 404 9851 "https://gitlab.kosk1011.tokyo/test/457269/-/merge_requests/1/conflicts" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/117.0.0.0 Safari/537.36" 5.81
Output of checks
Results of GitLab environment info
Expand for output related to GitLab environment info
$ sudo gitlab-rake gitlab:env:infoSystem information System: Proxy: no Current User: git Using RVM: no Ruby Version: 3.0.6p216 Gem Version: 3.4.19 Bundler Version:2.4.19 Rake Version: 13.0.6 Redis Version: 7.0.13 Sidekiq Version:6.5.7 Go Version: unknownGitLab information Version: 16.4.1-ee Revision: 229bc5f5985 Directory: /opt/gitlab/embedded/service/gitlab-rails DB Adapter: PostgreSQL DB Version: 13.11 URL: https://gitlab.kosk1011.tokyo HTTP Clone URL: https://gitlab.kosk1011.tokyo/some-group/some-project.git SSH Clone URL: git@gitlab.kosk1011.tokyo:some-group/some-project.git Elasticsearch: no Geo: no Using LDAP: yes Using Omniauth: yes Omniauth Providers:GitLab Shell Version: 14.28.0 Repository storages: \\- default: unix:/var/opt/gitlab/gitaly/gitaly.socket GitLab Shell path: /opt/gitlab/embedded/service/gitlab-shellGitaly \\- default Address: unix:/var/opt/gitlab/gitaly/gitaly.socket \\- default Version: 16.4.1 \\- default Git Version: 2.42.0