-
-
Notifications
You must be signed in to change notification settings - Fork 290
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I cant use supabse with expo, Immediately I run the web or app, It crashes immediately #1350
Comments
I have been facing the same issue lately. When I develop locally using the Expo build, it works well, but when I try to build the app using Xcode or EAS, the app crashes. I am not sure whether this is an Expo issue or a Supabase issue. I have created a project multiple times and still face this issue after some time in the project. |
This is how I normally implement my workflow in expo:
Step 1: Create a supabase.ts file (anywhere you can easily access), then add the code:
|
It throws this error anytime I run it:
C:\Users\HomePC\Desktop\pipuApp\node_modules@expo\cli\build\src\utils\errors.js:123
throw error;
^
ReferenceError: window is not defined
at getValue (C:\Users\HomePC\Desktop\pipuApp\node_modules@react-native-async-storage\async-storage\lib\commonjs\AsyncStorage.js:63:52)
at C:\Users\HomePC\Desktop\pipuApp\node_modules@react-native-async-storage\async-storage\lib\commonjs\AsyncStorage.js:39:21
at new Promise ()
at createPromise (C:\Users\HomePC\Desktop\pipuApp\node_modules@react-native-async-storage\async-storage\lib\commonjs\AsyncStorage.js:37:10)
at Object.getItem (C:\Users\HomePC\Desktop\pipuApp\node_modules@react-native-async-storage\async-storage\lib\commonjs\AsyncStorage.js:63:12)
at getItemAsync (C:\Users\HomePC\Desktop\pipuApp\node_modules@supabase\auth-js\dist\main\lib\helpers.js:134:33)
at SupabaseAuthClient.__loadSession (C:\Users\HomePC\Desktop\pipuApp\node_modules@supabase\auth-js\dist\main\GoTrueClient.js:815:66)
at SupabaseAuthClient._useSession (C:\Users\HomePC\Desktop\pipuApp\node_modules@supabase\auth-js\dist\main\GoTrueClient.js:796:39)
at SupabaseAuthClient._emitInitialSession (C:\Users\HomePC\Desktop\pipuApp\node_modules@supabase\auth-js\dist\main\GoTrueClient.js:1242:27)
at C:\Users\HomePC\Desktop\pipuApp\node_modules@supabase\auth-js\dist\main\GoTrueClient.js:1236:22
The text was updated successfully, but these errors were encountered: