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
- Error connecting Github
I have followed the documentation online for setting up VCS and cannot get my Github to properly connect in Functions. When I press the "Connect to Github" I am...
- delete cancelled site deployment
I would like to remove a cancelled site deployment, but the site menu shows only "Redeploy".
- Self-host migration from 1.8.X
Is it safe to now migrate from 1.7.4 to 1.8.X on my selfhost?