authClient.signIn.email returns status 0 with empty statusText — No descriptive error

I'm trying to implement email/password sign-in using authClient.signIn.email inside a React Native (Expo) project, but I’m getting a bland, unhelpful error message:
Copy
Edit
(NOBRIDGE) LOG Email Sign-In Error: {"status": 0, "statusText": ""}
(NOBRIDGE) LOG User: {"data": null, "error": {"status": 0, "statusText": ""}}
Copy
Edit
(NOBRIDGE) LOG Email Sign-In Error: {"status": 0, "statusText": ""}
(NOBRIDGE) LOG User: {"data": null, "error": {"status": 0, "statusText": ""}}
Code :
const handleEmailLogin = async () => {
try {
const user = await authClient.signIn.email(
{
email,
password,
},
{
onError(ctx) {
console.log('Email Sign-In Error:', ctx.error);
},
},
);

console.log('User:', user);
router.replace('/home');
} catch (error: any) {
console.error('Email Sign-In Error:', error);
Alert.alert(
'Sign In Failed',
error.message || 'An error occurred during sign in.',
);
}
};
const handleEmailLogin = async () => {
try {
const user = await authClient.signIn.email(
{
email,
password,
},
{
onError(ctx) {
console.log('Email Sign-In Error:', ctx.error);
},
},
);

console.log('User:', user);
router.replace('/home');
} catch (error: any) {
console.error('Email Sign-In Error:', error);
Alert.alert(
'Sign In Failed',
error.message || 'An error occurred during sign in.',
);
}
};
5 Replies
KiNFiSH
KiNFiSH4w ago
can you check up on your auth config
bekacru
bekacru4w ago
this is cause the fetch request couldn't properly reach the server
Rinshin
RinshinOP4w ago
How can i make sure if it reaches server or not
bekacru
bekacru4w ago
if it's local server and you're running emulator check how to forward ports
Rinshin
RinshinOP4w ago
I am using expo with --tunnel

Did you find this page helpful?