Open kushagra010 opened 1 year ago
Unfortunately that call stack is almost completely unhelpful :( The only thing I see that's useful in there is the reference to queueMicrotask
, which we only call in two places: the RTKQ middleware, and the autoBatchEnhancer
.
Can you show an actual repo that demonstrates this happening? Is there any way to create a minimal repro of just this problem, maybe as an Expo Snack that runs on the web?
Since this appears to be RN, it's going to be much harder for us to investigate this.
Sure, let me check if I can reproduce it on Expo Snack. Thanks for the quick response.
@markerikson Here's the repo for issue reproduction.
Currently reduxjs/toolkit
version is set to 1.9.1
which is breaking. But changing it to 1.8.6
works.
Hey, @markerikson Any update on this?
@kushagra010 Nope, sorry. Haven't had time to look at this.
@kushagra010不,谢谢。没时间看这个。
I also encountered this problem. Object a can no longer nest object a。
I'm currently upgrading project to latest versions of packages like react 17 -> 18, react native 0.68 -> 0.71, expo 46 -> 48, etc. and spent almost HALF OF DAY to find where this Maximum call stack size...
issue is comes from!!
Thx to @kushagra010 , downgrading to version 1.8.6 helps and everything is working like a sharm with latest versions of all packages...except redux-toolkit -_-
@AtoianAvetik downgrading isn't an "answer", it's a workaround.
Out of curiosity, what happens if you use the latest RTK 2.0 alphas instead?
@markerikson Hi! Thx for answer, yep, I'm agree with you that this is just workaround. About RTK 2.0, I didn't test it since our team policy restricts developers from using unstable versions of any packages. Later, once current upgrade process will be done, I will check :)
@markerikson I checked on RTK's 2.0.0-alpha.5
version. And it is still breaking with the same error. You can reproduce the issue by bumping the version to 2.0.0-alpha.5
in the repo mentioned https://github.com/reduxjs/redux-toolkit/issues/3023#issuecomment-1363979590
@kushagra010 Circling back to this issue:
Unfortunately I don't use RN at all, and I don't have time to try to figure out how to run RN projects locally or debug them.
Can you try converting this to an Expo Snack, or at least an Expo project with a Web target? If so, does it happen in that environment?
@markerikson Sorry for not getting back to you sooner.
I tried creating the replica of my above (https://github.com/reduxjs/redux-toolkit/issues/3023#issuecomment-1363979590) reproduction repo in an expo project with Android target and it is working fine even on 1.9.1
and above. Here's the expo project for reference https://github.com/kushagra010/my-app
So, it seems like the issue persists in the React Native CLI
project only.
Realistically, we don't have time to go debugging into RN projects any time soon.
We did make some changes to the RTKQ internals in 2.0. Can someone please try out 2.0 and see if that fixes things?
Getting the below error after upgrading to
v1.9.1
fromv1.8.6
. There is no issue if onv1.8.6
.package.json