Trying to migrate Data from to 2.2.3 I am running

    php bin/magento migrate:data -r -a vendor/magento/data-migration-tool/etc/opensource-to-opensource/

Getting error

    Notice: Undefined offset: 26 in /Applications/MAMP/htdocs/magentotest/vendor/magento/data-migration-tool/src/Migration/Step/Eav/Data.php on line 291 

Hope This Will Works:-

This happens when you re-try a migration

Insight 2 Truncating relevant (?) tables as in http://blog.titechnologies.in/magento-2-x-how-to-clear-test-data-before-production/ lead me to the next error - I believe the original issue is resolved.

Thanks :-)

  • I have tried as suggested but now getting :- [PDOException] SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '1-Migration_Default' for key 'EAV_ATTRIBUTE_SET_ENTITY_TYPE_ID_ATTRIBUTE_SET_NAME' – Virendra Kumar Sharma May 8 '18 at 10:54
  • 1
    Also Truncate:- catalog_eav_attribute, eav_attribute_group, eav_attribute_label, eav_attribute_option, eav_attribute_option_swatch, eav_attribute_option_value, eav_attribute_set, eav_entity, eav_entity_attribute, eav_entity_datetime, eav_entity_decimal, eav_entity_int, eav_entity_store, eav_entity_text, eav_entity_type, eav_entity_varchar, eav_form_element, eav_form_fieldset, eav_form_fieldset_label, eav_form_type, eav_form_type_entity – Divyesh May 8 '18 at 10:59
  • i have cleaned whole db and started migration again now getting below [Exception] Warning: Error while sending QUERY packet. PID=34518 in /Applications/MAMP/htdocs/magentotest/vendor/magento/data-migration-tool/src/Migration/ResourceModel/Adapter/Mysql.php on line 169 – Virendra Kumar Sharma May 8 '18 at 12:14
  • Perhaps $bind is multi-dimensional array It would be good if you put var_dump($bind) and var_dump($insertSql) right before $statement (github.com/magento/data-migration-tool/blob/master/src/…) and show here. If it is not tool big. Also you can run migration with -vvv param to see backtrace – Divyesh May 8 '18 at 12:24

Just for others who might bump into this one: it is a bug in the data migration tool. If the tool fails once for an attribute reason, when the tool reverts it does not put back the attribute set tables in the initial configuration. It leaves them in a state that will fail the migration, in an endless loop between 2 error states

  • m2's eav_attribute_set table ends up containing the "migration_" entries after the undefined offset error or any other error during a further substep of the eav process (hence causing the "duplicate" error next time)

  • m2's eav_attribute_set table ends up completely empty after this error (causing the "undefined offset" again)

on and on forever

For those struggling, I have managed to pass through by MANUALLY (in SQL) rebuilding the eav_attribute_set and eav_attribute_group tables in the database to have only the original entries, but with the IDs from after my first migration (taking out all the migration ones but leaving/putting back the missing default ones)

see my comments on https://github.com/magento/data-migration-tool/issues/204

it still happens in 2.2.5

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.