Your session has expired" error when adding products to cart from category page in Magento 2
I am facing an issue in my Magento 2.4.2 installation. Every time I try to add products to the cart from the category page, I receive the error message "Your session has expired". However, I am able to add products to the cart without any issues from other parts of the store.
I have tried to resolve the issue by following these steps:
I updated the base URLs in the core_config_data table using the Magento CLI commands:
Re: Your session has expired" error when adding products to cart from category page in Magento
If you are using a localhost, use 127.0.0.1 instead of localhost in the url. And run the command
php bin/magento cache:flush
These issues were widely faced by many people in Magento 2.3 but with the update of 2.4, according to the developers these issues were resolved. You can still try this. If this doesn't work, clean your cache and open in incognito.