Back

[SOLVED] Function Initialization Server Error

  • 0
  • Flutter
  • Functions
hamed
9 Sep, 2023, 16:17

After installing the latest CLI, I'm unable to initialize a function; it throws a server error. Here's my process:

1- Freshly installed Appwrite 1.4.2 on a new server (completed). 2- Unable to start openruntimes, so I updated the Docker Compose file by adding _APP_OPENSSL_KEY_V1 (completed). 3- Updated the environment by adding only Dart 3 runtime (completed). 4- Ran the restore script (completed). 5- Installed CLI 4.0.0 (completed). 6- Logged in to Appwrite within the CLI (completed). 7- Attempted to initialize a new function (failed with a server error)

TypeScript
2023-09-09 14:09:43 [Error] Line: 2619
2023-09-09 16:08:11 [Error] Timestamp: 2023-09-09T16:08:11+00:00
2023-09-09 16:08:11 [Error] Method: POST
2023-09-09 16:08:11 [Error] URL: /v1/functions
2023-09-09 16:08:11 [Error] Type: Utopia\Database\Exception\Structure
2023-09-09 16:08:11 [Error] Message: Invalid document structure: Unknown attribute: "schedule"
2023-09-09 16:08:11 [Error] File: /usr/src/code/vendor/utopia-php/database/src/Database/Database.php
2023-09-09 16:08:11 [Error] Line: 2619
TL;DR
User installed Appwrite 1.4.2 and tried to initialize a new function but received a server error. They followed these steps: 1. Installed Appwrite 1.4.2 on a new server. 2. Updated the Docker Compose file to start openruntimes. 3. Updated the environment by adding only Dart 3 runtime. 4. Ran the restore script. 5. Installed CLI 4.0.0 and logged in to Appwrite. 6. Attempted to initialize a new function but failed with a server error. The error message indicated an invalid document structure with an unknown attribute "schedule". Solution
Drake
9 Sep, 2023, 16:46

adding _APP_OPENSSL_KEY_V1? it was not set?

Drake
9 Sep, 2023, 16:47

4- Ran the restore script (completed).

that basically sets it back to whatever version from that restore...

Drake
9 Sep, 2023, 16:47

what version was your backup on?

hamed
9 Sep, 2023, 16:53

... was not set.

hamed
9 Sep, 2023, 16:53

From version 1.4.1

hamed
9 Sep, 2023, 16:56

Should I install 1.4.1 and run restore first!

Drake
9 Sep, 2023, 17:17

do you have your previous docker compose and env file?

hamed
9 Sep, 2023, 17:24

Yes

Drake
9 Sep, 2023, 17:29

you can do docker-compose up -d with those files. then restore. then uprade to 1.4.2 and run migrate command

hamed
9 Sep, 2023, 17:30

Alright.

hamed
9 Sep, 2023, 18:09

That works, finally I’m able to try the new cloud function 🥲

hamed
9 Sep, 2023, 18:10

[SOLVED] Function Initialization Server Error

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