Skip to content

Error while installing sample data in magento 2.4.1 #31558

@ajmalbuffy

Description

@ajmalbuffy

Preconditions:
Getting the below error while trying to install sample data and upgrading the setup in Magento 2.4.1
Error: Unable to apply data patch Magento\CatalogRuleSampleData\Setup\Patch\Data\InstallCatalogRuleSampleData for module Magento_CatalogRuleSampleData. Original exception message: Rolled back transaction has not been completed correctly.

Steps to reproduce:
Step:1 Install Magento 2.4.1 using composer and CLI
Step:2 Set to developer mode and run the sample data deploy and setup upgrade command
Commands used:
bin/magento sampledata:deploy
bin/magento setup:upgrade

Expected result:
setup:upgrade should be successful without any error and the site should be loaded with the sample data.

Actual result:
Getting the below error while trying to upgrade the setup after deploying the sample data.
Error: Unable to apply data patch Magento\CatalogRuleSampleData\Setup\Patch\Data\InstallCatalogRuleSampleData for module Magento_CatalogRuleSampleData. Original exception message: Rolled back transaction has not been completed correctly.

Environment details: I am using
ubuntu 20.04
PHP 7.3.25
apache 2.4.46
MYSQL 5.7.32
elastic search 7.6.0
Magento 2.4.1
composer 1.10.19

Recently I have installed the Magento 2.4.1 community edition in Ubuntu 20.04, Installation went correct and while I try to set sample data I got the error "Unable to apply data patch Magento\CatalogRuleSampleData\Setup\Patch\Data\InstallCatalogRuleSampleData for module Magento_CatalogRuleSampleData. Original exception message: Rolled back transaction has not been completed correctly."

I have searched about this issue and tried all the solution which have been provided

Tried solutions:

  1. Switch to developer mode before installing sample data
  2. Using MySQL 5.7
  3. Remove the sample data and rerun again
  4. Remove the corn job before installing the sample data but none of the solutions worked for me.
    Screenshot from 2021-01-06 00-49-40

As a temporary fix, I have disabled the Magento_CatalogRuleSampleData Magento_SalesRuleSampleData and using the local site.

Anybody, please suggest a proper fix for this issue.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions