adverse-sapphire
adverse-sapphire•14mo ago

Network request failed 0 -

When I start a new project and then try to login, I get the error message "Network request failed" What am I doing wrong?
7 Replies
kapa.ai
kapa.ai•14mo ago
Hi @shane7674. I'm kapa.ai, your friendly support bot. I will try to answer your question by searching through the knowledge base. :wave: ---------------------- Hmm, I don't know enough to give you a confident answer yet. The error message "Network request failed" typically indicates a problem with your internet connection or your server's response. It could be that your server is down or not responding correctly. However, based on the information provided in the extracts, refine allows you to customize error messages for login attempts. If the login method resolves the promise with success: false, refine automatically displays an error notification. You can customize this error message by resolving the promise with an error object that has name and message properties. Here's an example:
const authProvider: AuthBindings = {
login: async ({ email, password }) => {
// ---
return {
success: false,
error: {
name: "Login Failed!",
message:
"The email or password that you've entered doesn't match any account.",
},
};
},
// ---
};
const authProvider: AuthBindings = {
login: async ({ email, password }) => {
// ---
return {
success: false,
error: {
name: "Login Failed!",
message:
"The email or password that you've entered doesn't match any account.",
},
};
},
// ---
};
Source (https://refine.dev/docs/tutorial/understanding-authprovider/create-authprovider) If you're still having trouble, I recommend checking your server's response and your internet connection. If the problem persists, you might find it helpful to refer to the refine documentation (https://refine.dev/docs) for more information. ---------------------- Note: you can ask me a follow up question by @ mentioning me again :speech_balloon: ----------------------
kapa.ai
kapa.ai•14mo ago
<@951633046979883008> kapa.ai is still learning and improving, please let us how it did by reacting below
conscious-sapphire
conscious-sapphire•14mo ago
Hey @shane7674 , did you provide any authentication information? What endpoint are you trying to login to?
adverse-sapphire
adverse-sapphire•14mo ago
Hi @bastianwegge . Yes, the default credentials and it is trying to connect to the default appwrite endpoint. I just created the project and downloaded and ran it. Previously, I had created another project and was able to connect to my appwrite instance, but at somepoint I get the network failure message so I started over.
conscious-sapphire
conscious-sapphire•14mo ago
Mh ... unfortunately I'm not very familiar with the Appwrite implementation. Did you follow the section inside of the documentation specific to Appwrite? -> https://refine.dev/docs/packages/documentation/data-providers/appwrite/#introduction
Appwrite | refine
Introduction
conscious-sapphire
conscious-sapphire•14mo ago
There is something specific that says: refine default login screen allows you to login with username. Appwrite allows login with email, therefore we need to override the login page. But in the end I'm just poking without a clue 😅
adverse-sapphire
adverse-sapphire•14mo ago
thanks. I'll look into that...