Migration V5 from hosting to hosting

Hi it is me again :smiley:

So I checked the forum and read all items about migration and please let me know if I doing correct

  1. I have working version V5 on sub.domain1.com (I would like to transfer to sub1.domain2.com)
  2. on hosting 2 I install clean version and this is ok (login normaly)
  3. After that → phpmyadmin and clean DB from hosting 2 and import DB from server 1
After that i get invalid login with error 500
  1. on hosting 2 rename enc.fresh
  2. on hosting 2 upload all files from server nr 1 (working ninja V5)
  3. on hosting 2 lounch terminal and run (php artisan migrate, php artisan optimize)
  4. on new ninja invoice open browser /update?secret=

I try to load a new fresh DB and after that I can login normaly but app do not have any date about clients, invoices…

What I missed up?

log -->>

[2024-01-02 13:10:42] production.ERROR: The MAC is invalid. {“userId”:1,“exception”:"[object] (Illuminate\Contracts\Encryption\DecryptException(code: 0): The MAC is invalid. at /home/dsteam94/1.dsteamdev.eu/vendor/laravel/framework/src/Illuminate/Encryption/Encrypter.php:222)
#0 /home/dsteam94/1.dsteamdev.eu/vendor/laravel/framework/src/Illuminate/Encryption/Encrypter.php(151): Illuminate\Encryption\Encrypter->getJsonPayload(Array)
#1 /home/dsteam94/1.dsteamdev.eu/vendor/laravel/framework/src/Illuminate/Foundation/helpers.php(373): Illuminate\Encryption\Encrypter->decrypt(‘eyJpdiI6ImZ3QmF…’, true)
#2 /home/dsteam94/1.dsteamdev.eu/app/Models/CompanyGateway.php(253): decrypt(‘eyJpdiI6ImZ3QmF…’)


Please check that you have the same APP_KEY value in the .env file of the new install.

I changed the APP_Key and after that again runing terminal (php artisan migrate, php artisan optimize) on new ninja invoice open browser /update?secret=

This is solution.