I am getting an issue like Invalid customer address id at

Magento\Framework\Exception\NoSuchEntityException(code: 0): Invalid customer address id 57 at vendor/magento/module-quote/Model/QuoteAddressValidator.php:79

Please let me know the exact reason for this issue.Sometimes my credentials work fine, sometimes getting issue while checkout.


I've checked it further and fixed this issue by overriding Magento's validateForCart function.

 * Validate address to be used for cart.
 * @param CartInterface $cart
 * @param AddressInterface $address
 * @return void
public function validateForCart(CartInterface $cart, AddressInterface $address)
    $this->doValidate($address, $cart->getCustomer()->getId() ? $cart->getCustomer()->getId() : null);

The issue is with the customer Id passing in the function is null for the customers facing this issue.

| improve this answer | |

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.