Back

[SOLVED] Issue with upgrading to 1.4.3.

  • 0
  • Self Hosted
djcali
27 Sep, 2023, 18:02

I attempted to upgrade from 1.3.8 to 1.4.3 and I am getting the appwrite-assistant container keeps restarting. I looked into the docker logs and it seems that its missing an api key.

TypeScript
2023-09-27 14:01:09 which is longer than the specified 1000
2023-09-27 14:01:09 Created a chunk of size 1521, +
2023-09-27 14:01:09 which is longer than the specified 1000
2023-09-27 14:01:09 file:///usr/src/app/node_modules/.pnpm/langchain@0.0.131_faiss-node@0.3.0/node_modules/langchain/dist/embeddings/openai.js:82
2023-09-27 14:01:09             throw new Error("OpenAI or Azure OpenAI API key not found");
2023-09-27 14:01:09                   ^
2023-09-27 14:01:09 
2023-09-27 14:01:09 Error: OpenAI or Azure OpenAI API key not found
2023-09-27 14:01:09     at new OpenAIEmbeddings (file:///usr/src/app/node_modules/.pnpm/langchain@0.0.131_faiss-node@0.3.0/node_modules/langchain/dist/embeddings/openai.js:82:19)
2023-09-27 14:01:09     at file:///usr/src/app/embeddings.js:43:3
2023-09-27 14:01:09 
2023-09-27 14:01:09 Node.js v18.17.1```
TL;DR
There was an issue with upgrading to version 1.4.3, but it has been solved by re-running the migrate command. If you encounter a Server Error 500, it might be caused by the "appwrite-usage" container or the "appwrite-assistant" container. To fix the issue with the "appwrite-assistant" container, make sure to update the environment variable for the API key. If you don't want to use the Appwrite Assistant, you can leave it as it is. The restart issue with the container is a known issue, and a fix has been pushed and will likely be released soon
safwan
27 Sep, 2023, 18:30

This is expected, if you don't add an API key for the assistant.

  • If you want to use the Appwrite Assistant, make sure to update the environment variable. Reference
  • If you don't want to use the Appwrite Assistant, you can leave it be. The restart issue is something that is already a known issue and a fix has been pushed (look here) which will probably be released soon!
djcali
27 Sep, 2023, 18:53

Thanks for that. I thought that was making my console come up with a Server Error 500. But it might be the appwrite-usage conainer causing it, because that is also restarting.

TypeScript
2023-09-27 14:49:49 #11 {main}
2023-09-27 14:49:49   thrown in /usr/src/code/vendor/utopia-php/pools/src/Pools/Group.php on line 28
2023-09-27 14:50:50 Appwrite usage aggregation process v1 has started
2023-09-27 14:50:50 [27-09-2023 18:50:50] Aggregating Timeseries Usage data every 30 seconds
2023-09-27 14:50:50 
2023-09-27 14:50:50 Fatal error: Uncaught TypeError: Utopia\Pools\Group::get(): Argument #1 ($name) must be of type string, null given, called in /usr/src/code/app/cli.php on line 103 and defined in /usr/src/code/vendor/utopia-php/pools/src/Pools/Group.php:28
2023-09-27 14:50:50 Stack trace:
2023-09-27 14:50:50 #0 /usr/src/code/app/cli.php(103): Utopia\Pools\Group->get(NULL)
2023-09-27 14:50:50 #1 [internal function]: {closure}(Object(Utopia\Database\Document))
2023-09-27 14:50:50 #2 /usr/src/code/src/Appwrite/Usage/Calculators/TimeSeries.php(427): call_user_func(Object(Closure), Object(Utopia\Database\Document))
2023-09-27 14:50:50 #3 /usr/src/code/src/Appwrite/Usage/Calculators/TimeSeries.php(521): Appwrite\Usage\Calculators\TimeSeries->createOrUpdateMetric('linkup', '2023-09-26T18:0...', '1h', 'project.$all.ne...', 0, 0)
2023-09-27 14:50:50 #4 /usr/src/code/src/Appwrite/Usage/Calculators/TimeSeries.php(546): Appwrite\Usage\Calculators\TimeSeries->syncFromInfluxDB('project.$all.ne...', Array, Array)
2023-09-27 14:50:50 #5 /usr/src/code/src/Appwrite/Platform/Tasks/Usage.php(53): Appwrite\Usage\Calculators\TimeSeries->collect()
2023-09-27 14:50:50 #6 /usr/src/code/vendor/utopia-php/cli/src/CLI/Console.php(219): 
Drake
27 Sep, 2023, 20:24

what happens if you run:

TypeScript
docker compose down
docker compose up -d

Also, did the migrate command execute successfully?

djcali
27 Sep, 2023, 20:29

Sorry, I fixed it by re-running the migrate command. It must have failed the first time i ran it. Thanks

Drake
27 Sep, 2023, 20:57

[SOLVED] Issue with upgrading to 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