Closed kylegwalsh closed 8 months ago
I rolled my codebase way back and it seemed to start working again. Perhaps there is another confounding factor that was introduced a few weeks ago but didn't show up until recently. I'll continue to look into this issue on my end.
Preliminary Checks
[X] I have reviewed the documentation: https://clerk.com/docs
[X] I have searched for existing issues: https://github.com/clerk/javascript/issues
[X] I have not already reached out to Clerk support via email or Discord (if you have, no need to open an issue here)
[X] This issue is not a question, general help request, or anything other than a bug report directly related to Clerk. Please ask questions in our Discord community: https://clerk.com/discord.
Reproduction / Replay Link
https://drive.google.com/file/d/1aTBuCxsLnaQOur4hY_VJRHoA5hH0MjAB/view?usp=sharing
Publishable key
pk_test_Y2xlcmsuY3Jpc3Auc2Vhc25haWwtOTEubGNsLmRldiQ
Description
To start, I started seeing the following error when the user signs out:
"Uncaught Error: Rendered fewer hooks than expected. This may be caused by an accidental early return statement in React Hooks"
I tracked the error down to the following line of code in the
ClerkContextProvider.js
:Perhaps the listener is being skipped once during signout?
This issue randomly popped up over this past weekend without any code changes. This leads me to believe it either relates to a change at the iOS level or a backend change on the clerk side that is somehow detached from the version of clerk-expo (it happens in both the
0.10.6
and0.19.22
clerk-expo versions)?This issue seems to only impact native apps (I tested on iOS) - not web.
Steps to reproduce:
useSignOut()
hookExpected behavior:
The user should sign out without any errors and be able to log back in. This is how it behaved for the past 6 months without issues.
Actual behavior:
The app will crash and trigger its error boundary with the aforementioned error message.
Environment