Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

no route matches service-worker.js

I generated rails application and I got this message out of box. I don't know what service-worker.js is but I assume it can be bundled with some default gem?

Started GET "/service-worker.js" for 127.0.0.1 at 2015-07-21 19:48:33 +0200

ActionController::RoutingError (No route matches [GET] "/service-worker.js"):
  actionpack (4.2.3) lib/action_dispatch/middleware/debug_exceptions.rb:21:in `call'
  web-console (2.2.1) lib/web_console/middleware.rb:39:in `call'
  actionpack (4.2.3) lib/action_dispatch/middleware/show_exceptions.rb:30:in `call'
  railties (4.2.3) lib/rails/rack/logger.rb:38:in `call_app'
  railties (4.2.3) lib/rails/rack/logger.rb:20:in `block in call'
  activesupport (4.2.3) lib/active_support/tagged_logging.rb:68:in `block in tagged'
  activesupport (4.2.3) lib/active_support/tagged_logging.rb:26:in `tagged'
  activesupport (4.2.3) lib/active_support/tagged_logging.rb:68:in `tagged'
  railties (4.2.3) lib/rails/rack/logger.rb:20:in `call'
  actionpack (4.2.3) lib/action_dispatch/middleware/request_id.rb:21:in `call'
  rack (1.6.4) lib/rack/methodoverride.rb:22:in `call'
  rack (1.6.4) lib/rack/runtime.rb:18:in `call'
  activesupport (4.2.3) lib/active_support/cache/strategy/local_cache_middleware.rb:28:in `call'
  rack (1.6.4) lib/rack/lock.rb:17:in `call'
  actionpack (4.2.3) lib/action_dispatch/middleware/static.rb:116:in `call'
  rack (1.6.4) lib/rack/sendfile.rb:113:in `call'
  railties (4.2.3) lib/rails/engine.rb:518:in `call'
  railties (4.2.3) lib/rails/application.rb:165:in `call'
  rack (1.6.4) lib/rack/lock.rb:17:in `call'
  rack (1.6.4) lib/rack/content_length.rb:15:in `call'
  rack (1.6.4) lib/rack/handler/webrick.rb:88:in `service'
  /home/emkacf/.rvm/rubies/ruby-2.2.1/lib/ruby/2.2.0/webrick/httpserver.rb:138:in `service'
  /home/emkacf/.rvm/rubies/ruby-2.2.1/lib/ruby/2.2.0/webrick/httpserver.rb:94:in `run'
  /home/emkacf/.rvm/rubies/ruby-2.2.1/lib/ruby/2.2.0/webrick/server.rb:294:in `block in start_thread'
like image 600
Emilia Heller-Mrotek Avatar asked Oct 30 '25 15:10

Emilia Heller-Mrotek


2 Answers

I assume that is from another application which uses webworkers. If you are using Firefox, go to menu > web developer > service workers and unregister webworker from there (That's the one way to do it). The other application will register it again if needed.

like image 131
Vedran Mijatović Avatar answered Nov 01 '25 04:11

Vedran Mijatović


This coming from client-side so it's from a service-worker that has been registered in the browser.

Open DevTools and run navigator.serviceWorker.getRegistration().then(r => r.unregister()) in your console to disable it.

like image 20
Christopher Agnus Lam Avatar answered Nov 01 '25 05:11

Christopher Agnus Lam