An error occurred previewing the blob
Summary
Receiving An error occurred previewing the blob
while trying to preview
changes while editing a file.
Steps to reproduce
- Load an MR.
- Navigate to
Changes
. - Click
Edit in single-file editor
. - Make a change.
- Click
preview
.
Example Project
What is the current bug behavior?
Users can't preview
their changes when editing in a single-file editor.
What is the expected correct behavior?
Users can preview
their changes when editing in a single-file editor.
Relevant logs and/or screenshots
Sentry showing this started around Apr 30th: https://sentry.gitlab.net/gitlab/gitlabcom/issues/2599794/?query=correlation_id%3A01F5G488J188BEATJ7Q5JXG15R
Sample of 500's in Kibana: https://log.gprd.gitlab.net/goto/512c577a136eb9de1d5ea2c98f4c44f4
Example backtrace
lib/gitlab/diff/highlight.rb:49:in `block in populate_marker_ranges', lib/gitlab/diff/pair_selector.rb:47:in `block (2 levels) in each', lib/gitlab/diff/pair_selector.rb:45:in `block in each', lib/gitlab/diff/pair_selector.rb:37:in `scan', lib/gitlab/diff/pair_selector.rb:37:in `each', lib/gitlab/diff/highlight.rb:48:in `populate_marker_ranges', lib/gitlab/diff/highlight.rb:27:in `highlight', app/controllers/projects/blob_controller.rb:95:in `preview', ee/lib/gitlab/ip_address_state.rb:10:in `with', ee/app/controllers/ee/application_controller.rb:44:in `set_current_ip_address', app/controllers/application_controller.rb:486:in `set_current_admin', lib/gitlab/session.rb:11:in `with_session', app/controllers/application_controller.rb:477:in `set_session_storage', lib/gitlab/i18n.rb:99:in `with_locale', lib/gitlab/i18n.rb:105:in `with_user_locale', app/controllers/application_controller.rb:471:in `set_locale', app/controllers/application_controller.rb:464:in `block in set_current_context', lib/gitlab/application_context.rb:70:in `block in use', lib/gitlab/application_context.rb:70:in `use', lib/gitlab/application_context.rb:27:in `with_context', app/controllers/application_controller.rb:455:in `set_current_context', ee/lib/omni_auth/strategies/group_saml.rb:41:in `other_phase', lib/gitlab/metrics/elasticsearch_rack_middleware.rb:16:in `call', lib/gitlab/middleware/rails_queue_duration.rb:33:in `call', lib/gitlab/metrics/rack_middleware.rb:16:in `block in call', lib/gitlab/metrics/transaction.rb:56:in `run', lib/gitlab/metrics/rack_middleware.rb:16:in `call', lib/gitlab/middleware/speedscope.rb:13:in `call', lib/gitlab/request_profiler/middleware.rb:17:in `call', ee/lib/gitlab/database/load_balancing/rack_middleware.rb:40:in `call', lib/gitlab/jira/middleware.rb:19:in `call', lib/gitlab/middleware/go.rb:20:in `call', lib/gitlab/etag_caching/middleware.rb:21:in `call', lib/gitlab/middleware/multipart.rb:172:in `call', lib/gitlab/middleware/read_only/controller.rb:50:in `call', lib/gitlab/middleware/read_only.rb:18:in `call', lib/gitlab/middleware/same_site_cookies.rb:27:in `call', lib/gitlab/middleware/handle_malformed_strings.rb:21:in `call', lib/gitlab/middleware/basic_health_check.rb:25:in `call', lib/gitlab/middleware/handle_ip_spoof_attack_error.rb:25:in `call', lib/gitlab/middleware/request_context.rb:21:in `call', config/initializers/fix_local_cache_middleware.rb:11:in `call', lib/gitlab/middleware/rack_multipart_tempfile_factory.rb:19:in `call', lib/gitlab/metrics/requests_rack_middleware.rb:76:in `call', lib/gitlab/middleware/release_env.rb:12:in `call'Output of checks
This bug happens on GitLab.com
Possible fixes
Edited by Rehab