
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
- New Provider isn't working | Invalid OAu...
Hallo, I set up a new provider in Appwrite. I followed all the documentation, I set up everything, I successfully ran both Appwrite console and backend, and I f...
- Appwrite Sites: Error At Deployment
Hello, I am using Appwrite 1.7.4 on a self-hosted instance and am experiencing an issue with Appwrite Site's manual deployment. ```powershell [12:44:43] [open-...
- Unable to get teams ID
Part of my application involves looking at a table with the "assigned user" value and matching that to the corresponding user id in the team, for some reason th...
