You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
See that this is the remix starter with a small change. This page incudes a loader that returns a promise, since we're preparing to migrate to RR7 we are not using defer. In your browser you will see a loading message and then once the promise rejects you will see this is picked up by the error component for the Await and will see the text "error message"
This is the expected behaviour for that URL.
Now open the page /fail
open http://localhost:5173/fail
This page uses the same page component as the index page. See the routes.ts file. But this route is nested in a layout. The layout has it's own loader and this issues a redirect response, in the real world this may be a route that is responsible for checking if a user is logged in and issuing a redirect response where required.
When opening the page /fail you should be redirected to the index page / and the remix server should not crash
Actual Behavior
You are redirected to the index page. However the remix server has crashed, if you reload the page again you will see the server can not be reached.
The console will show an error from an unhandled promise rejection.
The text was updated successfully, but these errors were encountered:
It is worth noting that if you are using the now deprecated defer this issue does not happen.
Issue discovered while migrating our application and adopting all future flags for RR7
Reproduction
https://github.com/thomaswelton/remix-promise-rejection
Install dependencies and start local dev server
Navigate to the index page in a browser
See that this is the remix starter with a small change. This page incudes a loader that returns a promise, since we're preparing to migrate to RR7 we are not using defer. In your browser you will see a loading message and then once the promise rejects you will see this is picked up by the error component for the Await and will see the text "error message"
This is the expected behaviour for that URL.
Now open the page
/fail
This page uses the same page component as the index page. See the
routes.ts
file. But this route is nested in a layout. The layout has it's own loader and this issues a redirect response, in the real world this may be a route that is responsible for checking if a user is logged in and issuing a redirect response where required.System Info
Used Package Manager
npm
Expected Behavior
When opening the page
/fail
you should be redirected to the index page/
and the remix server should not crashActual Behavior
You are redirected to the index page. However the remix server has crashed, if you reload the page again you will see the server can not be reached.
The console will show an error from an unhandled promise rejection.
The text was updated successfully, but these errors were encountered: