mydreamday-fi / site

mydreamday.fi (Magento 2)
https://upwork.com/fl/mage2pro
0 stars 0 forks source link

«include(generated/metadata/crontab.php): Failed to open stream: No such file or directory in vendor/magento/framework/App/ObjectManager/ConfigLoader/Compiled.php on line 31» on `bin/magento cron:run` #21

Closed dmitrii-fediuk closed 9 months ago

dmitrii-fediuk commented 9 months ago
{
    "mage2pro/core": "10.5.4",
    "Magento": "2.4.6",
    "PHP": "8.1.21",
    "Command": "bin/magento cron:run"
}
EXCEPTION
Warning: include(generated/metadata/crontab.php): Failed to open stream: No such file or directory in vendor/magento/framework/App/ObjectManager/ConfigLoader/Compiled.php on line 31
************************************
1   
    https://github.com/magento/magento2/tree/2.4.6/lib/internal/Magento/Framework/App/ErrorHandler.php#L62

2   Magento\Framework\App\ErrorHandler::handler
    https://github.com/magento/magento2/tree/2.4.6/lib/internal/Magento/Framework/App/ObjectManager/ConfigLoader/Compiled.php#L31

3   include
    https://github.com/magento/magento2/tree/2.4.6/lib/internal/Magento/Framework/App/ObjectManager/ConfigLoader/Compiled.php#L31

4   Magento\Framework\App\ObjectManager\ConfigLoader\Compiled::load
    https://github.com/magento/magento2/tree/2.4.6/lib/internal/Magento/Framework/App/Cron.php#L80

5   Magento\Framework\App\Cron::launch
    https://github.com/magento/magento2/tree/2.4.6/app/code/Magento/Cron/Console/Command/CronCommand.php#L126

6   Magento\Cron\Console\Command\CronCommand::execute
    vendor/symfony/console/Command/Command.php:298

7   Symfony\Component\Console\Command\Command::run
    https://github.com/magento/magento2/tree/2.4.6/lib/internal/Magento/Framework/Interception/Interceptor.php#L58

8   Magento\Cron\Console\Command\CronCommand::___callParent
    https://github.com/magento/magento2/tree/2.4.6/lib/internal/Magento/Framework/Interception/Interceptor.php#L138

9   Magento\Cron\Console\Command\CronCommand::Magento\Framework\Interception\{closure}
    https://github.com/mage2pro/core/tree/10.5.4/Cron/Plugin/Console/Command/CronCommand.php#L19

10  Df\Cron\Plugin\Console\Command\CronCommand::aroundRun
    https://github.com/magento/magento2/tree/2.4.6/lib/internal/Magento/Framework/Interception/Interceptor.php#L135

11  Magento\Cron\Console\Command\CronCommand::Magento\Framework\Interception\{closure}
    https://github.com/magento/magento2/tree/2.4.6/lib/internal/Magento/Framework/Interception/Interceptor.php#L153

12  Magento\Cron\Console\Command\CronCommand::___callPlugins
    generated/code/Magento/Cron/Console/Command/CronCommand/Interceptor.php:23

13  Magento\Cron\Console\Command\CronCommand::run
    vendor/symfony/console/Application.php:1040

14  Symfony\Component\Console\Application::doRunCommand
    vendor/symfony/console/Application.php:301

15  Symfony\Component\Console\Application::doRun
    https://github.com/magento/magento2/tree/2.4.6/lib/internal/Magento/Framework/Console/Cli.php#L116

16  Magento\Framework\Console\Cli::doRun
    vendor/symfony/console/Application.php:171

17  Symfony\Component\Console\Application::run
    bin/magento:23

1   Magento\Framework\App\ErrorHandler::handler
    https://github.com/magento/magento2/tree/2.4.6/lib/internal/Magento/Framework/App/ErrorHandler.php#L62

2   include
    https://github.com/magento/magento2/tree/2.4.6/lib/internal/Magento/Framework/App/ObjectManager/ConfigLoader/Compiled.php#L31

3   Magento\Framework\App\ObjectManager\ConfigLoader\Compiled::load
    https://github.com/magento/magento2/tree/2.4.6/lib/internal/Magento/Framework/App/ObjectManager/ConfigLoader/Compiled.php#L31

4   Magento\Framework\App\Cron::launch
    https://github.com/magento/magento2/tree/2.4.6/lib/internal/Magento/Framework/App/Cron.php#L80

5   Magento\Cron\Console\Command\CronCommand::execute
    https://github.com/magento/magento2/tree/2.4.6/app/code/Magento/Cron/Console/Command/CronCommand.php#L126

6   Symfony\Component\Console\Command\Command::run
    vendor/symfony/console/Command/Command.php:298

7   Magento\Cron\Console\Command\CronCommand::___callParent
    https://github.com/magento/magento2/tree/2.4.6/lib/internal/Magento/Framework/Interception/Interceptor.php#L58

8   Magento\Cron\Console\Command\CronCommand::Magento\Framework\Interception\{closure}
    https://github.com/magento/magento2/tree/2.4.6/lib/internal/Magento/Framework/Interception/Interceptor.php#L138

9   Df\Cron\Plugin\Console\Command\CronCommand::aroundRun
    https://github.com/mage2pro/core/tree/10.5.4/Cron/Plugin/Console/Command/CronCommand.php#L19

10  Magento\Cron\Console\Command\CronCommand::Magento\Framework\Interception\{closure}
    https://github.com/magento/magento2/tree/2.4.6/lib/internal/Magento/Framework/Interception/Interceptor.php#L135

11  Magento\Cron\Console\Command\CronCommand::___callPlugins
    https://github.com/magento/magento2/tree/2.4.6/lib/internal/Magento/Framework/Interception/Interceptor.php#L153

12  Magento\Cron\Console\Command\CronCommand::run
    generated/code/Magento/Cron/Console/Command/CronCommand/Interceptor.php:23

13  Symfony\Component\Console\Application::doRunCommand
    vendor/symfony/console/Application.php:1040

14  Symfony\Component\Console\Application::doRun
    vendor/symfony/console/Application.php:301

15  Magento\Framework\Console\Cli::doRun
    https://github.com/magento/magento2/tree/2.4.6/lib/internal/Magento/Framework/Console/Cli.php#L116

16  Symfony\Component\Console\Application::run
    vendor/symfony/console/Application.php:171
dmitrii-fediuk commented 9 months ago

Solved by sudo service cron stop before a compilation:

sudo service cron stop
bin/magento maintenance:enable
rm -rf var/di var/generation generated/*
bin/magento setup:di:compile
bin/magento cache:clean
bin/magento maintenance:disable
sudo service cron start