**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
- Looking for a Partner
- Github Student org plan shows "Free Plan...
For few days, there is banner info appearing, says "Your Free plan includes up to 2 projects and limited resources" in github stundent org plan..?
- Error connecting to my GitHub repository
Nothing happens when I try to connect my GitHub repository, but when I try from “Create site,” I get a 500 error.