Next.js Discord

Discord Forum

14.1.4 -> 14.2.0 err: Element type is invalid. Received a promise that resolves to: [object Object]

Unanswered
Pacific herring posted this in #help-forum
Open in Discord
Pacific herringOP
Hello, longtime app router user here. Hosting with Docker successfully for 6+ months. I upgraded to 14.2.0 yesterday and I'm receiving this error when routing between pages. Only seems to happen in prod so far. Random routes, doesn't happen 100% of the time. I'm deploying 14.2.1 right now but not expecting a change, probably will revert back to 14.1.4... Would love any help.

9 Replies

Pacific herringOP
I decided to downgrade to 14.1.4 because 14.2.1 does not seem relevant to this error. I am unable to reproduce the bug now. We saw it a lot today but couldn't pin it down until now, really hoping this gets some attention.
Does this have anything to do with it
I heard pigment-css fixes some issues with MUI in NextJS but I never used MUI in Next so idk if this was something related to your issue
Pacific herringOP
I don’t think so, unless this is part of MUI components which seems unlikely cause it’d be a breaking change. Really appreciate you giving it some eyes though!
Taiwan Dog
do you also get this error when running build and start on local dev env?
Taiwan Dog
also, do you mean random routes as in accessing /auth/login show error the first time, but doesn't second time etc? or /auth/login and /dashboard show error but never with others?
Pacific herringOP
Hey @Taiwan Dog

No errors building or starting on local dev.

Random routes as in:

Sentry errors showed it coming from half a dozen pages, I could not reproduce those.

I found one page whereby I could reproduce a good 90% of the time but not 100%. Process was:

* Navigate directly to a particular page through address bar
* Click a particular internal link
* Immediate error in browser console, hard crash 500 page, only recoverable by browser reload…
* …except sometimes it worked totally fine

Error rate on that page was a good 90%. Directly navigating to the target page worked 100% of the time.