Webpack: A bad HTTP response code (404) was received when fetching the script.

Created on 13 Jan 2017  路  30Comments  路  Source: vuejs-templates/webpack

screen shot 2017-01-13 at 16 11 45

Any idea of what's that??

Most helpful comment

I run this is the console of my navigator (Chrome), and no error message anymore :

navigator.serviceWorker.getRegistrations().then(function(registrations) { for(let registration of registrations) { registration.unregister() } })

All 30 comments

It seems you are using a service worker?

That's not part of this template, so in don't see how this repository has anything to do with it.

Yes, this was probably a previous app running on the same port. Thx

@gazpachu any idea for solve this ? How to kill the previous app service-worker ? Thanks

@Nayir somehow it stopped appearing. I'm not sure how it happened.

@LinusBorg @Nayir it actually keeps appearing, so it's really something that comes from this package

I have this problem too. How does one kill it?

Someone is using UIkit 3.0 ? Maybe the error comes from UIkit and not Vuejs.

You kill it by unsubscribing the service worker from the local host port

@davidmoshal I still have no idea where this service worker is coming from. Have you found out more?

I run this is the console of my navigator (Chrome), and no error message anymore :

navigator.serviceWorker.getRegistrations().then(function(registrations) { for(let registration of registrations) { registration.unregister() } })

@LinusBorg I think it's coming from Vue-Hacker-News example project. And then when you run a new webpack vue-cli project, the service worker is still running for this one.

Ah that would make sense :)

@Nayir it works for me. thanks.

I'm sorry but this repository has nothing to do with angular or OneSignal, so i have no idea why you are asking here.

The only tipp I can give you is to check your chrome devtools under the "Application" tab when on localhost, and kill all service workers that may still be running.

If you're using a local repository then while specifying the URL or path of your file, don't specify the absolute path instead give an absolute path, for example, is the correct way to do it, so this isn't the correct way to do it. Well, this worked out for me, hope force may be with you.

To remove previous service worker along with other cache, if using Chrome, open DevTools and long press on 'Refresh button' , then select 'Empty Cache and Hard Reload' option.

Chrome=>Dev Tools=>Application=>Service Workers=>Update on reload (selected)

@ignacio68 that made it! Thanks

This error also occured in a reactjs project. same code above resolved it!

I run this is the console of my navigator (Chrome), and no error message anymore :

navigator.serviceWorker.getRegistrations().then(function(registrations) { for(let registration of registrations) { registration.unregister() } })

thanks for this dude!

I run this is the console of my navigator (Chrome), and no error message anymore :
navigator.serviceWorker.getRegistrations().then(function(registrations) { for(let registration of registrations) { registration.unregister() } })

thanks for this dude!

It really works! Thank you!

navigator.serviceWorker.getRegistrations().then(function(registrations) { for(let registration of registrations) { registration.unregister() } })

It works for me. Thanks!

navigator.serviceWorker.getRegistrations().then(function(registrations) { for(let registration of registrations) { registration.unregister() } })

thanks it's work for me :)

This happens when a previous app on the same url did utilize a service worker.

To fix:
Chrome - devtools - Application - Clear storage - check Unregister Service Worker - then click Clear site data

I run this is the console of my navigator (Chrome), and no error message anymore :

navigator.serviceWorker.getRegistrations().then(function(registrations) { for(let registration of registrations) { registration.unregister() } })

hi friend, let me know more exactly , where can i use this command ?

@timeworn I guess you can just paste it in your console window of Chrome dev tools. But for me that command, although executed, made no difference. Error still appears

I run this is the console of my navigator (Chrome), and no error message anymore :

navigator.serviceWorker.getRegistrations().then(function(registrations) { for(let registration of registrations) { registration.unregister() } })

Hi friend, please let me know with screenshot more exactly, thanks

Screen Shot 2020-03-24 at 18 34 24

I have this problem too. How does one kill it?
Thanks all

screen shot 2017-01-13 at 16 11 45

Any idea of what's that??

for me, it was finding firebase-messaging-sw.js in my root dir, but i've created it inside the /var/www/html/test/ ........ just paste it
sw.js file in root dir -> /var/www/html

this worked for me ::)

Was this page helpful?
0 / 5 - 0 ratings