Back

[AppwriteException: Network request failed]

  • 0
  • React Native
  • Cloud
Ankit Singh
10 May, 2024, 16:56

https://www.youtube.com/watch?v=ZBCUegTZF7M I have create same configuration in appwrite

Even tried web sdk to create

import {ID, Client, Account} from 'appwrite'; const client = new Client() client .setEndpoint("https://cloud.appwrite.io/v1") .setProject("663e447a00044fa78950"); const account = new Account(client); export const createUser = () => { // Register User account.create(ID.unique(), 'me@example.com', 'password', 'Jane Doe') .then(function (response) { console.log(response); }, function (error) { console.log(error); }); }

inside react native on Touchable opacity button i'm calling createUser function i'm getting the network request failed error

TL;DR
Developers are experiencing network request failed exceptions. Check emulator connectivity by accessing https://cloud.appwrite.io. Restart emulator if needed. Make sure context is not missing children in GlobalProvider.js.
Ankit Singh
11 May, 2024, 07:00

yes in console log i'm getting this error [AppwriteException: Network request failed]

Steven
11 May, 2024, 07:00

what’s the full logs?

Ankit Singh
11 May, 2024, 07:53

sometimes it works and sometime it doesn't

Ankit Singh
11 May, 2024, 07:58

Logs

Steven
11 May, 2024, 15:22

Could it be your Internet connection?

Ankit Singh
12 May, 2024, 10:54

internet connection is working

Steven
12 May, 2024, 14:29

Weird... I've seen some failed connections, but not a frequent as what you're showing 🧐

Ankit Singh
13 May, 2024, 02:17

Actually i'm calling createUser appwrite api on a react native button click

Ankit Singh
13 May, 2024, 02:36

Sometimes it works when i start makes changes in file it stops and then at random time it start working

Steven
13 May, 2024, 03:18

Still.. I'm not sure why you're getting a failed network request error

Ankit Singh
13 May, 2024, 04:21

i can provide my github repo

Steven
13 May, 2024, 04:22

You'll need to find a way to debug the network request

Ankit Singh
13 May, 2024, 17:31

I have open in js debug react native app but network insepctor not working

Ankit Singh
13 May, 2024, 17:33

i'm react native sdk react-native-appwrite

Steven
13 May, 2024, 19:10

maybe you need to enable internet permissions for android?

Ankit Singh
14 May, 2024, 14:33

Somtimes it works gives response of created user and some time it gives request error

Steven
14 May, 2024, 14:57

can you share a repo with your code?

Ankit Singh
14 May, 2024, 18:38
Ankit Singh
14 May, 2024, 18:39

https://github.com/ankitjasbeersingh/Nora/blob/main/lib/appwrite.js

in this file i'm using appwrite sdk for react native

Steven
15 May, 2024, 00:12

may i test against your project?

Ankit Singh
15 May, 2024, 16:37

yes sure

Steven
15 May, 2024, 22:59

im not seeing these network errors. I see:

[AppwriteException: User (role: guests) missing scope (account)]

which is expected since I'm not logged in. And then I see a white page

Steven
15 May, 2024, 23:00
Steven
15 May, 2024, 23:00
Reply

Reply to this thread by joining our Discord

Reply on Discord

Need support?

Join our Discord

Get community support by joining our Discord server.

Join Discord

Get premium support

Join Appwrite Pro and get email support from our team.

Learn more