completely rebuilt my local docker install with a v2.2.5 code base and magento db. All working well. then proceeded to install v2.2.6 thusly:
Exception #0 (Magento\Framework\Exception\LocalizedException): Please update your modules: Run "composer install" from the Magento root directory.
The following modules are outdated:
Amazon_Core db schema version: defined in codebase - 2.1.0, currently installed - 2.1.1
Amazon_Core db data version: defined in codebase - 2.1.0, currently installed - 2.1.1
Amazon_Login db schema version: defined in codebase - 2.1.0, currently installed - 2.1.1
Amazon_Login db data version: defined in codebase - 2.1.0, currently installed - 2.1.1
Amazon_Payment db schema version: defined in codebase - 2.1.0, currently installed - 2.1.1
Amazon_Payment db data version: defined in codebase - 2.1.0, currently installed - 2.1.1
Hi @pmsteil. Thank you for your report.
To help us process this issue please make sure that you provided the following information:
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 $VERSION instance
where $VERSION
is version tags (starting from 2.2.0+) or develop branches (for example: 2.3-develop).
For more details, please, review the Magento Contributor Assistant documentation.
@pmsteil do you confirm that you was able to reproduce the issue on vanilla Magento instance following steps to reproduce?
@magento-engcom-team give me 2.2.6 instance
Hi @pmsteil. Thank you for your request. I'm working on Magento 2.2.6 instance for you
@magento-engcom-team give me 2.2.5 instance
Hi @pmsteil. Thank you for your request. I'm working on Magento 2.2.5 instance for you
Hi @pmsteil, here is your Magento instance.
Admin access: https://i-18248-2-2-6.engcom.dev.magento.com/admin
Login: admin
Password: 123123q
Instance will be terminated in up to 3 hours.
I won't be able to reproduce this way since I can't run the commands via ssh that I am running. Did I miss something in the upgrade process?
Hi @engcom-backlog-nazar. Thank you for working on this issue.
In order to make sure that issue has enough information and ready for development, please read and check the following instruction: :point_down:
Issue: Format is valid
will be added to the issue automatically. Please, edit issue description if needed, until label Issue: Format is valid
appears.[x] 2. Verify that issue has a meaningful description and provides enough information to reproduce the issue. If the report is valid, add Issue: Clear Description
label to the issue by yourself.
[ ] 3. Add Component: XXXXX
label(s) to the ticket, indicating the components it may be related to.
[ ] 4. Verify that the issue is reproducible on 2.3-develop
branchDetails
- Add the comment @magento-engcom-team give me 2.3-develop instance
to deploy test instance on Magento infrastructure.
- If the issue is reproducible on 2.3-develop
branch, please, add the label Reproduced on 2.3.x
.
- If the issue is not reproducible, add your comment that issue is not reproducible and close the issue and _stop verification process here_!
[ ] 5. Verify that the issue is reproducible on 2.2-develop
branch. Details
- Add the comment @magento-engcom-team give me 2.2-develop instance
to deploy test instance on Magento infrastructure.
- If the issue is reproducible on 2.2-develop
branch, please add the label Reproduced on 2.2.x
[ ] 6. Add label Issue: Confirmed
once verification is complete.
[ ] 7. Make sure that automatic system confirms that report has been added to the backlog.
Hi @pmsteil This this issue happened because version of modules in DB has wrong number, update your Amazon module to current version.
Hi @pmsteil This this issue happened because version of modules in DB has wrong number, update your Amazon module to current version.
Thanks, but how do I do that? :)
patrick
@pmsteil I hit the same error using the same upgrade i.e. upgrading 2.2.5 to 2.2.6 using CLI in a PLESK environment. New to M2 (just migrated 1.9.3 to 2.2.5) and don't know how to update the Amazon module. Links/support appreciated.
@engcom-backlog-nazar Ok a second user having this problem. Can you look into it and/or provide instructions on how to resolve the version of modules issue that you mentioned?
thanks
Patrick
I am more just stating the obvious and my take on things so far. Maybe something here can help someone.
On Magento version 2.2.5 the Amazon Modules updated to 2.1.1
Here is a dump from Composer on my Magento running 2.2.5:
amzn/amazon-pay-and-login-magento-2-module 2.1.1
amzn/amazon-pay-and-login-with-amazon-core-module 2.1.1
amzn/amazon-pay-module 2.1.1
amzn/amazon-pay-sdk-php 3.3.2
amzn/login-with-amazon-module 2.1.1
So an update during the 2.2.5 lifecycle forced Amazon and the databases to 2.1.1
But after installing Magento 2.2.6 update by using the commands
composer require magento/product-community-edition 2.2.6 --no-update
composer update
rm -R /var/www/html/var/view_preprocessed/*
rm -R /var/www/html/pub/static/*
composer dump
php /var/www/html/bin/magento setup:upgrade
php /var/www/html/bin/magento setup:di:compile
php /var/www/html/bin/magento setup:static-content:deploy --jobs 10
php /var/www/html/bin/magento opcache:clear
supervisorctl restart php-fpm
Yes that was a bit overkill but I wanted to clean our everything. I get the same error as the original post. My composer now says I have downgraded by Amazon versions:
amzn/amazon-pay-and-login-with-amazon-core-module 2.1.0
amzn/amazon-pay-module 2.1.0
amzn/amazon-pay-sdk-php 3.3.2
amzn/login-with-amazon-module 2.1.0
So this does make sense that the database versions are complaining since Magento 2.2.6 downgraded the Amazon module version to 2.1.0.
I tried to make composer to upgrade Amazon to 2.1.1 and I got this error:
Your requirements could not be resolved to an installable set of packages.
Problem 1
- magento/product-community-edition 2.2.6 requires amzn/amazon-pay-and-login-with-amazon-core-module 2.1.0 -> satisfiable by amzn/amazon-pay-and-login-with-amazon-core-module[2.1.0] but these conflict with your requirements or minimum-stability.
- magento/product-community-edition 2.2.6 requires amzn/amazon-pay-and-login-with-amazon-core-module 2.1.0 -> satisfiable by amzn/amazon-pay-and-login-with-amazon-core-module[2.1.0] but these conflict with your requirements or minimum-stability.
- magento/product-community-edition 2.2.6 requires amzn/amazon-pay-and-login-with-amazon-core-module 2.1.0 -> satisfiable by amzn/amazon-pay-and-login-with-amazon-core-module[2.1.0] but these conflict with your requirements or minimum-stability.
- Installation request for magento/product-community-edition 2.2.6 -> satisfiable by magento/product-community-edition[2.2.6].
Installation failed, reverting ./composer.json to its original content.
So Magento 2.2.6 is requiring an older version of Amazon.
So here are my questions:
Should Magento 2.2.6 have been on Amazon 2.1.1?
If we have to downgrade to Amazon 2.1.0 how do we downgrade the database?
Can we just change the number in magento database to 2.1.0 under setup_module? If so what issues will this present?
Will there be upgrade issues down the road if 2.1.1+ come out and I faked the database versions?
I did try changing the database to show 2.1.0 for the Amazon Modules. The site did come back on. I have not tested Amazon Login and Pay yet. That is what I was trying to get working properly with my checkout.
I found the same issue when did composer update from 2.2.4 and then upgrade to 2.2.6
@pmsteil Ok a temporary fix, it's just change version in DataBase ons setup_module table to required.
@pmsteil Ok a temporary fix, it's just change version in DataBase ons setup_module table to required.
@engcom-backlog-nazar Ok, thank you for the note, but can you provide the actual sql statements to do what you are suggesting? I don't know what you are suggesting, thanks.
@pmsteil Yes sure
update setup_module set schema_version='2.1.0', data_version='2.1.0' where module="Amazon_Core";
update setup_module set schema_version='2.1.0', data_version='2.1.0' where module="Amazon_Login";
update setup_module set schema_version='2.1.0', data_version='2.1.0' where module="Amazon_Payment";
Another temporary work around, for those not using the gateway, is to disable the modules. I'm assuming there are no other dependencies.
php magento module:disable Amazon_Core Amazon_Payment Amazon_Login
@steveb2050 Thanks! Disabling the Amazon modules worked great! Not sure why these would default to enabled anyway.
I can confirm what is mentioned above.
magento225
magento226
module.xml
file:$ diff magento225/vendor/amzn/amazon-pay-and-login-with-amazon-core-module/etc/module.xml magento226/vendor/amzn/amazon-pay-and-login-with-amazon-core-module/etc/module.xml
3c3
< <module name="Amazon_Core" setup_version="2.1.1">
---
> <module name="Amazon_Core" setup_version="2.1.0">
/cc: @prayagr, you'll probably want to be aware of this.
/start rant
@maksek, @okorshenko, @dmanners, @woosley-mg: this is another proof that Magento does nothing to ensure these core bundled extensions are tested and none of these should be included by default in Magento as it brings down the stability of the core of Magento in all kinds of unexpected ways.
It was a fun experiment these things in the last couple of months, but I think you can conclude the experiment failed horribly.
Please do what is necessary to completely remove these from Magento 2.3.0 and 2.2.7. Thanks!
/end rant
This is a workaround for the people still wanting to use the Amazon modules, edit the composer.json
file of your project and add the following lines to the require
section:
"amzn/amazon-pay-and-login-with-amazon-core-module": "2.1.1 as 2.1.0",
"amzn/amazon-pay-module": "2.1.1 as 2.1.0",
"amzn/login-with-amazon-module": "2.1.1 as 2.1.0"
Here you're saying to composer to install version 2.1.1 but pretend it is version 2.1.0, so it won't conflict with the version contraints in the magento/product-community-edition
module.
Be sure to remove those lines again when the next version of Magento is released though!
My original problem is resolved, but now I am now having a problem that every page but the homepage is giving this error:
Fatal error: Uncaught Error: Cannot instantiate interface Magento\Framework\Search\Request\IndexScopeResolverInterface in /app/vendor/magento/framework/ObjectManager/Factory/Dynamic/Developer.php:50 Stack trace: #0 /app/vendor/magento/framework/ObjectManager/ObjectManager.php(70): Magento\Framework\ObjectManager\Factory\Dynamic\Developer->create('Magento\\Framewo...') #1 /app/vendor/magento/module-catalog-search/Model/Search/FilterMapper/ExclusionStrategy.php(90): Magento\Framework\ObjectManager\ObjectManager->get('Magento\\Framewo...') #2 /app/vendor/magento/framework/ObjectManager/Factory/AbstractFactory.php(111): Magento\CatalogSearch\Model\Search\FilterMapper\ExclusionStrategy->__construct(Object(Magento\Framework\App\ResourceConnection\Interceptor), Object(Magento\Store\Model\StoreManager), Object(Magento\CatalogSearch\Model\Adapter\Mysql\Filter\AliasResolver), NULL, NULL, Object(Magento\Catalog\Model\Indexer\Product\Price\PriceTableResolver), NULL) #3 /app/vendor/magento/framework/ObjectManager/Factory/Dynamic/Devel in /app/vendor/magento/framework/ObjectManager/Factory/Dynamic/Developer.php on line 50
Is anyone else having this problem? I have gone through all the different removing/resetting/reloading of caches and to no avail.
Hi @hostep, @pmsteil
This is a known issue but thank you for reporting it and making us know that it is important to you.
It is relevant only for version 2.2.5 (and lower) of Magento, because those versions allow you to install patch updates of the bundle extensions (i.e. in your case Magento updated Amazon extensions from 2.1.0 to 2.1.1 version because its dependency is defined as "^2.0.4" and 2.1.1 is already available publicly for some reasons).
Starting from version 2.2.6, Magento requires exact versions of bundled extensions to avoid such issues in future.
I hope, this information is helpful.
@aakimov - well, I am not sure what you are saying? Should we do something different when installing v2.2.6? Is this a known issue that will be resolved?
What about my latest issue that I reported directly prior to your comment? Any guidance on that?
Thanks
Patrick
@aakimov: thanks for the info, that explain a lot.
Unfortunately you can't go back in the past and make the version constraints more stricter, so you shouldn't make it more stricter now or in a future version of Magento, this is not the correct solution.
People will still be using Magento 2.2.4 or 2.2.5 and decide that the upgrade to 2.2.6 isn't for this very instant and might wait a couple of weeks/months.
In the mean time, newer versions of these modules will be released and people on 2.2.4/2.2.5 could (and will) update to those (as long as the version constraints in those modules allow that to happen (hint)).
But if they then want to update to Magento 2.2.6 or a higher Magento version, they might still run into problems if the version of the module Magento forces people to install is lower the version they already had installed.
You're now also forcing these bundled extensions to stick to the same super slow release cycle of Magento itself, so newer versions these vendors release won't be easily installable (unless using tricks like the one I mentioned above). So if they have a very important fix, shop owners have to wait on Magento to release a new version and then hope the vendors newer version will be included as well.
I thought Magento was moving in a direction of modularity, where all modules could be updated independently, but decisions like these are showing that you are moving in the exact opposite direction?
Btw, Amazon modules aren't the only ones affected, upgrading from Magento 2.2.5 to 2.2.6 causes these lines to be outputted on a composer update
call (I hope you were also already aware of these?):
Anyway, whatever, luckily at our company we complete ignore these modules and aren't affected by this nonsense.
I'm just worried about all the issues people will keep creating over here at github around these core bundled extensions, and it doesn't seem like it's going to get better in the near future.
I don't like to repeat myself, but I think the only good solution here is for Magento to remove these core bundled extensions from a default installation and let people decide for themselves if they want to include these and let people themselves manage the versions of those modules, Magento should really stay out of this.
@hostep , thank you for feedback. We appreciate your direct message regarding community experience.
You are right, modularity is a direction we are moving to. However, we should not expect that such fundamental changes may be implemented within already released minor version. All 2.2.x should follow the same concepts as were defined in 2.2.0. Strictly defined versions is one of the concepts used in 2.2.x.
Pilot wider definitions used till 2.2.5 just for extensions are recognized as potentially problematic. This specific case is a good example of possible issues. Mentioned Amazon package 2.1.1 was published in the context of 2.3.0 packaging and its compatibility with 2.2.6 was not confirmed. We predicted such cases in the context of planned 2.3.0 release.
Strict extension versions in 2.2.6 is a mitigation - we try to decrease amount of potentially affected customers. We expect that as must as possible customers will be migrated to 2.2.6. It is not the ideal solution, but we had to do such hard decision.
An ability to update modules independently requires compatibility and quality checks among all possible version pairs of Magento and an extension. If we do not guarantee that extensions released with 2.3.0 are compatible with 2.2.x, we reflect that in dependencies. Modularity should be built on stability.
@rgoncharuk: Thanks for the info!
Are there any plans from Magento's side to communicate this to a broader audience (like a blogpost for example), to explain these changes and tell people who run into these problems about the right way to solve them? For example: if database migrations got run by upgrading to a version which is higher then a version included in Magento 2.2.6, are you going to explain how and what the best way is for people to handle these downgrades?
I would also highly recommend that if new versions get released for these core bundled extensions that something is done so those new versions aren't going to be installed anymore on Magento 2.2.4/2.2.5, by either:
Can you also confirm that you will start testing Magento bundled with these core bundled extensions better? Because that wasn't really happening in the past if we look at all the various (sometimes very big) problems these extensions caused.
Thanks again!
update setup_module set schema_version='2.1.0', data_version='2.1.0' where module="Amazon_Core";
update setup_module set schema_version='2.1.0', data_version='2.1.0' where module="Amazon_Login";
update setup_module set schema_version='2.1.0', data_version='2.1.0' where module="Amazon_Payment";
update setup_module set schema_version='4.4.4', data_version='4.4.4' where module="Klarna_Core";
update setup_module set schema_version='4.3.4', data_version='4.3.4' where module="Klarna_Ordermanagement";
update setup_module set schema_version='5.4.4', data_version='5.4.4' where module="Klarna_Kp";
update setup_module set schema_version='100.2.0', data_version='100.2.0' where module="Vertex_Tax";
update setup_module set schema_version='2.2.1', data_version='2.2.1' where module="Magento_ConfigurableProduct";
update setup_module set schema_version='2.2.1', data_version='2.2.1' where module="Magento_Integration";
update setup_module set schema_version='1.0.0', data_version='1.0.0' where module="Magento_SwaggerWebapi";
update setup_module set schema_version='2.6.0', data_version='2.6.0' where module="Dotdigitalgroup_Email";
I'm getting the Fatal error: Uncaught Error: Cannot instantiate interface Magento\Framework\Search\Request\IndexScopeResolverInterface
issue. @pmsteil did you figure out this issue?
I have upgraded from 2.2.1 to 2.2.6
The result error:
1 exception(s):
Exception #0 (Magento\Framework\Exception\LocalizedException): Please update your modules: Run "composer install" from the Magento root directory.
The following modules are outdated:
Klarna_Core db schema version: defined in codebase - 4.4.4, currently installed - 4.5.2
Klarna_Core db data version: defined in codebase - 4.4.4, currently installed - 4.5.2
Klarna_Ordermanagement db schema version: defined in codebase - 4.3.4, currently installed - 4.4.1
Klarna_Ordermanagement db data version: defined in codebase - 4.3.4, currently installed - 4.4.1
Klarna_Kp db schema version: defined in codebase - 5.4.4, currently installed - 5.5.1
Klarna_Kp db data version: defined in codebase - 5.4.4, currently installed - 5.5.1
Vertex_Tax db schema version: defined in codebase - 100.2.0, currently installed - 100.2.1
Vertex_Tax db data version: defined in codebase - 100.2.0, currently installed - 100.2.1
Exception #0 (Magento\Framework\Exception\LocalizedException): Please update your modules: Run "composer install" from the Magento root directory.
The following modules are outdated:
Klarna_Core db schema version: defined in codebase - 4.4.4, currently installed - 4.5.2
Klarna_Core db data version: defined in codebase - 4.4.4, currently installed - 4.5.2
Klarna_Ordermanagement db schema version: defined in codebase - 4.3.4, currently installed - 4.4.1
Klarna_Ordermanagement db data version: defined in codebase - 4.3.4, currently installed - 4.4.1
Klarna_Kp db schema version: defined in codebase - 5.4.4, currently installed - 5.5.1
Klarna_Kp db data version: defined in codebase - 5.4.4, currently installed - 5.5.1
Vertex_Tax db schema version: defined in codebase - 100.2.0, currently installed - 100.2.1
Vertex_Tax db data version: defined in codebase - 100.2.0, currently installed - 100.2.1
I appreciate anyone give suggestion to solve the problem.
I have upgraded from 2.2.1 to 2.2.6
The result error:1 exception(s):
Exception #0 (Magento\Framework\Exception\LocalizedException): Please update your modules: Run "composer install" from the Magento root directory.
The following modules are outdated:
Klarna_Core db schema version: defined in codebase - 4.4.4, currently installed - 4.5.2
Klarna_Core db data version: defined in codebase - 4.4.4, currently installed - 4.5.2
Klarna_Ordermanagement db schema version: defined in codebase - 4.3.4, currently installed - 4.4.1
Klarna_Ordermanagement db data version: defined in codebase - 4.3.4, currently installed - 4.4.1
Klarna_Kp db schema version: defined in codebase - 5.4.4, currently installed - 5.5.1
Klarna_Kp db data version: defined in codebase - 5.4.4, currently installed - 5.5.1
Vertex_Tax db schema version: defined in codebase - 100.2.0, currently installed - 100.2.1
Vertex_Tax db data version: defined in codebase - 100.2.0, currently installed - 100.2.1Exception #0 (Magento\Framework\Exception\LocalizedException): Please update your modules: Run "composer install" from the Magento root directory.
The following modules are outdated:
Klarna_Core db schema version: defined in codebase - 4.4.4, currently installed - 4.5.2
Klarna_Core db data version: defined in codebase - 4.4.4, currently installed - 4.5.2
Klarna_Ordermanagement db schema version: defined in codebase - 4.3.4, currently installed - 4.4.1
Klarna_Ordermanagement db data version: defined in codebase - 4.3.4, currently installed - 4.4.1
Klarna_Kp db schema version: defined in codebase - 5.4.4, currently installed - 5.5.1
Klarna_Kp db data version: defined in codebase - 5.4.4, currently installed - 5.5.1
Vertex_Tax db schema version: defined in codebase - 100.2.0, currently installed - 100.2.1
Vertex_Tax db data version: defined in codebase - 100.2.0, currently installed - 100.2.10 /home/lp1757/mg_2.2/apps/magento/htdocs/vendor/magento/framework/Interception/Interceptor.php(121): Magento\Framework\Module\Plugin\DbStatusValidator->beforeDispatch(Object(Magento\Framework\App\FrontController\Interceptor), Object(Magento\Framework\App\Request\Http))
1 /home/lp1757/mg_2.2/apps/magento/htdocs/vendor/magento/module-page-cache/Model/App/FrontController/BuiltinPlugin.php(73): Magento\Framework\App\FrontController\Interceptor->Magento\Framework\Interception{closure}(Object(Magento\Framework\App\Request\Http))
2 /home/lp1757/mg_2.2/apps/magento/htdocs/vendor/magento/framework/Interception/Interceptor.php(135): Magento\PageCache\Model\App\FrontController\BuiltinPlugin->aroundDispatch(Object(Magento\Framework\App\FrontController\Interceptor), Object(Closure), Object(Magento\Framework\App\Request\Http))
3 /home/lp1757/mg_2.2/apps/magento/htdocs/vendor/magento/framework/Interception/Interceptor.php(153): Magento\Framework\App\FrontController\Interceptor->Magento\Framework\Interception{closure}(Object(Magento\Framework\App\Request\Http))
4 /home/lp1757/mg_2.2/apps/magento/htdocs/generated/code/Magento/Framework/App/FrontController/Interceptor.php(26): Magento\Framework\App\FrontController\Interceptor->___callPlugins('dispatch', Array, Array)
5 /home/lp1757/mg_2.2/apps/magento/htdocs/vendor/magento/framework/App/Http.php(135): Magento\Framework\App\FrontController\Interceptor->dispatch(Object(Magento\Framework\App\Request\Http))
6 /home/lp1757/mg_2.2/apps/magento/htdocs/generated/code/Magento/Framework/App/Http/Interceptor.php(24): Magento\Framework\App\Http->launch()
7 /home/lp1757/mg_2.2/apps/magento/htdocs/vendor/magento/framework/App/Bootstrap.php(257): Magento\Framework\App\Http\Interceptor->launch()
8 /home/lp1757/mg_2.2/apps/magento/htdocs/index.php(39): Magento\Framework\App\Bootstrap->run(Object(Magento\Framework\App\Http\Interceptor))
9 {main}
I appreciate anyone give suggestion to solve the problem.
I solved by changing directly in the database.
Look my answer this will to solve
@rafagaseo: just out of curiosity, did you check if any db upgrade scripts existed in these newer versions of these modules? Because if that was the case, you might run into problems when upgrading to a newer version later on.
If there weren't any db migration scripts involved in between those versions, then it should be fine.
Following @hostep's previous note of requiring the newer versions as if they were the older versions:
composer require vertex/module-tax:"2.2.0 as 2.1.10" \
amzn/amazon-pay-and-login-magento-2-module:2.1.1 \
amzn/amazon-pay-and-login-with-amazon-core-module:"2.1.1 as 2.1.0" \
amzn/amazon-pay-module:"2.1.1 as 2.1.0" \
amzn/login-with-amazon-module:"2.1.1 as 2.1.0" \
klarna/module-core:"4.5.2 as 4.4.5" \
klarna/module-ordermanagement:"4.4.1 as 4.3.4" \
klarna/module-kp:"5.5.1 as 5.4.4"
This can cause issues if there are third party dependencies that support and plug in to these modules, but that seems unlikely. You will also have to do more work to fix them once you have upgraded to the next version.
But it will be less confusing than the database errors you'll get if you just update the versions in the database.
It's also worth noting that Magento doesn't test bundled extension versions against versions of Magento they did not ship with. For performance reasons, it's a better idea to disable the modules you're not using.
For me, the same modules as @rastin1 posted are affected:
As @hostep correctly pointed out, if these modules have made db upgrades after the version that is now required, probably it is not a good idea to just change the module's versions in the setup_module table. Of these four modules, only the Klarna_Kp has made db data updates (updates happened in version 5.4.5, now 5.4.4 is required but 5.5.1 is currently installed). Please correct me, if I'm wrong!
So there is still no good workaround to this problem -- did I get this right?
The best workaround seems to be to disable the affected modules, in case I don't need them. But what would be a good and secure solution if my eCommerce depends on the Klarna modules? Staying with Magento 2.2.5 and forego the advertised security enhancements from 2.2.6!? When would I be able to update my Magento instance without hacking the db or the composer dependency definitions? Should I wait until 2.2.7 is released and be careful not to make further updates of my 2.2.5 instance because further updates may affect further modules, in case the newer module versions will not match the strict dependencies from 2.2.7?
@magento-engcom-team suggest a practical solution to this issue, please!
Will Magento 2.3 have this problem?
@pmsteil, based on what I can tell from beta12, it looks like it should be fine, version numbers aren't going down between 2.2.5 and 2.3.0-beta12:
Magento 2.2.5:
amzn/amazon-pay-and-login-magento-2-module 2.1.1
amzn/amazon-pay-and-login-with-amazon-core-module 2.1.1
amzn/amazon-pay-module 2.1.1
amzn/amazon-pay-sdk-php 3.3.2
amzn/login-with-amazon-module 2.1.1
dotmailer/dotmailer-magento2-extension 2.6.0
klarna/module-core 4.5.2
klarna/module-kp 5.5.1
klarna/module-ordermanagement 4.4.1
temando/module-shipping-m2 1.3.3
vertex/module-tax 2.2.0
vertex/sdk 1.0.0
Magento 2.2.6:
amzn/amazon-pay-and-login-with-amazon-core-module 2.1.0
amzn/amazon-pay-module 2.1.0
amzn/amazon-pay-sdk-php 3.3.2
amzn/login-with-amazon-module 2.1.0
dotmailer/dotmailer-magento2-extension 2.6.0
klarna/module-core 4.4.5
klarna/module-kp 5.4.4
klarna/module-ordermanagement 4.3.4
temando/module-shipping-m2 1.3.3
vertex/module-tax 2.1.10
Magento 2.3.0-beta12:
amzn/amazon-pay-and-login-magento-2-module 2.1.1
amzn/amazon-pay-and-login-with-amazon-core-module 2.1.1
amzn/amazon-pay-module 2.1.1
amzn/amazon-pay-sdk-php 3.3.2
amzn/login-with-amazon-module 2.1.1
dotmailer/dotmailer-magento2-extension 3.0.0
klarna/m2-payments 5.2.0
klarna/module-core 4.5.2
klarna/module-kp 5.5.1
klarna/module-ordermanagement 4.4.1
temando/module-shipping-m2 1.4.0
vertex/module-tax 2.2.0
vertex/sdk 1.0.0
But that doesn't mean it won't happen, because if a new version of these modules gets released in the future, which is marked as compatible with Magento 2.2.5, then we might still see a downgrade happening in 2.3.
Hopefully the Magento people will try to communicate with the vendors about this and try to prevent this from happening, right @rgoncharuk ?
Btw: is there already an update from Magento in regards of making this "hard decision" more publicly known? And telling people what to do when they run against this problem with downgrades and potential db migration problems they might run into in the future?
My original problem is resolved, but now I am now having a problem that every page but the homepage is giving this error:
Fatal error: Uncaught Error: Cannot instantiate interface Magento\Framework\Search\Request\IndexScopeResolverInterface in /app/vendor/magento/framework/ObjectManager/Factory/Dynamic/Developer.php:50 Stack trace: #0 /app/vendor/magento/framework/ObjectManager/ObjectManager.php(70): Magento\Framework\ObjectManager\Factory\Dynamic\Developer->create('Magento\\Framewo...') #1 /app/vendor/magento/module-catalog-search/Model/Search/FilterMapper/ExclusionStrategy.php(90): Magento\Framework\ObjectManager\ObjectManager->get('Magento\\Framewo...') #2 /app/vendor/magento/framework/ObjectManager/Factory/AbstractFactory.php(111): Magento\CatalogSearch\Model\Search\FilterMapper\ExclusionStrategy->__construct(Object(Magento\Framework\App\ResourceConnection\Interceptor), Object(Magento\Store\Model\StoreManager), Object(Magento\CatalogSearch\Model\Adapter\Mysql\Filter\AliasResolver), NULL, NULL, Object(Magento\Catalog\Model\Indexer\Product\Price\PriceTableResolver), NULL) #3 /app/vendor/magento/framework/ObjectManager/Factory/Dynamic/Devel in /app/vendor/magento/framework/ObjectManager/Factory/Dynamic/Developer.php on line 50
Is anyone else having this problem? I have gone through all the different removing/resetting/reloading of caches and to no avail.
Hi @pmsteil - please did you solved this issue? We're fighting with this issue even on the clean magentro install. We're unable to display Category and search pages. Trying to solve it for two days :( Thanx a lot for help!
@maximkrusina No, I haven't resolved that. Good to know it is happening to someone else. I am just skipping this release for now and moving on to 2.3.
patrick
@pmsteil plz and it works with 2.3 well? I'm really fighting with an clean imstall :( we're a liitle bit mad about it
@pmsteil and please, do you use your own Docker file or some image? We're using this one: alexcheng/magento2
@maximkrusina I haven't had time to try 2.3 yet...
We use this image for docker:
https://hub.docker.com/r/rafaelcgstz/magento2/
We are hosting this on platform.sh.
@maximkrusina & @pmsteil: according to this post, it might be an environmental problem caused by a specific docker setup (possibly your app/etc/di.xml
file is missing some lines).
But if you're sure it's not and you can very easily reproduce it, would you be so kind to open a new issue? Since we're now talking about two different problems in this thread, it's best to have one thread per problem, thanks! :)
I stumbled on this too. 225 -> 226
Exception #0 (Magento\Framework\Exception\LocalizedException): Please update your modules: Run "composer install" from the Magento root directory.
The following modules are outdated:
Klarna_Core db schema version: defined in codebase - 4.4.4, currently installed - 4.5.2
Klarna_Core db data version: defined in codebase - 4.4.4, currently installed - 4.5.2
...
Vertex_Tax db schema version: defined in codebase - 100.2.0, currently installed - 100.2.1
Vertex_Tax db data version: defined in codebase - 100.2.0, currently installed - 100.2.1
Because this happened, I disabled these modules (my customer doesn't need them) in another shop and then did the upgrade. It went fine.
Oh I forgot to tell how I fixed this:
I simply ran
php bin/magento module:disable Klarna_Core Klarna_Ordermanagement Klarna_Kp Vertex_Tax
composer update
and then did the rm, cache clean, flush, setup upgrade and compile commands again
It worked out fine and the shop is up and running again.
The biggest issue here is the use of meta packages. A meta package is great for avoiding having to require dozens of individual extensions in the root composer.json. However it has zero visibility because the meta package is not actually installed. If you included a small package just to document what is being included by the meta package, it would be easy for technically proficient users to actual check the information. Heck, just publish the composer.json file of the meta package with the release notes!
"Strict extension versions in 2.2.6 is a mitigation - we try to decrease amount of potentially affected customers. We expect that as must as possible customers will be migrated to 2.2.6. It is not the ideal solution, but we had to do such hard decision."
That you deliberately made this decision but it is not in the release notes is extremely bad. https://devdocs.magento.com/guides/v2.2/release-notes/ReleaseNotes2.2.6CE.html . This should have been there.
Magento Cloud manages to include checks on vendor supplied libraries for issues such as this and provides a warning. The same can be done here. Magento provides a plugin which runs during composer installs. That plugin can be enhanced to perform these checks.
"You are right, modularity is a direction we are moving to. However, we should not expect that such fundamental changes may be implemented within already released minor version"
Stop calling them minor releases. You are not following semantic versioning - it is quite obvious. 2.2.5 was a major feature upgrade. 2.2.6 is another major upgrade. When you have massive backwards compatible issues, it is major.
"An ability to update modules independently requires compatibility and quality checks among all possible version pairs of Magento and an extension. If we do not guarantee that extensions released with 2.3.0 are compatible with 2.2.x, we reflect that in dependencies. Modularity should be built on stability."
No, it really doesn't. Your B2B module is a great example, by using very strict versioning dependencies, the latest B2B module which only runs under 2.2.6 won't be installed for 2.2.5.
The function found here: File vendor/magento/framework/Module/ModuleResource.php:50
Line 52:
if ($needType == 'db' && self::$schemaVersions === null ||
$needType == 'data' && self::$dataVersions === null)
Might be part of the issue? There is something sketchy with this logic... I think that the reasoning behind the versioning going over the version installed is because of this function coupled with dependency ordering. A module with a version of 2.1.1, for example, has somehow managed to exploit some logic within the code that has kept its version and then set it for another module. When that module (after dependencies finish), is attempting a version update, it cannot do it...
@pmsteil, based on what I can tell from beta12, it looks like it should be fine, version numbers aren't going down between 2.2.5 and 2.3.0-beta12:
Magento 2.2.5:
amzn/amazon-pay-and-login-magento-2-module 2.1.1 amzn/amazon-pay-and-login-with-amazon-core-module 2.1.1 amzn/amazon-pay-module 2.1.1 amzn/amazon-pay-sdk-php 3.3.2 amzn/login-with-amazon-module 2.1.1 dotmailer/dotmailer-magento2-extension 2.6.0 klarna/module-core 4.5.2 klarna/module-kp 5.5.1 klarna/module-ordermanagement 4.4.1 temando/module-shipping-m2 1.3.3 vertex/module-tax 2.2.0 vertex/sdk 1.0.0
Magento 2.2.6:
amzn/amazon-pay-and-login-with-amazon-core-module 2.1.0 amzn/amazon-pay-module 2.1.0 amzn/amazon-pay-sdk-php 3.3.2 amzn/login-with-amazon-module 2.1.0 dotmailer/dotmailer-magento2-extension 2.6.0 klarna/module-core 4.4.5 klarna/module-kp 5.4.4 klarna/module-ordermanagement 4.3.4 temando/module-shipping-m2 1.3.3 vertex/module-tax 2.1.10
Magento 2.3.0-beta12:
amzn/amazon-pay-and-login-magento-2-module 2.1.1 amzn/amazon-pay-and-login-with-amazon-core-module 2.1.1 amzn/amazon-pay-module 2.1.1 amzn/amazon-pay-sdk-php 3.3.2 amzn/login-with-amazon-module 2.1.1 dotmailer/dotmailer-magento2-extension 3.0.0 klarna/m2-payments 5.2.0 klarna/module-core 4.5.2 klarna/module-kp 5.5.1 klarna/module-ordermanagement 4.4.1 temando/module-shipping-m2 1.4.0 vertex/module-tax 2.2.0 vertex/sdk 1.0.0
But that doesn't mean it won't happen, because if a new version of these modules gets released in the future, which is marked as compatible with Magento 2.2.5, then we might still see a downgrade happening in 2.3.
Hopefully the Magento people will try to communicate with the vendors about this and try to prevent this from happening, right @rgoncharuk ?
Btw: is there already an update from Magento in regards of making this "hard decision" more publicly known? And telling people what to do when they run against this problem with downgrades and potential db migration problems they might run into in the future?
I'm not sure that is accurate for all cases... I do not see amazon showing 2.1.1 in my 2.2.5.
@df2k2: it's indeed not super accurate because you can have multiple versions of the amazon modules installed on Magento 2.2.4/2.2.5, it depends on when exactly you setup your store, or if you regularly run composer update
on your store to keep your dependencies up2date.
The module versions in the list I mentioned above were the module versions which got installed on a clean Magento store at that particular date (9 Oct 2018).
So how to fix this?
Updating versions in db is not a solution as for example Klarna db schemas don't then get updated as someone pointed out.
@sundflux, instead of updating versions directly in db just try to delete completely those rows from db and run bin/magento setup:upgrade
it will run upgrade scripts of those modules if needed and put correct versions into db
@sundflux The most future proof way is: https://github.com/magento/magento2/issues/18248#issuecomment-427362136
Or, skip 2.2.6 and go to 2.3 once it's released
_Needed_ 2.2.6 for another blocker bugfix unfortunately..
Another temporary work around, for those not using the gateway, is to disable the modules. I'm assuming there are no other dependencies.
php magento module:disable Amazon_Core Amazon_Payment Amazon_Login
php bin/magento module:disable Amazon_Core Amazon_Payment Amazon_Login Klarna_Core Klarna_Ordermanagement Klarna_Kp Vertex_Tax
worked for me, while we are not using those modules
I ran the below sql command and the website started working.
update setup_module set schema_version='4.4.4', data_version='4.4.4' where module = 'Klarna_Core';
update setup_module set schema_version='4.3.4', data_version='4.3.4' where module = 'Klarna_Ordermanagement';
update setup_module set schema_version='5.4.4', data_version='5.4.4' where module = 'Klarna_Kp';
update setup_module set schema_version='2.1.0', data_version='2.1.0' where module = 'Amazon_Core';
update setup_module set schema_version='2.1.0', data_version='2.1.0' where module = 'Amazon_Login';
update setup_module set schema_version='2.1.0', data_version='2.1.0' where module = 'Amazon_Payment';
update setup_module set schema_version='100.2.0', data_version='100.2.0' where module = 'Vertex_Tax';
I could not fully reconstruct the reason for this flakiness (that some composer installs pull another vertex/module-tax for M 2.2.5 on some occations) but I did fixate on the newer version with an explicit entry in composer.json for 2.2.1
At least for me, it took deleting the local composer cache to go through, but it's a stable solution finally that does not do guesswork on upgrades / downgrades
Maybe this is helpful for some out there...
I asked Magento Enterprise support what to do in this situation (Where you have composer modules that are a higher version than what future versions of Magento require). Their workaround was do update the setup_module
table with the expected versions before upgrading, like some of the posts here tried.
Of course, right now we don't know what, if any, problems this may introduce. Regardless of what bugs may exist, I wonder why Magento didn't just test and require the latest version of whatever was available at time of release, so that everyone is on the same, tested, code. And any bugs discovered could be resolved in a patch if necessary. Now there's unknown permutations of core Magento modules tied to different Magento framework versions.
So after some discussion with Magento support, I was able to upgrade 2.2.4 -> 2.2.7 with the following steps:
composer.phar require magento/product-enterprise-edition 2.2.7 --no-update
composer.phar update
Then update your database:
update setup_module set schema_version='2.1.0', data_version='2.1.0' where module="Amazon_Core";
update setup_module set schema_version='2.1.0', data_version='2.1.0' where module="Amazon_Login";
update setup_module set schema_version='2.1.0', data_version='2.1.0' where module="Amazon_Payment";
update setup_module set schema_version='4.4.4', data_version='4.4.4' where module="Klarna_Core";
update setup_module set schema_version='5.5.1', data_version='5.5.1' where module="Klarna_Kp";
update setup_module set schema_version='4.4.1', data_version='4.4.1' where module="Klarna_Ordermanagement";
update setup_module set schema_version='1.2.1', data_version='1.2.1' where module="Temando_Shipping";
Then run upgrade command:
php bin/magento setup:upgrade
Hi @milindsingh. Thank you for working on this issue.
In order to make sure that issue has enough information and ready for development, please read and check the following instruction: :point_down:
Issue: Format is valid
will be added to the issue automatically. Please, edit issue description if needed, until label Issue: Format is valid
appears.[ ] 2. Verify that issue has a meaningful description and provides enough information to reproduce the issue. If the report is valid, add Issue: Clear Description
label to the issue by yourself.
[ ] 3. Add Component: XXXXX
label(s) to the ticket, indicating the components it may be related to.
[ ] 4. Verify that the issue is reproducible on 2.3-develop
branchDetails
- Add the comment @magento-engcom-team give me 2.3-develop instance
to deploy test instance on Magento infrastructure.
- If the issue is reproducible on 2.3-develop
branch, please, add the label Reproduced on 2.3.x
.
- If the issue is not reproducible, add your comment that issue is not reproducible and close the issue and _stop verification process here_!
[ ] 5. Verify that the issue is reproducible on 2.2-develop
branch. Details
- Add the comment @magento-engcom-team give me 2.2-develop instance
to deploy test instance on Magento infrastructure.
- If the issue is reproducible on 2.2-develop
branch, please add the label Reproduced on 2.2.x
[ ] 6. Add label Issue: Confirmed
once verification is complete.
[ ] 7. Make sure that automatic system confirms that report has been added to the backlog.
Just upgraded to 2.2.4 to 2.2.7 and Magento crashed due to invalid versions in setup_module.
Do we need to fix this issue or not ?
The only way it could be "Fixed", is if Magento issued a patch that updated the database to have the expected (yet wrong) versions of the modules in setup_module.
The best way to resolve issues like this are through composer aliases, no application is perfect, especially Magento when it comes to included third-party extensions as Magento doesn't test them.
"amzn/amazon-pay-and-login-with-amazon-core-module": "2.2.10 as 2.1.2",
"amzn/amazon-pay-module": "2.2.10 as 2.1.2",
"amzn/login-with-amazon-module": "2.2.10 as 2.1.2"
Where you put the version set in the database table "setup_module" "schema_version" for the specific module, and then the version being requested by composer, as you can see, my database defined 2.2.10, and composer defined it wanted 2.1.2. and you really don't want to "downgrade" modules do you? ;)
What my database tables looked like within setup_module
Amazon_Core 2.2.10 2.2.10
Amazon_Login 2.2.10 2.2.10
Amazon_Payment 2.2.10 2.2.10
When updated like this, you get the latest version of the plugin, and Magento doesn't try and downgrade anything. More importantly, you're not touching the database, and manually updating the DB schema for the module.
Just in case this isn't known, you'd add this into your composer.json file like this
"require": {
"magento/product-community-edition": "2.2.7",
"composer/composer": "@alpha",
"amzn/amazon-pay-and-login-with-amazon-core-module": "2.2.10 as 2.1.2",
"amzn/amazon-pay-module": "2.2.10 as 2.1.2",
"amzn/login-with-amazon-module": "2.2.10 as 2.1.2"
},
Then run composer update
, however I don't recommend running composer update
in production and running this locally first... and then run composer install
on production. That's just my two cents.
I have the same issue
Magento_Directory db schema version: defined in codebase - 2.0.2, currently installed - 2.0.3
Magento_Directory db data version: defined in codebase - 2.0.2, currently installed - 2.0.3
Magento_Sales db schema version: defined in codebase - 2.0.10, currently installed - 2.0.11
Magento_Sales db data version: defined in codebase - 2.0.10, currently installed - 2.0.11
Magento_Config db schema version: defined in codebase - 2.0.0, currently installed - 2.1.0
Magento_Config db data version: defined in codebase - 2.0.0, currently installed - 2.1.0
Amazon_Core db schema version: defined in codebase - 2.1.0, currently installed - 2.1.3
Amazon_Core db data version: defined in codebase - 2.1.0, currently installed - 2.1.3
Magento_ConfigurableProduct db schema version: defined in codebase - 2.2.1, currently installed - 2.2.2
Magento_ConfigurableProduct db data version: defined in codebase - 2.2.1, currently installed - 2.2.2
Amazon_Login db schema version: defined in codebase - 2.1.0, currently installed - 2.1.3
Amazon_Login db data version: defined in codebase - 2.1.0, currently installed - 2.1.3
Magento_Downloadable db schema version: defined in codebase - 2.0.2, currently installed - 2.0.3
Magento_Downloadable db data version: defined in codebase - 2.0.2, currently installed - 2.0.3
Amazon_Payment db schema version: defined in codebase - 2.1.0, currently installed - 2.1.3
Amazon_Payment db data version: defined in codebase - 2.1.0, currently installed - 2.1.3
Klarna_Core db schema version: defined in codebase - 4.4.4, currently installed - 4.5.2
Klarna_Core db data version: defined in codebase - 4.4.4, currently installed - 4.5.2
Magento_Wishlist db schema version: defined in codebase - 2.0.1, currently installed - 2.0.2
Magento_Wishlist db data version: defined in codebase - 2.0.1, currently installed - 2.0.2
Klarna_Ordermanagement db schema version: defined in codebase - 4.3.4, currently installed - 4.4.1
Klarna_Ordermanagement db data version: defined in codebase - 4.3.4, currently installed - 4.4.1
Klarna_Kp db schema version: defined in codebase - 5.4.4, currently installed - 5.5.1
Klarna_Kp db data version: defined in codebase - 5.4.4, currently installed - 5.5.1
Dotdigitalgroup_Email db schema version: defined in codebase - 2.6.0, currently installed - 2.7.1
Dotdigitalgroup_Email db data version: defined in codebase - 2.6.0, currently installed - 2.7.1
Vertex_Tax db schema version: defined in codebase - 100.2.0, currently installed - 100.2.1
Vertex_Tax db data version: defined in codebase - 100.2.0, currently installed - 100.2.1
@hostep I use your solution
"amzn/amazon-pay-and-login-with-amazon-core-module": "2.1.1 as 2.1.0",
"amzn/amazon-pay-module": "2.1.1 as 2.1.0",
"amzn/login-with-amazon-module": "2.1.1 as 2.1.0"
But it is only for 3 module. Can you please give me all modules solution ?
@pandyakrunal: in your case, there is probably something else wrong, because there are core Magento modules which are using a newer version in your database then they are in your code.
Did you upgrade Magento and then downgraded again maybe? In that's the case and if you have a backup of your database from before the upgrade, I would put that back (unless you have some data which you can't afford to loose, but then you're on your own I'm afraid and Github isn't the right place to ask for support for these kinds of things, sorry).
Same issue.
@pandyakrunal: in your case, there is probably something else wrong, because there are core Magento modules which are using a newer version in your database then they are in your code.
Did you upgrade Magento and then downgraded again maybe? In that's the case and if you have a backup of your database from before the upgrade, I would put that back (unless you have some data which you can't afford to loose, but then you're on your own I'm afraid and Github isn't the right place to ask for support for these kinds of things, sorry).
Maybe it happens.
As I can see from the latest comments it seems was kind of configuration issue.
I am closing this Issue for now but feel free to open a new one if the problem still occurs on the latest Magento code 2.3.x
Most helpful comment
I can confirm what is mentioned above.
magento225
magento226
module.xml
file:/cc: @prayagr, you'll probably want to be aware of this.
/start rant
@maksek, @okorshenko, @dmanners, @woosley-mg: this is another proof that Magento does nothing to ensure these core bundled extensions are tested and none of these should be included by default in Magento as it brings down the stability of the core of Magento in all kinds of unexpected ways.
It was a fun experiment these things in the last couple of months, but I think you can conclude the experiment failed horribly.
Please do what is necessary to completely remove these from Magento 2.3.0 and 2.2.7. Thanks!
/end rant