Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Magento doesn't work after upgrade from 2.3.0 to 2.3.1 #21976

Closed
dweerd opened this issue Mar 27, 2019 · 9 comments
Closed

Magento doesn't work after upgrade from 2.3.0 to 2.3.1 #21976

dweerd opened this issue Mar 27, 2019 · 9 comments
Assignees
Labels
Fixed in 2.3.x The issue has been fixed in 2.3 release line Issue: Format is valid Gate 1 Passed. Automatic verification of issue format passed

Comments

@dweerd
Copy link

dweerd commented Mar 27, 2019

Preconditions (*)

  1. Magento version 2.3.1
  2. PHP version 7.1.x + Redis
  3. Deploy mode: production

Steps to reproduce (*)

  1. I upgraded a production environment to magento 2.3.1
  2. I ran setup:upgrade and setup:di:compile
  3. I visited homepage

Expected result (*)

  1. See the homepage

Actual result (*)

  1. Server error log contained the following error: Backend fatal error: PHP Fatal error: Uncaught RuntimeException: Source class "\\Magento\\Cron\\Model\\Virtual" for "Magento\\Cron\\Model\\VirtualLogger" generation does not exist.

This seems related to the following change in Magento 2.3.1: #18209

@magento-engcom-team
Copy link
Contributor

Hi @dweerd. Thank you for your report.
To help us process this issue please make sure that you provided the following information:

  • Summary of the issue
  • Information on your environment
  • Steps to reproduce
  • Expected and actual results

Please make sure that the issue is reproducible on the vanilla Magento instance following Steps to reproduce. To deploy vanilla Magento instance on our environment, please, add a comment to the issue:

@magento-engcom-team give me 2.3-develop instance - upcoming 2.3.x release

For more details, please, review the Magento Contributor Assistant documentation.

@dweerd do you confirm that you was able to reproduce the issue on vanilla Magento instance following steps to reproduce?

  • yes
  • no

@magento-engcom-team magento-engcom-team added the Issue: Format is valid Gate 1 Passed. Automatic verification of issue format passed label Mar 27, 2019
@hostep
Copy link
Contributor

hostep commented Mar 27, 2019

Hi @dweerd

Would you be able to list all the exact steps you performed after the upgrade?
Because I can't seem to reproduce this after upgrading a vanilla 2.3.0 to 2.3.1 and putting 2.3.1 in production mode.

Thanks!

@bahramdavoodi
Copy link

Hi @dweerd,
I had the same problem on Amasy Layered Navigation extension with Magento 2.3.1, but with a different error: Issue #21916. if you installed some extension, you can to try to disable one by one extensions.

Thanks

@hostep
Copy link
Contributor

hostep commented Mar 27, 2019

@bahramdavodi: thanks for the link!
If I understand it correctly, in case of this issue, it might be that some custom module has a plugin on the class Magento\Cron\Observer\ProcessCronQueueObserver, and by introducing a different typed $logger argument in #18209, it might cause this problem. (not 100% sure if this description is correct, not fully understanding it yet).

@dweerd: can you check the custom code (your own or 3rd party) if there is a plugin defined on Magento\Cron\Observer\ProcessCronQueueObserver somewhere?

@dweerd
Copy link
Author

dweerd commented Mar 28, 2019

@bahramdavodi I had that same error as well, which I got around by disabling the Magento_ElasticSearch6 module. That error prevented setup:di:compile to complete. After disabling the module, the compile would run fine.

The error reported here actually didn't occur during setup:di:compile, but happens upon visiting the backend/frontend.

@hostep as far as I can tell, there is no plugin defined on that class in my code.

I didn't get the error on my development environment, but did get it on the production environment.

For the upgrade I did these things:

  • enabled maintenance mode
  • pulled new code from git
  • ran composer install --no-dev -o
  • php bin/magento setup:upgrade
  • redis-cli -s /tmp/redis.sock flushall
  • I then noticed the deploy mode was no longer 'production' so I ran bin/magento deploy:mode:set production
  • I ran into the error linked to by @bahramdavodi, and fixed it by running bin/magento module:disable Magento_Elasticsearch6
  • This time compilation / switching to production mode worked, and I tried visiting the frontend, ending up with the error about the Cron class.

Looking at the error, where should the class '\Magento\Cron\Model\Virtual' come from? I actually don't see this class defined in code?

@hostep
Copy link
Contributor

hostep commented Mar 28, 2019

@dweerd, thanks for the info.

Very good remark about Magento\Cron\Model\Virtual, this is really weird, because the virtual type Magento\Cron\Model\VirtualLogger got introduced in https://github.com/magento/magento2/pull/18209/files. But for some reason, in your error it strips of the Logger part of the class, which is really strange ...

@dweerd
Copy link
Author

dweerd commented Mar 30, 2019

@dweerd, thanks for the info.

Very good remark about Magento\Cron\Model\Virtual, this is really weird, because the virtual type Magento\Cron\Model\VirtualLogger got introduced in https://github.com/magento/magento2/pull/18209/files. But for some reason, in your error it strips of the Logger part of the class, which is really strange ...

See: https://magento.stackexchange.com/questions/132700/magento-2-what-are-generated-logger-classes-for. Maybe this is related?

@hostep
Copy link
Contributor

hostep commented Mar 30, 2019

@dweerd: this seems to be related to the issue #21916
And there is a possible fix proposed in #22046

Maybe you can test that fix and see if it fixes your issue as well?

@magento-engcom-team magento-engcom-team added the Fixed in 2.3.x The issue has been fixed in 2.3 release line label Apr 15, 2019
@magento-engcom-team
Copy link
Contributor

Hi @dweerd. Thank you for your report.
The issue has been fixed in #22046 by @phoenix128 in 2.3-develop branch
Related commit(s):

The fix will be available with the upcoming 2.3.2 release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Fixed in 2.3.x The issue has been fixed in 2.3 release line Issue: Format is valid Gate 1 Passed. Automatic verification of issue format passed
Projects
None yet
Development

No branches or pull requests

6 participants