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 errors relating to an unknown attribute, 'pingCount,' after restoring their appwrite database. They were advised to check if 'pingCount' existed in the appwrite console and recreate it if necessary due to potential sync issues.Inspecting tables via queries showed 'pingCount' existed, suggesting a code reference to the attribute. A solution offered was to recreate the attribute due to the errors referencing it in the code.
Devika
9 Nov, 2025, 12:26

Hey @rohan ! 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

@Devika 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
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