1

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?

0

It was a module throwing a large error message on login.

An error message is larger than the MAX_COOKIE_SIZE.

It's path is vendor/magento/framework/Stdlib/Cookie/PhpCookieManager.php

Try to edit a larger value for it and redeploy your site.

Reference: Unable to send the cookie

2
  • Can you please be more specific? From what I know, if is trowing the error 'Invalid Form Key", then it has to be display on the screen. I really do not understand what I have to change. – andy1786 Mar 25 '20 at 14:07
  • I've made an update to the post, maybe you can look at it – andy1786 Mar 27 '20 at 17:31

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.