Migration won't complete

Hi,

I can go as far as Select Companies to migrate and click [ Continue ].
Then : Whoops, looks like something went wrong.

Error message in laravel-error.log

[2021-04-21 16:24:07] production.ERROR: Illuminate\Contracts\Encryption\DecryptException [0] : /home/customer/www/sub.domain.com/public_html/vendor/laravel/framework/src/Illuminate/Encryption/Encrypter.php [Line 195] => The MAC is invalid. {“context”:“PHP”,“user_id”:1,“account_id”:1,“user_name”:“Alexandre Gauvin”,“method”:“POST”,“user_agent”:“Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/90.0.4430.72 Safari/537.36”,“locale”:“en”,“ip”:“74.59.119.254”,“count”:1,“is_console”:“no”,“is_api”:“no”,“db_server”:“mysql”,“url”:“migration/companies”} []

The only thing that I modified is the locale from FR to EN before migration.

Any help would be appreciated

Hi,

I’m not sure, the MAC error usually means the APP_KEY in the .env file has changed

@david, any thoughts?

Ok thanks for the reply.

Should the APP_KEY be the same in both .env files ?

v4 and v5 can have different values, is it possible the value in v4 was changed?

No, it didn’t. I never get my hands on this file.

I noticed that API_SECRET is set on v4 but not in v5 .env file

APP_KEY=base64:***************Qqw=
APP_CIPHER=AES-256-CBC
API_SECRET=

Could that be a part of the problem ?

I wouldn’t think so, Dave may have more ideas…

Sorry to ping again.

I have tried everything in my knowledge and from what I have read in this forum and help docs.
Just in case something would have modified the APP_KEY just before migration, I have restored .env file from a few days before this day. Still, I can’t complete the migration.

Thank you helping me getting up and running with v5.

Does the table on the bottom half of Settings > Online Payments load correctly in v4?

I think so. Screenshot by Lightshot

I don’t use any gateway though

Do you have any bank accounts added?

No, as far as I know, and recall from a previous post with you on that matter, Canadian banks do not support OFX export.

Are there any records in the account_gateways table?

Yes, there is one records from 2017. I suppose I did try to hook to my bank institution. Should I delete this record ?

Ok, after a DB backup, I did delete the account_gateways entry.
The migration process went a bit further, but with still some issues or discrepancies

This is the final message from v4 after trying migration: Screenshot by Lightshot
In the same time, I received a “Migration Completed” email notification with my logo in it.
Not sure which message to believe ??
I did check the migration report provided at the end of email. See screenshot
Migration Completed - alexandre.gauvin@gmail.com - Gmail

There is a difference between what is listed in this report and what I can see in the v4 UI, at the bottom of each related pages.

What do you suggest ?

Thanks for your support

I suggest you remove the filters on listing data on V4 and you will see that entries will match. with V5.

Yeah, I did, in the mean time.

I went on again with migration. Before trying another attempt, I did completely delete files and DB to start on fresh foundation.

The process went well until the end. I do get an error message at the end of process in v4 saying :

Oops, something went wrong. Migration can’t be processed at the moment. Please checks the logs

In the same time I received a “Migration complete” email notifications saying :

Import completed
Hello, here is the output of your recent import job.
If your logo imported correctly it will display below. If it didn’t import, you’ll need to reupload your logo

This message includes my logo and the success report.

So I’m not sure about the real success of the migration even if all the data are in new DB and I can access the app and datas via UI.

In the app I do get another message warning me that the Company is not activated. When I click on orange error message, The “Activate company” toggle is activated but the warning will not disappear.
And if I click on Apply licence, nothing happens.

Thanks for your support

There is an option to activate the company on Settings > Account Management