
I got this error on the console of appwrite cloud when clicking in a document
Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'length')
And the document doesnt shows up, some times it goes full black screen or stays at loading and the error on the console shows up

Would you be able to check the network tab and look for the request for the document? Then share the response body

In the network tab there are many things but this is the only one that seems to look like the document that im trying to open

{ "$id": "6502750d3953de32412b", "$createdAt": "2023-09-14T02:50:53.235+00:00", "$updatedAt": "2023-09-14T02:52:08.294+00:00", "$permissions": [ "read(any)", "create(team:64fff91d8c3a37b75906)", "read(team:64fff91d8c3a37b75906)", "update(team:64fff91d8c3a37b75906)" ], "databaseId": "64de657768e3169c1b54", "name": "platformInfo", "enabled": true, "documentSecurity": true, "attributes": [ { "key": "whitelist", "type": "boolean", "status": "available", "required": false, "array": false, "default": null }, { "key": "topbarAlert", "type": "boolean", "status": "available", "required": false, "array": false, "default": null }, { "key": "topbarAlertMessage", "type": "string", "status": "available", "required": false, "array": false, "size": 999, "default": null }, { "key": "maintenance", "type": "boolean", "status": "available", "required": false, "array": false, "default": null }, { "key": "whitelistUsers", "type": "string", "status": "available", "required": false, "array": true, "size": 9999, "default": null } ], "indexes": [] }

and then there is this other one called document and the response is an html

There should be a fetch/xhr request that ends in /documents/[document id]

There is none like /documents/id with the slash, but this one here is called document-65027544323edc9b8fd0
Am I looking for it the right way or im missing something?

It only shows the document id rather than the full path so if you have to click on it to see the full URL.
Anyways, it should be the last or second to last request in that screenshot you shared

ohh i see, the last 2 ends on /documents/id.
here is the response, preview and headers tab:

So the page doesn't load properly when you open this document? Are all the attributes there? Is that null one an array attribute?

Exactly, the page does not load when I open the document, it remains without displaying information. If I refresh everything stays black
The attributes page can be seen, the whitelistUsers does not seem to be in the fetch response could that be the error?

Ya that'd be the problem. That's weird that happened. By default, arrays should be an empty string and never null or missing 🧐
Any idea how this happened?

Hmm weird, I have no idea how it could have happened. Should I try deleting the attribute and doing it again?

You can recreate the document

Alright, how can I delete a document without entering the document view? Is it possible to do it by code? Or how do I access the view of the corrupted document so I can delete it?

You can use a server SDK or Appwrite CLI

alright thank you very much steven i will try that

its fixed now <:appwriterocket:823996226894692403>

[SOLVED] Cannot read properties of undefined on appwrite cloud
Recommended threads
- Database not found
i am getting an error named - database not found . I have logged on yesterday and it was working fine. But today it fails . More clearly i can say, each new day...
- 500 error trying to view database consol...
My project was blocked yesterday for queries missing a custom index. After it was restored, I was able to see the console last evening. But, when I try to acce...
- 404 if I try to access a non-existent bu...
When I try to access my profile_pictures bucket, Appwrite just gives a 404 error. I made it at the beginning of the year and since I created it this has happene...
