Convex + Clerk crashing in react-native after using the new Convex Auth
Hi Convex team,
I have 2 applications:
1 react-native-expo app using
convex.dev (+ clerk for authentication)
. This app has been happily working fine for the past 4 months.
1 nextjs
app (app router). For the nextjs
app, I have decided to use the new Convex Auth
library. So I followed the official documentation here https://labs.convex.dev/auth. I have successfully setup the new convex auth
in dev and in production. And everything works fine in the web.
Here is now my auth config with the 2 entries: the first entry is used with clerk (this is how I started my application). The second entry is the new convex auth
:
This morning, I decided to spin up my react native expo (using same convex backend). I'm observing that clerk
is crashing at start.
I'm not saying whether the crash is caused by this new setup (I have already filed an issue in the clerk
forum). But I'm just investigating whether the crash could be related to the my new setup.
Also I am hesitating to rollback my changes given that new tables related to authentication have already been created (in dev and in prod).
Can I safely rollback my changes (and see if it fixed my issues?)
Thank you for your support.5 Replies
It's always safer to experiment in dev than prod (assuming you have users). but yes it's ok to deploy a schema that doesn't list all the tables that are actually existing - it won't delete data. When you later deploy with the auth tables again, it will validate that all the documents in the DB match the schema you're deploying.
If you made schema changes that are not backwards compatible then deploying the old schema might not work - e.g. you might have to change some field to optional if you deprecated/removed one, or add an optional field for a field that you had added. https://search.convex.dev/?q=migration has some good Stack articles on migrations
Convex Developer Search
Search Docs, Stack, Discord all at once
I'm observing that clerk is crashing at start.What exactly are you observing? Do you have an error message?
When app is starting, it crashes with below error:
It is worth noting that seems to occur only on
android
(my app is a react-native + expo app). I haven't observed it yet on ios
.Hmm, that's really weird. That suggests
React
itself is somehow null.
The cjs version has this code:
Hi @Michal Srb I reverted the app a few early commits back where everything was working and rewrote the app from there. I believe something went wrong with some dependencies and they messed up
convex
(??).