You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
TypeError: Network request failed on sign up / sign in on Android #879
bugSomething isn't workinghas workaroundIssue has a valid workaround.temp - locksTemporary label to group together all the lock-related issues and PRs.
Signing in or up on Android emulator locally results in TypeError: Network request failed. This error only shows up on the Android emulator and not the iOS one
Started happening to me too once locally running supabase, since last year i changed nothing but only running supabase locally instead of having it hosted online and it keeps giving me network request failed aswell.
+1 on this. I also get the Network request failed on Android Emulator and additionally, the session is not available after login. No such issues with ios simulator
Reacted by Ian Hafkenschiel, Max Shen and Sagar Tiwari
I've since then switched to developing with Supabase Cloud. No such problems whatsoever. Haven't exceeded the limits on the free tier either so far. Would suggest the same if you've been blocked by this for a while
Reacted by Rustem Shakirov, Rouslan Gabiss and Volodymyr Zakhovaiko
My problem was in supabase api url - instead of default I replaced it with http://10.0.2.2:54321 as your emulator does not work with http://127.0.0.1:54321.
The reason is that 10.0.2.2 points to your actual machine instead of some loopback service.
@caseydierking try this and let me know if it works for you
@carodej Unfortunately it did not work. Out of curiosity, I wondered if it was because of an http/https issue. So I tunneled it through ngrok and it worked. That is not a great long term solution though.
My problem was in supabase api url - instead of default I replaced it with http://10.0.2.2:54321 as your emulator does not work with http://127.0.0.1:54321.
The reason is that 10.0.2.2 points to your actual machine instead of some loopback service.
@caseydierking try this and let me know if it works for you
Changing the supabaseUrl from http://127.0.0.1:54321/ to http://10.0.2.2:54321/ fixed it for Android, but then iOS got the Network request failed error. So seems like you need to either use conditional logic that checks the platform, like Platform.select(...) and return the appropriate url, or read the expoConfig.hostUri as mentioned by @JacobJaffe.
I went with the expoConfig approach. Also, it looks like they fixed the types on that so no need for casting to unknown.
importConstantsfrom"expo-constants";// Types on this are wrong. This exists, and `host` does not.constorigin=(Constants?.expoConfigasunknownas{hostUri?: string})?.hostUri?.split(":").shift();if(!origin)thrownewError("Could not determine origin");constsupabaseUrl=`http://${origin}:54321`;
This is very similar to what is typically needed to connect to local Firebase projects.
As a sanity check, I'd recommend logging hostUri, and try going to hostUri:54323 in your phone's browser. That should show the Supabase dashboard.
FWIW, this should apply for both ios and android. This is JS issue, not a native issue
After spending two days troubleshooting this issue, I found that the root cause was related to the initial project location setting in Supabase. My original project was created with Singapore as the region, while I am based in India.
To resolve this, I created a new Supabase project and selected India as the region. This adjustment immediately resolved the issue.
Recommendation: When creating a new Supabase project, make sure to select a region close to your actual location to avoid connectivity issues.
In my case, this happened because I was using the remote Supabase instance, but I wanted to switch to a local one for convenience. When I did that, I encountered an error. To fix it, I cleared the cache from the Expo app, and it worked.
bugSomething isn't workinghas workaroundIssue has a valid workaround.temp - locksTemporary label to group together all the lock-related issues and PRs.
Activity
Killbyfire commentedon Oct 17, 2023
Started happening to me too once locally running supabase, since last year i changed nothing but only running supabase locally instead of having it hosted online and it keeps giving me network request failed aswell.
atanaskanchev commentedon Oct 19, 2023
+1 on this. I also get the
Network request failedon Android Emulator and additionally, the session is not available after login. No such issues with ios simulatoratanaskanchev commentedon Oct 19, 2023
Here some debug logging from auth
atanaskanchev commentedon Oct 19, 2023
Tried downgrading to
"@supabase/supabase-js": "2.33.2"but the issue is still there. I wonder if it's related to Sonomaatanaskanchev commentedon Oct 19, 2023
Will make a PlayStore build to see if this is only local and report back
maxwowo commentedon Oct 22, 2023
I've since then switched to developing with Supabase Cloud. No such problems whatsoever. Haven't exceeded the limits on the free tier either so far. Would suggest the same if you've been blocked by this for a while
caseydierking commentedon Feb 25, 2024
I'm running into this on Android Emulator and iOS on Expo Go. Anyone get around this other than using Supabase Cloud?
carodej commentedon Feb 26, 2024
My problem was in supabase api url - instead of default I replaced it with
http://10.0.2.2:54321as your emulator does not work withhttp://127.0.0.1:54321.The reason is that 10.0.2.2 points to your actual machine instead of some loopback service.
@caseydierking try this and let me know if it works for you
caseydierking commentedon Feb 28, 2024
@carodej Unfortunately it did not work. Out of curiosity, I wondered if it was because of an http/https issue. So I tunneled it through ngrok and it worked. That is not a great long term solution though.
atanaskanchev commentedon Feb 29, 2024
@caseydierking this solved it for me:
EXPO_PUBLIC_SUPABASE_URL=http://192.168.1.110:54321caseydierking commentedon Mar 2, 2024
@atanaskanchev That worked. Thanks!
Teegreat commentedon Mar 30, 2024
This worked. Thank you!
TARishabh commentedon Apr 7, 2024
changing the supabaseUrl from http://127.0.0.1:54321 to http://10.0.2.2:54321 worked for me.
BigDrems commentedon Jun 21, 2024
How did you change your url?
2 remaining items
blwinters commentedon Sep 9, 2024
Changing the
supabaseUrlfrom http://127.0.0.1:54321/ to http://10.0.2.2:54321/ fixed it for Android, but then iOS got theNetwork request failederror. So seems like you need to either use conditional logic that checks the platform, likePlatform.select(...)and return the appropriate url, or read theexpoConfig.hostUrias mentioned by @JacobJaffe.I went with the
expoConfigapproach. Also, it looks like they fixed the types on that so no need for casting tounknown.Mvrs commentedon Oct 3, 2024
Thank you! This worked 🔥
pammu453 commentedon Nov 7, 2024
Error while SignUp
Please some one help me
@caseydierking @blwinters @Mvrs @carodej
pammu453 commentedon Nov 7, 2024
After spending two days troubleshooting this issue, I found that the root cause was related to the initial project location setting in Supabase. My original project was created with Singapore as the region, while I am based in India.
To resolve this, I created a new Supabase project and selected India as the region. This adjustment immediately resolved the issue.
Recommendation: When creating a new Supabase project, make sure to select a region close to your actual location to avoid connectivity issues.

angelroma commentedon Feb 8, 2025
In my case, this happened because I was using the remote Supabase instance, but I wanted to switch to a local one for convenience. When I did that, I encountered an error. To fix it, I cleared the cache from the Expo app, and it worked.
For Android, I used:
EXPO_PUBLIC_SUPABASE_URL=http://10.0.2.2:54321 instead.
raozhaizhu commentedon Jun 28, 2025
grazie
fix: update session warning (#879)
chore(master): release 2.63.1 (#878)
SharmaVrishab commentedon Feb 23, 2026
i am seeing the same error i am using supabase for authentication
mandarini commentedon Feb 24, 2026
@SharmaVrishab Does the workaround work for you?
mandarini commentedon May 26, 2026
Here is the refactor: #2392
Published under
2.107.0-beta.1.Instructions on how to migrate are here.
Non breaking change, backwards compatible. Please let me know if you try it out, we're trying to evaluate this before publishing.
@maxwowo @SharmaVrishab