Skip to content

No such entity with addressId, occurs randomly on visitors browser. System Log Generated #15115

Closed
@InternetMedicineMan

Description

@InternetMedicineMan

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

  1. Magento 2.2.3
  2. PHP v 7.0.23
  3. Percona
  4. Managed Magento server at Nexcess

Steps to reproduce

I have not managed to figure out reliable steps to reproduce. Appears to be random

Expected result

  1. It shouldn't produce an error?

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

Metadata

Metadata

Assignees

Labels

Fixed in 2.4.xThe issue has been fixed in 2.4-develop branchIssue: ConfirmedGate 3 Passed. Manual verification of the issue completed. Issue is confirmedIssue: ready for confirmationPriority: P1Once P0 defects have been fixed, a defect having this priority is the next candidate for fixing.Progress: doneReported on 2.2.xIndicates original Magento version for the Issue report.Reproduced on 2.4.xThe issue has been reproduced on latest 2.4-develop branchSeverity: S1Affects critical data or functionality and forces users to employ a workaround.

Type

No type

Projects

Status

Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions