Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

LifeIsEazi's avatar

MAC is invalid production.error

Anyone come across this error when hosting on forge?

[2020-11-16 19:53:49] production.ERROR: The MAC is invalid. {"userId":5,"exception":"[object] (Illuminate\Contracts\Encryption\DecryptException(code: 0): The MAC is invalid. at /home/forge/projects.creativebox.world/vendor/laravel/framework/src/Illuminate/Encryption/Encrypter.php:199)

I read on it and it indicated that there was an issue with the key I used in env but this error is occuring across different sites that were properly deployed. I have run optimize and restarted the server.

The temporary workaround involves asking the users to try a different browser but this isn't a long term solution

Environments it has occured in both staging and prod, php7.4, laravel v8 with inertiajs and jetstream

0 likes
1 reply
Sinnbeck's avatar

And you have nothing in your deploy pipeline that runs php artisan key:generate?

Please or to participate in this conversation.