Back

working on localhost but not on the live site(changed the platform id too)

  • 0
  • Databases
  • Auth
  • Web
  • Cloud
justshowkat
28 Aug, 2024, 20:27

My website is working fine on the localhost, yet I am not able to fetch data and create anything on the live site.

I created a separate platform and changed the hostname. on the live site, the login and logout are working fine. but I can't do any crud operations. I am not sure what I am missing!

can anyone help, please? it's urgent!

TL;DR
Developers facing issue where code works on localhost but not on live site after changing platform id. Suggestions to check environment variables and network requests. Issue likely due to incorrect setup of environment variables on the live site. Need to review and update to ensure proper functionality.
Kenny
28 Aug, 2024, 20:46

Did you setup your environment variables correctly?

justshowkat
28 Aug, 2024, 20:46

yes i did.

Kenny
28 Aug, 2024, 20:48

What's the network request look like when fetching data?

justshowkat
28 Aug, 2024, 20:51

like this

Kenny
28 Aug, 2024, 20:52

Can you click into it? It says 404, makes me thing you've put the wrong project id, database id, or collection id.

justshowkat
28 Aug, 2024, 20:54
Kenny
28 Aug, 2024, 20:55
Kenny
28 Aug, 2024, 20:55

You don't have your environment variables setup correctly.

justshowkat
28 Aug, 2024, 20:59

no my environment is all there. nothing missing. let me redeploy the project again

Kenny
28 Aug, 2024, 21:00

Well, it says undefined, if you're using the environment variables to populate that. Then it's not setup correctly lol

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