StateMismatchError when using redis #5952
|
We just enabled Redis for our reflex instances and suddently we get this error: Previously -- without Redis -- we wouldn't get that one. How to best debug this? PS: On Reflex v0.8.16 |
Answered by
ruhz3
Dec 2, 2025
Replies: 1 comment
Overviewa20f0bf Reproduceif there are references to another State and that referenced State ends up at the end of the array due to alphabetical ordering, an error will occur. CauseThe root cause is variable shadowing in the Redis-side module. As mentioned earlier, this has already been fixed in the current main branch. |
0 replies
Answer selected by
masenf
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Overview
a20f0bf
I was also looking into the issue above. In conclusion, it’s a bug that occurs because the state_cls variable is being reused in the Redis interface class. Refer to the corresponding commit and apply the fix yourself, or wait for the latest version.
Reproduce
if there are references to another State and that referenced State ends up at the end of the array due to alphabetical ordering, an error will occur.