Closed chequille closed 4 years ago
Hi @chequille. Thank you for your report. To help us process this issue please make sure that you provided the following information:
Please make sure that the issue is reproducible on the vanilla Magento instance following Steps to reproduce. To deploy vanilla Magento instance on our environment, please, add a comment to the issue:
@magento give me 2.3-develop instance
- upcoming 2.3.x release
For more details, please, review the Magento Contributor Assistant documentation.
@chequille do you confirm that you were able to reproduce the issue on vanilla Magento instance following steps to reproduce?
I am working on this at #dmcdindia19”
Hello @chequille ! Thank you for report ! Any 3rd party modules/extensions installed ?
Yes, of course some third party modules. And as well own stuff. Ok, my own stuff does not access customer classes. So I guess these are not the reason for this exception.
Regarding German Law regulations and privacy I am using "mageplaza module-gdpr". This is some customer related stuff.
How can I find out which extension is causing the exception?
Is there a way to find out?
Hello @chequille ! Please provide more information about this issue , some steps to reproduce it . Also did you try to reproduce this issue on Vanilla Magento instance ?
Hello, sorry, but I do not relly know what to do with vanilla instance, because I do not know how to install a third party or my own modules. I thougth this is a test environment for Magento stuff only.
Therefor, I cannot provide more information on this issue.
But what about my question: is there a way to find which module is causing the exception?
More information: I found the point after the exception occurs. It is after placing the order. Strange is, that the order is placed, but the error in exception.log
I activated my backup of all files and installed my database backup. So, I am again on 2.3.1. THe exception does not occur as it is in 2.3.2
No extension was change, everything the same except Magento version.
Maybe this help you to have an idea where this happesn now.
Regards, Chequille
@chequille Have you reached out to mageplaza to see if they have an updated version of that module for 2.3.2? It could be that something has changed between 2.3.1 and 2.3.2 that breaks the extension.
Hi Ctucker, the problem is, that it seems everything is working. Order is placed etc. Everything is fine in the frontend. As well in the backend. EMails sent etc.
But in the exception.log there is the error. Mageplaza-gdpr module was just a guess. The module does not influence the checkout process, so I really do not believe, that this is the reason for.
So, if there is no other way to find out which part of the system is causing the error, I do have to disbale one module by the other till I find the point where the exception is not there anymore.
Nice work !?!?!?!?!?!?!?!
Ok, but if nobody does have another idea, I will finally do it like this.
Best regards, Chequille
@chequille That's exactly what Magento documentation recommends is to disable extensions one by one. A pain in the neck to be sure. you could also try running CLI Commands: php bin/magento indexer:reset php bin/magento indexer:reindex php bin/magento cache:clean
Was there any kind of stack trace that followed after the error in the log?
Hi Guys, deactivated all third party extensions/modules and it still happens. To answer the question: no stack trace following the error in the log file. It is only the line with saying "No entry for CustomerID = 1" Of course, if I am logged in with another customer, it says "No entry for CustomerID = 44" f.e.
What I did not try is using a standard Magento Theme like Luma. WIll do that later.
Any other ideas?
Hi Everybody, just made a fresh new installation on my local computer. Installed the sample data and created a new customer and placed an order. The exception is as well in the exception.log [2019-06-29 11:59:31] main.CRITICAL: No such entity with customerId = 2 {"exception":"[object] (Magento\Framework\Exception\NoSuchEntityException(code: 0): No such entity with customerId = 2 at D:\Internetseiten\Web Magento2.3\vendor\magento\framework\Exception\NoSuchEntityException.php:50)"} []
So, this is a bug in Magento and not in one of my used extensions/modules. THis exception was not in version 2.3.1 It is now happening with version 2.3.2
So, please have a look at this. Regards Chequille
@chequille: thanks for the effort to keep testing this problem! I was able to very easily reproduce the problem based on your comments:
var/log/exception.log
file, it contains 4 errors:
[2019-06-29 14:34:05] main.CRITICAL: No such entity with customerId = 1 {"exception":"[object] (Magento\\Framework\\Exception\\NoSuchEntityException(code: 0): No such entity with customerId = 1 at vendor/magento/framework/Exception/NoSuchEntityException.php:50)"} []
[2019-06-29 14:34:06] main.CRITICAL: No such entity with customerId = 1 {"exception":"[object] (Magento\\Framework\\Exception\\NoSuchEntityException(code: 0): No such entity with customerId = 1 at vendor/magento/framework/Exception/NoSuchEntityException.php:50)"} []
[2019-06-29 14:34:08] main.CRITICAL: No such entity with customerId = 1 {"exception":"[object] (Magento\\Framework\\Exception\\NoSuchEntityException(code: 0): No such entity with customerId = 1 at vendor/magento/framework/Exception/NoSuchEntityException.php:50)"} []
[2019-06-29 14:34:08] main.CRITICAL: No such entity with customerId = 1 {"exception":"[object] (Magento\\Framework\\Exception\\NoSuchEntityException(code: 0): No such entity with customerId = 1 at vendor/magento/framework/Exception/NoSuchEntityException.php:50)"} []
var/log/exception.log
file each time you visit a page:
[2019-06-29 14:36:58] main.CRITICAL: No such entity with customerId = 1 {"exception":"[object] (Magento\\Framework\\Exception\\NoSuchEntityException(code: 0): No such entity with customerId = 1 at vendor/magento/framework/Exception/NoSuchEntityException.php:50)"} []
This last one seems to come from the ajax request to /customer/section/load/?sections=cart&force_new_section_timestamp=false&_=1561818997600
Putting a break point in that NoSuchEntityException.php
file on line 50 and then calling that ajax endpoint, gives me the following stack trace:
Magento\Framework\Exception\NoSuchEntityException::singleField (vendor/magento/framework/Exception/NoSuchEntityException.php:50)
Magento\Quote\Model\QuoteRepository\Interceptor->loadQuote (vendor/magento/module-quote/Model/QuoteRepository.php:232)
Magento\Quote\Model\QuoteRepository\Interceptor->getForCustomer (vendor/magento/module-quote/Model/QuoteRepository.php:149)
Magento\Quote\Model\QuoteRepository\Interceptor->___callParent (vendor/magento/framework/Interception/Interceptor.php:58)
Magento\Quote\Model\QuoteRepository\Interceptor->Magento\Framework\Interception\{closure:vendor/magento/framework/Interception/Interceptor.php:104-151} (vendor/magento/framework/Interception/Interceptor.php:138)
Magento\Quote\Model\QuoteRepository\Interceptor->___callPlugins (vendor/magento/framework/Interception/Interceptor.php:153)
Magento\Quote\Model\QuoteRepository\Interceptor->getForCustomer (generated/code/Magento/Quote/Model/QuoteRepository/Interceptor.php:39)
Magento\Quote\Model\QuoteRepository\Interceptor->getActiveForCustomer (vendor/magento/module-quote/Model/QuoteRepository.php:174)
Magento\Quote\Model\QuoteRepository\Interceptor->___callParent (vendor/magento/framework/Interception/Interceptor.php:58)
Magento\Quote\Model\QuoteRepository\Interceptor->Magento\Framework\Interception\{closure:vendor/magento/framework/Interception/Interceptor.php:104-151} (vendor/magento/framework/Interception/Interceptor.php:138)
Magento\Quote\Model\QuoteRepository\Interceptor->___callPlugins (vendor/magento/framework/Interception/Interceptor.php:153)
Magento\Quote\Model\QuoteRepository\Interceptor->getActiveForCustomer (generated/code/Magento/Quote/Model/QuoteRepository/Interceptor.php:65)
Magento\Checkout\Model\Session\Interceptor->getQuote (vendor/magento/module-checkout/Model/Session.php:274)
Magento\Checkout\Model\Session\Interceptor->getQuote (generated/code/Magento/Checkout/Model/Session/Interceptor.php:63)
Magento\Checkout\CustomerData\Cart\Interceptor->getQuote (vendor/magento/module-checkout/CustomerData/Cart.php:116)
Magento\Checkout\CustomerData\Cart\Interceptor->getSectionData (vendor/magento/module-checkout/CustomerData/Cart.php:91)
Magento\Checkout\CustomerData\Cart\Interceptor->___callParent (vendor/magento/framework/Interception/Interceptor.php:58)
Magento\Checkout\CustomerData\Cart\Interceptor->Magento\Framework\Interception\{closure:vendor/magento/framework/Interception/Interceptor.php:104-151} (vendor/magento/framework/Interception/Interceptor.php:138)
Magento\Checkout\CustomerData\Cart\Interceptor->___callPlugins (vendor/magento/framework/Interception/Interceptor.php:153)
Magento\Checkout\CustomerData\Cart\Interceptor->getSectionData (generated/code/Magento/Checkout/CustomerData/Cart/Interceptor.php:26)
Magento\Customer\CustomerData\SectionPool->getSectionDataByNames (vendor/magento/module-customer/CustomerData/SectionPool.php:79)
Magento\Customer\CustomerData\SectionPool->getSectionsData (vendor/magento/module-customer/CustomerData/SectionPool.php:60)
Magento\Customer\Controller\Section\Load\Interceptor->execute (vendor/magento/module-customer/Controller/Section/Load.php:78)
Magento\Customer\Controller\Section\Load\Interceptor->execute (generated/code/Magento/Customer/Controller/Section/Load/Interceptor.php:24)
Magento\Customer\Controller\Section\Load\Interceptor->dispatch (vendor/magento/framework/App/Action/Action.php:108)
Magento\Customer\Controller\Section\Load\Interceptor->___callParent (vendor/magento/framework/Interception/Interceptor.php:58)
Magento\Customer\Controller\Section\Load\Interceptor->Magento\Framework\Interception\{closure:vendor/magento/framework/Interception/Interceptor.php:104-151} (vendor/magento/framework/Interception/Interceptor.php:138)
Magento\Customer\Controller\Section\Load\Interceptor->___callPlugins (vendor/magento/framework/Interception/Interceptor.php:153)
Magento\Customer\Controller\Section\Load\Interceptor->dispatch (generated/code/Magento/Customer/Controller/Section/Load/Interceptor.php:39)
Magento\Framework\App\FrontController\Interceptor->processRequest (vendor/magento/framework/App/FrontController.php:159)
Magento\Framework\App\FrontController\Interceptor->dispatch (vendor/magento/framework/App/FrontController.php:99)
Magento\Framework\App\FrontController\Interceptor->___callParent (vendor/magento/framework/Interception/Interceptor.php:58)
Magento\Framework\App\FrontController\Interceptor->Magento\Framework\Interception\{closure:vendor/magento/framework/Interception/Interceptor.php:104-151} (vendor/magento/framework/Interception/Interceptor.php:138)
Magento\Store\App\FrontController\Plugin\RequestPreprocessor->aroundDispatch (vendor/magento/module-store/App/FrontController/Plugin/RequestPreprocessor.php:94)
Magento\Framework\App\FrontController\Interceptor->Magento\Framework\Interception\{closure:vendor/magento/framework/Interception/Interceptor.php:104-151} (vendor/magento/framework/Interception/Interceptor.php:135)
Magento\PageCache\Model\App\FrontController\BuiltinPlugin->aroundDispatch (vendor/magento/module-page-cache/Model/App/FrontController/BuiltinPlugin.php:73)
Magento\Framework\App\FrontController\Interceptor->Magento\Framework\Interception\{closure:vendor/magento/framework/Interception/Interceptor.php:104-151} (vendor/magento/framework/Interception/Interceptor.php:135)
Magento\Framework\App\FrontController\Interceptor->___callPlugins (vendor/magento/framework/Interception/Interceptor.php:153)
Magento\Framework\App\FrontController\Interceptor->dispatch (generated/code/Magento/Framework/App/FrontController/Interceptor.php:26)
Magento\Framework\App\Http\Interceptor->launch (vendor/magento/framework/App/Http.php:137)
Magento\Framework\App\Http\Interceptor->launch (generated/code/Magento/Framework/App/Http/Interceptor.php:24)
Magento\Framework\App\Bootstrap->run (vendor/magento/framework/App/Bootstrap.php:261)
{main} (pub/index.php:40)
I'm not sure how important this problem is and what is breaks exactly. But it doesn't sound very good...
@engcom-Charlie: can you also test this again?
@engcom-Charlie Thank you for verifying the issue.
Unfortunately, not enough information was provided to acknowledge ticket. Please consider adding the following:
Once all required information is added, please add label "Issue: Confirmed"
again.
Thanks!
:white_check_mark: Confirmed by @engcom-Charlie
Thank you for verifying the issue. Based on the provided information internal tickets MC-17913
were created
Issue Available: @engcom-Charlie, You will be automatically unassigned. Contributors/Maintainers can claim this issue to continue. To reclaim and continue work, reassign the ticket to yourself.
This is normal due to loadQuote throwing an exception when no cart/quote exists for the customerId
protected function loadQuote($loadMethod, $loadField, $identifier, array $sharedStoreIds = [])
{
/** @var CartInterface $quote */
$quote = $this->cartFactory->create();
if ($sharedStoreIds && method_exists($quote, 'setSharedStoreIds')) {
$quote->setSharedStoreIds($sharedStoreIds);
}
$quote->setStoreId($this->storeManager->getStore()->getId())->$loadMethod($identifier);
if (!$quote->getId()) {
throw NoSuchEntityException::singleField($loadField, $identifier);
}
return $quote;
}
@southerncomputer Yes, the quote exists, but it is not active anymore at the moment. But this is not normal, cause the order has not been placed yet.
Hi Guys, just a small comment from my site: Be aware, the eception was not thrown in version 2.3.1. Therefore, it must be a bug in 2.3.2 Regards, Chequille
It is because there is no quote! I just showed you the routine above! No Quote means when customer-data is called it cannot load the quote that does not exist! Whether this was changed in 2.3.2 i don't know but i've been working around this bug for the last day or so since it messes up onestepcheckout when the quote structure is not existing already!
I upgraded to 2.3.2 locally and am experiencing this bug as well. Anyone come up with a solution? Unknown exceptions cropping up right at the point of sale isn’t exactly comforting.
Everybody is facing this problem, because it is a core bug !!!!! Sorry to the Magento team, but I really cannot understand this. Updates should fix bugs and security stuff, but not introduce new bugs. I like the system anyway, but sometimes it is really strange what happens.
Nevertheless, do your best to fix this soon. I am waiting !! BR Chequille
I'm faced this issue also, Does anybody have a fix?
The commit https://github.com/magento/magento2/commit/117d7103de2989168af45de550091e79f815d54e improved quote (error) handling but also introduced a log that is wrong in my opinion. It was first delivered with 2.3.2.
Line 276 from that commit logs a critical error, when a \Magento\Framework\Exception\NoSuchEntityException
occurs. Inspecting the context of that line, this should not be done:
\Magento\Checkout\Model\Session.php:268-283
if (!$this->getQuoteId()) {
if ($this->_customerSession->isLoggedIn() || $this->_customer) {
$customerId = $this->_customer
? $this->_customer->getId()
: $this->_customerSession->getCustomerId();
try {
$quote = $this->quoteRepository->getActiveForCustomer($customerId);
$this->setQuoteId($quote->getId());
} catch (\Magento\Framework\Exception\NoSuchEntityException $e) {
$this->logger->critical($e);
}
} else {
$quote->setIsCheckoutCart(true);
$this->_eventManager->dispatch('checkout_quote_init', ['quote' => $quote]);
}
}
The whole method could use some (or some more) refactoring, but this block should get the last active quote for a customer. Especially after placing an order and before adding products to a new quote, there is never an active quote for a customer. Therefore (with the least impact to the method) the line 277 $this->logger->critical($e);
should be dropped.
I will prepare a pull request for this.
Additional information: the critical log is actually a false positive - nothing is wrong except the log entry itself.
Is this issue still on the radar of the Magento developers? Because the PR of @david-fuehr was closed due to inactivity... and it's very annoying to have the exception log flooded with this message. Makes it inconvenient to find real exceptions.
@fritzmg I use this to filter out that exception to find others, not a real fix but it helps for now.
cat var/log/exception.log | grep -v customerId
Hi @hostep & @chequille & @david-fuehr ,
I've recently upgraded from Magento 2.2.6 to Magento 2.3.2. I can see that you guys have made a patch to resolve the No such entity with customerId but it just doesn't work yet.
Still happening in Magento 2.3.3.
Issue is still for me in Magento 2.3.2 I have applied all the patch which is mentioned by @david-fuehr.
Hello @j-lloyd-slc @sumitvgupta @samumaretiya
As I can see this issue should be fixed not in the 2.3-develop
the PR with the fix was proposed by @hostep and delivered in https://github.com/magento/magento2/pull/25307
Could you please confirm that https://github.com/magento/magento2/pull/25307 fixed the issue and we can close it? or we still have some cases/scenarios that not fixed
For any that is still getting this and needs it fixing/changing, I have created a patch. Changes it from and error to an info message, which I feel is more appropriate, as I agreed with @david-fuehr it is a false positive.
The patch can be found here: https://magento.stackexchange.com/a/295470/70781 Hope you find it useful
Any update regrading this issue?
Having the same issue on 2.3.3 when placing an order. (order placed successfully. but confirmation email is not going)
Hi @chequille. Thank you for your report. The issue has been fixed in magento/magento2#25307 by @hostep in 2.3-develop branch Related commit(s):
The fix will be available with the upcoming 2.3.5 release.
Having the same issue. What am I supposed to do? Apply the email patch and fix my files manually as per the 6 commits above???
@jsdupuis you can use this as patch file: https://patch-diff.githubusercontent.com/raw/magento/magento2/pull/25307.diff
Please make sure you make the paths correct when you use a composer installation.
I have same issue @arnoudhgz After apply 25307.diff. Checkout page is working. I still have issue on checkout/success page 1 exception(s): Exception #0 (Magento\Framework\Exception\NoSuchEntityException): No such entity with customerId = 4778
Exception #0 (Magento\Framework\Exception\NoSuchEntityException): No such entity with customerId = 4778
#1 Magento\Quote\Model\QuoteRepository->loadQuote() called at [vendor/magento/module-quote/Model/QuoteRepository.php:149] #2 Magento\Quote\Model\QuoteRepository->getForCustomer() called at [vendor/magento/framework/Interception/Interceptor.php:58] #3 Magento\Quote\Model\QuoteRepository\Interceptor->___callParent() called at [vendor/magento/framework/Interception/Interceptor.php:138] #4 Magento\Quote\Model\QuoteRepository\Interceptor->Magento\Framework\Interception\{closure}() called at [vendor/magento/framework/Interception/Interceptor.php:153] #5 Magento\Quote\Model\QuoteRepository\Interceptor->___callPlugins() called at [generated/code/Magento/Quote/Model/QuoteRepository/Interceptor.php:39] #6 Magento\Quote\Model\QuoteRepository\Interceptor->getForCustomer() called at [vendor/magento/module-quote/Model/QuoteRepository.php:174] #7 Magento\Quote\Model\QuoteRepository->getActiveForCustomer() called at [vendor/magento/framework/Interception/Interceptor.php:58] #8 Magento\Quote\Model\QuoteRepository\Interceptor->___callParent() called at [vendor/magento/framework/Interception/Interceptor.php:138] #9 Magento\Quote\Model\QuoteRepository\Interceptor->Magento\Framework\Interception\{closure}() called at [vendor/magento/framework/Interception/Interceptor.php:153] #10 Magento\Quote\Model\QuoteRepository\Interceptor->___callPlugins() called at [generated/code/Magento/Quote/Model/QuoteRepository/Interceptor.php:65] #11 Magento\Quote\Model\QuoteRepository\Interceptor->getActiveForCustomer() called at [vendor/magento/module-checkout/Model/Session.php:589] #12 Magento\Checkout\Model\Session->getQuoteByCustomer() called at [vendor/magento/module-checkout/Model/Session.php:279] #13 Magento\Checkout\Model\Session->getQuote() called at [generated/code/Magento/Checkout/Model/Session/Interceptor.php:63] #14 Magento\Checkout\Model\Session\Interceptor->getQuote() called at [vendor/magento/module-checkout/Controller/Onepage.php:153] #15 Magento\Checkout\Controller\Onepage->dispatch() called at [vendor/magento/framework/Interception/Interceptor.php:58] #16 Magento\Checkout\Controller\Onepage\Success\Interceptor->___callParent() called at [vendor/magento/framework/Interception/Interceptor.php:138] #17 Magento\Checkout\Controller\Onepage\Success\Interceptor->Magento\Framework\Interception\{closure}() called at [vendor/magento/framework/Interception/Interceptor.php:153] #18 Magento\Checkout\Controller\Onepage\Success\Interceptor->___callPlugins() called at [generated/code/Magento/Checkout/Controller/Onepage/Success/Interceptor.php:39] #19 Magento\Checkout\Controller\Onepage\Success\Interceptor->dispatch() called at [vendor/magento/framework/App/FrontController.php:159] #20 Magento\Framework\App\FrontController->processRequest() called at [vendor/magento/framework/App/FrontController.php:99] #21 Magento\Framework\App\FrontController->dispatch() called at [vendor/magento/framework/Interception/Interceptor.php:58] #22 Magento\Framework\App\FrontController\Interceptor->___callParent() called at [vendor/magento/framework/Interception/Interceptor.php:138] #23 Magento\Framework\App\FrontController\Interceptor->Magento\Framework\Interception\{closure}() called at [vendor/magento/module-store/App/FrontController/Plugin/RequestPreprocessor.php:94] #24 Magento\Store\App\FrontController\Plugin\RequestPreprocessor->aroundDispatch() called at [vendor/magento/framework/Interception/Interceptor.php:135] #25 Magento\Framework\App\FrontController\Interceptor->Magento\Framework\Interception\{closure}() called at [vendor/magento/module-page-cache/Model/App/FrontController/BuiltinPlugin.php:73] #26 Magento\PageCache\Model\App\FrontController\BuiltinPlugin->aroundDispatch() called at [vendor/magento/framework/Interception/Interceptor.php:135] #27 Magento\Framework\App\FrontController\Interceptor->Magento\Framework\Interception\{closure}() called at [vendor/magento/framework/Interception/Interceptor.php:153] #28 Magento\Framework\App\FrontController\Interceptor->___callPlugins() called at [generated/code/Magento/Framework/App/FrontController/Interceptor.php:26] #29 Magento\Framework\App\FrontController\Interceptor->dispatch() called at [vendor/magento/framework/App/Http.php:137] #30 Magento\Framework\App\Http->launch() called at [generated/code/Magento/Framework/App/Http/Interceptor.php:24] #31 Magento\Framework\App\Http\Interceptor->launch() called at [vendor/magento/framework/App/Bootstrap.php:261] #32 Magento\Framework\App\Bootstrap->run() called at [pub/index.php:40]
customerId = 4778 created for me.
I updated function getQuoteByCustomer and it work better.
private function getQuoteByCustomer(): ?CartInterface
{
$customerId = $this->_customer
? $this->_customer->getId()
: $this->_customerSession->getCustomerId();
if(!$customerId) return null;
try {
$quote = $this->quoteRepository->getActiveForCustomer($customerId);
} catch (NoSuchEntityException $e) {
$quote = null;
}
return $quote;
}
@sangthieu what is the file you modified?
@interequipment I using patch https://patch-diff.githubusercontent.com/raw/magento/magento2/pull/25307.diff In file app/code/Magento/Checkout/Model/Session.php funtion getQuoteByCustomer(). I added line if(!$customerId) return null;
Still appearing on on 2.3.4 - jesus - nothing but bugs.
@jackrevate: as mentioned above, the fix should get included in Magento 2.3.5: https://github.com/magento/magento2/issues/23411#issuecomment-554132357
@sangthieu: if you are able to list steps to reproduce the issue after applying the patch, that would be awesome!
Does someone have a copy of the patched file handy they can post up? I rather save the original and try the patched file first. thanks
Hi everyone, I've got the same error: The order is complete but no confirmation email was sent
I am experiencing this issue in the backend admin, in the customer record, Shopping Cart tab. It looks like the getQuote() function returns all cart items (without a parent id), if no active quote is found for customer id [X].
See screenshot:
This getQuote() function is at fault
The quoteRepository->getForCustomer() function throws the exception as shown here:
The trouble is if no quote is found, then _prepareCollection() will return all quote_items regardless of quote id, regardless of customer_id, as shown by this query:
SELECT main_table
.* FROM quote_item
AS main_table
WHERE (parent_item_id
IS NULL)
I fixed in by adding this check:
` protected function _prepareCollection() { $quote = $this->getQuote();
if ($quote) {
$collection = $quote->getItemsCollection(false);
} else {
$collection = $this->_dataCollectionFactory->create();
}
$collection->addFieldToFilter('parent_item_id', ['null' => true]);
**if(is_null($quote->getId()))
$collection->addFieldToFilter('quote_id', -1);**
$this->setCollection($collection);
return parent::_prepareCollection();
}
` It probably isn't the best or most elegant fix, but it works, or so it seems. Does anyone have a better idea?
Thanks, Michael Mussulis
Still appearing on on 2.3.4 - jesus - nothing but bugs.
A similar error occurs in 2.3.4, i get this error and the user seems to be logged out, but the patch is there.
No such entity with customerId = 1 [] []
Anyone encountering the same issue?
It seems to be fixed in 2.3.5 I do not have the error anymore.
Magento 2.3.5 still get the error: No such entity with customerId = 175
[
{
"file":"/var/www/current/vendor/magento/module-quote/Model/QuoteRepository.php",
"line":232,
"function":"singleField",
"class":"Magento\\Framework\\Exception\\NoSuchEntityException",
"type":"::",
"args":[
"customerId",
"175"
]
},
{
"file":"/var/www/current/vendor/magento/module-quote/Model/QuoteRepository.php",
"line":149,
"function":"loadQuote",
"class":"Magento\\Quote\\Model\\QuoteRepository",
"type":"->",
"args":[
"loadByCustomer",
"customerId",
"175",
[
]
]
},
{
"file":"/var/www/current/generated/code/Magento/Quote/Model/QuoteRepository/Interceptor.php",
"line":37,
"function":"getForCustomer",
"class":"Magento\\Quote\\Model\\QuoteRepository",
"type":"->",
"args":[
"175",
[
]
]
},
{
"file":"/var/www/current/vendor/magento/module-quote/Model/QuoteRepository.php",
"line":174,
"function":"getForCustomer",
"class":"Magento\\Quote\\Model\\QuoteRepository\\Interceptor",
"type":"->",
"args":[
"175",
[
]
]
},
{
"file":"/var/www/current/generated/code/Magento/Quote/Model/QuoteRepository/Interceptor.php",
"line":63,
"function":"getActiveForCustomer",
"class":"Magento\\Quote\\Model\\QuoteRepository",
"type":"->",
"args":[
"175",
[
]
]
},
...
]
@textarea: could you open a new issue and please try to list steps to reproduce so it can be followed up properly.
Thanks! 🙂
We have Magento v2.3.2. we are facing same issue.
Most of our customer facing this issue, it's happening multiple times a day. it seems to be an issue with once they login, and then come back to the site.. not sure what's causing it.
they are seeing the "Invalid customer addres id" error in the checkout page in the front end.
Can someone give me the final patch to solve this issue?
here is the screenshot for better reference:
Hi @chequille. Thank you for your report. The issue has been fixed in #25307 by @hostep in 2.3-develop branch Related commit(s):
- bd964566b5e8de180866a14303e8dc168bf3e600
- 8920923021110fe0d76f1c17dca9adfa9c0d1b9b
- 96b969d1e0303fa711f8bf051b0e5d9b6c1759f1
- 36fb3b7e47343425892355d8b63dfd01068ab291
- 31412e05d1304ded58b4494f21eeb75573dcaee9
- 34591623e3fdf5f963d080dfaaed044f6c4aa4fc
The fix will be available with the upcoming 2.3.5 release.
Which Commit should I use to solve the issue?
Summary
Sorry to say this, but as usually, after upgrading Magento versions something is wrong at the end. I did have no exceptions and no errors before. Now upgrading to 2.3.2 I get exceptions like:
[2019-06-25 21:46:34] main.CRITICAL: Keine Eintrag mit customerId = 1 {"exception":"[object] (Magento\\Framework\\Exception\\NoSuchEntityException(code: 0): Keine Eintrag mit customerId = 1 at /var/www/vhosts/hopfenmuseum-tettnang.de/magento.hopfenexpress.de/vendor/magento/framework/Exception/NoSuchEntityException.php:50)"} []
Preconditions
Magento 2.3.2 PHP 7.2
Steps to reproduce
var/log/exception.log
file each time you visit a page:Expected result
No errors
Actual result
[2019-06-29 14:34:05] main.CRITICAL: No such entity with customerId = 1 {"exception":"[object] (Magento\Framework\Exception\NoSuchEntityException(code: 0): No such entity with customerId = 1 at vendor/magento/framework/Exception/NoSuchEntityException.php:50)"} [] [2019-06-29 14:34:06] main.CRITICAL: No such entity with customerId = 1 {"exception":"[object] (Magento\Framework\Exception\NoSuchEntityException(code: 0): No such entity with customerId = 1 at vendor/magento/framework/Exception/NoSuchEntityException.php:50)"} [] [2019-06-29 14:34:08] main.CRITICAL: No such entity with customerId = 1 {"exception":"[object] (Magento\Framework\Exception\NoSuchEntityException(code: 0): No such entity with customerId = 1 at vendor/magento/framework/Exception/NoSuchEntityException.php:50)"} [] [2019-06-29 14:34:08] main.CRITICAL: No such entity with customerId = 1 {"exception":"[object] (Magento\Framework\Exception\NoSuchEntityException(code: 0): No such entity with customerId = 1 at vendor/magento/framework/Exception/NoSuchEntityException.php:50)"} []
Additional information
From the comment
This last one seems to come from the ajax request to
/customer/section/load/?sections=cart&force_new_section_timestamp=false&_=1561818997600
Putting a break point in that
NoSuchEntityException.php
file on line 50 and then calling that ajax endpoint, gives me the following stack trace:I'm not sure how important this problem is and what is breaks exactly. But it doesn't sound very good..