I updated from version 1.3.8 to 1.5.7, there was no problem while updating. But after update I ran migrate command and got this error.
TypeScript
Fatal error: Uncaught TypeError: Utopia\DSN\DSN::__construct(): Argument #1 ($dsn) 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/dsn/src/DSN/DSN.php:54
Stack trace:
#0 /usr/src/code/app/cli.php(103): Utopia\DSN\DSN->__construct(NULL)
#1 /usr/src/code/src/Appwrite/Platform/Tasks/Migrate.php(95): {closure}(Object(Utopia\Database\Document))
#2 /usr/src/code/src/Appwrite/Platform/Tasks/Migrate.php(34): Appwrite\Platform\Tasks\Migrate->action('1.5.7', Object(Utopia\Cache\Cache), Object(Utopia\Database\Database), Object(Closure), Object(Utopia\Registry\Registry))
#3 /usr/src/code/vendor/utopia-php/cli/src/CLI/CLI.php(320): Appwrite\Platform\Tasks\Migrate->Appwrite\Platform\Tasks\{closure}('1.5.7', Object(Utopia\Cache\Cache), Object(Utopia\Database\Database), Object(Closure), Object(Utopia\Registry\Registry))
#4 /usr/src/code/app/cli.php(216): Utopia\CLI\CLI->run()
#5 {main}
thrown in /usr/src/code/vendor/utopia-php/dsn/src/DSN/DSN.php on line 54
TL;DR
The developers encountered an Uncaught TypeError after updating from version 1.3.8 to 1.5.7 and running a migrate command, resulting in a fatal error with type string. The error occurred due to passing null instead of a string in the DSN constructor on line 103. The suggested inquiry was whether there was a direct upgrade from 1.3.8 to 1.5.7.Did you jump directly from 1.3.8 to 1.5.7?
Recommended threads
- 1:1 relationship doesn’t sync after re-a...
Hi, I’m trying to use a two-way one-to-one relationship. It works fine when I create a record with the relationship set, and it also works when I unset it. But ...
- Upsert with setting permissions
Hi there, I am using self-hosted appwrite v1.7.4 and trying to use the bulk update stuff that was released with 1.7.x. Unfortunally I found that there is an ser...
- Github connection error - Self Hosted Ap...
I am trying to connect my github account to deploy a project to sites, but Connect to Gtihub button is disabled. I have configured all Env variables needed for...