Magento2: Uncaught Error: Cannot instantiate interface Magento\InventorySalesApi\Api\GetProductSalableQtyInterface

Created on 6 May 2019  路  17Comments  路  Source: magento/magento2

Preconditions (*)

  1. Using Magento 2.3.0 migrated from Magento 1.8
  2. Magento is in default mode
  3. No customization

Steps to reproduce (*)

  1. Stock version of Magento 2.3.0
  2. Disable all Magento_Inventory* modules
  3. Run setup:upgrade
  4. Clean Cache
  5. Reindex

Expected result (*)

  1. After disabling Magento_Inventory* modules magento should work using the pre 2.3 inventory system
  2. Magento should no longer use the concept of Salable quantities

Actual result (*)

  1. Login in to the Magento admin portal and open a product
  2. Press "Save" button
  3. HTTP 500 thrown with following error:
[05-May-2019 20:50:39 UTC] PHP Fatal error:  Uncaught Error: Cannot instantiate interface Magento\InventorySalesApi\Api\GetProductSalableQtyInterface in /home/villase1/public_html/vendor/magento/framework/ObjectManager/Factory/AbstractFactory.php:116

Stack trace:

0 /home/villase1/public_html/vendor/magento/framework/ObjectManager/Factory/Compiled.php(108): MagentoFrameworkObjectManagerFactoryAbstractFactory->createObject('Magento\Invento...', Array)

1 /home/villase1/public_html/vendor/magento/framework/ObjectManager/Factory/Compiled.php(150): MagentoFrameworkObjectManagerFactoryCompiled->create('Magento\Invento...')

2 /home/villase1/public_html/vendor/magento/framework/ObjectManager/Factory/Compiled.php(79): MagentoFrameworkObjectManagerFactoryCompiled->get('Magento\Invento...')

3 /home/villase1/public_html/vendor/magento/framework/ObjectManager/Factory/Compiled.php(150): MagentoFrameworkObjectManagerFactoryCompiled->create('KoekEnPeer\Effe...')

4 /home/villase1/public_html/vendor/magento/framework/ObjectManager/Factory/Compiled in /home/villase1/public_html/vendor/magento/framework/ObjectManager/Factory/AbstractFactory.php on line 116

Why is this interface still being instantiated when all Magento_Inventory modules have been disabled?

Format is valid

Most helpful comment

THis is still an issue. DOnt know who will look into it. They keep blaming each other for the issues!!

All 17 comments

Hi @karlgram. 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.

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

  • [ ] yes
  • [ ] no

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

Hi @karlgram. Thank you for your request. I'm working on Magento 2.3-develop instance for you

Hi @karlgram, here is your Magento instance.
Admin access: https://i-22753-2-3-develop.instances.magento-community.engineering/admin
Login: admin Password: 123123q
Instance will be terminated in up to 3 hours.

this instance does not have MSI enabled and not able to subsequently disable it to reproduce my error

Hi @karlgram.
Problems with data migration from 1.x must be reported in https://github.com/magento/data-migration-tool repository
Log this issue in Data migration repository so it will processed faster.

This is not a data migration tool issue. We migrated our 1.8 shop to 2.3 and ran for 3 months until we decided to turn off MSI. After turning off all MSI modules we are no longer able to save any product due to the error as indicted.

@karlgram did you enable MSI modules after migration ?

Hi @AlexWorking. 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:

  • [ ] 1. Verify that issue has all the required information. (Preconditions, Steps to reproduce, Expected result, Actual result).
    DetailsIf the issue has a valid description, the label 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 branch

    Details- 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.

Hello @karlgram. Please recreate Your issue in an appropriate repository of https://github.com/magento-engcoom/msi. We are closing this issue here but You can link it to a new one You will have created in that repository in order to keep together all the information posted about the issue. Thank You.

THis is still an issue. DOnt know who will look into it. They keep blaming each other for the issues!!

I am also getting the same error

I am using B2B feature quick order. While adding the product into the cart from quickorder menu i am getting the error Uncaught Error: Cannot instantiate interface MagentoInventorySalesApiApiIsProductSalableInterface

@abbaseg how to resolve this problem? I have same error now

@karlgram try to disable Magento_GoogleShoppingAds module.
Also disable MSI modules via composer, add this to composer.json (for ver. 2.3.4)
"replace": { "magento/module-inventory": "*", "magento/module-inventory-admin-ui": "*", "magento/module-inventory-advanced-checkout": "*", "magento/module-inventory-api": "*", "magento/module-inventory-bundle-product": "*", "magento/module-inventory-bundle-product-admin-ui": "*", "magento/module-inventory-cache": "*", "magento/module-inventory-catalog": "*", "magento/module-inventory-catalog-admin-ui": "*", "magento/module-inventory-catalog-api": "*", "magento/module-inventory-catalog-search": "*", "magento/module-inventory-configurable-product": "*", "magento/module-inventory-configurable-product-admin-ui": "*", "magento/module-inventory-configurable-product-indexer": "*", "magento/module-inventory-configuration": "*", "magento/module-inventory-configuration-api": "*", "magento/module-inventory-distance-based-source-selection": "*", "magento/module-inventory-distance-based-source-selection-admin-ui": "*", "magento/module-inventory-distance-based-source-selection-api": "*", "magento/module-inventory-elasticsearch": "*", "magento/module-inventory-export-stock": "*", "magento/module-inventory-export-stock-api": "*", "magento/module-inventory-graph-ql": "*", "magento/module-inventory-grouped-product": "*", "magento/module-inventory-grouped-product-admin-ui": "*", "magento/module-inventory-grouped-product-indexer": "*", "magento/module-inventory-import-export": "*", "magento/module-inventory-indexer": "*", "magento/module-inventory-low-quantity-notification": "*", "magento/module-inventory-low-quantity-notification-admin-ui": "*", "magento/module-inventory-low-quantity-notification-api": "*", "magento/module-inventory-multi-dimensional-indexer-api": "*", "magento/module-inventory-product-alert": "*", "magento/module-inventory-requisition-list": "*", "magento/module-inventory-reservation-cli": "*", "magento/module-inventory-reservations": "*", "magento/module-inventory-reservations-api": "*", "magento/module-inventory-sales": "*", "magento/module-inventory-sales-admin-ui": "*", "magento/module-inventory-sales-api": "*", "magento/module-inventory-sales-frontend-ui": "*", "magento/module-inventory-setup-fixture-generator": "*", "magento/module-inventory-shipping": "*", "magento/module-inventory-shipping-admin-ui": "*", "magento/module-inventory-source-deduction-api": "*", "magento/module-inventory-source-selection": "*", "magento/module-inventory-source-selection-api": "*" }
and run composer update.
For older version just remove modules not exist yet.

Hey,
same here with a 2.3.3 installation...

@karlgram @huykon @gewaechshaus @abbaseg : Hi there, I am also getting the same error Fatal error: Uncaught Error: Cannot instantiate interface MagentoInventorySalesApiApiGetProductSalableQtyInterface in when I try to place order form frontend & backend. I also disabled MSI modules for my store. I am using Magento 2.3.5-p1. No clue about this issue.

Please help me If you got the solution of this issue.

Thanks in advance.!

Cc @magento-engcom-team @AlexWorking

Check if any of the following modules have been disabled:

Magento_InventoryAdvancedCheckout
Magento_InventoryDistanceBasedSourceSelection
Magento_InventoryDistanceBasedSourceSelectionAdminUi
Magento_InventoryDistanceBasedSourceSelectionApi
Magento_InventoryElasticsearch
Magento_InventoryExportStockApi
Magento_InventoryRequisitionList
Magento_InventoryReservationCli
Magento_InventoryExportStock
Magento_InventorySetupFixtureGenerator
Magento_InventoryGraphQl

with

php bin/magento module:status
Was this page helpful?
0 / 5 - 0 ratings