Back

[SOLVED] Invalid Query Method: equal, error after Appwrite Cloud Update

  • 0
  • Databases
  • Web
  • Cloud
Pranay Goel
24 Sep, 2023, 17:32

Hi, I am having an issue with my application after the appwrite cloud got updated; before it was working absolutely fine. Some of the queries are giving me this error

TypeScript
{
    "message": "Invalid query method: equal",
    "code": 400,
    "type": "general_argument_invalid",
    "version": "0.11.3"
}

Also, in the project console, a few indexes are showing failed. I suppose the problem might be with the indexing. So I deleted the index and tried recreating it, but that too won't work, and it throws an error: "Index length is longer than maximum: 768". I can't understand why this is happening because since I deployed the application, everything has been working flawlessly until the update. Please help me with it.

TL;DR
After an Appwrite Cloud update, the user encountered an error with the query method 'equal'. They removed the equals method and the issue was resolved. The error seems to be caused by passing an equal query for a getDocument() API call which is not allowed. The user also mentioned that some indexes in the project console are showing as failed and encountered an error when trying to recreate them due to exceeding the maximum index length. The solution is to remove the equals method from the code and check if the issue persists.
Susmita
24 Sep, 2023, 17:46

Hey @Pranay Goel Did you try to redeploy or reload or restart stuffs?

Drake
25 Sep, 2023, 05:20

Would you please share your code with the query or the network request with the query?

Strings bigger than 768 can't be indexed.

Pranay Goel
25 Sep, 2023, 17:38

Yeah sure

Pranay Goel
25 Sep, 2023, 17:39
Pranay Goel
25 Sep, 2023, 17:40
Pranay Goel
25 Sep, 2023, 17:40
Pranay Goel
25 Sep, 2023, 17:42

For further reference you can visit the website: https://spot-light-appwrite.vercel.app Steps to reproduce:

  1. Go to the Explore Page (/explore). You'll see a list of event cards.
  2. Click on any event card.
Drake
25 Sep, 2023, 21:51

I think it's because you're passing an equal query for a getDocument() api call which isn't allowed

Pranay Goel
26 Sep, 2023, 03:34

Okay. Actually this error didn't occur anytime before saturday. Is it because of the update?

Drake
26 Sep, 2023, 03:36

Appwrite cloud upgrade happened on 9/22

Pranay Goel
26 Sep, 2023, 04:02

Is there any alternative to equal in getDocument?

Drake
26 Sep, 2023, 04:07

Why? What are you trying to do?

Guille
26 Sep, 2023, 11:57

As I can see, you're trying to get the documents for the current logged user, you can achieve the same with permissions. Correct me if I'm wrong @Pranay Goel

Pranay Goel
27 Sep, 2023, 09:52

Yes, it's fixed now. I removed the equals method. Actually, the same code has totally worked fine for the last three months so I wondered if it was due to the update. Thanks

Pranay Goel
27 Sep, 2023, 09:56

Yeah, actually I didn't need explicit permissions for my use case, so didn't use that approach.

Drake
27 Sep, 2023, 15:00

[SOLVED] Invalid Query Method: equal, error after Appwrite Cloud Update

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