I think the answer is actually here github issue - 23411, meaning it is a false positive.
I have created a patch that downgrades the message from 'error' to 'info'. So that visibility is maintained, but severity is downgraded.
file: patches/no_entity_with_customer_id.patch
--- Model/Session.php 2019-11-13 09:59:47.214035581 +0000
+++ Model/Session.php 2019-11-13 10:25:54.187217836 +0000
@@ -274,7 +274,13 @@
$quote = $this->quoteRepository->getActiveForCustomer($customerId);
$this->setQuoteId($quote->getId());
} catch (\Magento\Framework\Exception\NoSuchEntityException $e) {
- $this->logger->critical($e);
+ $this->logger->info(
+ 'Failed to find active quote for customer',
+ [
+ 'customerId' => $customerId,
+ 'error' => $e->getMessage(),
+ ]
+ );
}
} else {
$quote->setIsCheckoutCart(true);
Then add the following to your patches configuration
"patches": {
"magento/module-checkout": {
"no such entity with customerId, false positive (https://github.com/magento/magento2/issues/23411#issuecomment-508426676)": "patches/no_entity_with_customer_id.patch"
}
}
this would require cweagans/composer-patches to be installed.