Multiple 404 errors for internal Next.js and custom files during page rendering in Next.js 15
Answered
Longtail tuna posted this in #help-forum
Longtail tunaOP
Hi everyone,
I’m encountering a strange issue while rendering some pages in my Next.js 15 app. Occasionally, I see a series of 404 errors in the console for files that seem to be either internal to Next.js or part of my project. Here are a few examples:
(These are just some examples — I get several similar errors.)
I'm not sure why these requests are being made or why they fail. Could this be related to something misconfigured in my project? Is it possible that these missing files are affecting other issues I'm having in my app?
Any insight or guidance would be greatly appreciated. Thanks in advance!
I’m encountering a strange issue while rendering some pages in my Next.js 15 app. Occasionally, I see a series of 404 errors in the console for files that seem to be either internal to Next.js or part of my project. Here are a few examples:
GET /_next/src/createBrowserClient.ts 404 in 1103ms
GET /_next/src/cookies.ts 404 in 1222ms
GET /_next/src/createServerClient.ts 404 in 1299ms
GET /src/lib/errors.ts 404 in 1235ms
GET /src/lib/fetch.ts 404 in 1563ms
GET /_next/src/RealtimeClient.ts 404 in 1690ms
GET /_next/static/runtime.ts 404 in 3120ms
GET /_next/internal/helpers.ts 404 in 3421ms
(These are just some examples — I get several similar errors.)
I'm not sure why these requests are being made or why they fail. Could this be related to something misconfigured in my project? Is it possible that these missing files are affecting other issues I'm having in my app?
Any insight or guidance would be greatly appreciated. Thanks in advance!
Answered by Longtail tuna
I made some changes to the project... I replaced Supabase Auth with BetterAuth, and that seems to have resolved the errors for now. Thanks @Dutch for your help!
10 Replies
@Dutch check network tab when refresh
Longtail tunaOP
Hi, @Dutch
It seems like the errors start appearing after the page has already loaded, and I’m actually not seeing them in the list of requests. Also, none of the requests that appear in the network tab of my browser while loading a page are returning a 404.
No clue of what's happening 😥
It seems like the errors start appearing after the page has already loaded, and I’m actually not seeing them in the list of requests. Also, none of the requests that appear in the network tab of my browser while loading a page are returning a 404.
No clue of what's happening 😥
@Longtail tuna Hi, <@1257609464811487255>
It seems like the errors start appearing after the page has already loaded, and I’m actually not seeing them in the list of requests. Also, none of the requests that appear in the network tab of my browser while loading a page are returning a 404.
No clue of what's happening 😥
Dutch
rerun npm run dev command and check again
but before make sure that you have this files like
createBrowserClient.ts
in src@Dutch but before make sure that you have this files like `createBrowserClient.ts` in src
Longtail tunaOP
createBrowserClient is a function from @supabase/ssr that I'm using for authentication.
I'm using it just in one file... Also I have a middleware from supabase too, dont know if it could cause this type of error.
I rerun my application as you say, but get the same result 😦
I'm using it just in one file... Also I have a middleware from supabase too, dont know if it could cause this type of error.
I rerun my application as you say, but get the same result 😦
@Longtail tuna createBrowserClient is a function from @supabase/ssr that I'm using for authentication.
I'm using it just in one file... Also I have a middleware from supabase too, dont know if it could cause this type of error.
I rerun my application as you say, but get the same result 😦
Dutch
what, its giving totally unrelated errors :?!
rm -rf node_modules .next package-lock.json && npm i && npm run dev
@Dutch `rm -rf node_modules .next package-lock.json && npm i && npm run dev`
Longtail tunaOP
Done, but it happend again
@Longtail tuna Done, but it happend again
Dutch
So weird, probably middleware. Remove middleware and try again
@Dutch So weird, probably middleware. Remove middleware and try again
Longtail tunaOP
I made some changes to the project... I replaced Supabase Auth with BetterAuth, and that seems to have resolved the errors for now. Thanks @Dutch for your help!
Answer