- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Cannot instantiate interface Magento\InventoryReservationsApi\Model\GetReservationsQuantityInterface
Fatal error: Uncaught Error: Cannot instantiate interface Magento\InventoryReservationsApi\Model\GetReservationsQuantityInterface in MAGE_ROOT/vendor/magento/framework/ObjectManager/Factory/Dynamic/Developer.php on line 50
With the modules enabled and disabled I ran the 'hamster wheel' troubleshooting cycle.
Steps were taken so far: (not in this order)
• Flushed cache
• Removed the generated/code folder
• ran s:up and s:di:c
• disabled the following:
List of disabled modules: Magento_InventoryReservations Magento_InventoryReservationCli Magento_InventoryReservationsApi
This occurred after upgrading from 2.2.8 to 2.3.1, saw other issues and upgraded to 2.3.2.
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Re: Cannot instantiate interface Magento\InventoryReservationsApi\Model\GetReservationsQuantityInter
Did you ever resolve this? If so, how?
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Re: Cannot instantiate interface Magento\InventoryReservationsApi\Model\GetReservationsQuantityInter
Did anyone solve this? +1
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Re: Cannot instantiate interface Magento\InventoryReservationsApi\Model\GetReservationsQuantityInter
Enabled below modules if they are disabled.
Magento_InventoryDistanceBasedSourceSelection
Magento_InventoryDistanceBasedSourceSelectionAdminUi
Magento_InventoryDistanceBasedSourceSelectionApi
Magento_InventoryElasticsearch
Magento_InventorySetupFixtureGenerator
If it will not work then enabled all Magento_Inventory related modules and check.
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Re: Cannot instantiate interface Magento\InventoryReservationsApi\Model\GetReservationsQuantityInter
Please enable all the modules related to Magento_Inventory in app\etc\config.php
and run the below command :-
rm -rf generated
rm -rf var/*
php bin/magento setup:upgrade
php bin/magento setup:static-content:deploy
php bin/magento setup:di:compile
If my answer is useful Click Kudos & Accept as Solution.
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Re: Cannot instantiate interface Magento\InventoryReservationsApi\Model\GetReservationsQuantityInter
I faced similar kind of issue last time, I am still searching for some proper solution.
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Re: Cannot instantiate interface Magento\InventoryReservationsApi\Model\GetReservationsQuantityInter
Hello SrLucasM,
The error occurs after upgrading Magento from 2.2.8 to 2.3.1, and you haven't overridden the interface for the di.xml class in the file. The error can also appear by disabling or enabling the modules directly in app/etc/config.php.
Therefore, to fix the "Cannot instantiate interface Magento\InventoryReservationsApi\Model\GetReservationsQuantityInterface" error, follow the steps below:
CLI (Command Line Interface) is a text-based user interface that views and manages files. Magento has a default CLI command.
- Firstly, run the below command,
bin/magento setup:upgrade
- The above command clears compiled code, the cache and updates components.
- Now, check if the following two files exist:
- app/etc/env.php > Magento 2 stores the database credentials, backend URL, enabled cache types, etc.
- app/etc/config.php > It contains the list of installed modules, themes, language packages, and shared configuration settings.
- Now, check the redis connection information and database settings credentials are proper.
- Lastly, Re-run the below command; if it's correctly set,
bin/magento setup:upgrade
- If you're using redis run,
redis-cli flushall
- Or, run the following commands,
Clear generated
Clear:
var / cache
Enable magento modules:
php bin/magento module:enable --all
Compile DI
- The command 'bin/magento setup:di:compile' develops DI configuration and all missing classes that can be auto-generated,
php bin/magento setup:di:compile
If you still encounter the same error, you can run the following command to fix the issue,
php -dmemory_limit=-1 bin/magento setup:di:compile
- An -dmemory_limit = -1 option allows you to run PHP in the CLI without memory limits. You can also change the memory_limit setting.
I hope the above-given fix helps you to fix the Cannot instantiate interface in Magento. However, if the issue persists, you can update it here.
---------------------------
Regards,
Rex M
Problem solved? Click Accept as Solution!
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Re: Cannot instantiate interface Magento\InventoryReservationsApi\Model\GetReservationsQuantityInter
-- edit
sorry wrong thread
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Re: Cannot instantiate interface Magento\InventoryReservationsApi\Model\GetReservationsQuantityInter
plaese delete all folders Inventory from your hosting on localhost and install new Inventory on this link
https://github.com/magento/inventory/releases/tag/1.1.6
and install in app/code/magento
and let me know what happend