Ruby & JS errors

I have been having a few minor issues with my forum. In particular, users accessing the forum with an iOS device were unable to click any links or navigate in any way on the forum. I disabled all plugins and one by one, enabled one, then disabled it and went though all of them. After that, I enabled one, and subsequently enabled a second at the same time until I narrowed down the problem. I contacted the plugin dev and they could not repro my problem. :frowning_face: The dev suggested looking at JS errors.

What I did find was in my logs and admittedly, I don’t know enough for this to make sense. Any help or suggestions are much appreciated. Each of these seem to have been repeating every couple of weeks for the past 5 months or so. :cry:

Error #1:
Message

Mime::Type::InvalidMimeType ("application/xml;" is not a valid MIME type)
lib/middleware/omniauth_bypass_middleware.rb:68:in `call'
lib/content_security_policy/middleware.rb:12:in `call'
lib/middleware/anonymous_cache.rb:334:in `call'
config/initializers/100-quiet_logger.rb:23:in `call'
config/initializers/100-silence_logger.rb:31:in `call'
lib/middleware/enforce_hostname.rb:22:in `call'
lib/middleware/request_tracker.rb:176:in `call'

Backtrace

actionpack (6.0.3.3) lib/action_dispatch/http/mime_type.rb:235:in `initialize'
actionpack (6.0.3.3) lib/action_dispatch/http/mime_type.rb:143:in `new'
actionpack (6.0.3.3) lib/action_dispatch/http/mime_type.rb:143:in `lookup'
actionpack (6.0.3.3) lib/action_dispatch/http/mime_type.rb:125:in `block in sort!'
actionpack (6.0.3.3) lib/action_dispatch/http/mime_type.rb:125:in `map!'
actionpack (6.0.3.3) lib/action_dispatch/http/mime_type.rb:125:in `sort!'
actionpack (6.0.3.3) lib/action_dispatch/http/mime_type.rb:191:in `parse'
actionpack (6.0.3.3) lib/action_dispatch/http/mime_negotiation.rb:47:in `block in accepts'
rack (2.2.3) lib/rack/request.rb:69:in `fetch'
rack (2.2.3) lib/rack/request.rb:69:in `fetch_header'

Env

HTTP HOSTS: discourse.****************.com

Error #2:

Message (5 copies reported)

ActionView::Template::Error (undefined method `raw' for nil:NilClass)
app/views/topics/show.rss.erb:9
app/controllers/topics_controller.rb:841:in `feed'
app/controllers/application_controller.rb:358:in `block in with_resolved_locale'
app/controllers/application_controller.rb:358:in `with_resolved_locale'
lib/middleware/omniauth_bypass_middleware.rb:68:in `call'
lib/content_security_policy/middleware.rb:12:in `call'
lib/middleware/anonymous_cache.rb:352:in `call'
config/initializers/100-quiet_logger.rb:23:in `call'
config/initializers/100-silence_logger.rb:31:in `call'
lib/middleware/enforce_hostname.rb:22:in `call'
lib/middleware/request_tracker.rb:176:in `call'

Backtrace

app/views/topics/show.rss.erb:9
actionview (6.0.3.3) lib/action_view/base.rb:274:in `_run'
actionview (6.0.3.3) lib/action_view/template.rb:185:in `block in render'
activesupport (6.0.3.3) lib/active_support/notifications.rb:182:in `instrument'
actionview (6.0.3.3) lib/action_view/template.rb:385:in `instrument_render_template'
actionview (6.0.3.3) lib/action_view/template.rb:183:in `render'
rack-mini-profiler (2.2.0) lib/mini_profiler/profiling_methods.rb:85:in `block in profile_method'
actionview (6.0.3.3) lib/action_view/renderer/template_renderer.rb:58:in `block (2 levels) in render_template'
actionview (6.0.3.3) lib/action_view/renderer/abstract_renderer.rb:88:in `block in instrument'
activesupport (6.0.3.3) lib/active_support/notifications.rb:180:in `block in instrument'

Env

HTTP HOSTS: discourse.****************.com

Error #3:

Message

(google_oauth2) Authentication failure! access_denied:     OmniAuth::Strategies::OAuth2::CallbackError, access_denied

Backtrace

/var/www/discourse/vendor/bundle/ruby/2.6.0/gems/omniauth-1.9.1/lib/omniauth/strategy.rb:163:in `log'
/var/www/discourse/vendor/bundle/ruby/2.6.0/gems/omniauth-1.9.1/lib/omniauth/strategy.rb:486:in `fail!'
/var/www/discourse/vendor/bundle/ruby/2.6.0/gems/omniauth-oauth2-1.7.0/lib/omniauth/strategies/oauth2.rb:87:in `callback_phase'
/var/www/discourse/vendor/bundle/ruby/2.6.0/gems/omniauth-1.9.1/lib/omniauth/strategy.rb:238:in `callback_call'
/var/www/discourse/vendor/bundle/ruby/2.6.0/gems/omniauth-1.9.1/lib/omniauth/strategy.rb:189:in `call!'
/var/www/discourse/vendor/bundle/ruby/2.6.0/gems/omniauth-1.9.1/lib/omniauth/strategy.rb:169:in `call'
/var/www/discourse/vendor/bundle/ruby/2.6.0/gems/omniauth-1.9.1/lib/omniauth/strategy.rb:192:in `call!'
/var/www/discourse/vendor/bundle/ruby/2.6.0/gems/omniauth-1.9.1/lib/omniauth/strategy.rb:169:in `call'
/var/www/discourse/vendor/bundle/ruby/2.6.0/gems/omniauth-1.9.1/lib/omniauth/builder.rb:45:in `call'
/var/www/discourse/lib/middleware/omniauth_bypass_middleware.rb:47:in `call'

Env

HTTP HOSTS: discourse.*************.com

Error #4:

Message

Job exception: JavaScript was terminated (either by timeout or explicitly)

Backtrace

mini_racer-0.3.1/lib/mini_racer.rb:209:in `eval_unsafe'


mini_racer-0.3.1/lib/mini_racer.rb:209:in `block (2 levels) in eval'


mini_racer-0.3.1/lib/mini_racer.rb:350:in `timeout'


mini_racer-0.3.1/lib/mini_racer.rb:208:in `block in eval'


mini_racer-0.3.1/lib/mini_racer.rb:206:in `synchronize'


mini_racer-0.3.1/lib/mini_racer.rb:206:in `eval'

/var/www/discourse/lib/discourse_js_processor.rb:135:in `block in perform'

/var/www/discourse/lib/discourse_js_processor.rb:128:in `synchronize'


/var/www/discourse/lib/discourse_js_processor.rb:128:in `perform'


/var/www/discourse/lib/pretty_text.rb:38:in `apply_es6_file'


/var/www/discourse/lib/pretty_text.rb:57:in `block in ctx_load_manifest'


/var/www/discourse/lib/pretty_text.rb:54:in `each_line'


/var/www/discourse/lib/pretty_text.rb:54:in `ctx_load_manifest'


/var/www/discourse/lib/pretty_text.rb:87:in `create_es6_context'


/var/www/discourse/lib/pretty_text.rb:128:in `block in v8'


/var/www/discourse/lib/pretty_text.rb:126:in `synchronize'


/var/www/discourse/lib/pretty_text.rb:126:in `v8'


/var/www/discourse/lib/pretty_text.rb:152:in `block in markdown'


/var/www/discourse/lib/pretty_text.rb:514:in `block in protect'


/var/www/discourse/lib/pretty_text.rb:513:in `synchronize'


/var/www/discourse/lib/pretty_text.rb:513:in `protect'


/var/www/discourse/lib/pretty_text.rb:151:in `markdown'


/var/www/discourse/lib/pretty_text.rb:271:in `cook'


/var/www/discourse/plugins/discourse-narrative-bot/lib/discourse_narrative_bot/track_selector.rb:228:in `cook'


/var/www/discourse/plugins/discourse-narrative-bot/lib/discourse_narrative_bot/track_selector.rb:233:in `match_trigger?'


/var/www/discourse/plugins/discourse-narrative-bot/lib/discourse_narrative_bot/track_selector.rb:123:in `selected_track'


/var/www/discourse/plugins/discourse-narrative-bot/lib/discourse_narrative_bot/track_selector.rb:107:in `block in reset_track'


/var/www/discourse/plugins/discourse-narrative-bot/lib/discourse_narrative_bot/track_selector.rb:106:in `each'


/var/www/discourse/plugins/discourse-narrative-bot/lib/discourse_narrative_bot/track_selector.rb:106:in `reset_track'


/var/www/discourse/plugins/discourse-narrative-bot/lib/discourse_narrative_bot/track_selector.rb:37:in `select'


/var/www/discourse/plugins/discourse-narrative-bot/autoload/jobs/bot_input.rb:15:in `block in execute'


i18n-1.8.7/lib/i18n.rb:313:in `with_locale'


/var/www/discourse/plugins/discourse-narrative-bot/autoload/jobs/bot_input.rb:11:in `execute'


/var/www/discourse/app/jobs/base.rb:232:in `block (2 levels) in perform'


rails_multisite-2.5.0/lib/rails_multisite/connection_management.rb:76:in `with_connection'
/var/www/discourse/app/jobs/base.rb:221:in `block in perform'


/var/www/discourse/app/jobs/base.rb:217:in `each'


/var/www/discourse/app/jobs/base.rb:217:in `perform'


sidekiq-6.1.2/lib/sidekiq/processor.rb:196:in `execute_job'
sidekiq-6.1.2/lib/sidekiq/processor.rb:164:in `block (2 levels) in process'
sidekiq-6.1.2/lib/sidekiq/middleware/chain.rb:138:in `block in invoke'
/var/www/discourse/lib/sidekiq/pausable.rb:138:in `call'


sidekiq-6.1.2/lib/sidekiq/middleware/chain.rb:140:in `block in invoke'
sidekiq-6.1.2/lib/sidekiq/middleware/chain.rb:143:in `invoke'
sidekiq-6.1.2/lib/sidekiq/processor.rb:163:in `block in process'
sidekiq-6.1.2/lib/sidekiq/processor.rb:136:in `block (6 levels) in dispatch'
sidekiq-6.1.2/lib/sidekiq/job_retry.rb:111:in `local'
sidekiq-6.1.2/lib/sidekiq/processor.rb:135:in `block (5 levels) in dispatch'
sidekiq-6.1.2/lib/sidekiq.rb:38:in `block in <module:Sidekiq>'
sidekiq-6.1.2/lib/sidekiq/processor.rb:131:in `block (4 levels) in dispatch'
sidekiq-6.1.2/lib/sidekiq/processor.rb:257:in `stats'
sidekiq-6.1.2/lib/sidekiq/processor.rb:126:in `block (3 levels) in dispatch'
sidekiq-6.1.2/lib/sidekiq/job_logger.rb:13:in `call'
sidekiq-6.1.2/lib/sidekiq/processor.rb:125:in `block (2 levels) in dispatch'
sidekiq-6.1.2/lib/sidekiq/job_retry.rb:78:in `global'
sidekiq-6.1.2/lib/sidekiq/processor.rb:124:in `block in dispatch'
sidekiq-6.1.2/lib/sidekiq/logger.rb:10:in `with'
sidekiq-6.1.2/lib/sidekiq/job_logger.rb:33:in `prepare'
sidekiq-6.1.2/lib/sidekiq/processor.rb:123:in `dispatch'
sidekiq-6.1.2/lib/sidekiq/processor.rb:162:in `process'
sidekiq-6.1.2/lib/sidekiq/processor.rb:78:in `process_one'
sidekiq-6.1.2/lib/sidekiq/processor.rb:68:in `run'
sidekiq-6.1.2/lib/sidekiq/util.rb:15:in `watchdog'
sidekiq-6.1.2/lib/sidekiq/util.rb:24:in `block in safe_thread'