Invoice: Whoops error when view in portal

Hello!

I installed Invoice Ninja in my hosting using an autoinstaller. Everything works fine at first, i created invoices, i viewed in portal, etc. No problem at all.

After i started to load with more customers and invoices the function to view the invoice in portal not works anymore. I enabled the debug and have this log instead the “whoops” message.

I do not what to do and cant find a similar problem here.

Thanks

(1/1) DecryptException

The MAC is invalid.
in Encrypter.php (line 195)
at Encrypter->getJsonPayload( array (‘iv’ => ‘eM+fqDo0w8XKFCx+dcdNdg==’, ‘value’ => ‘2h77gOB1PedtvADazSFibyvIy2nxvQrccZ5M4XoRWyhrFfEgJchouYq6B1W+J1nwlcQaJ4phDpvFCZ5CKWvdkMbQOjdyPAi+8ZQDkRYmGgZPfLWKPBvgiy6OA7uoVb28a0GIItcAPfIAgwVOSWv9F4WLNZtwphw+EraZQqjoa2QduILTy/4MLxaXbiKsbkqmKIrcFp0MKRgFh37hclSuUBBv5r9uZHzx+CjKWLFYCVn+mJgTm5KeWzGpppWo8AHY’, ‘mac’ => ‘9e5eb1b826702560e3115f75621addd6c3af576b7839e06dd67207175ae43817’))in Encrypter.php (line 134)
at Encrypter->decrypt(‘eyJpdiI6ImVNK2ZxRG8wdzhYS0ZDeCtkY2ROZGc9PSIsInZhbHVlIjoiMmg3N2dPQjFQZWR0dkFEYXpTRmlieXZJeTJueHZRcmNjWjVNNFhvUld5aHJGZkVnSmNob3VZcTZCMVcrSjFud2xjUWFKNHBoRHB2RkNaNUNLV3Zka01iUU9qZHlQQWkrOFpRRGtSWW1HZ1pQZkxXS1BCdmdpeTZPQTd1b1ZiMjhhMEdJSXRjQVBmSUFnd1ZPU1d2OUY0V0xOWnR3cGh3K0VyYVpRcWpvYTJRZHVJTFR5XC80TUx4YVhiaUtzYmtxbUtJcmNGcDBNS1JnRmgzN2hjbFN1VUJCdjVyOXVaSHp4K0NqS1dMRllDVm4rbUpnVG01S2VXekdwcHBXbzhBSFkiLCJtYWMiOiI5ZTVlYjFiODI2NzAyNTYwZTMxMTVmNzU2MjFhZGRkNmMzYWY1NzZiNzgzOWUwNmRkNjcyMDcxNzVhZTQzODE3In0=’)in Facade.php (line 221)
at Facade::__callStatic(‘decrypt’, array (‘eyJpdiI6ImVNK2ZxRG8wdzhYS0ZDeCtkY2ROZGc9PSIsInZhbHVlIjoiMmg3N2dPQjFQZWR0dkFEYXpTRmlieXZJeTJueHZRcmNjWjVNNFhvUld5aHJGZkVnSmNob3VZcTZCMVcrSjFud2xjUWFKNHBoRHB2RkNaNUNLV3Zka01iUU9qZHlQQWkrOFpRRGtSWW1HZ1pQZkxXS1BCdmdpeTZPQTd1b1ZiMjhhMEdJSXRjQVBmSUFnd1ZPU1d2OUY0V0xOWnR3cGh3K0VyYVpRcWpvYTJRZHVJTFR5XC80TUx4YVhiaUtzYmtxbUtJcmNGcDBNS1JnRmgzN2hjbFN1VUJCdjVyOXVaSHp4K0NqS1dMRllDVm4rbUpnVG01S2VXekdwcHBXbzhBSFkiLCJtYWMiOiI5ZTVlYjFiODI2NzAyNTYwZTMxMTVmNzU2MjFhZGRkNmMzYWY1NzZiNzgzOWUwNmRkNjcyMDcxNzVhZTQzODE3In0=’))in AccountGateway.php (line 137)
at AccountGateway->getConfig()in AccountGateway.php (line 147)
at AccountGateway->getConfigField(‘name’)in BasePaymentDriver.php (line 1073)
at BasePaymentDriver->paymentLinks()in ClientPortalController.php (line 197)
at ClientPortalController->getPaymentTypes( object (Account), object (Client), object (Invitation))in ClientPortalController.php (line 128)
at ClientPortalController->viewInvoice(‘z9pbbudmotcqjn5h1sq0m4xcmvc7ewkh’)
at call_user_func_array( array ( object (ClientPortalController), ‘viewInvoice’), array (‘invitation_key’ => ‘z9pbbudmotcqjn5h1sq0m4xcmvc7ewkh’))in Controller.php (line 54)
at Controller->callAction(‘viewInvoice’, array (‘invitation_key’ => ‘z9pbbudmotcqjn5h1sq0m4xcmvc7ewkh’))in ControllerDispatcher.php (line 45)
at ControllerDispatcher->dispatch( object (Route), object (ClientPortalController), ‘viewInvoice’)in Route.php (line 212)
at Route->runController()in Route.php (line 169)
at Route->run()in Router.php (line 658)
at Router->Illuminate\Routing{closure}( object (Request))in Pipeline.php (line 30)
at Pipeline->Illuminate\Routing{closure}( object (Request))in Authenticate.php (line 122)
at Authenticate->handle( object (Request), object (Closure), ‘client’)in Pipeline.php (line 149)
at Pipeline->Illuminate\Pipeline{closure}( object (Request))in Pipeline.php (line 53)
at Pipeline->Illuminate\Routing{closure}( object (Request))in DatabaseLookup.php (line 21)
at DatabaseLookup->handle( object (Request), object (Closure), ‘contact’)in Pipeline.php (line 149)
at Pipeline->Illuminate\Pipeline{closure}( object (Request))in Pipeline.php (line 53)
at Pipeline->Illuminate\Routing{closure}( object (Request))in StartupCheck.php (line 241)
at StartupCheck->handle( object (Request), object (Closure))in Pipeline.php (line 149)
at Pipeline->Illuminate\Pipeline{closure}( object (Request))in Pipeline.php (line 53)
at Pipeline->Illuminate\Routing{closure}( object (Request))in QueryLogging.php (line 32)
at QueryLogging->handle( object (Request), object (Closure))in Pipeline.php (line 149)
at Pipeline->Illuminate\Pipeline{closure}( object (Request))in Pipeline.php (line 53)
at Pipeline->Illuminate\Routing{closure}( object (Request))in DuplicateSubmissionCheck.php (line 41)
at DuplicateSubmissionCheck->handle( object (Request), object (Closure))in Pipeline.php (line 149)
at Pipeline->Illuminate\Pipeline{closure}( object (Request))in Pipeline.php (line 53)
at Pipeline->Illuminate\Routing{closure}( object (Request))in TransformsRequest.php (line 30)
at TransformsRequest->handle( object (Request), object (Closure))in Pipeline.php (line 149)
at Pipeline->Illuminate\Pipeline{closure}( object (Request))in Pipeline.php (line 53)
at Pipeline->Illuminate\Routing{closure}( object (Request))in VerifyCsrfToken.php (line 68)
at VerifyCsrfToken->handle( object (Request), object (Closure))in VerifyCsrfToken.php (line 44)
at VerifyCsrfToken->handle( object (Request), object (Closure))in Pipeline.php (line 149)
at Pipeline->Illuminate\Pipeline{closure}( object (Request))in Pipeline.php (line 53)
at Pipeline->Illuminate\Routing{closure}( object (Request))in ShareErrorsFromSession.php (line 49)
at ShareErrorsFromSession->handle( object (Request), object (Closure))in Pipeline.php (line 149)
at Pipeline->Illuminate\Pipeline{closure}( object (Request))in Pipeline.php (line 53)
at Pipeline->Illuminate\Routing{closure}( object (Request))in StartSession.php (line 63)
at StartSession->handle( object (Request), object (Closure))in Pipeline.php (line 149)
at Pipeline->Illuminate\Pipeline{closure}( object (Request))in Pipeline.php (line 53)
at Pipeline->Illuminate\Routing{closure}( object (Request))in AddQueuedCookiesToResponse.php (line 37)
at AddQueuedCookiesToResponse->handle( object (Request), object (Closure))in Pipeline.php (line 149)
at Pipeline->Illuminate\Pipeline{closure}( object (Request))in Pipeline.php (line 53)
at Pipeline->Illuminate\Routing{closure}( object (Request))in EncryptCookies.php (line 66)
at EncryptCookies->handle( object (Request), object (Closure))in Pipeline.php (line 149)
at Pipeline->Illuminate\Pipeline{closure}( object (Request))in Pipeline.php (line 53)
at Pipeline->Illuminate\Routing{closure}( object (Request))in Pipeline.php (line 102)
at Pipeline->then( object (Closure))in Router.php (line 660)
at Router->runRouteWithinStack( object (Route), object (Request))in Router.php (line 635)
at Router->runRoute( object (Request), object (Route))in Router.php (line 601)
at Router->dispatchToRoute( object (Request))in Router.php (line 590)
at Router->dispatch( object (Request))in Kernel.php (line 176)
at Kernel->Illuminate\Foundation\Http{closure}( object (Request))in Pipeline.php (line 30)
at Pipeline->Illuminate\Routing{closure}( object (Request))in InjectDebugbar.php (line 51)
at InjectDebugbar->handle( object (Request), object (Closure))in Pipeline.php (line 149)
at Pipeline->Illuminate\Pipeline{closure}( object (Request))in Pipeline.php (line 53)
at Pipeline->Illuminate\Routing{closure}( object (Request))in CheckForMaintenanceMode.php (line 46)
at CheckForMaintenanceMode->handle( object (Request), object (Closure))in Pipeline.php (line 149)
at Pipeline->Illuminate\Pipeline{closure}( object (Request))in Pipeline.php (line 53)
at Pipeline->Illuminate\Routing{closure}( object (Request))in HandlePreflight.php (line 46)
at HandlePreflight->handle( object (Request), object (Closure))in Pipeline.php (line 149)
at Pipeline->Illuminate\Pipeline{closure}( object (Request))in Pipeline.php (line 53)
at Pipeline->Illuminate\Routing{closure}( object (Request))in Pipeline.php (line 102)
at Pipeline->then( object (Closure))in Kernel.php (line 151)
at Kernel->sendRequestThroughRouter( object (Request))in Kernel.php (line 116)
at Kernel->handle( object (Request))in index.php (line 51)

Hi,

We usually see the ‘The MAC is invalid’ error if the value for APP_KEY in the .env file is changed, I’m not aware of any other cause.

Hello! On the .env file i only added google maps api key.

Finally looking into another thread i found that manually “archiving” the payment gateways in database fixed the issue. I recreated new gateways and now its working.

Don’t know why happened and if it will happen again.

Thanks