Committing accented chars with the WebIDE shows error (500) but still saves the commit
Summary
When submitting a commit with accented characters, it causes a 500 to be thrown even though the commit does go through.
The page shows a 500 red warning at the top. Encoding::UndefinedConversionError ("\xE2" from ASCII-8BIT to UTF-8)
.
Steps to reproduce
- Open any file
- Add the character
Ã
. - Stage it and commit that.
- Should get a 500 error bar.
Example Project
andr3/meet.andr3.net@3f207b27 This commit threw the error (was committed via WebIDE).
What is the current bug behavior?
Throws a 500 error warning and no success message is shown.
What is the expected correct behavior?
Success message appears (no 500 error thrown).
Relevant logs and/or screenshots
Error | ![]() |
Expected | ![]() |
See log: development.log
Encoding::UndefinedConversionError ("\xE2" from ASCII-8BIT to UTF-8): /Users/andr3/.rvm/gems/ruby-2.3.6/gems/json-1.8.6/lib/json/common.rb:223:in `encode' /Users/andr3/.rvm/gems/ruby-2.3.6/gems/json-1.8.6/lib/json/common.rb:223:in `generate' /Users/andr3/.rvm/gems/ruby-2.3.6/gems/json-1.8.6/lib/json/common.rb:223:in `generate' /Users/andr3/.rvm/gems/ruby-2.3.6/gems/json-1.8.6/lib/json/common.rb:394:in `dump' /Users/andr3/.rvm/gems/ruby-2.3.6/gems/lograge-0.5.1/lib/lograge/formatters/json.rb:6:in `call' /gitlab/projects/gdk-ce/gitlab/lib/gitlab/grape_logging/formatters/lograge_with_timestamp.rb:14:in `call' /Users/andr3/.rvm/rubies/ruby-2.3.6/lib/ruby/2.3.0/logger.rb:546:in `format_message' /Users/andr3/.rvm/rubies/ruby-2.3.6/lib/ruby/2.3.0/logger.rb:434:in `add' /Users/andr3/.rvm/rubies/ruby-2.3.6/lib/ruby/2.3.0/logger.rb:489:in `info' /Users/andr3/.rvm/gems/ruby-2.3.6/gems/grape_logging-1.7.0/lib/grape_logging/reporters/logger_reporter.rb:12:in `perform' /Users/andr3/.rvm/gems/ruby-2.3.6/gems/grape_logging-1.7.0/lib/grape_logging/middleware/request_logger.rb:41:in `after' /Users/andr3/.rvm/gems/ruby-2.3.6/gems/grape_logging-1.7.0/lib/grape_logging/middleware/request_logger.rb:83:in `call!' /Users/andr3/.rvm/gems/ruby-2.3.6/gems/grape-1.0.2/lib/grape/middleware/base.rb:24:in `call' /Users/andr3/.rvm/gems/ruby-2.3.6/gems/rack-oauth2-1.2.3/lib/rack/oauth2/server/resource.rb:20:in `call' /Users/andr3/.rvm/gems/ruby-2.3.6/gems/rack-oauth2-1.2.3/lib/rack/oauth2/server/resource/bearer.rb:8:in `call' /Users/andr3/.rvm/gems/ruby-2.3.6/gems/grape-1.0.2/lib/grape/middleware/error.rb:37:in `block in call!' /Users/andr3/.rvm/gems/ruby-2.3.6/gems/grape-1.0.2/lib/grape/middleware/error.rb:36:in `catch' /Users/andr3/.rvm/gems/ruby-2.3.6/gems/grape-1.0.2/lib/grape/middleware/error.rb:36:in `call!' /Users/andr3/.rvm/gems/ruby-2.3.6/gems/grape-1.0.2/lib/grape/middleware/base.rb:24:in `call' /Users/andr3/.rvm/gems/ruby-2.3.6/gems/rack-1.6.9/lib/rack/head.rb:13:in `call' /Users/andr3/.rvm/gems/ruby-2.3.6/gems/grape-1.0.2/lib/grape/endpoint.rb:227:in `call!' /Users/andr3/.rvm/gems/ruby-2.3.6/gems/grape-1.0.2/lib/grape/endpoint.rb:221:in `call' /Users/andr3/.rvm/gems/ruby-2.3.6/gems/grape-1.0.2/lib/grape/router/route.rb:72:in `exec' /Users/andr3/.rvm/gems/ruby-2.3.6/gems/grape-1.0.2/lib/grape/router.rb:121:in `process_route' /Users/andr3/.rvm/gems/ruby-2.3.6/gems/grape-1.0.2/lib/grape/router.rb:74:in `block in identity' /Users/andr3/.rvm/gems/ruby-2.3.6/gems/grape-1.0.2/lib/grape/router.rb:93:in `transaction' /Users/andr3/.rvm/gems/ruby-2.3.6/gems/grape-1.0.2/lib/grape/router.rb:72:in `identity' /Users/andr3/.rvm/gems/ruby-2.3.6/gems/grape-1.0.2/lib/grape/router.rb:57:in `block in call' /Users/andr3/.rvm/gems/ruby-2.3.6/gems/grape-1.0.2/lib/grape/router.rb:137:in `with_optimization' /Users/andr3/.rvm/gems/ruby-2.3.6/gems/grape-1.0.2/lib/grape/router.rb:56:in `call' /Users/andr3/.rvm/gems/ruby-2.3.6/gems/grape-1.0.2/lib/grape/api.rb:119:in `call' /Users/andr3/.rvm/gems/ruby-2.3.6/gems/grape-1.0.2/lib/grape/api.rb:45:in `call!' /Users/andr3/.rvm/gems/ruby-2.3.6/gems/grape-1.0.2/lib/grape/api.rb:40:in `call' /Users/andr3/.rvm/gems/ruby-2.3.6/gems/actionpack-4.2.10/lib/action_dispatch/routing/mapper.rb:51:in `serve' /Users/andr3/.rvm/gems/ruby-2.3.6/gems/actionpack-4.2.10/lib/action_dispatch/journey/router.rb:43:in `block in serve' /Users/andr3/.rvm/gems/ruby-2.3.6/gems/actionpack-4.2.10/lib/action_dispatch/journey/router.rb:30:in `each' /Users/andr3/.rvm/gems/ruby-2.3.6/gems/actionpack-4.2.10/lib/action_dispatch/journey/router.rb:30:in `serve' /Users/andr3/.rvm/gems/ruby-2.3.6/gems/actionpack-4.2.10/lib/action_dispatch/routing/route_set.rb:817:in `call' /Users/andr3/.rvm/gems/ruby-2.3.6/gems/peek-performance_bar-1.3.1/lib/peek/views/performance_bar/process_utilization.rb:119:in `call' /gitlab/projects/gdk-ce/gitlab/lib/gitlab/middleware/multipart.rb:95:in `call' /gitlab/projects/gdk-ce/gitlab/lib/gitlab/request_profiler/middleware.rb:14:in `call' /gitlab/projects/gdk-ce/gitlab/lib/gitlab/query_limiting/middleware.rb:17:in `block in call' /gitlab/projects/gdk-ce/gitlab/lib/gitlab/query_limiting/transaction.rb:37:in `run' /gitlab/projects/gdk-ce/gitlab/lib/gitlab/query_limiting/middleware.rb:16:in `call' /gitlab/projects/gdk-ce/gitlab/lib/gitlab/middleware/go.rb:17:in `call' /Users/andr3/.rvm/gems/ruby-2.3.6/gems/flipper-0.13.0/lib/flipper/middleware/memoizer.rb:64:in `memoized_call' /Users/andr3/.rvm/gems/ruby-2.3.6/gems/flipper-0.13.0/lib/flipper/middleware/memoizer.rb:42:in `call' /gitlab/projects/gdk-ce/gitlab/lib/gitlab/etag_caching/middleware.rb:11:in `call' /Users/andr3/.rvm/gems/ruby-2.3.6/gems/batch-loader-1.2.1/lib/batch_loader/middleware.rb:11:in `call' /Users/andr3/.rvm/gems/ruby-2.3.6/gems/rack-attack-4.4.1/lib/rack/attack.rb:107:in `call' /Users/andr3/.rvm/gems/ruby-2.3.6/gems/warden-1.2.6/lib/warden/manager.rb:35:in `block in call' /Users/andr3/.rvm/gems/ruby-2.3.6/gems/warden-1.2.6/lib/warden/manager.rb:34:in `catch' /Users/andr3/.rvm/gems/ruby-2.3.6/gems/warden-1.2.6/lib/warden/manager.rb:34:in `call' /Users/andr3/.rvm/gems/ruby-2.3.6/gems/rack-cors-1.0.2/lib/rack/cors.rb:97:in `call' /Users/andr3/.rvm/gems/ruby-2.3.6/gems/rack-1.6.9/lib/rack/etag.rb:24:in `call' /Users/andr3/.rvm/gems/ruby-2.3.6/gems/rack-1.6.9/lib/rack/conditionalget.rb:38:in `call' /Users/andr3/.rvm/gems/ruby-2.3.6/gems/rack-1.6.9/lib/rack/head.rb:13:in `call' /Users/andr3/.rvm/gems/ruby-2.3.6/gems/actionpack-4.2.10/lib/action_dispatch/middleware/params_parser.rb:27:in `call' /gitlab/projects/gdk-ce/gitlab/lib/gitlab/middleware/read_only/controller.rb:28:in `call' /gitlab/projects/gdk-ce/gitlab/lib/gitlab/middleware/read_only.rb:16:in `call' /Users/andr3/.rvm/gems/ruby-2.3.6/gems/actionpack-4.2.10/lib/action_dispatch/middleware/flash.rb:260:in `call' /Users/andr3/.rvm/gems/ruby-2.3.6/gems/rack-1.6.9/lib/rack/session/abstract/id.rb:225:in `context' /Users/andr3/.rvm/gems/ruby-2.3.6/gems/rack-1.6.9/lib/rack/session/abstract/id.rb:220:in `call' /Users/andr3/.rvm/gems/ruby-2.3.6/gems/actionpack-4.2.10/lib/action_dispatch/middleware/cookies.rb:560:in `call' /Users/andr3/.rvm/gems/ruby-2.3.6/gems/activerecord-4.2.10/lib/active_record/query_cache.rb:36:in `call' /Users/andr3/.rvm/gems/ruby-2.3.6/gems/activerecord-4.2.10/lib/active_record/connection_adapters/abstract/connection_pool.rb:653:in `call' /Users/andr3/.rvm/gems/ruby-2.3.6/gems/activerecord-4.2.10/lib/active_record/migration.rb:377:in `call' /Users/andr3/.rvm/gems/ruby-2.3.6/gems/actionpack-4.2.10/lib/action_dispatch/middleware/callbacks.rb:29:in `block in call' /Users/andr3/.rvm/gems/ruby-2.3.6/gems/activesupport-4.2.10/lib/active_support/callbacks.rb:88:in `__run_callbacks__' /Users/andr3/.rvm/gems/ruby-2.3.6/gems/activesupport-4.2.10/lib/active_support/callbacks.rb:778:in `_run_call_callbacks' /Users/andr3/.rvm/gems/ruby-2.3.6/gems/activesupport-4.2.10/lib/active_support/callbacks.rb:81:in `run_callbacks' /Users/andr3/.rvm/gems/ruby-2.3.6/gems/actionpack-4.2.10/lib/action_dispatch/middleware/callbacks.rb:27:in `call' /Users/andr3/.rvm/gems/ruby-2.3.6/gems/actionpack-4.2.10/lib/action_dispatch/middleware/reloader.rb:73:in `call' /Users/andr3/.rvm/gems/ruby-2.3.6/gems/actionpack-4.2.10/lib/action_dispatch/middleware/remote_ip.rb:78:in `call' /Users/andr3/.rvm/gems/ruby-2.3.6/gems/better_errors-2.1.1/lib/better_errors/middleware.rb:84:in `protected_app_call' /Users/andr3/.rvm/gems/ruby-2.3.6/gems/better_errors-2.1.1/lib/better_errors/middleware.rb:79:in `better_errors_call' /Users/andr3/.rvm/gems/ruby-2.3.6/gems/better_errors-2.1.1/lib/better_errors/middleware.rb:57:in `call' /Users/andr3/.rvm/gems/ruby-2.3.6/gems/actionpack-4.2.10/lib/action_dispatch/middleware/debug_exceptions.rb:17:in `call' /Users/andr3/.rvm/gems/ruby-2.3.6/gems/actionpack-4.2.10/lib/action_dispatch/middleware/show_exceptions.rb:30:in `call' /Users/andr3/.rvm/gems/ruby-2.3.6/gems/railties-4.2.10/lib/rails/rack/logger.rb:38:in `call_app' /Users/andr3/.rvm/gems/ruby-2.3.6/gems/railties-4.2.10/lib/rails/rack/logger.rb:20:in `block in call' /Users/andr3/.rvm/gems/ruby-2.3.6/gems/activesupport-4.2.10/lib/active_support/tagged_logging.rb:68:in `block in tagged' /Users/andr3/.rvm/gems/ruby-2.3.6/gems/activesupport-4.2.10/lib/active_support/tagged_logging.rb:26:in `tagged' /Users/andr3/.rvm/gems/ruby-2.3.6/gems/activesupport-4.2.10/lib/active_support/tagged_logging.rb:68:in `tagged' /Users/andr3/.rvm/gems/ruby-2.3.6/gems/railties-4.2.10/lib/rails/rack/logger.rb:20:in `call' /Users/andr3/.rvm/gems/ruby-2.3.6/gems/sprockets-rails-3.2.1/lib/sprockets/rails/quiet_assets.rb:13:in `call' /gitlab/projects/gdk-ce/gitlab/lib/gitlab/request_context.rb:18:in `call' /Users/andr3/.rvm/gems/ruby-2.3.6/gems/request_store-1.3.1/lib/request_store/middleware.rb:9:in `call' /Users/andr3/.rvm/gems/ruby-2.3.6/gems/actionpack-4.2.10/lib/action_dispatch/middleware/request_id.rb:21:in `call' /Users/andr3/.rvm/gems/ruby-2.3.6/gems/rack-1.6.9/lib/rack/methodoverride.rb:22:in `call' /Users/andr3/.rvm/gems/ruby-2.3.6/gems/rack-1.6.9/lib/rack/runtime.rb:18:in `call' /Users/andr3/.rvm/gems/ruby-2.3.6/gems/rack-1.6.9/lib/rack/lock.rb:17:in `call' /Users/andr3/.rvm/gems/ruby-2.3.6/gems/actionpack-4.2.10/lib/action_dispatch/middleware/static.rb:120:in `call' /gitlab/projects/gdk-ce/gitlab/lib/gitlab/middleware/static.rb:9:in `call' /gitlab/projects/gdk-ce/gitlab/lib/gitlab/middleware/webpack_proxy.rb:20:in `perform_request' /Users/andr3/.rvm/gems/ruby-2.3.6/gems/rack-proxy-0.6.0/lib/rack/proxy.rb:57:in `call' /Users/andr3/.rvm/gems/ruby-2.3.6/gems/rack-1.6.9/lib/rack/sendfile.rb:113:in `call' /gitlab/projects/gdk-ce/gitlab/lib/gitlab/metrics/requests_rack_middleware.rb:27:in `call' /Users/andr3/.rvm/gems/ruby-2.3.6/gems/sentry-raven-2.7.2/lib/raven/integrations/rack.rb:51:in `call' /Users/andr3/.rvm/gems/ruby-2.3.6/gems/railties-4.2.10/lib/rails/engine.rb:518:in `call' /Users/andr3/.rvm/gems/ruby-2.3.6/gems/railties-4.2.10/lib/rails/application.rb:165:in `call' /Users/andr3/.rvm/gems/ruby-2.3.6/gems/railties-4.2.10/lib/rails/railtie.rb:194:in `public_send' /Users/andr3/.rvm/gems/ruby-2.3.6/gems/railties-4.2.10/lib/rails/railtie.rb:194:in `method_missing' /gitlab/projects/gdk-ce/gitlab/lib/gitlab/middleware/release_env.rb:10:in `call' /Users/andr3/.rvm/gems/ruby-2.3.6/gems/rack-1.6.9/lib/rack/urlmap.rb:66:in `block in call' /Users/andr3/.rvm/gems/ruby-2.3.6/gems/rack-1.6.9/lib/rack/urlmap.rb:50:in `each' /Users/andr3/.rvm/gems/ruby-2.3.6/gems/rack-1.6.9/lib/rack/urlmap.rb:50:in `call' /Users/andr3/.rvm/gems/ruby-2.3.6/gems/unicorn-5.1.0/lib/unicorn/http_server.rb:562:in `process_client' /Users/andr3/.rvm/gems/ruby-2.3.6/gems/unicorn-5.1.0/lib/unicorn/http_server.rb:658:in `worker_loop' /Users/andr3/.rvm/gems/ruby-2.3.6/gems/unicorn-5.1.0/lib/unicorn/http_server.rb:508:in `spawn_missing_workers' /Users/andr3/.rvm/gems/ruby-2.3.6/gems/unicorn-5.1.0/lib/unicorn/http_server.rb:132:in `start' /Users/andr3/.rvm/gems/ruby-2.3.6/gems/unicorn-5.1.0/bin/unicorn_rails:209:in `' /Users/andr3/.rvm/gems/ruby-2.3.6/bin/unicorn_rails:23:in `load' /Users/andr3/.rvm/gems/ruby-2.3.6/bin/unicorn_rails:23:in `' /Users/andr3/.rvm/gems/ruby-2.3.6/bin/ruby_executable_hooks:15:in `eval' /Users/andr3/.rvm/gems/ruby-2.3.6/bin/ruby_executable_hooks:15:in `'Output of checks
This bug happens on GitLab.com
Edited by André Luís