Skip to content

Module setup fails during creation of customer address attributes #121

@robaimes

Description

@robaimes

Problem:

Attempting to install the Shipper HQ module produces an error and setup cannot complete.

Reproduction:

  • Install Magento (2.4.4) with preconditions above
  • composer require shipperhq/module-shipper
  • bin/magento setup:upgrade

Additional Info

The exact error message spat out by the command line during bin/magento setup:upgrade is as below:

Unable to apply data patch ShipperHQ\Shipper\Setup\Patch\Data\InstallDestTypeAttributes for module ShipperHQ_Shipper. Original exception message: SQLSTATE[HY000]: General error: 1205 Lock wait timeout exceeded; try restarting transaction, query was: INSERT INTO `eav_attribute` (`entity_type_id`, `attribute_code`) VALUES (?, ?)

The specific query is

INSERT INTO `eav_attribute` (`entity_type_id`, `attribute_code`) VALUES ('2', 'destination_type')

The issue is present from lines 84 through 89 of Setup\Patch\Data\InstallDestTypeAttributes, and the same issue applies to lines 106 through 112.

Removing the $attribute->save() call allows setup to continue as normal, but without the used_in_forms data. Perhaps this would be better as a separate patch?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions