Unhandled Runtime Error
Recently, I encountered an issue after updating Reflex, which has left me puzzled. Prior to the update, my code was functioning seamlessly, without any alterations on my part. However, post-update, I've been confronted with an unexpected error. To clarify, there have been no changes made to the code from my end in the interim. I attempted to apply the 'keep chakra' command, hoping it might resolve the issue, but unfortunately, it had no effect. I'm reaching out to seek guidance on this matter, as it was operating perfectly just a few hours before the update.
I get three error windows where two of them are very similar:
1 of 3 unhandled errors Unhandled Runtime Error Error: Hydration failed because the initial UI does not match what was rendered on the server. Warning: Expected server HTML to contain a matching <div> in <div>. See more info here: https://nextjs.org/docs/messages/react-hydration-error
Component Stack div eval eval $f631663db3294ace$export$c760c09fdd558351 Provider $a093c7e1ec25a057$export$f78649fb9ca566b8 eval eval RadixThemesColorModeProvider ChakraColorModeProvider EnvironmentProvider ColorModeProvider ThemeProvider ThemeProvider ChakraProvider ChakraProvider2 AppWrap $ y MyApp Call Stack throwOnHydrationMismatch node_modules/react-dom/cjs/react-dom.development.js (12507:0) tryToClaimNextHydratableInstance node_modules/react-dom/cjs/react-dom.development.js (12535:0) updateHostComponent node_modules/react-dom/cjs/react-dom.development.js (19902:0) beginWork node_modules/react-dom/cjs/react-dom.development.js (21618:0) HTMLUnknownElement.callCallback node_modules/react-dom/cjs/react-dom.development.js (4164:0) Object.invokeGuardedCallbackDev node_modules/react-dom/cjs/react-dom.development.js (4213:0) invokeGuardedCallback node_modules/react-dom/cjs/react-dom.development.js (4277:0) beginWork$1 node_modules/react-dom/cjs/react-dom.development.js (27451:0) performUnitOfWork node_modules/react-dom/cjs/react-dom.development.js (26557:0) workLoopSync node_modules/react-dom/cjs/react-dom.development.js (26466:0) renderRootSync node_modules/react-dom/cjs/react-dom.development.js (26434:0) performConcurrentWorkOnRoot node_modules/react-dom/cjs/react-dom.development.js (25738:0) workLoop node_modules/scheduler/cjs/scheduler.development.js (266:0) flushWork node_modules/scheduler/cjs/scheduler.development.js (239:0) MessagePort.performWorkUntilDeadline node_modules/scheduler/cjs/scheduler.development.js (533:0)
Specifics:
- Python Version: 3.10.2
- Reflex Version: 0.4.0
- OS: Ubuntu 22.04 LTS
- Browser (Optional): Chrome
do you have a code sample that reproduces this? are you using the rx.markdown component?
do you have a code sample that reproduces this? are you using the
rx.markdowncomponent?
I have no idea what code reproduces this, I have not modified anything and this error has started to appear. The only thing I did was update reflex to 0.4.0. And I don't see that the error tells me where the failure may originate.
And I don't use the rx.markdow component
@CristianTacoronteRivero Did you delete you .web folder and / or call reflex init after the update?
@CristianTacoronteRivero Did you delete you
.webfolder and / or callreflex initafter the update?
Yes and I was still having the same problem... I'm putting components back in and sometimes it fails and other times, depending on the configuration I add, it doesn't fail. And so returning to the starting point of my project that I was on previously.
I'm getting the exact same error message, even when using just the basic reflex example app on the github home. Python Version: 3.12.0 Reflex Version: 0.4.1 OS: Windows 10
I'm getting the exact same error message, even when using just the basic reflex example app on the github home. Python Version: 3.12.0 Reflex Version: 0.4.1 OS: Windows 10
What I have done is rewriting the code and seeing where it fails, I modify it with other options and that's it... it is not a specific error, it is like when rendering, it fails depending on the way you have programmed
Facing the same error.
@rohitsathish @CristianTacoronteRivero Do you have a reproducible code in a public repo I can test out?
I'm getting the exact same error message, even when using just the basic reflex example app on the github home. Python Version: 3.12.0 Reflex Version: 0.4.1 OS: Windows 10
What reflex example app repro-ed this? Can you confirm if is still an issue in reflex v0.4.6?
I tried on Safari, and the issue is no more (with reflex v0.4 and 0.4.7).