Rank 2: Process
My frontend is screaming even it's the frontend is localhost.
I have tried to put * in hostname but still not fixed. Both in development and production.
What could be leading to this?
Votes
0
Replies
14
Participants
4
Messages
15
Rank 2: Process
My frontend is screaming even it's the frontend is localhost.
I have tried to put * in hostname but still not fixed. Both in development and production.
What could be leading to this?
Have you added your localhost address on Platforms in your console?
Localhost should be added as a platform by default, but you can try specifically adding it
Rank 2: Process
I even tried adding there * for wildcard. I am now trying to see if project id is sent in the header requests.
Rank 2: Process
Thanks to @Steven he pointed out something interesting about query formats. And I was able to resolve the issue.
Glad your issue is resolved now! Please mark this post as solved by adding "[Solved]" in front of your post's title.
Rank 2: Process
CORs problem even on localhost [Solved]
[SOLVED] CORs problem even on localhost
do you know how/why this code was like this?
Rank 2: Process
First of all I used AI to generate much of the code. Could it be prompting or the AI not prioritising the latest documentation?
Probably the latter
Rank 2: Process
Yes AI installed the SDK
The code
const result = await databases.listDocuments(DATABASE_ID,COLLECTIONS.SUBSCRIPTIONS, [Query.equal("user_id", user.$id)]); //Notice value isn't an array if (result.documents.length > 0) { navigate({ to: "/dashboard" }); }} catch (e) { console.log("No subscription found");}```
3. No, I didn't start with the Appwrite docs MCP server.4. Oh yes, but it seems Claude usually has old knowledge about Appwrite.Weird...did you have different Appwrite SDKs installed?
Rank 2: Process
All I changed was treating value as an array and things started working.
SUBSCRIPTIONS, [Query.equal("user_id", [user.$id])]);