After data migration process I fetched one problem. Problem is when customer Sign Out from the account then this error occurred,

No such entity with id = 0

When I refresh the page again then customer Sign Out but I see that customer is logged in.

Does anyone have a solution for this?

1 Answer 1


Please check customer_group table in Magento2 database.

Check NOT LOGGED IN value in customer_group_code field. If it's not available in that field, that means when the customer Sign Out then Magento2 can't get the customer group for NOT LOGGED IN group.

Add NOT LOGGED IN group in the database, Execute this in SQL,

INSERT INTO `customer_group` (`customer_group_id`, `customer_group_code`, `tax_class_id`) VALUES ('0', 'NOT LOGGED IN', '3');

And if 'NOT LOGGED IN' value available in that field then set itscustomer_group_id '0'.

UPDATE `customer_group` SET customer_group_id = 0 WHERE customer_group_code='NOT LOGGED IN';

This work for me properly.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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