**AppwriteException: Invalid document structure: Attribute "$tenant" has invalid type. Value must be
- 2
- General
- Web
I'm experiencing an issue with my Appwrite project where I'm getting the error: "Invalid document structure: Attribute '$tenant' has invalid type. Value must be a valid integer"
Environment:
- Using Appwrite Cloud (not self-hosted)
- SDK version: 13.0.2
- Frontend: React + Vite
- TypeScript project
Issue details:
- This error occurs during authentication (both sign-in and sign-up)
- It also happens with database operations like fetching posts
- Clearing browser cache fixed the authentication issue, but I'm having partial problems with images
- Some images from storage display correctly, while others don't show up at all
What I've tried:
- Modified the authentication flow to remove session deletion before creating a new session
- Cleared browser cache (fixed authentication)
- Checked my configuration settings
Oh, wait
You're using the web SDK?
upon my checking, i could open and connect with my appwrite alr but the storage seems to do some bugs on my end. it doesnt display some of my images from my bucket.
Are they visible from the console?
it doesnt also display any error on console
I mean, in the appwrite dashboard
@azi Are you using the web SDK? If so, why not use the 17.0.1?
{ "message": "Invalid document structure: Attribute $tenant has invalid type. Value must be a valid integer", "code": 400, "type": "document_invalid_structure", "version": "1.6.2" }
i've updated it to 17.0.1 now
export function getFilePreview(fileId: string) { try { const fileUrl = storage.getFilePreview( appwriteConfig.storageId, fileId, 2000, 2000, ImageGravity.Top, 100 );
if (!fileUrl) throw Error;
return fileUrl;
} catch (error) { console.log(error); } }
Having the same issue, also changing any document or user account via https://cloud.appwrite.io/console yields the same error
Recommended threads
- Project paused?
Hello, I have two Appwrite projects and I can not resume them for some reason. I'm using the free plan, and I saw in the pricing page that 2 free projects are a...
- Imagine bad exp
I am having very bad exp of imagine website on mobile you should guys improve it. Sorry if I shouldn't share the feedback of imagine here
- Restoring Project
Hi, I’m encountering a **“Suspicious access pattern detected”** error when attempting to restore the project. I’ve already tried connecting through different ne...