Skip to content
Back

Message: Invalid document structure: Unknown attribute: "pingCount"

  • 0
  • Self Hosted
rohan
9 Nov, 2025, 12:03

Hi,

I Restored my appwrite database and im facing this error.. im not able to do anything

TypeScript
[Error] Timestamp: 2025-11-09T11:59:47+00:00

[Error] Method: POST

[Error] URL: /v1/functions/:functionId/executions

[Error] Type: Utopia\Database\Exception\Structure

[Error] Message: Invalid document structure: Unknown attribute: "pingCount"

[Error] File: /usr/src/code/vendor/utopia-php/database/src/Database/Database.php

[Error] Line: 4271

please help me fix the issue... im on appwrite 1.7.4

TL;DR
A developer encountered an error about an unknown attribute, 'pingCount,' in Appwrite. They fixed it by commenting out a line, restarting the Appwrite container, and editing a file. They ran SQL queries to resolve the issue and had trouble with incorrect timestamps. Some projects loaded properly, while others did not due to the missing 'pingCount' attribute. They were advised to recreate it and troubleshoot further. Additionally, a database restore may have caused the loss of changes, leading to the 'pingCount' error. The version specified is Appwrite 1.7.4.
Devika
9 Nov, 2025, 12:26

Hey <@765201455636021319> ! as you said that you've restored your appwrite db, you probably have lost any changes you've made to it before restoring the same (like addition of the attribute pingCount). You should re-create this attribute called pingCount if it's important. Because as per your error, that attribute is being referenced somewhere in your code.

rohan
9 Nov, 2025, 12:30

<@1329045306997866509> pingCount already exists

TypeScript
MariaDB [appwrite]> select pingCount from _console_projects
    -> ;
+-----------+
| pingCount |
+-----------+
|         0 |
|         0 |
|         0 |
|         0 |
+-----------+
4 rows in set (0.008 sec)
Devika
9 Nov, 2025, 12:33

Ok. Then try deleting it and creating it again. Maybe it's not getting synced properly

rohan
9 Nov, 2025, 12:46

oh that worked..

rohan
9 Nov, 2025, 12:46

thanks

Devika
9 Nov, 2025, 12:47

Mention not! And let me know if you need any further help..

rohan
9 Nov, 2025, 12:47

i was able to create session...

but now not able to access storage

TypeScript
[Error] Type: Utopia\Database\Exception\Structure

[Error] Message: Invalid document structure: Unknown attribute: "pingCount"

[Error] File: /usr/src/code/vendor/utopia-php/database/src/Database/Database.php

[Error] Line: 4271
rohan
9 Nov, 2025, 12:48
TypeScript
[Error] Timestamp: 2025-11-09T12:47:17+00:00

[Error] Method: GET

[Error] URL: /v1/storage/buckets/:bucketId/files/:fileId/view

[Error] Type: Utopia\Database\Exception\Structure

[Error] Message: Invalid document structure: Unknown attribute: "pingCount"

[Error] File: /usr/src/code/vendor/utopia-php/database/src/Database/Database.php

[Error] Line: 4271
rohan
9 Nov, 2025, 12:49

where all do i need to recreate?

Devika
9 Nov, 2025, 12:49

Please check in your appwrite console, whether that pingCount exists there or not

rohan
9 Nov, 2025, 12:50

where do i check for?

Devika
9 Nov, 2025, 12:51

On appwrite cloud

rohan
9 Nov, 2025, 12:51

im self hosted

Devika
9 Nov, 2025, 12:54

Try running: SELECT * FROM _1_documents WHERE $collection = 'attributes' AND key = 'pingCount';

rohan
9 Nov, 2025, 12:55

i have total 4 projects in selfhosted... 2 of them i can access now properly even storage

2 of them i cant

TypeScript
[Error] Method: GET

[Error] URL: /v1/storage/buckets

[Error] Type: Utopia\Database\Exception\Structure

[Error] Message: Invalid document structure: Unknown attribute: "pingCount"

[Error] File: /usr/src/code/vendor/utopia-php/database/src/Database/Database.php

[Error] Line: 4271

[Error] Timestamp: 2025-11-09T12:53:49+00:00
rohan
9 Nov, 2025, 12:55

Table 'appwrite._1_documents' doesn't exist

Devika
9 Nov, 2025, 12:56

Ok. Let's debug this together. Try running: SHOW TABLES;

rohan
9 Nov, 2025, 12:57

total 992 rows in set

Devika
9 Nov, 2025, 12:58

Ok. Run these one by one: 1) SELECT * FROM _console_attributes WHERE key = 'pingCount'; 2) DESCRIBE _console_projects;

Devika
9 Nov, 2025, 12:59

Share the outputs

rohan
9 Nov, 2025, 12:59
Devika
9 Nov, 2025, 13:23

Good👍🏻

prisM
9 Nov, 2025, 23:32

Hey, sorry to bump. Can you provide more details on how you fixed this issue for good? Thx

rohan
10 Nov, 2025, 01:48

It's just this.. comment out that line .. restart appwrite container then load all your projects in web console... Then reset back the edited file.. the restart appwrite container

Reply

Reply to this thread by joining our Discord

Reply on Discord

Need support?

Join our Discord

Get community support by joining our Discord server.

Join Discord

Get premium support

Join Appwrite Pro and get email support from our team.

Learn more