AzuraCast / AzuraCast

A self-hosted web radio management suite, including turnkey installer tools for the full radio software stack and a modern, easy-to-use web app to manage your stations.
https://www.azuracast.com/
GNU Affero General Public License v3.0
3.09k stars 569 forks source link

Database Migration During Update Issue #4171

Closed hillbilly-mark closed 3 years ago

hillbilly-mark commented 3 years ago

Using Docker installation method? Yes

AzuraCast version: current stable

Host Operating System: Ubuntu 20.04

Describe the bug: Borked Update. Appears to be a database migration issue. Web interface is offline with slip application error

Steps to reproduce: ./docker.sh update-self && ./docker.sh update or ./docker.sh install

Expected behavior: No errors

Relevant logs:

Running Database Migrations
---------------------------

[2021-05-15T05:01:52.659989+00:00] AzuraCast.ERROR: TypeError: mb_substr(): Argument #1 ($string) must be of type string, int given (uncaught exception) at /var/azuracast/www/src/Entity/Migration/Version20210419043231.php line 129 while running console command `azuracast:setup` {"exception":"[object] (TypeError(code: 0): mb_substr(): Argument #1 ($string) must be of type string, int given at /var/azuracast/www/src/Entity/Migration/Version20210419043231.php:129)"} []
[2021-05-15T05:01:52.666469+00:00] AzuraCast.WARNING: Console command `azuracast:setup` exited with error code 1. [] []
[15-May-2021 05:01:52 UTC] PHP Fatal error:  Uncaught TypeError: mb_substr(): Argument #1 ($string) must be of type string, int given in /var/azuracast/www/src/Entity/Migration/Version20210419043231.php:129
Stack trace:
#0 /var/azuracast/www/src/Entity/Migration/Version20210419043231.php(129): mb_substr()
#1 /var/azuracast/www/vendor/doctrine/migrations/lib/Doctrine/Migrations/Version/DbalExecutor.php(157): App\Entity\Migration\Version20210419043231->preUp()
#2 /var/azuracast/www/vendor/doctrine/migrations/lib/Doctrine/Migrations/Version/DbalExecutor.php(102): Doctrine\Migrations\Version\DbalExecutor->executeMigration()
#3 /var/azuracast/www/vendor/doctrine/migrations/lib/Doctrine/Migrations/DbalMigrator.php(101): Doctrine\Migrations\Version\DbalExecutor->execute()
#4 /var/azuracast/www/vendor/doctrine/migrations/lib/Doctrine/Migrations/DbalMigrator.php(74): Doctrine\Migrations\DbalMigrator->executePlan()
#5 /var/azuracast/www/vendor/doctrine/migrations/lib/Doctrine/Migrations/DbalMigrator.php(151): Doctrine\Migrations\DbalMigrator->executeMigrations()
#6 /var/azuracast/www/vendor/doctrine/migrations/lib/Doctrine/Migrations/Tools/Console/Command/MigrateCommand.php(207): Doctrine\Migrations\DbalMigrator->migrate()
#7 /var/azuracast/www/vendor/symfony/console/Command/Command.php(256): Doctrine\Migrations\Tools\Console\Command\MigrateCommand->execute()
#8 /var/azuracast/www/src/Console/Command/CommandAbstract.php(30): Symfony\Component\Console\Command\Command->run()
#9 /var/azuracast/www/src/Console/Command/SetupCommand.php(52): App\Console\Command\CommandAbstract->runCommand()
#10 [internal function]: App\Console\Command\SetupCommand->__invoke()
#11 /var/azuracast/www/vendor/php-di/invoker/src/Invoker.php(74): call_user_func_array()
#12 /var/azuracast/www/vendor/mnapoli/silly/src/Application.php(95): Invoker\Invoker->call()
#13 /var/azuracast/www/vendor/symfony/console/Command/Command.php(254): Silly\Application->Silly\{closure}()
#14 /var/azuracast/www/vendor/symfony/console/Application.php(989): Symfony\Component\Console\Command\Command->run()
#15 /var/azuracast/www/vendor/symfony/console/Application.php(290): Symfony\Component\Console\Application->doRunCommand()
#16 /var/azuracast/www/vendor/symfony/console/Application.php(166): Symfony\Component\Console\Application->doRun()
#17 /var/azuracast/www/bin/console(14): Symfony\Component\Console\Application->run()
#18 {main}
  thrown in /var/azuracast/www/src/Entity/Migration/Version20210419043231.php on line 129

Fatal error: Uncaught TypeError: mb_substr(): Argument #1 ($string) must be of type string, int given in /var/azuracast/www/src/Entity/Migration/Version20210419043231.php on line 129

TypeError: mb_substr(): Argument #1 ($string) must be of type string, int given in /var/azuracast/www/src/Entity/Migration/Version20210419043231.php on line 129

Screenshots:

Device(s):

Additional context:

The update failed. So, then, I tried to reinstall over top of existing. Unfortunately I don't have snapshot capability to revert it. However, I do have a full back up dated December 12. and an --excluded-media backup just prior to the failed update.

Any advice on the best way to gain back the web interface and api, from this point, would be greatly appreciated.

On a good note, though the interface and api are broken, the music has continued to play.

Vaalyn commented 3 years ago

Hey, this issue has been fixed in the rolling-release channel.

Please follow the guide on how to change from stable to rolling-release in our docs: https://docs.azuracast.com/en/getting-started/updates/release-channels

hillbilly-mark commented 3 years ago

Hey, this issue has been fixed in the rolling-release channel.

Please follow the guide on how to change from stable to rolling-release in our docs: https://docs.azuracast.com/en/getting-started/updates/release-channels

Thank you. That was an easy fix. Problem solved