Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Any type of Error is correct in SSR but in CSR is always Error #6187

Closed
1 task done
pkasarda opened this issue Apr 26, 2023 · 4 comments · Fixed by #6675
Closed
1 task done

Any type of Error is correct in SSR but in CSR is always Error #6187

pkasarda opened this issue Apr 26, 2023 · 4 comments · Fixed by #6675
Labels
bug Something isn't working feat:routing

Comments

@pkasarda
Copy link

pkasarda commented Apr 26, 2023

What version of Remix are you using?

1.15.0

Are all your remix dependencies & dev-dependencies using the same version?

  • Yes

Steps to Reproduce

// error-route.tsx

export async function loader(args: LoaderArgs) {
    referenceError;
}


export default function ReferenceErrorPage() {
    return <main>ReferenceErrorPage</main>;
}

root.tsx

export const ErrorBoundary = () => {
    const error = useRouteError();

    console.log((error as Error).toString()); // Error: referenceError is not defined
    console.log((error as Error).name); // Error
    console.log((error as Error).message); // referenceError is not defined
    console.log((error as Error).stack); // ReferenceError: referenceError is not defined

    return (
        <html lang="en">
            <head>
                <Meta />
                <Links />
            </head>
            <body>
                <div>{error.name}</div>
                <Scripts />
            </body>
        </html>
    );

}

Expected Behavior

No error and correct error type

Actual Behavior

warning: Text content did not match. Server: "ReferenceError" Client: "Error"
@brophdawg11
Copy link
Contributor

This is fixed in #6675 and should be available in the next release after 1.18.1

@brophdawg11 brophdawg11 added the awaiting release This issue has been fixed and will be released soon label Jun 30, 2023
@github-actions
Copy link
Contributor

github-actions bot commented Jul 1, 2023

🤖 Hello there,

We just published version v0.0.0-nightly-7abaf9f-20230701 which involves this issue. If you'd like to take it for a test run please try it out and let us know what you think!

Thanks!

@github-actions
Copy link
Contributor

🤖 Hello there,

We just published version 1.19.0-pre.0 which involves this issue. If you'd like to take it for a test run please try it out and let us know what you think!

Thanks!

@github-actions
Copy link
Contributor

🤖 Hello there,

We just published version 1.19.0 which involves this issue. If you'd like to take it for a test run please try it out and let us know what you think!

Thanks!

@brophdawg11 brophdawg11 removed the awaiting release This issue has been fixed and will be released soon label Dec 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working feat:routing
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants