Skip to content
This repository has been archived by the owner on Apr 30, 2023. It is now read-only.

Error: Cannot instantiate interface #23

Closed
nix0x00 opened this issue Apr 5, 2021 · 7 comments
Closed

Error: Cannot instantiate interface #23

nix0x00 opened this issue Apr 5, 2021 · 7 comments
Assignees

Comments

@nix0x00
Copy link

nix0x00 commented Apr 5, 2021

Hello,

Continuing my issue from here. I have now installed 1.2.7 on Magento 2.4.2, but I am getting following error when accessing Admin > Stores > Config > Facebook

Also getting this error when saving a product.

https://raw.githubusercontent.com/nix0x00/newsletter_subscribers/master/facebook-1.2.7.log

@zlik
Copy link
Contributor

zlik commented Apr 6, 2021

@nix0x00, thanks for opening a fresh task. Does vendor/magento/module-inventory-api/Api/SourceRepositoryInterface.php exist in your Magento codebase? Is Magento_InventoryApi module enabled in your etc/config.php file? Also, can you please try removing all files in the ./generated directory and rerunning bin/magento setup:di:compile?

@nix0x00
Copy link
Author

nix0x00 commented Apr 6, 2021

@nix0x00, thanks for opening a fresh task. Does vendor/magento/module-inventory-api/Api/SourceRepositoryInterface.php exist in your Magento codebase? Is Magento_InventoryApi module enabled in your etc/config.php file? Also, can you please try removing all files in the ./generated directory and rerunning bin/magento setup:di:compile?

@zlik I have disabled all the modules for module-inventory*. As its a single store and no much of these extensions are required. Therefore, as recommended by yireo I had used their replace modules in compose.json to increase the performance.

@zlik
Copy link
Contributor

zlik commented Apr 6, 2021

@nix0x00, thanks for sharing the details – super helpful for understanding the problem!

A quick fix should be enabling these 2 Magento modules (you might need to add them back to composer.json as well):

  • Magento_InventoryApi
  • Magento_InventorySourceDeductionApi

Guide: https://devdocs.magento.com/guides/v2.4/install-gde/install/cli/install-cli-subcommands-enable.html

Also, we're going to prepare a new version of the extension later this week in which multi-source inventory will be optional so the extension will work without enabling those modules.

@duxabilii
Copy link

duxabilii commented Apr 7, 2021

Similar issue from admin panel when try to save product
( ! ) Fatal error: Uncaught Error: Cannot instantiate interface Magento\InventoryApi\Api\SourceItemRepositoryInterface in /var/www/magento-multisite/vendor/magento/framework/ObjectManager/Factory/Dynamic/Developer.php on line 50
facebook_module_issue.zip

@nix0x00
Copy link
Author

nix0x00 commented Apr 7, 2021

@nix0x00, thanks for sharing the details – super helpful for understanding the problem!

A quick fix should be enabling these 2 Magento modules (you might need to add them back to composer.json as well):

  • Magento_InventoryApi
  • Magento_InventorySourceDeductionApi

Guide: https://devdocs.magento.com/guides/v2.4/install-gde/install/cli/install-cli-subcommands-enable.html

Also, we're going to prepare a new version of the extension later this week in which multi-source inventory will be optional so the extension will work without enabling those modules.

Alright, that will be good. I shall wait for that version then for now as I do not want to enable these extra modules.

@nix0x00
Copy link
Author

nix0x00 commented Apr 11, 2021

  • Magento_InventoryApi

I have installed the modules you mentioned and now I do not see that error. However, I get following message on browser when I click Stores > Config > Facebook >

An error has happened during application run. See exception log for details.

System.log :

https://raw.githubusercontent.com/nix0x00/newsletter_subscribers/master/facebook-1.2.7.log

facebook-github-bot pushed a commit that referenced this issue Apr 13, 2021
Summary:
Reverted multi-source inventory implementation as it was causing fatal errors for some sellers: #23.

Bumped version to `1.4.0`.

Reviewed By: xiangminxufsu

Differential Revision: D27724661

fbshipit-source-id: d5ef4df1
@zlik
Copy link
Contributor

zlik commented Apr 13, 2021

Reverted multi-source implementation in 1.4.0. Please update to this version and reopen the task if the issue is still happening for you. Thanks!

@zlik zlik closed this as completed Apr 13, 2021
facebook-github-bot pushed a commit that referenced this issue Oct 21, 2022
Summary:
Reverted multi-source inventory implementation as it was causing fatal errors for some sellers: #23.

Bumped version to `1.4.0`.

Reviewed By: xiangminxufsu

Differential Revision: D27724661

fbshipit-source-id: 1ca3b933812e46aae716abee5946603409b02efd
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants