**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
- Custom API domain is unreachable
Earlier my custom api domain was working fine. Now it seems to be offline without a trace a few hours later. I didn't change anything, all the relevant DNS reco...
- "Invalid console fingerprint" when unpau...
I've tried logging out and logging back in, still can't figure out why this is happening.
- Inviting members while SMTP is disabled ...
Issue: https://github.com/appwrite/console/issues/3125 PR: https://github.com/appwrite/console/pull/3126