Back

Bad gateway from cloud appwrite

  • 0
  • Cloud
faye
20 Oct, 2024, 15:04

Are you trying to do an API call? What's your doing?

TL;DR
Developers reporting intermittent bad gateway issue from Appwrite cloud app. Discussion on DNS servers, API calls, and Appwrite SDK version. Suggestion to flush DNS. Flurry of messages trying to troubleshoot and provide help. No definitive solution reached, but issue being monitored.
D5
20 Oct, 2024, 15:04

Okay, try to run this: ipconfig /flushdns

D5
20 Oct, 2024, 15:04

It's in the console I think

faye
20 Oct, 2024, 15:04

but they said in their app, right?

Vignesh Gupta
20 Oct, 2024, 15:04

Using node-appwrite for my project. So yeah it's api

faye
20 Oct, 2024, 15:05

yeah so the dns flushing has nothing to do with it kinda

faye
20 Oct, 2024, 15:05

What API? What node-appwrite version?

faye
20 Oct, 2024, 15:05

give us more info

faye
20 Oct, 2024, 15:05

what is the code you are trying to run

D5
20 Oct, 2024, 15:05

Yes, because the DNS servers changed and it could be that it's hitting the old IP. At lest that's how another user solved this error before 😅

Vignesh Gupta
20 Oct, 2024, 15:06

"node-appwrite": "^14.1.0",

Vignesh Gupta
20 Oct, 2024, 15:06

bash

faye
20 Oct, 2024, 15:06

lol

faye
20 Oct, 2024, 15:06

.. bash?

Vignesh Gupta
20 Oct, 2024, 15:06

my bad

Vignesh Gupta
20 Oct, 2024, 15:06

I read console, haahahaahahaha

faye
20 Oct, 2024, 15:06

try this first

D5
20 Oct, 2024, 15:07

In the CMD

Vignesh Gupta
20 Oct, 2024, 15:07
TypeScript
  const client = new Client()
    .setEndpoint(process.env.NEXT_PUBLIC_APPWRITE_ENDPOINT!)
    .setProject(process.env.NEXT_PUBLIC_APPWRITE_PROJECT!);

  const session = getCookie(c, AUTH_COOKIE_NAME);

  if (!session) {
    return c.json({ error: "Unauthorized" }, 401);
  }

  client.setSession(session);

  const account = new Account(client);

  const user = await account.get();
Vignesh Gupta
20 Oct, 2024, 15:08

yeah done, and starting up the app

Vignesh Gupta
20 Oct, 2024, 15:09

It's intermittent so it's difficult so say it's resolved but somehow it's working for now

Vignesh Gupta
20 Oct, 2024, 15:09

Thanks guys!

faye
20 Oct, 2024, 15:09

If your issue has been solved, mind adding [SOLVED] in the beginning of the title? Happy appwriting! :appwriterocket:

D5
20 Oct, 2024, 15:10

It's always DNS 💀 😆

D5
20 Oct, 2024, 15:12

@Vignesh Gupta Tell us if it happens again 🙂:appwritepeepo:

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