RoutingError for service-worker.js

AI-generated summary

A user is experiencing a RoutingError for service-worker.js, with a “No route matches [GET] “/service-worker.js”” error in their production.log file. fhe is running the latest version of Discourse and is unsure if this is a normal issue. sam explains that the file was renamed in the latest version to unregister the old one. Although fhe isn’t experiencing issues, they noticed a lot of 4xx errors in their traffic report. tgxworld has since fixed the issue in a commit.

I’m getting lots of

Started GET "/service-worker.js" for <IP REMOVED> at 2018-02-18 19:28:32 +0000
ActionController::RoutingError (No route matches [GET] "/service-worker.js")
/var/www/discourse/vendor/bundle/ruby/2.4.0/gems/actionpack-5.1.4/lib/action_dispatch/middleware/debug_exceptions.rb:63:in `call'
  Rendering exceptions/not_found.html.erb within layouts/no_ember
  Rendered exceptions/not_found.html.erb within layouts/no_ember (5.2ms)
  Rendered layouts/_head.html.erb (0.2ms)
  Rendered common/_special_font_face.html.erb (0.1ms)
  Rendered common/_discourse_stylesheet.html.erb (0.1ms)
  Rendered application/_header.html.erb (0.1ms)
  Rendering html template
  Rendered html template (0.0ms)

in production.log. Any idea why?

What version of discourse are you running?

It’s the latest version.

We renamed this file on latest, it is meant to unregister the old one

Is this causing issues?

cc @tgxworld

No, I’ve noticed a lot of 4xx’s in the detailed traffic report which made me curious.

I’m pretty new to Discourse, so I wasn’t sure whether I should do anything about it. If it’s supposed to be that way (at least temporary) all is fine.

Fixed in

https://github.com/discourse/discourse/commit/d601a6b23cf270f79d635eadd56590188fa2ea20