Unhandled Runtime Error[ Server ] Error: Invalid document structure: Missing required attribute
- 0
- Databases
- Web
- Cloud

Since yesterday, I am getting this error : Error: Invalid document structure: Missing required attribute "bucketField" in my project with appwrite as the backend.
It was working fine till yesterday 1:00am IST. The code snippet where this error came from : `const fileDocument = { type: getFileType(bucketFile.name).type, name: bucketFile.name, url: constructFileUrl(bucketFile.$id), extension: getFileType(bucketFile.name).extension, size: bucketFile.sizeOriginal, owner: ownerId, accountId, users: [], bucketFileId: bucketFile.$id, };
const newFile = await databases
.createDocument(
appwriteConfig.databaseId,
appwriteConfig.filesCollectionId,
ID.unique(),
fileDocument,
)
.catch(async (error: unknown) => {
await storage.deleteFile(appwriteConfig.bucketId, bucketFile.$id);
await handleError(error, "Failed to create file document");
});`
I have attached all the snapshots with the error and my appwrite collection -> attributes in this post.

@ZDevLuffOP743 Can you please provide more detais please , projectId, databaseId, collectionId 🙏

Sure :
ProjectId : 6747311a0038f1fcc367 DatabaseId: 674731b1001a4c3e29f9 UsersCollectionId: 67473230001a965af8cd FilesCollectionId: 6747340b0032a72fc133
Recommended threads
- Issue - Migration From Cloud > Self Host...
Hi team, I’m trying to migrate a few of my Appwrite projects from the cloud to a self-hosted instance. These projects are currently in “archive mode” due to th...
- Why "You’ve reached the limit for your G...
Why did Appwrite send me this alert when the usage reached 10605%? Is it too late? Why not when reached 100% usage? And I can not pay for more usage described ...
- Subdomain failed verification
So I wanted to do a custom subdomain, because local storage doesn't work for me, but I've tried it a long time ago, it didn't work for me, and now I'm trying ag...
