Error “Your session has expired” when click on add to cart in magento 2

when clicking on product’s add to cart then it’s giving me error–> Your session has expired.

Solution

UPDATE `core_config_data` SET `value` = 'http://127.0.0.1/zain/accessories/' WHERE `core_config_data`.`path` = 'web/unsecure/base_url';

UPDATE `core_config_data` SET `value` = 'http://127.0.0.1/zain/accessories/' WHERE `core_config_data`.`path` = 'web/secure/base_url';

http://127.0.0.1/zain/accessories/ in this write your frontend url (home page url) what you have

after that run command in your terminal

php bin/magento cache:clean

Leave a comment

Your email address will not be published. Required fields are marked *