Skip to content
Back

Create platform and can not connect ping

  • 0
  • React Native
Jeff
17 Sep, 2025, 09:07

I created a new platform but when I cloned the source, I didn't see the lib/... folder, only env. Then I created a .env file and added those files, then pinged but got error 500. What should I do next?

TL;DR
Developers are experiencing an issue where they cannot connect ping on their platform. The problem seems to be with the Structure validator in Database.php not validating against the collection schema. The Model response (Project.php) seems to be correctly defined. The error in the server log indicates an "Unknown attribute: 'pingCount'". The Appwrite version is 17.0.2. To resolve this, developers may need to check permissions and ensure all necessary files are included when creating a new platform.
Jeff
17 Sep, 2025, 09:08

here is the app

D5
17 Sep, 2025, 09:17

What's the SDK version?

Jeff
17 Sep, 2025, 12:07

it looks like 1.8.0

D5
17 Sep, 2025, 13:41

You're self-hosting?

Jeff
17 Sep, 2025, 13:47

no, but i can ask the host

Jeff
23 Sep, 2025, 04:02

@D5 yes, I self-hosting

Bret
23 Sep, 2025, 04:17

Try asking the owner for the server logs

D5
23 Sep, 2025, 06:20

The react native SDK version or Appwrite version?

Jeff
23 Sep, 2025, 06:23

the Appwrite version, sdk-version: 17.0.2, and from the project : "appwrite": "^17.0.0", "expo": "~52.0.28", "react-native": "0.76.6",

Jeff
24 Sep, 2025, 15:10

I see the error on server log:

appwrite | [Error] Timestamp: 2025-09-24T15:05:47+00:00 appwrite | [Error] Method: GET appwrite | [Error] URL: /v1/ping appwrite | [Error] Type: Utopia\Database\Exception\Structure appwrite | [Error] Message: Invalid document structure: Unknown attribute: "pingCount" appwrite | [Error] File: /usr/src/code/vendor/utopia-php/database/src/Database/Database.php appwrite | [Error] Line: 4271

Jeff
24 Sep, 2025, 17:17

I checked on /usr/src/code/src/Appwrite/Utopia/Response/Model/Project.php docker and I see code have define pingCount, pingedAt

TypeScript
->addRule('pingCount', [
  'type' => self::TYPE_INTEGER,
  'description' => 'Number of times the ping was received for this project.',
  'default' => 0,
  'example' => 1,
])
->addRule('pingedAt', [
  'type' => self::TYPE_DATETIME,
  'description' => 'Last ping datetime in ISO 8601 format.',
  'default' => '',
  'example' => self::TYPE_DATETIME_EXAMPLE,
])

==> it means the response Model (Project.php) - Used for API responses ✅ Working (I think that)

Jeff
24 Sep, 2025, 17:17

I checked the database and tried update pingCount and I see that database work well

TypeScript
MariaDB [appwrite]> SELECT pingCount, pingedAt  FROM _console_projects  WHERE _uid = '682f5edd0032dee5xxx' LIMIT 1;
+-----------+----------+
| pingCount | pingedAt |
+-----------+----------+
|         0 | NULL     |
+-----------+----------+
1 row in set (0.001 sec)

MariaDB [appwrite]> UPDATE _console_projects SET pingCount = pingCount + 1, pingedAt = NOW(3) WHERE _uid = '682f5edd0032dee5xxx';
Query OK, 1 row affected (0.015 sec)
Rows matched: 1  Changed: 1  Warnings: 0

MariaDB [appwrite]> SELECT pingCount, pingedAt  FROM _console_projects  WHERE _uid = '682f5edd0032dee5xxx' LIMIT 1;
+-----------+-------------------------+
| pingCount | pingedAt                |
+-----------+-------------------------+
|         1 | 2025-09-24 16:38:05.318 |
+-----------+-------------------------+
1 row in set (0.001 sec)
Jeff
24 Sep, 2025, 17:18

So I think root cause: Collection Schema (Structure validator) - Used for database validation ❌ Broken The Structure validator in Database.php line 4271 is checking against the collection schema

I have checked the cache and restarted Docker several times, but the issue has not been resolved. Do you have any suggestions? cc @D5

prisM
8 Nov, 2025, 02:01

Did you ever figure this out? I had the same issue and was able to find a temporary workaround, but it's not pretty.

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