Azuracast: doctrine error after last update

Created on 29 Sep 2019  路  8Comments  路  Source: AzuraCast/AzuraCast

Using Docker installation method

Yes

Host Operating System

Ubuntu 18.04.3 LTS

Describe the bug

(root!play)(azuracast)# ./docker.sh update-self && echo "y" | ./docker.sh update
New Docker utility script downloaded.
Pulling mariadb ... done
Pulling influxdb ... done
Pulling redis ... done
Pulling stations ... done
Pulling web ... done
Stopping azuracast_web_1 ... done
Stopping azuracast_stations ... done
Stopping azuracast_mariadb_1 ... done
Stopping azuracast_influxdb_1 ... done
Stopping azuracast_redis_1 ... done
Removing azuracast_web_1 ... done
Removing azuracast_stations ... done
Removing azuracast_mariadb_1 ... done
Removing azuracast_influxdb_1 ... done
Removing azuracast_redis_1 ... done
Removing network azuracast_default
azuracast_www_data
azuracast_tmp_data
Creating network "azuracast_default" with the default driver
Creating volume "azuracast_tmp_data" with default driver
Creating volume "azuracast_www_data" with default driver
Creating azuracast_redis_1 ... done
Creating azuracast_influxdb_1 ... done
Creating azuracast_stations ... done
Creating azuracast_mariadb_1 ... done
2019/09/29 16:42:21 Waiting for: tcp://mariadb:3306
2019/09/29 16:42:21 Waiting for: tcp://influxdb:8086
2019/09/29 16:42:21 Connected to tcp://influxdb:8086
2019/09/29 16:42:21 Connected to tcp://mariadb:3306
Updating AzuraCast...
(Environment: production)
Installing azuracast/azuracast (dev-master d7819a699359929e53bcf7dd15f4dff2e3f96c9b)

  • Installing azuracast/azuracast (dev-master d7819a6): Cloning d7819a6993 from cache
    Created project in /var/azuracast/new
    Loading composer repositories with package information
    Installing dependencies from lock file
    Package operations: 10 installs, 17 updates, 0 removals
  • Updating aws/aws-sdk-php (3.110.3 => 3.112.10): Downloading (100%)
  • Installing symfony/stopwatch (v4.3.4): Downloading (100%)
  • Updating zendframework/zend-code (3.3.1 => 3.3.2): Downloading (100%)
  • Updating doctrine/migrations (v1.8.1 => 2.1.1): Downloading (100%)
  • Updating doctrine/common (v2.10.0 => v2.11.0): Downloading (100%)
  • Updating doctrine/orm (v2.6.3 => v2.6.4): Downloading (100%)
  • Updating mobiledetect/mobiledetectlib (2.8.33 => 2.8.34): Downloading (100%)
  • Updating monolog/monolog (1.24.0 => 2.0.0): Downloading (100%)
  • Updating nikic/php-parser (v4.2.3 => v4.2.4): Downloading (100%)
  • Updating paragonie/sodium_compat (v1.10.1 => v1.11.1): Downloading (100%)
  • Updating paragonie/certainty (v2.3.1 => v2.5.0): Downloading (100%)
  • Updating php-di/phpdoc-reader (2.1.0 => 2.1.1): Downloading (100%)
  • Updating sentry/sentry (2.1.2 => 2.2.1): Downloading (100%)
  • Downgrading slim/http (dev-master 52693db => 0.8): Downloading (100%)
  • Installing cache/prefixed-cache (1.0.0): Downloading (100%)
  • Installing cache/array-adapter (1.0.1): Downloading (100%)
  • Installing cache/psr-6-doctrine-bridge (3.0.1): Downloading (100%)
  • Installing mnapoli/silly (1.7.1): Downloading (100%)
  • Installing mnapoli/silly-php-di (1.2.0): Downloading (100%)
  • Downgrading slim/slim (4.x-dev 5c493cb => 4.2.0): Downloading (100%)
  • Installing php-di/slim-bridge (3.0.0): Downloading (100%)
  • Installing zendframework/zend-expressive-session (1.2.1): Downloading (100%)
  • Installing dflydev/fig-cookies (v2.0.0): Downloading (100%)
  • Installing zendframework/zend-expressive-session-cache (1.3.1): Downloading (100%)
  • Removing azuracast/azuracore (dev-master bdf8e18)
  • Installing azuracast/azuracore (dev-master 4a5edf7): Downloading (100%)
  • Removing azuracast/azuraforms (dev-master 523b74a)
  • Installing azuracast/azuraforms (dev-master 6cc5fb9): Downloading (100%)
  • Removing james-heinrich/getid3 (dev-master 00f3fbf)
  • Installing james-heinrich/getid3 (dev-master 208ec3b): Downloading (100%)
    Generating optimized autoload files
    ocramius/package-versions: Generating version class...
    ocramius/package-versions: ...done generating version class
    [29-Sep-2019 16:43:10 UTC] PHP Fatal error: Uncaught TypeError: Argument 2 passed to Azura\Doctrine\Repository::__construct() must be an instance of Symfony\Component\Serializer\Serializer, instance of Doctrine\ORM\Mapping\ClassMetadata given, called in /var/azuracast/www/vendor/doctrine/orm/lib/Doctrine/ORM/Repository/DefaultRepositoryFactory.php on line 68 and defined in /var/azuracast/www/vendor/azuracast/azuracore/src/Doctrine/Repository.php:38
    Stack trace:

0 /var/azuracast/www/vendor/doctrine/orm/lib/Doctrine/ORM/Repository/DefaultRepositoryFactory.php(68): Azura\Doctrine\Repository->__construct(Object(Doctrine\ORM\EntityManager), Object(Doctrine\ORM\Mapping\ClassMetadata))

1 /var/azuracast/www/vendor/doctrine/orm/lib/Doctrine/ORM/Repository/DefaultRepositoryFactory.php(50): Doctrine\ORM\Repository\DefaultRepositoryFactory->createRepository(Object(Doctrine\ORM\EntityManager), 'App\Entity\Sett...')

2 /var/azuracast/www/vendor/doctrine/orm/lib/Doctrine/ORM/EntityManager.php(713): Doctrine\ORM\Repository\DefaultRepositoryFactory->getRepository(O in /var/azuracast/www/vendor/azuracast/azuracore/src/Doctrine/Repository.php on line 38

2019/09/29 16:43:10 Command exited with error: exit status 255
azuracast_redis_1 is up-to-date
azuracast_stations is up-to-date
azuracast_influxdb_1 is up-to-date
azuracast_mariadb_1 is up-to-date
Creating azuracast_web_1 ... done
Update complete!
(root!play)(azuracast)#

To Reproduce

bug in progress

All 8 comments

@simpsss We've identified the source of this problem and posted a fix to our codebase. Please update again and let us know if this fixes the issue.

still in error..

Generating optimized autoload files
ocramius/package-versions: Generating version class...
ocramius/package-versions: ...done generating version class
[29-Sep-2019 22:04:29 UTC] PHP Fatal error: Uncaught TypeError: Argument 2 passed to Azura\Doctrine\Repository::__construct() must be an instance of Symfony\Component\Serializer\Serializer, instance of Doctrine\ORM\Mapping\ClassMetadata given, called in /var/azuracast/www/vendor/doctrine/orm/lib/Doctrine/ORM/Repository/DefaultRepositoryFactory.php on line 68 and defined in /var/azuracast/www/vendor/azuracast/azuracore/src/Doctrine/Repository.php:38
Stack trace:

0 /var/azuracast/www/vendor/doctrine/orm/lib/Doctrine/ORM/Repository/DefaultRepositoryFactory.php(68): Azura\Doctrine\Repository->__construct(Object(Doctrine\ORM\EntityManager), Object(Doctrine\ORM\Mapping\ClassMetadata))

1 /var/azuracast/www/vendor/doctrine/orm/lib/Doctrine/ORM/Repository/DefaultRepositoryFactory.php(50): Doctrine\ORM\Repository\DefaultRepositoryFactory->createRepository(Object(Doctrine\ORM\EntityManager), 'App\Entity\Sett...')

2 /var/azuracast/www/vendor/doctrine/orm/lib/Doctrine/ORM/EntityManager.php(713): Doctrine\ORM\Repository\DefaultRepositoryFactory->getRepository(O in /var/azuracast/www/vendor/azuracast/azuracore/src/Doctrine/Repository.php on line 38

2019/09/29 22:04:29 Command exited with error: exit status 255

Getting some errors over here too after trying to update.
[29-Sep-2019 22:14:54 UTC] PHP Fatal error: Uncaught TypeError: Argument 2 passed to Azura\Doctrine\Repository::__construct() must be an instance of Symfony\Component\Serializer\Serializer, instance of Doctrine\ORM\Mapping\ClassMetadata given, called in /var/azuracast/www/vendor/doctrine/orm/lib/Doctrine/ORM/Repository/DefaultRepositoryFactory.php on line 68 and defined in /var/azuracast/www/vendor/azuracast/azuracore/src/Doctrine/Repository.php:38
Stack trace:

0 /var/azuracast/www/vendor/doctrine/orm/lib/Doctrine/ORM/Repository/DefaultRepositoryFactory.php(68): Azura\Doctrine\Repository->__construct(Object(Doctrine\ORM\EntityManager), Object(Doctrine\ORM\Mapping\ClassMetadata))

1 /var/azuracast/www/vendor/doctrine/orm/lib/Doctrine/ORM/Repository/DefaultRepositoryFactory.php(50): Doctrine\ORM\Repository\DefaultRepositoryFactory->createRepository(Object(Doctrine\ORM\EntityManager), 'App\Entity\Sett...')

2 /var/azuracast/www/vendor/doctrine/orm/lib/Doctrine/ORM/EntityManager.php(713): Doctrine\ORM\Repository\DefaultRepositoryFactory->getRepository(O in /var/azuracast/www/vendor/azuracast/azuracore/src/Doctrine/Repository.php on line 38

2019/09/29 22:14:54 Command exited with error: exit status 255

logs from docker-compose logs -f
image

Same for me.

@simpsss @SC2Mitch @MrSteelMiner This one's tricky, but it would've actually showed up _any time_ we made Doctrine metadata changes; it just happens that we haven't had to make those changes until the latest few code updates, which caused us to have to deal with it now.

The latest update (released a few seconds ago) should resolve this issue in a clean long-term manner. The commit number is 88b3de, so please update and make sure you're on at least that version, and confirm whether it fixed things for you.

Sorry for the inconvenience; we're looking to get this fixed ASAP.

Works fine for me now after deploying the latest patch

Now it's ok!

Thanks!

This appears to be fixed across the board now.

Sorry for the inconvenience; because this had to do with an outdated cache, our unit/functional test suite, which normally catches big issues like this, couldn't catch it since its cache is always cleared upon every reload.

The fix posted to the code removes this entire class of error by ensuring CLI commands don't use the existing cache, and thus aren't subject to this type of issue.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

dpcee30 picture dpcee30  路  3Comments

adamderann picture adamderann  路  4Comments

susl16c picture susl16c  路  3Comments

ErnestPH picture ErnestPH  路  3Comments

Blazedallup picture Blazedallup  路  3Comments