I am encountering a persistent issue in my Next.js application whenever I load a specific page. The console logs multiple 404 errors related to _nextjs_original_stack_frame, as shown below:
Failed to load resource: the server responded with a status of 404 (Not Found) http://localhost:3000/_nextjs_original_stack_frame?...
What I've tried so far:
Verified that my next.config.js has no unusual custom configurations that could interfere with routing. Cleared the .next folder and rebuilt the application. Confirmed that process.env.__NEXT_ROUTER_BASEPATH is either correctly set or unused in the project. Checked the server routes to ensure all expected routes are available. Logged query parameters being passed to _nextjs_original_stack_frame to debug if they are malformed. Setup:
Next.js version: 15.0.4 Running in development mode (npm run dev) No custom _next handling in next.config.js Expected behavior: The page should load without errors, and the console should not log 404s.
Actual behavior: The browser console logs multiple 404 errors for _nextjs_original_stack_frame, and the errors seem to relate to the hot reloading or stack frame fetching process.
Question: What might cause these _nextjs_original_stack_frame 404 errors, and how can I resolve them? Are they related to development tooling or potentially incorrect server-side configurations?
Screenshot: