Skip to content
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

Open
qal-technologies opened this issue Jan 9, 2025 · 1 comment
Labels
bug Something isn't working

Comments

@qal-technologies
Copy link

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

@qal-technologies qal-technologies added the bug Something isn't working label Jan 9, 2025
@Mohammed-Yasin-Mulla
Copy link

Mohammed-Yasin-Mulla commented Jan 10, 2025

I have been facing the same issue lately.
If I console log all the .envs in the Expo app, I can read them without any issues, but the moment I try to initialise a Supabase client, I get the error saying that the Supabase URL is required.

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants