Error

Hi,
 
After the Categories stage, in the “Products” settings for migration, I got the following error:
 
“Error 500
unserialize(): Error at offset 49148 of 49151 bytes”
 
How should I fix it ? 
 
Thanks !

35 answers

Profile photo of Mall Staff 72130.00 $tone December 28, 2017
Public

Hi there,

After the Categories stage, in the “Products” settings for migration, I got the following error:

“Error 500
unserialize(): Error at offset 49148 of 49151 bytes”

Let’s run below SQL statement in your Magento2’s database:

ALTER TABLE `ub_migrate_step` CHANGE `setting_data` `setting_data` LONGBLOB NULL DEFAULT NULL COMMENT 'Settings Data';

And back to step #5 of our tool and tell me know how it goes then.
Regards,
Mall.

#1
Profile photo of Mall Staff 72130.00 $tone December 28, 2017
Public

Hi there,

I runned the SQL query successfully. I flush cache, but the error still remains exactly the same

Let’s try reset the settings in the steps #4, #5 by run CLI commands:
php -f bin/ubdatamigration reset --step=4
php -f bin/ubdatamigration reset --step=5
And back to settings on these steps and tell me know how it goes.
Regards,
Mall.

#3
Profile photo of Mall Staff 72130.00 $tone January 2, 2018
Public

Hi there,

1- It says that “Migrate Customer” has finished, but when I go to check the Migrated Customer I see none. 

To see the customer after migrated, you have to reindex your data. 

2- The migration process has freezed at 71%. I tried to “run all steps” again, but it still get stuck at 71% (731 Sales Orders).

I have checked in back-end of your instance. And i don’t see any error message in the log of our tool. And the latest message log of our tool in the step #7 is:

2017/12/31 08:03:55 -- [Processing] Step #7 migration completed with 100 Sales Orders;
2017/12/31 08:04:02 -- [Processing] Step #7 migration completed with 100 Sales Orders;

Let’s continue with data migration in the step #7 by run cli command:
php -f bin/ubdatamigration run --step=7
Regards,
Mall.

#7
Profile photo of nmella 270.00 $tone January 2, 2018
Public

Thanks !. When I run if from the command line, I get the error:

php -f bin/ubdatamigration run --step=7
Processing in step #7........................................................................................................................................................................................................................................................................PHP Error[2]: include(Mage_Core_Controller_Request_Http.php): failed to open stream: No such file or directory
in file /chroot/home/petacl2/peta.cl/html/m2/pub/ub-tool/yii-1.1.19/YiiBase.php at line 432
#0 /chroot/home/petacl2/peta.cl/html/m2/pub/ub-tool/yii-1.1.19/YiiBase.php(432): include()
#1 unknown(0): autoload()
#2 unknown(0): spl_autoload_call()
#3 /chroot/home/petacl2/peta.cl/html/m2/pub/ub-tool/protected/controllers/Step7Controller.php(1834): unserialize()
#4 /chroot/home/petacl2/peta.cl/html/m2/pub/ub-tool/protected/controllers/Step7Controller.php(2778): Step7Controller->_convertProductOptions()
#5 /chroot/home/petacl2/peta.cl/html/m2/pub/ub-tool/protected/controllers/Step7Controller.php(1306): Step7Controller->_migrateSalesOrderItem()
#6 /chroot/home/petacl2/peta.cl/html/m2/pub/ub-tool/protected/controllers/Step7Controller.php(246): Step7Controller->_migrateSalesOrders()
#7 /chroot/home/petacl2/peta.cl/html/m2/pub/ub-tool/protected/commands/RunCommand.php(58): Step7Controller->actionRun()
#8 /chroot/home/petacl2/peta.cl/html/m2/pub/ub-tool/protected/commands/RunCommand.php(28): RunCommand->_migrateData()
#9 unknown(0): RunCommand->actionIndex()
#10 /chroot/home/petacl2/peta.cl/html/m2/pub/ub-tool/yii-1.1.19/console/CConsoleCommand.php(172): ReflectionMethod->invokeArgs()
#11 /chroot/home/petacl2/peta.cl/html/m2/pub/ub-tool/yii-1.1.19/console/CConsoleCommandRunner.php(71): RunCommand->run()
#12 /chroot/home/petacl2/peta.cl/html/m2/pub/ub-tool/yii-1.1.19/console/CConsoleApplication.php(92): CConsoleCommandRunner->run()
#13 /chroot/home/petacl2/peta.cl/html/m2/pub/ub-tool/yii-1.1.19/base/CApplication.php(185): CConsoleApplication->processRequest()
#14 /chroot/home/petacl2/peta.cl/html/m2/pub/ub-tool/yii-1.1.19/yiic.php(33): CConsoleApplication->run()
#15 /chroot/home/petacl2/peta.cl/html/m2/pub/ub-tool/protected/ubdatamigration_cli.php(5): require_once()
#16 /chroot/home/petacl2/peta.cl/html/m2/bin/ubdatamigration(4): require_once()
#8
Profile photo of Mall Staff 72130.00 $tone January 2, 2018
Public

Hi there,
Seem your M1’s database has some records with bad data in the sales data section. Let’s provide me more the SSH credentials.
I will check further and reply you more later.
Regards,
Mall.

#9
Profile photo of Mall Staff 72130.00 $tone January 3, 2018
Public

Hi there,
Please pause all your activities at your end now. I will check further in your instance and reply you more later.
Regards,
Mall.

#13
Profile photo of Mall Staff 72130.00 $tone January 3, 2018
Public

Hi there,
I have checked in your instance and i see the issue as you mentioned. I have added more tweak code in step #7 of our tool to handle for that case. And now you could continue with data migration in the step #7. You could run CLI command:
php -f bin/ubdatamigration run --step=7
I have run for testing: http://i.prntscr.com/LuzQqhlWTvelmXbAEVRTDA.png
Regards,
Mall.

#15
Profile photo of nmella 270.00 $tone January 3, 2018
Public

 Thanks ! What did you do exactly ? What file did you changed ?
Because this is my test migration in my DEV environment. Once I fix all issues, I will proceed with the definitive migration, so I will probably need to do what you just did. 
Thanks. 

#16
Profile photo of Mall Staff 72130.00 $tone January 3, 2018
Public

Hi there,

I will proceed with the definitive migration, so I will probably need to do what you just did. 

Any times, you could download the php file for step #7 of our tool at here
And then, upload replace to the php file in your new instance at path: pub/ub-tool/protected/controllers/Step7Controller.php
Note: This patch only compatible with ver.3.1.2 of our tool.
Regards,
Mall.

#17
Profile photo of nmella 270.00 $tone January 4, 2018
Public

Hi Mall,
Now it has stopped again. Error says:

2018/01/03 05:18:35 [error] [ub_data_migration] Mage2SalesOrder: Total Canceled is too long (maximum is 12 characters).- Total Due is too long (maximum is 12 characters).

What can I do ?
Thanks for the great help !

#18
Profile photo of Mall Staff 72130.00 $tone January 4, 2018
Public

Hi there,

2018/01/03 05:18:35 [error] [ub_data_migration] Mage2SalesOrder: Total Canceled is too long (maximum is 12 characters).- Total Due is too long (maximum is 12 characters).

That because your database has some records has bad data in values of the the sales_flat_order.total_canceled and sales_flat_order.total_due fields.
To solve that issue, you could do with steps as followings:
Step 1: Open the php file at path: pub/ub-tool/protected/controllers/Step7Controller.php
and find to the code line:

'weight','base_grand_total','base_subtotal','grand_total','subtotal',

and replace it by code line:

'weight','base_grand_total','base_subtotal','grand_total','subtotal',total_canceled,total_due,

Once done, you could continue with data migration in the step #7: php -f bin/ubdatamigration run --step=7
Regards,
Mall.

#19
Profile photo of nmella 270.00 $tone January 5, 2018
Public

Thanks. I did (actually I found 2 lines: 1189 and 1256, so I changed on boths), but now I get similar error:

Status: fail
Message: Mage2SalesOrderItem: Price Incl Tax is too long (maximum is 12 characters).<br/>Mage2SalesOrderPayment: Amount Ordered is too long (maximum is 12 characters)

Shoud I add the “Price Incl Tax” variable to the same line ? What is the “Price Incl Tax” variable ?

#20
Profile photo of Mall Staff 72130.00 $tone January 5, 2018
Public

Hi there,

Message: Mage2SalesOrderItem: Price Incl Tax is too long (maximum is 12 characters).
<br/>Mage2SalesOrderPayment: Amount Ordered is too long (maximum is 12 characters)

No, that is another issue in other context. To solve that, you could do with steps as followings:
Open the php file at path: pub/ub-tool/protected/controllers/Step7Controller.php
and find to the code line:

} else if (in_array($key, array('weight', 'row_weight', 'row_total_incl_tax', 'base_row_total_incl_tax')) AND strlen($val) > 12) {

and replace it by code line:

} else if (in_array($key, array('weight', 'row_weight', 'row_total_incl_tax', 'base_row_total_incl_tax', 'price_incl_tax')) AND strlen($val) > 12) {

And then, continue with data migration in the step #7 by run CLI command:
php -f bin/ubdatamigration run --step=7
Regards,
Mall.
 

#21
Profile photo of Mall Staff 72130.00 $tone January 5, 2018
Public

Hi there,

Message: Mage2SalesOrderPayment: Amount Ordered is too long (maximum is 12 characters).

You could check the records with bad data by run below SQL statement in your M1’s database:

SELECT * FROM `sales_flat_order_payment` WHERE LENGTH(`amount_ordered`) > 12;

And re-solve values on that records. And you could continue with data migration then.
Regards,
Mall.

#23
Profile photo of nmella 270.00 $tone January 8, 2018
Public

 Hi Mall,

I had to do everything again….But when I get this error, I don’t know what you did before (I did the same files changes for Step7Controller.php).
What did you do a couple of days ago to solve this issue?

PHP Error[2]: include(Mage_Core_Controller_Request_Http.php): failed to open stream: No such file or directory
in file /chroot/home/petacl2/peta.cl/html/m2/pub/ub-tool/yii-1.1.19/YiiBase.php at line 432
#0 /chroot/home/petacl2/peta.cl/html/m2/pub/ub-tool/yii-1.1.19/YiiBase.php(432): include()
#1 unknown(0): autoload()
#2 unknown(0): spl_autoload_call()
#3 /chroot/home/petacl2/peta.cl/html/m2/pub/ub-tool/protected/models/UBMigrate.php(2073): unserialize()
#4 /chroot/home/petacl2/peta.cl/html/m2/pub/ub-tool/protected/controllers/Step7Controller.php(1836): mb_unserialize()
#5 /chroot/home/petacl2/peta.cl/html/m2/pub/ub-tool/protected/controllers/Step7Controller.php(2780): Step7Controller->_convertProductOptions()
#6 /chroot/home/petacl2/peta.cl/html/m2/pub/ub-tool/protected/controllers/Step7Controller.php(1308): Step7Controller->_migrateSalesOrderItem()
#7 /chroot/home/petacl2/peta.cl/html/m2/pub/ub-tool/protected/controllers/Step7Controller.php(246): Step7Controller->_migrateSalesOrders()
#8 /chroot/home/petacl2/peta.cl/html/m2/pub/ub-tool/protected/commands/RunCommand.php(58): Step7Controller->actionRun()
#9 /chroot/home/petacl2/peta.cl/html/m2/pub/ub-tool/protected/commands/RunCommand.php(28): RunCommand->_migrateData()
#10 unknown(0): RunCommand->actionIndex()
#11 /chroot/home/petacl2/peta.cl/html/m2/pub/ub-tool/yii-1.1.19/console/CConsoleCommand.php(172): ReflectionMethod->invokeArgs()
#12 /chroot/home/petacl2/peta.cl/html/m2/pub/ub-tool/yii-1.1.19/console/CConsoleCommandRunner.php(71): RunCommand->run()
#13 /chroot/home/petacl2/peta.cl/html/m2/pub/ub-tool/yii-1.1.19/console/CConsoleApplication.php(92): CConsoleCommandRunner->run()
#14 /chroot/home/petacl2/peta.cl/html/m2/pub/ub-tool/yii-1.1.19/base/CApplication.php(185): CConsoleApplication->processRequest()
#15 /chroot/home/petacl2/peta.cl/html/m2/pub/ub-tool/yii-1.1.19/yiic.php(33): CConsoleApplication->run()
#16 /chroot/home/petacl2/peta.cl/html/m2/pub/ub-tool/protected/ubdatamigration_cli.php(5): require_once()
#17 /chroot/home/petacl2/peta.cl/html/m2/bin/ubdatamigration(4): require_once()What did you did before to solve the above issue.
#24
Profile photo of Mall Staff 72130.00 $tone January 8, 2018
Public

Hi there,

What did you do a couple of days ago to solve this issue?

Kindly try with step as followings:
Open the php file at path: pub/ub-tool/protected/models/UBMigrate.php
and find to the code line 2073:

return unserialize($string);

and replace it by code line:

return @unserialize($string);

And tell me know how it goes then.
Regards,
Mall.

#25
Profile photo of nmella 270.00 $tone January 8, 2018
Public

Hi, 
Migration when 100%. Thanks!
 
Now, I can’t login using the same credentials (login & password) from magento 1….
 
All customers were migrated successfully.
 
What might be wrong ?
 
Thanks again.

#28
Profile photo of Mall Staff 72130.00 $tone January 9, 2018
Public

Hit here,

Now, I can’t login using the same credentials (login & password) from magento 1….
All customers were migrated successfully.
What might be wrong ?

Did you select the Merge default website option in the step #2 of our tool? (It seems you have changed the URL of your M2 instance, I couldn’t access http://m2.peta.cl/admin_1r0bk7/ now)
If you haven’t select the Merge default website option, you need to set the migrated website as default website in your M2’s instance now. And then, the migrated customers belong to migrated website can login in your M2 instance normally. Please check this again via the back-end of your M2 instance now.
Regards,
Mall.

#29
Profile photo of Mall Staff 72130.00 $tone January 10, 2018
Public

Hi there,
I have checked login with the customer credentials you provided and i see the issue as you said.
I have checked more in back-end of your instance and i see there are some strange:
I couldn’t view customer’s information in back-end: http://i.prntscr.com/N8pL08qwQPqfS7nRmX5ESw.png
Do you see that issue in the first time?
Also, our tool detected in your M1’s database has Total: 34858 customers -- https://prnt.sc/hycq20
But in the quick report of our tool there are total migrated 35028 customers: https://prnt.sc/hycqcq
But now i see total 35027 customers in gridview in back-end of your M2: https://prnt.sc/hycqgq
That are strange, could you explain more information about that? What did you do with your data after migration with our tool?
Regards,
Mall.
 

#33
Profile photo of nmella 270.00 $tone January 11, 2018
Public

Thanks. 
I haven’t done anything….so it is very strange. I can’t explain…. I only have worked on the migration tool test. 
I will install a new M2 instance, and try again the migration process. I’ll let you know if the login & password error persists. 

#34
Profile photo of Mall Staff 72130.00 $tone 7 days ago
Public

Hi there,

I will install a new M2 instance, and try again the migration process. I’ll let you know if the login & password error persists. 

Yeah, let’s try with that step and contact me if you need further assistance.
Regards,
Mall.

#35

Please login or Register to Submit Answer

Written By

Comments