{"id":18031,"date":"2021-04-08T15:55:48","date_gmt":"2021-04-08T15:55:48","guid":{"rendered":"http:\/\/wiki2.plumserver.com\/?post_type=ht_kb&#038;p=18031"},"modified":"2021-09-22T04:33:17","modified_gmt":"2021-09-22T08:33:17","slug":"magento-auto-invoice-shipment-v2-troubleshooting-auto-shipment-inventory-msi-error","status":"publish","type":"post","link":"https:\/\/plumrocket.com\/docs\/magento-auto-invoice-shipment\/v2\/troubleshooting\/msi-error","title":{"rendered":"Auto Shipment Inventory MSI Error"},"content":{"rendered":"\n<h2>Error: Cannot instantiate interface Magento\\InventorySalesApi\\Model\\StockByWebsiteIdResolverInterface in &#8230;\/AbstractFactory.php:121<\/h2>\n\n\n\n<h2>Issue Description<\/h2>\n\n\n\n<p>In <a href=\"\/magento-auto-invoice-shipment\">Magento 2 Auto Invoice &amp; Shipment extension<\/a>, this issue occurs when you try to place an order with Auto Shipment Rule. The reason is that Plumrocket extensions depend on MSI extensions added during the Inventory Management installation process. Therefore, when you disable the Plumrocket extension, the dependency between them is lost.<\/p>\n\n\n\n<p>By default, after the installation of the Auto Invoice &amp; Shipment extension, MSI support is enabled. Learn more about MSI in the <a href=\"https:\/\/devdocs.magento.com\/extensions\/inventory-management\/\" target=\"_blank\" aria-label=\"undefined (opens in a new tab)\" rel=\"noreferrer noopener nofollow\">official Magento documentation<\/a>.<\/p>\n\n\n\n<h2>Solution<\/h2>\n\n\n\n<p>If MSI is disabled in your Magento 2 store, you also need to disable the additional Plumrocket_AutoShipmentInventory module. Take one of the following steps:<\/p>\n\n\n\n<p>1) After installing the modules, execute the following three commands in the terminal:<br><\/p>\n\n\n\n<div class=\"wp-block-prismatic-blocks\"><div><\/div><pre><code class=\"language-php\">php bin\/magento module:disable Plumrocket_AutoInvoiceShipment\nphp bin\/magento module:disable Plumrocket_AutoShipmentInventory\nphp bin\/magento module:enable Plumrocket_AutoInvoiceShipment<\/code><\/pre><\/div>\n\n\n\n<p>2) Otherwise, you can disable the AutoShipmentInventory module forcibly using the -f (&#8211;force) option:<\/p>\n\n\n\n<div class=\"wp-block-prismatic-blocks\"><div><\/div><pre><code class=\"language-php\">php bin\/magento module:disable Plumrocket_AutoShipmentInventory -f<\/code><\/pre><\/div>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Error: Cannot instantiate interface Magento\\InventorySalesApi\\Model\\StockByWebsiteIdResolverInterface in &#8230;\/AbstractFactory.php:121 Issue Description In Magento 2 Auto Invoice &amp; Shipment extension, this issue occurs when you try to place an order with Auto Shipment Rule. The reason is that Plumrocket extensions depend on MSI extensions added during the Inventory Management installation process. Therefore, when you disable the Plumrocket extension, &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/plumrocket.com\/docs\/magento-auto-invoice-shipment\/v2\/troubleshooting\/msi-error\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;Auto Shipment Inventory MSI Error&#8221;<\/span><\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"inline_featured_image":false,"_mi_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0},"categories":[126],"tags":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v17.2 (Yoast SEO v17.2) - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Auto Shipment Inventory MSI Error - Plumrocket Documentation<\/title>\n<meta name=\"description\" content=\"Error: Cannot instantiate interface MagentoInventorySalesApiModelStockByWebsiteIdResolverInterface in ...\/AbstractFactory.php:121 Issue Description In\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/plumrocket.com\/docs\/magento-auto-invoice-shipment\/v2\/troubleshooting\/msi-error\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Auto Shipment Inventory MSI Error\" \/>\n<meta property=\"og:description\" content=\"Error: Cannot instantiate interface Magento\\InventorySalesApi\\Model\\StockByWebsiteIdResolverInterface in ...\/AbstractFactory.php:121 Issue Description In\" \/>\n<meta property=\"og:url\" content=\"https:\/\/plumrocket.com\/docs\/magento-auto-invoice-shipment\/v2\/troubleshooting\/msi-error\" \/>\n<meta property=\"og:site_name\" content=\"Plumrocket Documentation\" \/>\n<meta property=\"article:published_time\" content=\"2021-04-08T15:55:48+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2021-09-22T08:33:17+00:00\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Plumrocket\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"1 minute\" \/>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"Auto Shipment Inventory MSI Error - Plumrocket Documentation","description":"Error: Cannot instantiate interface MagentoInventorySalesApiModelStockByWebsiteIdResolverInterface in ...\/AbstractFactory.php:121 Issue Description In","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/plumrocket.com\/docs\/magento-auto-invoice-shipment\/v2\/troubleshooting\/msi-error","og_locale":"en_US","og_type":"article","og_title":"Auto Shipment Inventory MSI Error","og_description":"Error: Cannot instantiate interface Magento\\InventorySalesApi\\Model\\StockByWebsiteIdResolverInterface in ...\/AbstractFactory.php:121 Issue Description In","og_url":"https:\/\/plumrocket.com\/docs\/magento-auto-invoice-shipment\/v2\/troubleshooting\/msi-error","og_site_name":"Plumrocket Documentation","article_published_time":"2021-04-08T15:55:48+00:00","article_modified_time":"2021-09-22T08:33:17+00:00","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Plumrocket","Est. reading time":"1 minute"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebSite","@id":"https:\/\/plumrocket.com\/docs\/#website","url":"https:\/\/plumrocket.com\/docs\/","name":"Plumrocket Documentation","description":"Extensions docs, troubleshootings etc.","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/plumrocket.com\/docs\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-US"},{"@type":"WebPage","@id":"https:\/\/plumrocket.com\/docs\/magento-auto-invoice-shipment\/v2\/troubleshooting\/msi-error#webpage","url":"https:\/\/plumrocket.com\/docs\/magento-auto-invoice-shipment\/v2\/troubleshooting\/msi-error","name":"Auto Shipment Inventory MSI Error - Plumrocket Documentation","isPartOf":{"@id":"https:\/\/plumrocket.com\/docs\/#website"},"datePublished":"2021-04-08T15:55:48+00:00","dateModified":"2021-09-22T08:33:17+00:00","author":{"@id":"https:\/\/plumrocket.com\/docs\/#\/schema\/person\/c96fccdb89342ae6804272265723eca8"},"description":"Error: Cannot instantiate interface Magento\\InventorySalesApi\\Model\\StockByWebsiteIdResolverInterface in ...\/AbstractFactory.php:121 Issue Description In","breadcrumb":{"@id":"https:\/\/plumrocket.com\/docs\/magento-auto-invoice-shipment\/v2\/troubleshooting\/msi-error#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/plumrocket.com\/docs\/magento-auto-invoice-shipment\/v2\/troubleshooting\/msi-error"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/plumrocket.com\/docs\/magento-auto-invoice-shipment\/v2\/troubleshooting\/msi-error#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Magento 2 Extensions","item":"https:\/\/plumrocket.com\/magento-extensions"},{"@type":"ListItem","position":2,"name":"Magento 2 Auto Invoice &amp; Shipment","item":"https:\/\/plumrocket.com\/magento-auto-invoice-shipment"},{"@type":"ListItem","position":3,"name":"Documentation","item":"https:\/\/plumrocket.com\/docs\/magento-auto-invoice-shipment"},{"@type":"ListItem","position":4,"name":"v2","item":"https:\/\/plumrocket.com\/docs\/magento-auto-invoice-shipment\/v2"},{"@type":"ListItem","position":5,"name":"Troubleshooting","item":"https:\/\/plumrocket.com\/docs\/magento-auto-invoice-shipment\/v2\/troubleshooting"},{"@type":"ListItem","position":6,"name":"Auto Shipment Inventory MSI Error"}]},{"@type":"Person","@id":"https:\/\/plumrocket.com\/docs\/#\/schema\/person\/c96fccdb89342ae6804272265723eca8","name":"Plumrocket","image":{"@type":"ImageObject","@id":"https:\/\/plumrocket.com\/docs\/#personlogo","inLanguage":"en-US","url":"https:\/\/secure.gravatar.com\/avatar\/10c44aa45aab391250913d982e552e53?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/10c44aa45aab391250913d982e552e53?s=96&d=mm&r=g","caption":"Plumrocket"}}]}},"_links":{"self":[{"href":"https:\/\/plumrocket.com\/docs\/wp-json\/wp\/v2\/posts\/18031"}],"collection":[{"href":"https:\/\/plumrocket.com\/docs\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/plumrocket.com\/docs\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/plumrocket.com\/docs\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/plumrocket.com\/docs\/wp-json\/wp\/v2\/comments?post=18031"}],"version-history":[{"count":4,"href":"https:\/\/plumrocket.com\/docs\/wp-json\/wp\/v2\/posts\/18031\/revisions"}],"predecessor-version":[{"id":24220,"href":"https:\/\/plumrocket.com\/docs\/wp-json\/wp\/v2\/posts\/18031\/revisions\/24220"}],"wp:attachment":[{"href":"https:\/\/plumrocket.com\/docs\/wp-json\/wp\/v2\/media?parent=18031"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/plumrocket.com\/docs\/wp-json\/wp\/v2\/categories?post=18031"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/plumrocket.com\/docs\/wp-json\/wp\/v2\/tags?post=18031"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}