Not Found Error on sveltekit project
I am getting a weird error "Not Found" on my sveltekit hosted on cloudflare worker
whenever i do CMD+ShIFT+R, its shows not found error, never used to come until today. nothing was updated on my site since weeks.

52 Replies
Can you access the worker in the CF dashboard?
yes

able to access correct on
jhs-frontend.justhomestayinfo.workers.dev
only issue with custom domain
i checked my DNS it looks fine
can you please help bro? i really don't know what is the problem 😅
Ah definitely a DNS issue then, what is the custom domain? I can help in about 15 min
ok
justhomestay.in
Your website is up!
still same bro 😅

do cmd+shift+r couple of times and you will see the issue
see
I am in chrome and cannot reproduce, which browser are you using?
firefox and chrome both
see in chrome

you can check my dns record? do you need any access?
Interesting, intermittent 404. Can you reproduce using the jhs-frontend.justhomestayinfo.workers.dev domain?
let me check
I think we can rule out DNS since the 404 is intermittent, it is more likely an issue with caching or svelte
unable to reproduce in worker domain
but if its a svelte issue then worker domain will also be similar right?
only able to see this with custom domain
Ok and this only happens on the homepage for you? Or other pages as well?
ok let me check on some other page
happens in other pages too
no issues with jhs-frontend.justhomestayinfo.workers.dev at all 😂
so weird! Im doing some digging
thanks for your help tho 😅

Can you trigger a 404, and inspect the 'cf-cache-status' response header? I would do it myself but I really cannot reproduce
can't see that

i can share the login details for the dashboard
see my cache settings
i think its all default only
as my dumb client keeps on changing things a lot
Actually sorry can you screenshot the response headers for one of the css or js files that is 404 status
ok
instead of the HTML route
Right now I am trying to rule out a caching issue
all the css/js is 200, only root / and favicon is 404
Oh interesting, in the 3rd screenshot you posted I saw some css files

no header content
sorry, this is header tab

should i purge cache?
i was just hard reloading and found that favicon route is showing the html content

haha wut
Can you open the headers tab on that

here is my worker wrangler.jsonc

Oh its probablyy the fallback 404 page
oh ok
Ok next steps here, are you able to find any real time worker logs for any uncaught exceptions that throw during the 404?
might have to trigger it again with your logs open
let me enable realtime logs and check
Im wondering if you have some server side code that occasionally fails, and we are seeing the result of that
yes, enabling live logs and doing it
but working everytime with worker.dev domain?
yes that is suspicious


this is in client account, i have other personal applications on my account, that is working just fine
can't i share this account login details with you?
that will be easier?
Ok at this point, my assumption/gut feeling is that you're experiencing a silent failure on the server, and it's not being logged or caught. I think the 404s are a symptom of this.
The next step would be to implement some middleware that wraps every network request, and will catch any errors.
Would love to help with this, but I need to head out the door in a few minutes. Want to DM me and I can help later?
sure i can DM
I would not do this with anyone FYI!