
I tried to follow almost every tutorials available online to solve this error but those all didn't work along with it even javascript AppwriteException: Network request failed
even this error is printed in the console


can you send all the browser console logs?

AppwriteException: Network request failed
AppwriteException sdk.js:76
call sdk.js:398
rejected sdk.js:23
promise callback*step sdk.js:24
__awaiter sdk.js:25
__awaiter sdk.js:21
call sdk.js:335
create sdk.js:469
__awaiter sdk.js:25
__awaiter sdk.js:21
create sdk.js:444
signUpUser Signup.jsx:33
React 23
renderReactElement index.js:346
doRender index.js:489
_render index.js:507
asyncGeneratorStep _async_to_generator.js:13
_next _async_to_generator.js:31
_asyncToGenerator _async_to_generator.js:36
_asyncToGenerator _async_to_generator.js:28
_render index.js:525
render index.js:498
_hydrate index.js:639
asyncGeneratorStep _async_to_generator.js:13
_next _async_to_generator.js:31
promise callback*asyncGeneratorStep _async_to_generator.js:22
_next _async_to_generator.js:31
promise callback*asyncGeneratorStep _async_to_generator.js:22
_next _async_to_generator.js:31
promise callback*asyncGeneratorStep _async_to_generator.js:22
_next _async_to_generator.js:31
promise callback*asyncGeneratorStep _async_to_generator.js:22
_next _async_to_generator.js:31
_asyncToGenerator _async_to_generator.js:36
_asyncToGenerator _async_to_generator.js:28
_hydrate index.js:641
hydrate index.js:528
<anonymous> next-dev.js:40
promise callback* next-dev.js:35
NextJS 7```

@Berserker where is your client init?

you created an instance of Client
called client
, but you are not setting the endpoint, projectid

@safwan again thnx bro lemme try it out

@safwan javascript client.setEndpoint(process.env.END_PT).setProject(process.env.PROJECT_ID);
this code is causing the above error

@safwan whereas setting the endpoint and project id **as string ** directly , rather than importing them from the .env file is not causing any error

that seems like a problem with the ENV variables then.
Are you setting the ENV variables like so?
END_PT=https://your-domain.com/v1

Sometimes people store ENV variables in double quotes, which can be an issue

Another thing to check, is if you're rebuilding the app after adding the ENV variables?

Nope

Yes bro i didn't use double quotes

@safwan lemme try that out bro

yep try rebuilding the app

I did that for more than 3 times as of now ðŸ˜

you're using nextjs 13?

@Steven yes

maybe try prefixing the env var with NEXT_PUBLIC_
. See https://nextjs.org/docs/basic-features/environment-variables#exposing-environment-variables-to-the-browser

@Steven okie

@Steven it worked thank u

[SOLVED] CORS - request did not succeed

[SOLVED] CORS request did not succeed
Recommended threads
- Stuck in "deleting"
my parent element have relationship that doesnt exist and its stuck in "deleting", i cant delete it gives me error: Collection with the requested ID could not b...
- Help with 409 Error on Relationship Setu...
I ran into a 409 document_already_exists issue. with AppWrite so I tried to debug. Here's what I've set up: Collection A has 3 attributes and a two-way 1-to-m...
- Database Double Requesting Error.
I am getting error for creating new document in an collection with new ID.unique() then too getting error of existing document. When button is pressed one docum...
