Magento – Error while installing sampledata Magento 2.4

magento2.4sample-data

I have setup the Magento 2.4 on Windows 10.
I have run these commands to install the sampledata:

php bin/magento sampledata:deploy   - Working 
php bin/magento setup:upgrade   - Error

Error: Unable to apply data patch Magento\CatalogSampleData\Setup\Patch\Data\InstallCatalogSampleData for module Magento_CatalogSampleData. Original exception message: Rolled back transaction has not been completed correctly.

For clarification see attached screenshot:
enter image description here

Note- I am getting this error only in Magento2.4 version

Best Answer

I did had such a problem and recovered by run command php bin/magento sampledata:remove after upgrade run normally

Related Topic