Back

appwrite-cli: creating functions not working

  • 0
  • Tools
  • Functions
  • General
NextG
16 Sep, 2023, 15:42

Hi, when i try to create a new function this happens:

CMD LOG (WINDOWS): C:\PROJECT_PATH\appwrite>appwrite --verbose init function ? What would you like to name your function? test ? What ID would you like to have for your function? unique() ? What runtime would you like to use? Node.js (node-16.0) AppwriteException [Error]: Server Error at Client.call (C:\Users\MY_USER\AppData\Roaming\npm\node_modules\appwrite-cli\lib\client.js:209:19) at process.processTicksAndRejections (node:internal/process/task_queues:95:5) at async functionsCreate (C:\Users\MY_USER\AppData\Roaming\npm\node_modules\appwrite-cli\lib\commands\functions.js:174:16) at async initFunction (C:\Users\MY_USER\AppData\Roaming\npm\node_modules\appwrite-cli\lib\commands\init.js:79:20) { code: 500, response: [Object: null prototype] { message: 'Server Error', code: 500, type: 'general_unknown', version: '1.4.3' } } ✗ Error Server Error

SERVER LOG: [Error] Timestamp: 2023-09-16T15:16:02+00:00 [Error] Method: POST [Error] URL: /v1/functions [Error] Type: Utopia\Database\Exception\Structure [Error] Message: Invalid document structure: Unknown attribute: "schedule" [Error] File: /usr/src/code/vendor/utopia-php/database/src/Database/Database.php [Error] Line: 2619

Does anyone know how to fix it?

TL;DR
The user encountered an error while trying to create a new function using the appwrite-cli. The error is a server error with a code of 500. The server log indicates that there is an invalid document structure with an unknown attribute "schedule". The solution provided by the user is to run the migrate command: `docker compose exec appwrite migrate` with Version 1.4.3.
NextG
16 Sep, 2023, 18:39

I have fixed it with the migrate command: docker compose exec appwrite migrate (Version 1.4.3)

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