question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Failing deploying a file named 404.html

See original GitHub issue

I was deploying a 404.html file and faced some weird problems!

The deploy was successful, but my service worker was always failing to install due to a fetch failure (for this 404.html file, which was always not found when the sw tried to fetch it and store it into cache).

I simply renamed the 404.html into not-found.html and it started working normally.

Any idea about the reason for this behaviour? In my local environment it works with the 404.html file, tried in many different machines and devices, so, I don’t think it is a problem with the service worker itself.

Indeed, after deploying, when going for the /404.html address in the browser, I got a not found page (the zeit’s now 404 page) instead of the (existing??) file named 404.html.

Interestingly enough, the 404.png file works normally.

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Reactions:1
  • Comments:8 (6 by maintainers)

github_iconTop GitHub Comments

2reactions
felipenmouracommented, Feb 16, 2018

@leo did you get the point of this issue? That PR you had mentioned hadn’t actually much to do with it. The problem is the file name. If the file being requested is 404.html, it will deliver the zeit’s 404 page, not the customised 404.html being requested. When the we simply rename it to anything else, it works.

I thought it had already been fixed as you had closed it, and haven’t tried it lately. Am just mentioning it here because I see @jackrobertscott has faced it and brought this issue back to light 😃

1reaction
leocommented, Nov 8, 2018

Thank you so much for the effort you have put into this issue! 😊

However, since we completely re-worked the entire codebase of Now CLI and this issue does not apply to the new code anymore, I’m closing it now.

You can read more about our biggest release yet here: https://zeit.co/blog/now-2

Read more comments on GitHub >

github_iconTop Results From Across the Web

Error 404: 4 Ways to Fix It - Hostinger
Error 404 is a response code, meaning the server could not locate the requested content. Check this article to learn 4 steps to...
Read more >
How to Fix Error 404 Not Found on Your WordPress Site - Kinsta
The Error 404 Not Found status code indicates that the origin server did not find the target resource. Check out these common causes...
Read more >
Error 404 not found - What does it mean & how to fix it! - IONOS
Open the .htaccess file (or create one if needed) in the root directory, enter this in 'ErrorDocument 404 /404.html' and save the change....
Read more >
Deploying a WAR file gives me a 404 Status Code on Tomcat?
I tried deploying it through the Tomcat Admin panel but I'm seeing the same behavior. Am I doing anything fundamentally wrong?
Read more >
HTTP Error 404 when deploying a web service
A 404 error at the beginning of the deployment operation almost certainly means that MFCS was unable to locate either the mfdeploy.exe program...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found