Loading chunk 18 failed
Unanswered
Giant Angora posted this in #help-forum
Giant AngoraOP
Hello, I recently noticed that my app when it is opened in a mobile browser, throws an error like the following:
This is happening in some browsers only, in others everything is fine. I've added an error boundary to my app in order to be able to see this error from my phone, any ideas why is Next failing to load this chunk on some mobile browsers?
The error is being caught by my
Something went wrong!
Loading chunk 18 failed. (missing: https://example.com/_next/static/chunks/18-1fdf0a0f5339858d.js)`
This is happening in some browsers only, in others everything is fine. I've added an error boundary to my app in order to be able to see this error from my phone, any ideas why is Next failing to load this chunk on some mobile browsers?
The error is being caught by my
global-error.tsx
'use client';
import { Button } from '@/app/components/ui/button';
export default function GlobalError({
error,
reset,
}: {
error: Error & { digest?: string };
reset: () => void;
}) {
return (
<html>
<body>
<h2>Something went wrong!</h2>
{error.message}
<Button onClick={() => reset()}>Try again</Button>
</body>
</html>
);
}