Back

AppwriteException: Server Error

  • 0
  • Android
  • Auth
  • Databases
  • Apple
  • Cloud
danstevenson_reyt
16 May, 2024, 08:54

We're seeing various errors on our production cloud instance, when making requests to the Auth and Collections.

The error we're seeing is: AppwriteException: Server Error

Project ID: 65dcad981d0f86cc7f7f

Please could someone look into this urgently and report back as this is our production instance and is affecting the ability for users to use our app.

On a potentially separate/related note, I can see that from the Cloud console Overview, under Databases I can see there are "-11" documents, so something looks to be wrong there.

TL;DR
Developers are experiencing consistent failures with GraphQL queries related to account creation, login, and logout. While transitioning to the Web API has been a temporary workaround, the issue remains unresolved. Suggestions include specifying the version header and sharing failing queries for investigation. The team is currently debugging to identify the root cause and prevent future occurrences. Urgent updates and stability timelines are requested due to app usability concerns.
D5
16 May, 2024, 17:21

Is this happening in the cloud console too?

D5
16 May, 2024, 17:21

If so, do you can check the browser console and check what errors you're getting?

D5
16 May, 2024, 17:22

@Meldiron Do you have some ideas on why is this happening?

Steven
16 May, 2024, 17:30

What request exactly are you making that results in this?

danstevenson_reyt
17 May, 2024, 08:04

Can you not see any logs for our project? I provided the project ID above.

This has been an issue for the auth creation, login, logout and document creation.

I've since deleted all of our users and documents (luckily this is an app still being developed, but worryingly it will be going live soon).

Now, since there are no users it's mainly an issue with auth create and document create.

During testing yesterday afternoon I managed to create an auth user, but not the user_profile document that should be created at the same time.

The auth create only worked once though, and most of the time also fails.

This doesn't seem to be an issue when manually creating things from the UI console, so I can't see any errors there.

Hellsdust
17 May, 2024, 09:58

Hey guys, this is still happening for us.

I have just gone through our app in it's entirety and it's looking like the cloud is very hit and miss at the minute. The API seems to work every now and then, by that I mean at one point I wasn't able to log in, I pressed "log in" again and it worked, sometimes it's fetches the current user (and other GET requests), other times it does not.

Right now, it's feeling like the cloud isn't something that is stable enough for us to be able to build our product to then take the market.

Do you have any advice or timelines on when the current issue will be fixed and when we can expect a more stable cloud versioning?

Cheers

D5
17 May, 2024, 10:06

You're working or similar with the original poster?

Hellsdust
17 May, 2024, 10:45

Working alongisde

D5
17 May, 2024, 10:48

Ok. Could you please specify the queries or requests that fail so the team investigates?

danstevenson_reyt
17 May, 2024, 11:14

Here are some of them:

GraphQL:

  • accountCreate
  • accountCreateEmailPasswordSession
  • accountGet
  • databasesCreateDocument

Node:

  • databases.listDocuments
  • databases.getDocument

(We're using a mix of GraphQL and Node mainly because when Cloud was updated from 1.4 to 1.5 it broke our Collections GraphQL requests, which I reported.)

D5
17 May, 2024, 12:01

You should use the version header to prevent it to break again when cloud is updated

D5
17 May, 2024, 12:07

Could you send a complete example of a request that fails with dummy/demo data?

Hellsdust
17 May, 2024, 12:27

The worry we have is that these issues arose without any change to our code. One day we clocked off with the cloud being fine, the following day we went in to testing we had these issues.

D5
17 May, 2024, 12:35

The ones related to the upgrade are cause because the version header was not being specified. The latest ones are not identified, and that's something unusual. That's why we're trying to debug with you the issue in order to identify the root cause and prevent it from happening again

Hellsdust
17 May, 2024, 13:04

Great, thanks! Have you had any other reports in the past couple of days of something similar? Just so we know if it's isolated or not.

D5
17 May, 2024, 13:34

As far as I know, this is the only one.

danstevenson_reyt
20 May, 2024, 09:10

@D5 thanks for your messages on Friday about this. Do you have any more information or logs about it?

I've just had another look, and it seems that some of the issues are related to the GraphQL Auth queries (i.e. accountCreate).

I'm able to consistently use the Web API account.create where doing a GraphQL accountCreate fails.

Has anything changed with this GraphQL API? I can see the Cloud version is still 1.5.5, but whereas it was previously working, now it isn't and just returns AppwriteException: Server Error

We previously had to change a lot of our getDocument and listDocuments queries when Cloud was updated from 1.4 to 1.5 and we're now using the Web API instead of GraphQL. We left the Auth ones using GraphQL because they were still working and would mean a lot of work to update them to use Web API if we don't need to.

Please let me know if you could look into this issue and fix anything that might have broken.

D5
20 May, 2024, 12:13

I'm not sure about this. If you can send an example of the full query that fails it will be very appreciated.

Anyways if you want to use it as 1.4.x, you can always specify this header: X-Appwrite-Response-Format:1.4.14 and appwrite will behave like that version

Steven
20 May, 2024, 14:12

so its 1 single account create graphql query that consistently fails?

danstevenson_reyt
20 May, 2024, 14:51

This is the accountCreate query...

TypeScript
const createAccountMutation: IQueryAccountCreateResponse = await graphql.mutation({
            query: `mutation CreateAccount(
              $email: String!,
              $password: String!,
          ) {
              accountCreate(
                  email: $email,
                  password: $password,
                  userId: "unique()"
              ) {
                _id
              }
          }`,
            variables: {
                email: emailAddress,
                password
            }
        });

This is another query that also consistently fails and is needed to logout/delete sessions:

TypeScript
const logoutMutation: IResponse = await graphql.mutation({
            query: `
      mutation {
        accountDeleteSession(sessionId: "current") {
          status
        }
      }
      `
        });

And there's also:

TypeScript
const logInMutation: IResponse = await graphql.mutation({
            query: `mutation($email: String!, $password: String!) {
        accountCreateEmailPasswordSession(email: $email, password: $password) {
          _id
          userId
        }
      }`,
            variables: {
                email,
                password
            }
        });

As mentioned previously, all of these have been working consistently up to last Thursday. It's not the 1.4 to 1.5 upgrade that has broken this, because it has been working for the last couple of weeks since that change. It looks like we're still on 1.5.5, so there shouldn't have been anything else upgraded.

Nothing else has changed in our code relating to user onboarding/auth, and the error response is AppwriteException: Server Error so from everything we can see, it's an Appwrite Cloud error.

Please could you look into this and let me know if there's any more info you need to debug it.

Steven
20 May, 2024, 15:22

Thanks for the insight! πŸ™ Let me bring it up to the team and dig into it

Steven
20 May, 2024, 17:29

Ya, seems like there's some sort of bug. Here's an issue to track it: https://github.com/appwrite/appwrite/issues/8166

Steven
20 May, 2024, 17:29

it would be good if you add a πŸ‘πŸΌ to it

danstevenson_reyt
21 May, 2024, 07:57

Thanks, added a πŸ‘ - is there a rough ETA for when it will be worked on and fixed?

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