-
Notifications
You must be signed in to change notification settings - Fork 9.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
No such entity with addressId, occurs randomly on visitors browser. System Log Generated #15115
Comments
Did you find a solution? I am facing the same issue, but cannot find a way to reproduce it. |
@hunterallen No I haven't found a solution. Appears to happen randomly. If a customer calls us about the issue, having them clear their cookies solves the issue. I have no idea why it happens or how to prevent it. But the problem is being caused in the cookies. |
What happened to me was that a customer was checking out with a new shipping address and a new (but different from shipping) billing address. Once I manually added the address to that customers account the error went away. |
I am also having the same error. Only happens for customers who are logged in. |
I have this when I try to create an order in the admin for customers that have an account. I'm using Magento 2.2.5. The error is:
Note that the customer has an account and an address, and use for shipping address the "use same as billing address" is checked. |
I found the problem. how to reproduce :
I don't how to fix it. hope someone can help to fix it Thank you |
Hi @InternetMedicineMan thank you for you report, the fix for this issue has already on 2.2-develop and 2.3-develop branch |
@engcom-backlog-nazar can you confirm which PR it was that fixed this issue please? |
@adamj88 No i can't find any commit, but tested it on 2.2-develop branch, the issue not exist |
Hi, is this bug fixed? |
I am also facing this problem, does anyone have a fix? |
issues occurs where the default billing address id and default shipping address id in the customer table do not actually match up to an address record as address record creation failed. this throws the "No such entity with address Id = ####" error on login / logout to correct this a modification is need to public function execute in Magento\Persistent\Observer\EmulateCustomerObserver so that the $this->addressRepository->getById calls are executed in a try catch and if a no such entity exception is trapped in the catch update the related customer record to a null value for the related address id column. P.S. I had the issue occur in Magento Version 2.2.6 resolution outline (not tested code):- |
This issue is present in 2.2.6 @engcom-backlog-andrii @engcom-backlog-nazar @engcom-backlog-nickolas @engcom-backlog-pb As mentioned above a failed checkout with new address is causing this issue
|
Hi, There is a fix for it, Actually quote_address table have some non exist customer_address_id column records, we need to set NULL to those records. Below is query for the same.
Thanks |
The fact that it becomes necessary to run a DB query shows that there is something wrong with the code. |
Can confirm this issue is not resolved in Magento 2.3.0. The database query provided updates zero entries for my installation.
|
Got the same issue, when I was trying to update customer from magento backend. Magento ver. 2.2.5 main.WARNING: No such entity with addressId = I hope someone can help to fix it. |
@pskigen ... are you running a fresh install of 2.3 or an upgrade from a previous version? |
Same problem here.. it is an upgrade from 2.2.6 to 2.2.7 |
Same issue here v2.2.5, I have not done any upgrades recently. |
Hi @InternetMedicineMan, @zakdma. Thank you for your report and collaboration! The related internal Jira ticket The fix will be available with the upcoming |
Hey, can I get the changes you have done for this because I'm facing the same issue on my site. magento version 2.3.5-p2 EE |
Hi @rtshshukla! 👋 |
@rtshshukla, you can often use github's search functionality to find commits related to that ticket number they mentioned before, like this: https://github.com/magento/magento2/search?q=MC-39765&type=commits Hope this helps 🙂 |
We're experiencing this after upgrading from 2.3.0 CE to 2.3.6 CE. I don't see any Persistent settings in our admin section, confused why there would be a persistent issue when it seems Persistent is no longer on CE? Or am I wrong? Why is this closed? We updated the file EmulateCustomerObserver.php with the latest file and that still has not corrected the issue. Do we first need to run the Db query to clear the tables? This is happening on a live site to customers all day. Anyone? |
It seems to happen to logged in users when they have neither default billing address nor do they have default shipping address. |
@mrtuvn: Commits tagged with MC-39765: https://github.com/magento/magento2/search?q=MC-39765&type=commits (I already mentioned this 4 posts ago 😉 ) @nickpiro, the Persistent module is definitely still a default Magento module in 2.3.6 (make sure you didn't disable this module in your |
oh i don't recognise that! Thank you for mention |
Is there a patch for previous versions of magento? I see there are 7 commits with multiple modified files. What is the complete solution for this regarding previous versions of magento? |
@broadmargin: there seem to be 2 merge commits: The second one only contains some minor changes to a unit test. If you don't care about unit tests, you will probably have enough with the first commit and can make a patch out of that one commit. Or alternatively, you could try to setup a clone of the magento2 git repo, checking out the tag of the Magento version you are working on, and then cherry-picking with the And then creating a patch out of the uncommited changes, which should result in the same patch as those merge commits. |
We've been having an issue on our 2.2.3 installation in Production. On occasion a visitor will report they have this System Log Generated error show up instead of the web page. I've managed to get it myself just a couple times. Every single time when you go to the filesystem and check the report it reports the following:
{"0":"No such entity with addressId = 45879","1":"#0 /chroot/home/wonderci/retailer.wondercide.com/html/vendor/magento/module-customer/Model/AddressRegistry.php(49): Magento\Framework\Exception\NoSuchEntityException::singleField('addressId', '45879')
#1 /chroot/home/wonderci/retailer.wondercide.com/html/vendor/magento/module-customer/Model/ResourceModel/AddressRepository.php(166): Magento\Customer\Model\AddressRegistry->retrieve('45879')
#2 /chroot/home/wonderci/retailer.wondercide.com/html/vendor/magento/module-persistent/Observer/EmulateCustomerObserver.php(105): Magento\Customer\Model\ResourceModel\AddressRepository->getById('45879')
</end Fragment>
The addressID is different every time. And the only way to fix it for that person, is to just clear the cookies. Once you clear your cookies for the domain everything works perfectly fine again. It almost seems like something on the cookies is getting corrupt. It's pretty rare that it happens but we have a busy store, so rare is still 2-5 times a day.
Preconditions
Steps to reproduce
I have not managed to figure out reliable steps to reproduce. Appears to be random
Expected result
Actual result
{"0":"No such entity with addressId = 45879","1":"#0 /chroot/home/wonderci/retailer.wondercide.com/html/vendor/magento/module-customer/Model/AddressRegistry.php(49): Magento\Framework\Exception\NoSuchEntityException::singleField('addressId', '45879')\n#1 /chroot/home/wonderci/retailer.wondercide.com/html/vendor/magento/module-customer/Model/ResourceModel/AddressRepository.php(166): Magento\Customer\Model\AddressRegistry->retrieve('45879')\n#2 /chroot/home/wonderci/retailer.wondercide.com/html/vendor/magento/module-persistent/Observer/EmulateCustomerObserver.php(105): Magento\Customer\Model\ResourceModel\AddressRepository->getById('45879')\n#3 /chroot/home/wonderci/retailer.wondercide.com/html/vendor/magento/framework/Event/Invoker/InvokerDefault.php(72): Magento\Persistent\Observer\EmulateCustomerObserver->execute(Object(Magento\Framework\Event\Observer))\n#4 /chroot/home/wonderci/retailer.wondercide.com/html/vendor/magento/framework/Event/Invoker/InvokerDefault.php(60): Magento\Framework\Event\Invoker\InvokerDefault->_callObserverMethod(Object(Magento\Persistent\Observer\EmulateCustomerObserver), Object(Magento\Framework\Event\Observer))\n#5 /chroot/home/wonderci/retailer.wondercide.com/html/vendor/magento/framework/Event/Manager.php(66): Magento\Framework\Event\Invoker\InvokerDefault->dispatch(Array, Object(Magento\Framework\Event\Observer))\n#6 /chroot/home/wonderci/retailer.wondercide.com/html/generated/code/Magento/Framework/Event/Manager/Proxy.php(95): Magento\Framework\Event\Manager->dispatch('controller_acti...', Array)\n#7 /chroot/home/wonderci/retailer.wondercide.com/html/vendor/magento/framework/App/Action/Action.php(96): Magento\Framework\Event\Manager\Proxy->dispatch('controller_acti...', Array)\n#8 /chroot/home/wonderci/retailer.wondercide.com/html/vendor/magento/framework/Interception/Interceptor.php(58): Magento\Framework\App\Action\Action->dispatch(Object(Magento\Framework\App\Request\Http))\n#9 /chroot/home/wonderci/retailer.wondercide.com/html/vendor/magento/framework/Interception/Interceptor.php(138): Magento\Cms\Controller\Index\Index\Interceptor->___callParent('dispatch', Array)\n#10 /chroot/home/wonderci/retailer.wondercide.com/html/vendor/magento/framework/Interception/Interceptor.php(153): Magento\Cms\Controller\Index\Index\Interceptor->Magento\Framework\Interception\{closure}(Object(Magento\Framework\App\Request\Http))\n#11 /chroot/home/wonderci/retailer.wondercide.com/html/generated/code/Magento/Cms/Controller/Index/Index/Interceptor.php(39): Magento\Cms\Controller\Index\Index\Interceptor->___callPlugins('dispatch', Array, Array)\n#12 /chroot/home/wonderci/retailer.wondercide.com/html/vendor/magento/framework/App/FrontController.php(55): Magento\Cms\Controller\Index\Index\Interceptor->dispatch(Object(Magento\Framework\App\Request\Http))\n#13 /chroot/home/wonderci/retailer.wondercide.com/html/vendor/magento/framework/Interception/Interceptor.php(58): Magento\Framework\App\FrontController->dispatch(Object(Magento\Framework\App\Request\Http))\n#14 /chroot/home/wonderci/retailer.wondercide.com/html/vendor/magento/framework/Interception/Interceptor.php(138): Magento\Framework\App\FrontController\Interceptor->___callParent('dispatch', Array)\n#15 /chroot/home/wonderci/retailer.wondercide.com/html/vendor/magento/module-store/App/FrontController/Plugin/RequestPreprocessor.php(94): Magento\Framework\App\FrontController\Interceptor->Magento\Framework\Interception\{closure}(Object(Magento\Framework\App\Request\Http))\n#16 /chroot/home/wonderci/retailer.wondercide.com/html/vendor/magento/framework/Interception/Interceptor.php(135): Magento\Store\App\FrontController\Plugin\RequestPreprocessor->aroundDispatch(Object(Magento\Framework\App\FrontController\Interceptor), Object(Closure), Object(Magento\Framework\App\Request\Http))\n#17 /chroot/home/wonderci/retailer.wondercide.com/html/vendor/magento/module-page-cache/Model/App/FrontController/BuiltinPlugin.php(69): Magento\Framework\App\FrontController\Interceptor->Magento\Framework\Interception\{closure}(Object(Magento\Framework\App\Request\Http))\n#18 /chroot/home/wonderci/retailer.wondercide.com/html/vendor/magento/framework/Interception/Interceptor.php(135): Magento\PageCache\Model\App\FrontController\BuiltinPlugin->aroundDispatch(Object(Magento\Framework\App\FrontController\Interceptor), Object(Closure), Object(Magento\Framework\App\Request\Http))\n#19 /chroot/home/wonderci/retailer.wondercide.com/html/vendor/magento/framework/Interception/Interceptor.php(153): Magento\Framework\App\FrontController\Interceptor->Magento\Framework\Interception\{closure}(Object(Magento\Framework\App\Request\Http))\n#20 /chroot/home/wonderci/retailer.wondercide.com/html/generated/code/Magento/Framework/App/FrontController/Interceptor.php(26): Magento\Framework\App\FrontController\Interceptor->___callPlugins('dispatch', Array, NULL)\n#21 /chroot/home/wonderci/retailer.wondercide.com/html/vendor/magento/framework/App/Http.php(135): Magento\Framework\App\FrontController\Interceptor->dispatch(Object(Magento\Framework\App\Request\Http))\n#22 /chroot/home/wonderci/retailer.wondercide.com/html/generated/code/Magento/Framework/App/Http/Interceptor.php(24): Magento\Framework\App\Http->launch()\n#23 /chroot/home/wonderci/retailer.wondercide.com/html/vendor/magento/framework/App/Bootstrap.php(256): Magento\Framework\App\Http\Interceptor->launch()\n#24 /chroot/home/wonderci/wondercide.com/html/index.php(43): Magento\Framework\App\Bootstrap->run(Object(Magento\Framework\App\Http\Interceptor))\n#25 {main}","url":"/","script_name":"/index.php"}
Additional Information
The issue is not trivial and reproducible only in specific condition(s) or situation.
Here is the summary based investigation and comments
The text was updated successfully, but these errors were encountered: