cancel
Showing results for 
Search instead for 
Did you mean: 

Cannot Remove Magento Amazon Sales Channel

Cannot Remove Magento Amazon Sales Channel

I am trying to update the PHP version for my site from 8.2 to 8.3. However, Amazon Sales Channel module 4.5 is not supported on PHP 8.3. I am no longer using this module so I uninstalled is using composer as well as bin/magento module:disable magento_amazon. I also tried using the module:uninstall command but this hung and did not complete. After upgrading magento with the module disabled and updating php to 8.3 I receive this exception. It appears Magento is still looking for files related to this module even though they have been removed.

 

 

 

[2024-10-15T19:38:18.582618+00:00] main.CRITICAL: Magento\Framework\Exception\FileSystemException: The contents from the "/var/www/html/mydomain.com/vendor/magento/module-amazon/etc/module.xml" file can't be read. Warning!file_get_contents(/var/www/html/mydomain.com/vendor/magento/module-amazon/etc/module.xml): Failed to open stream: No such file or directory in /var/www/html/mydomain.com/vendor/magento/framework/Filesystem/Driver/File.php:187
Stack trace:
#0 /var/www/html/mydomain.com/vendor/magento/framework/Module/ModuleList/Loader.php(132): Magento\Framework\Filesystem\Driver\File->fileGetContents()
#1 /var/www/html/mydomain.com/vendor/magento/framework/Module/ModuleList/Loader.php(92): Magento\Framework\Module\ModuleList\Loader->getModuleConfigs()
#2 /var/www/html/mydomain.com/vendor/magento/framework/Module/ModuleList.php(72): Magento\Framework\Module\ModuleList\Loader->load()
#3 /var/www/html/mydomain.com/vendor/magento/framework/Module/ModuleList.php(91): Magento\Framework\Module\ModuleList->getAll()
#4 /var/www/html/mydomain.com/vendor/magento/framework/Module/DbVersionInfo.php(144): Magento\Framework\Module\ModuleList->getOne()
#5 /var/www/html/mydomain.com/vendor/magento/framework/Module/DbVersionInfo.php(59): Magento\Framework\Module\DbVersionInfo->isModuleVersionEqual()
#6 /var/www/html/mydomain.com/vendor/magento/framework/Module/DbVersionInfo.php(103): Magento\Framework\Module\DbVersionInfo->isSchemaUpToDate()
#7 /var/www/html/mydomain.com/vendor/magento/framework/Module/Plugin/DbStatusValidator.php(136): Magento\Framework\Module\DbVersionInfo->getDbVersionErrors()
#8 /var/www/html/mydomain.com/vendor/magento/framework/Module/Plugin/DbStatusValidator.php(70): Magento\Framework\Module\Plugin\DbStatusValidator->getGroupedDbVersionErrors()
#9 /var/www/html/mydomain.com/vendor/magento/framework/Interception/Interceptor.php(121): Magento\Framework\Module\Plugin\DbStatusValidator->beforeDispatch()
#10 /var/www/html/mydomain.com/vendor/magento/module-page-cache/Model/App/FrontController/BuiltinPlugin.php(72): Magento\Framework\App\FrontController\Interceptor->Magento\Framework\Interception\{closure}()
#11 /var/www/html/mydomain.com/vendor/magento/framework/Interception/Interceptor.php(135): Magento\PageCache\Model\App\FrontController\BuiltinPlugin->aroundDispatch()
#12 /var/www/html/mydomain.com/vendor/magento/framework/Interception/Interceptor.php(153): Magento\Framework\App\FrontController\Interceptor->Magento\Framework\Interception\{closure}()
#13 /var/www/html/mydomain.com/generated/code/Magento/Framework/App/FrontController/Interceptor.php(23): Magento\Framework\App\FrontController\Interceptor->___callPlugins()
#14 /var/www/html/mydomain.com/vendor/magento/framework/App/Http.php(116): Magento\Framework\App\FrontController\Interceptor->dispatch()
#15 /var/www/html/mydomain.com/vendor/magento/framework/Interception/Interceptor.php(58): Magento\Framework\App\Http->launch()
#16 /var/www/html/mydomain.com/vendor/magento/framework/Interception/Interceptor.php(138): Magento\Framework\App\Http\Interceptor->___callParent()
#17 /var/www/html/mydomain.com/vendor/magento/module-application-performance-monitor/Plugin/ApplicationPerformanceMonitor.php(38): Magento\Framework\App\Http\Interceptor->Magento\Framework\Interception\{closure}()
#18 /var/www/html/mydomain.com/vendor/magento/framework/Interception/Interceptor.php(135): Magento\ApplicationPerformanceMonitor\Plugin\ApplicationPerformanceMonitor->aroundLaunch()
#19 /var/www/html/mydomain.com/vendor/magento/framework/Interception/Interceptor.php(153): Magento\Framework\App\Http\Interceptor->Magento\Framework\Interception\{closure}()
#20 /var/www/html/mydomain.com/generated/code/Magento/Framework/App/Http/Interceptor.php(23): Magento\Framework\App\Http\Interceptor->___callPlugins()
#21 /var/www/html/mydomain.com/vendor/magento/framework/App/Bootstrap.php(264): Magento\Framework\App\Http\Interceptor->launch()
#22 /var/www/html/mydomain.com/pub/index.php(30): Magento\Framework\App\Bootstrap->run()
#23 {main} {"report_id":"44a8c291cba4f08c7029e54df90064b0f984cde5f73b3c5141eef6f993b78e41","exception":"[object] (Magento\\Framework\\Exception\\FileSystemException(code: 0): The contents from the \"/var/www/html/mydomain.com/vendor/magento/module-amazon/etc/module.xml\" file can't be read. Warning!file_get_contents(/var/www/html/mydomain.com/vendor/magento/module-amazon/etc/module.xml): Failed to open stream: No such file or directory at /var/www/html/mydomain.com/vendor/magento/framework/Filesystem/Driver/File.php:187)"} []

1 REPLY 1

Re: Cannot Remove Magento Amazon Sales Channel

Hello @joe_masciangelo 

 

Steps to Remove Magento Amazon Sales Channel

Run the following command to disable the Magento Amazon Sales Channel module:

bin/magento module:disable Magento_Amazon

 

Run the following Composer command:

composer remove magento/module-amazon 
bin/magento cache:clean 
bin/magento cache:flush
bin/magento setup:upgrade 
bin/magento setup:di:compile

 

Remove Database Entries

Look for tables related to amazon_* and remove them if necessary. Use queries like:

DROP TABLE IF EXISTS amazon_account; 
DROP TABLE IF EXISTS amazon_order;

Note: Make sure you back up your database before performing any manual deletions.

 

Check the Magento Admin to see if the Amazon Sales Channel has been successfully removed.

 

Hope it helps !

If you find our reply helpful, please give us kudos.

 

A Leading Magento Development Agency That Delivers Powerful Results, Innovation, and Secure Digital Transformation.

 

WebDesk Solution Support Team

Get a Free Quote | | Adobe Commerce Partner | Hire Us | Call Us 877.536.3789

 

Thank You,


WebDesk Solution Support Team
Get a Free Quote | Email | Adobe Commerce Partner | Hire Us | Call Us 877.536.3789


Location: 150 King St. W. Toronto, ON M5H 1J9