Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Uncaught TypeError in Migration\Step\Map\Data::getRecordTransformer() #421

Closed
purnaresa opened this issue Dec 5, 2017 · 5 comments
Closed
Labels

Comments

@purnaresa
Copy link

Hi,

I need help here.
I do migration from Magento 1.9.2.1 Opensource to Magento 2.2.1 Commerce.

I stuck with this error.
I search the web but can't find a clue.

Really appreciate info, hint or something to point me to right direction.
Thanks

[2017-12-05 07:26:34][INFO][mode: data][stage: data migration][step: EAV Step]: started
100% [============================] Remaining Time: < 1 sec
[2017-12-05 07:26:35][INFO][mode: data][stage: volume check][step: EAV Step]: started
100% [============================] Remaining Time: < 1 sec
[2017-12-05 07:26:35][INFO][mode: data][stage: data migration][step: Customer Attributes Step]: started
[2017-12-05 07:26:35][DEBUG][mode: data][stage: data migration][step: Customer Attributes Step][table: customer_entity]: migrating
100% [============================] Remaining Time: < 1 sec
[2017-12-05 07:27:34][DEBUG][mode: data][stage: data migration][step: Customer Attributes Step][table: customer_address_entity]: migrating
100% [============================] Remaining Time: < 1 sec
[2017-12-05 07:28:25][DEBUG][mode: data][stage: data migration][step: Customer Attributes Step][table: customer_entity_datetime]: migrating
100% [============================] Remaining Time: < 1 sec
[2017-12-05 07:28:26][DEBUG][mode: data][stage: data migration][step: Customer Attributes Step][table: customer_entity_decimal]: migrating
100% [============================] Remaining Time: < 1 sec
[2017-12-05 07:28:26][DEBUG][mode: data][stage: data migration][step: Customer Attributes Step][table: customer_entity_int]: migrating
100% [============================] Remaining Time: < 1 sec
[2017-12-05 07:28:29][DEBUG][mode: data][stage: data migration][step: Customer Attributes Step][table: customer_entity_text]: migrating
100% [============================] Remaining Time: < 1 sec
[2017-12-05 07:28:39][DEBUG][mode: data][stage: data migration][step: Customer Attributes Step][table: customer_entity_varchar]: migrating
100% [============================] Remaining Time: < 1 sec
[2017-12-05 07:28:52][DEBUG][mode: data][stage: data migration][step: Customer Attributes Step][table: customer_address_entity_datetime]: migrating
100% [============================] Remaining Time: < 1 sec
[2017-12-05 07:28:52][DEBUG][mode: data][stage: data migration][step: Customer Attributes Step][table: customer_address_entity_decimal]: migrating
100% [============================] Remaining Time: < 1 sec
[2017-12-05 07:28:52][DEBUG][mode: data][stage: data migration][step: Customer Attributes Step][table: customer_address_entity_int]: migrating
100% [============================] Remaining Time: < 1 sec
[2017-12-05 07:28:54][DEBUG][mode: data][stage: data migration][step: Customer Attributes Step][table: customer_address_entity_text]: migrating
100% [============================] Remaining Time: < 1 sec
[2017-12-05 07:28:55][DEBUG][mode: data][stage: data migration][step: Customer Attributes Step][table: customer_address_entity_varchar]: migrating
100% [============================] Remaining Time: < 1 sec
[2017-12-05 07:29:08][INFO][mode: data][stage: volume check][step: Customer Attributes Step]: started
100% [============================] Remaining Time: < 1 sec
[2017-12-05 07:29:08][INFO][mode: data][stage: data migration][step: Map Step]: started
[2017-12-05 07:29:08][DEBUG][mode: data][stage: data migration][step: Map Step][table: cache]: migratingPHP Fatal error: Uncaught TypeError: Argument 1 passed to Migration\Step\Map\Data::getRecordTransformer() must be an instance of Migration\ResourceModel\Document, boolean given, called in /var/www/html/magento2/vendor/magento/data-migration-tool/src/Migration/Step/Map/Data.php on line 147 and defined in /var/www/html/magento2/vendor/magento/data-migration-tool/src/Migration/Step/Map/Data.php:191
Stack trace:
#0 /var/www/html/magento2/vendor/magento/data-migration-tool/src/Migration/Step/Map/Data.php(147): Migration\Step\Map\Data->getRecordTransformer(false, Object(Migration\ResourceModel\Document))
#1 /var/www/html/magento2/vendor/magento/data-migration-tool/src/Migration/Mode/AbstractMode.php(79): Migration\Step\Map\Data->perform()
#2 /var/www/html/magento2/vendor/magento/data-migration-tool/src/Migration/Mode/Data.php(119): Migration\Mode\AbstractMode->runStage(Object(Migration\Step\Map\Data), 'Map Step', 'data migration')
#3 /var/www/html/magento2/vendor/magento/data-migration-tool/src/Migration/Mode/Data.php(69): Migratio in /var/www/html/magento2/vendor/magento/data-migration-tool/src/Migration/Step/Map/Data.php on line 191

@victor-v-rad
Copy link
Collaborator

Hi @purnaresa
Try cleaning ddl cache

bin/magento cache:flush db_ddl

@purnaresa
Copy link
Author

@victor-v-rad Hi Victor
Really appreciate your info. I try it but it still gives me the same error.
Here is command history what I do

magento setup:uninstall
magento setup:install [complete param]
magento setup:di:compile
magento cache:flush db_ddl
magento migrate:setting --reset config.xml
magento cache:flush db_ddl
magento migrate:data -vvv --reset --auto config.xml -> output is the error that I sent earlier
magento cache:flush db_ddl
magento migrate:data -vvv --reset --auto config.xml -> output is error "Integrity constraint violation: 1062 Duplicate entry '1-Migration_Default' for key 'EAV_ATTRIBUTE_SET_ENTITY_TYPE_ID_ATTRIBUTE_SET_NAME'"

When I check DB, I see customer data is there. But the migration is failed.
The error log is too generic for me. I do not know where to debug.

Can you help me to understand?
Is it not proper migration config.xml
or my Magento 1.9.2.1 data is not in a good state
or something else.

@victor-v-rad
Copy link
Collaborator

victor-v-rad commented Dec 11, 2017

@purnaresa It must be something wrong with cache or configuration. You can try to install new Magento 2 and the tool, to test it.

@purnaresa
Copy link
Author

@victor-v-rad hi Victor
Thanks for your suggestion.
Yes, I already tried to install new Magento.
The command history in the previous post is uninstalling Magento and install it again.

I even launch a new instance in AWS to run data-migration, but no avail.
Actually, my company is using EE, but the support takes forever to reply.

Is this related to current data in Magento 1 database?
Can you help me to understand this;
It's quite vague for me.

[2017-12-05 07:28:55][DEBUG][mode: data][stage: data migration][step: Customer Attributes Step][table: customer_address_entity_varchar]: migrating
100% [============================] Remaining Time: < 1 sec
[2017-12-05 07:29:08][INFO][mode: data][stage: volume check][step: Customer Attributes Step]: started
100% [============================] Remaining Time: < 1 sec
[2017-12-05 07:29:08][INFO][mode: data][stage: data migration][step: Map Step]: started
[2017-12-05 07:29:08][DEBUG][mode: data][stage: data migration][step: Map Step][table: cache]: migratingPHP Fatal error: Uncaught TypeError: Argument 1 passed to Migration\Step\Map\Data::getRecordTransformer() must be an instance of Migration\ResourceModel\Document, boolean given, called in /var/www/html/magento2/vendor/magento/data-migration-tool/src/Migration/Step/Map/Data.php on line 147 and defined in /var/www/html/magento2/vendor/magento/data-migration-tool/src/Migration/Step/Map/Data.php:191

@victor-v-rad
Copy link
Collaborator

victor-v-rad commented Dec 18, 2017

The command history in the previous post is uninstalling Magento and install it again.

It might be better if you remove magento 2 codebase, then download latest code again and install everything from scratch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants