Hello,
I've update to Magento 2.3.4 and after the update, for most of the users that try to login, we get the next report
{"0":"Unable to send the cookie. Size of 'mage-messages' is 4155 bytes.","1":"#1 Magento\\Framework\\Stdlib\\Cookie\\PhpCookieManager->setCookie('mage-messages', '[{\"type\":\"error\"...', array('duration' => 31536000, 'path' => '\/', 'http_only' => false)) called at [vendor\/magento\/framework\/Stdlib\/Cookie\/PhpCookieManager.php:121]\n#2 Magento\\Framework\\Stdlib\\Cookie\\PhpCookieManager->setPublicCookie('mage-messages', '[{\"type\":\"error\"...', &Magento\\Framework\\Stdlib\\Cookie\\PublicCookieMetadata#000000001a59503b000000007930b032#) called at [vendor\/magento\/module-theme\/Controller\/Result\/MessagePlugin.php:140]\n#3 Magento\\Theme\\Controller\\Result\\MessagePlugin->setCookie(array(array('type' => 'error', 'text' => 'Invalid Form Key...'), array('type' => 'error', 'text' => 'Invalid Form Key...'), array('type' => 'error', 'text' => 'Invalid Form Key...'), array('type' => 'error', 'text' => 'Invalid Form Key...'), array('type' => 'error', 'text' => 'Invalid Form Key...'), array('type' => 'error', 'text' => 'Invalid Form Key...'), array('type' => 'error', 'text' => 'Invalid Form Key...'), array('type' => 'error', 'text' => 'Invalid Form Key...'), array('type' => 'error', 'text' => 'Invalid Form Key...'), array('type' => 'error', 'text' => 'Invalid Form Key...'), array('type' => 'error', 'text' => 'Invalid Form Key...'), array('type' => 'error', 'text' => 'Invalid Form Key...'), array('type' => 'error', 'text' => 'Invalid Form Key...'), array('type' => 'error', 'text' => 'Invalid Form Key...'), array('type' => 'error', 'text' => 'Invalid Form Key...'), array('type' => 'error', 'text' => 'Invalid Form Key...'), array('type' => 'error', 'text' => 'Invalid Form Key...'), array('type' => 'error', 'text' => 'Invalid Form Key...'), array('type' => 'error', 'text' => 'Invalid Form Key...'), array('type' => 'error', 'text' => 'Invalid Form Key...'), array('type' => 'error', 'text' => 'Invalid Form Key...'), array('type' => 'error', 'text' => 'Invalid Form Key...'), array('type' => 'error', 'text' => 'Invalid Form Key...'), array('type' => 'error', 'text' => 'Invalid Form Key...'), array('type' => 'error', 'text' => 'Invalid Form Key...'), array('type' => 'error', 'text' => 'Invalid Form Key...'), array('type' => 'error', 'text' => 'Invalid Form Key...'), array('type' => 'error', 'text' => 'Invalid Form Key...'), array('type' => 'error', 'text' => 'Invalid Form Key...'), array('type' => 'error', 'text' => 'Invalid Form Key...'), array('type' => 'error', 'text' => 'Invalid Form Key...'), array('type' => 'error', 'text' => 'Invalid Form Key...'), array('type' => 'error', 'text' => 'Invalid Form Key...'), array('type' => 'error', 'text' => 'Invalid Form Key...'), array('type' => 'error', 'text' => 'Invalid Form Key...'), array('type' => 'error', 'text' => 'Invalid Form Key...'), array('type' => 'error', 'text' => 'Invalid Form Key...'), array('type' => 'error', 'text' => 'Invalid Form Key...'), array('type' => 'error', 'text' => 'Invalid Form Key...'), array('type' => 'error', 'text' => 'Invalid Form Key...'), array('type' => 'error', 'text' => 'Invalid Form Key...'), array('type' => 'error', 'text' => 'Invalid Form Key...'), array('type' => 'error', 'text' => 'Invalid Form Key...'), array('type' => 'error', 'text' => 'Invalid Form Key...'), array('type' => 'error', 'text' => 'Invalid Form Key...'), array('type' => 'error', 'text' => 'Invalid Form Key...'), array('type' => 'error', 'text' => 'Invalid Form Key...'), array('type' => 'error', 'text' => 'Invalid Form Key...'), array('type' => 'error', 'text' => 'Invalid Form Key...'), array('type' => 'error', 'text' => 'Invalid Form Key...'), array('type' => 'error', 'text' => 'Invalid Form Key...'), array('type' => 'error', 'text' => 'Invalid Form Key...'), array('type' => 'error', 'text' => 'Invalid Form Key...'), array('type' => 'error', 'text' => 'Invalid Form Key...'), array('type' => 'error', 'text' => 'Invalid Form Key...'), array('type' => 'error', 'text' => 'Invalid Form Key...'), array('type' => 'error', 'text' => 'Invalid Form Key...'), array('type' => 'error', 'text' => 'Invalid Form Key...'), array('type' => 'error', 'text' => 'Invalid Form Key...'), array('type' => 'error', 'text' => 'Invalid Form Key...'))) called at [vendor\/magento\/module-theme\/Controller\/Result\/MessagePlugin.php:95]\n#4 Magento\\Theme\\Controller\\Result\\MessagePlugin->afterRenderResult(&Magento\\Framework\\Controller\\Result\\Redirect\\Interceptor#000000001a5957b2000000007930b032#, &Magento\\Framework\\Controller\\Result\\Redirect\\Interceptor#000000001a5957b2000000007930b032#, &Magento\\Framework\\App\\Response\\Http\\Interceptor#000000001a595485000000007930b032#) called at [vendor\/magento\/framework\/Interception\/Interceptor.php:146]\n#5 Magento\\Framework\\Controller\\Result\\Redirect\\Interceptor->Magento\\Framework\\Interception\\{closure}(&Magento\\Framework\\App\\Response\\Http\\Interceptor#000000001a595485000000007930b032#) called at [vendor\/magento\/framework\/Interception\/Interceptor.php:153]\n#6 Magento\\Framework\\Controller\\Result\\Redirect\\Interceptor->___callPlugins('renderResult', array(&Magento\\Framework\\App\\Response\\Http\\Interceptor#000000001a595485000000007930b032#), NULL) called at [generated\/code\/Magento\/Framework\/Controller\/Result\/Redirect\/Interceptor.php:26]\n#7 Magento\\Framework\\Controller\\Result\\Redirect\\Interceptor->renderResult(&Magento\\Framework\\App\\Response\\Http\\Interceptor#000000001a595485000000007930b032#) called at [vendor\/magento\/framework\/App\/Http.php:120]\n#8 Magento\\Framework\\App\\Http->launch() called at [generated\/code\/Magento\/Framework\/App\/Http\/Interceptor.php:24]\n#9 Magento\\Framework\\App\\Http\\Interceptor->launch() called at [vendor\/magento\/framework\/App\/Bootstrap.php:261]\n#10 Magento\\Framework\\App\\Bootstrap->run(&Magento\\Framework\\App\\Http\\Interceptor#000000001a59549b000000007930b032#) called at [index.php:39]\n","url":"\/downloader\/gutuie.ro\/downloader\/","script_name":"\/index.php","report_id":"764afd02bda351efe574b979fe4dce10c624e9cb56b4556df01d7838441ded9c"}
If I login in incognito page is working. If I login into other browser that Google Chrome is working. If I clean browser data in Google Chrome then is working also.
The problem is that a lot of customers cannot login and they are not going to another browser.
Can someone please help with this?
UPDATE
This error is fixed an it was because of Amasty GDPR cookie plugin. Now is showing on the screen "Invalid form key..." and when I look in cookies I see 2 records of "form_key".
How can I update or create a module that is deleting both of them and adding only one?
Hey @capoan
Find cookies related configuration in Store > Configuration
Do the required changes.
And remove cookies and session from the browser
Hope it helps.
Hello @Sanjay Jethva ,
Removing cookie from users browser is not really an option on this moment. I know that if they will remove cookies it will work. I wanted to find a solution so I do not have to tell all the clients from the website that they have to do this and find a solution in Magento itself to fix those wrong cookies.