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

vincent15000's avatar

Cookie problem generates 419 error with Chrome

Hello,

I have an app that works fine, except sometimes a 419 error with Chrome (not tested with other browsers).

For example yesterday evening I was connected to the app, I have closed the session properly. And this morning I wanted to connect to the app and I got a 419 error.

Sorry I don't know how to share an image directly in the post, so I give you this link. The image shows the cookies in the dev tools in the browser.

https://drive.google.com/file/d/1ycG5W2syNwT6lf9-DXroY5FtcbB5T0KB/view?usp=sharing

You can see that there are 2 laravel_session and 2 XSRF-TOKEN, whereas there should be only one of each.

I have this problem on the desktop and on the smartphone.

Do you have any idea why I have this problem ?

Thanks for your help.

Vincent

0 likes
5 replies
vincent15000's avatar

Nobody has any idea to solve this problem ?

I have checked the browser's configuration, but I don't find anything that could solve this problem.

vincent15000's avatar

I don't have identified any manipulation that could generate this problem, for me it occurs randomly.

I precise that if I reload the page or delete the cookies or empty the cache, it works again.

vincent15000's avatar

@webrobert Thank you. Yes that's a good idea.

But it's perhaps not the better solution to keep the session alive.

I will perhaps try to catch the error and redirect if the session is down. I didn't thought about this solution until now.

vincent15000's avatar

@webrobert Perhaps another way would be to delete all cookies just before any login action. But the problem is that cookies are in the front and not in the back.

Please or to participate in this conversation.