Skip to content
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 = #19621

Closed
Alex1844 opened this issue Dec 7, 2018 · 5 comments
Closed

No such entity with addressId = #19621

Alex1844 opened this issue Dec 7, 2018 · 5 comments
Labels
Issue: Format is not valid Gate 1 Failed. Automatic verification of issue format is failed

Comments

@Alex1844
Copy link

Alex1844 commented Dec 7, 2018

I have upgraded perfectly working Magento 2.2.6 to 2.3.0 last week and since then about once per day I find my store front-end down, displaying Ooops, our bad message. It keeps showing that message on page refresh. The admin pages work fine though. I fix it by Flushing Page cache and then it works fine until next occasion.

This is the only thing I found in system log reporting any kind of failure, but since I do not know at what time the store went down I cannot be sure it is related.

[2018-12-06 09:56:59] main.WARNING: No such entity with addressId =
#0 /var/www/html/store/vendor/magento/module-customer/Model/AddressRegistry.php(49): Magento\Framework\Exception\NoSuchEntityException::singleField('addressId', NULL)
#1 /var/www/html/store/vendor/magento/module-customer/Model/ResourceModel/AddressRepository.php(172): Magento\Customer\Model\AddressRegistry->retrieve(NULL)
#2 /var/www/html/store/vendor/vertex/module-tax/Model/AddressDeterminer.php(88): Magento\Customer\Model\ResourceModel\AddressRepository->getById(NULL)
#3 /var/www/html/store/vendor/vertex/module-tax/Model/AddressDeterminer.php(73): Vertex\Tax\Model\AddressDeterminer->getDefaultBilling(367)

I cannot reproduce it at will. I have no additional modules enabled other than Magepal SMTP.
What would the error above suggest though?

Thanks

@magento-engcom-team magento-engcom-team added the Issue: Format is not valid Gate 1 Failed. Automatic verification of issue format is failed label Dec 7, 2018
@magento-engcom-team
Copy link
Contributor

Hi @Alex1844. Thank you for your report.
To help us process this issue please make sure that you provided the following information:

  • Summary of the issue
  • Information on your environment
  • Steps to reproduce
  • Expected and actual results

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-engcom-team give me $VERSION instance

where $VERSION is version tags (starting from 2.2.0+) or develop branches (for example: 2.3-develop).
For more details, please, review the Magento Contributor Assistant documentation.

@Alex1844 do you confirm that you was able to reproduce the issue on vanilla Magento instance following steps to reproduce?

  • yes
  • no

@ghost ghost self-assigned this Dec 10, 2018
@magento-engcom-team
Copy link
Contributor

Hi @engcom-backlog-nazar. Thank you for working on this issue.
In order to make sure that issue has enough information and ready for development, please read and check the following instruction: 👇

  • 1. Verify that issue has all the required information. (Preconditions, Steps to reproduce, Expected result, Actual result).

    DetailsIf the issue has a valid description, the label Issue: Format is valid will be added to the issue automatically. Please, edit issue description if needed, until label Issue: Format is valid appears.

  • 2. Verify that issue has a meaningful description and provides enough information to reproduce the issue. If the report is valid, add Issue: Clear Description label to the issue by yourself.

  • 3. Add Component: XXXXX label(s) to the ticket, indicating the components it may be related to.

  • 4. Verify that the issue is reproducible on 2.3-develop branch

    Details- Add the comment @magento-engcom-team give me 2.3-develop instance to deploy test instance on Magento infrastructure.
    - If the issue is reproducible on 2.3-develop branch, please, add the label Reproduced on 2.3.x.
    - If the issue is not reproducible, add your comment that issue is not reproducible and close the issue and stop verification process here!

  • 5. Verify that the issue is reproducible on 2.2-develop branch.

    Details- Add the comment @magento-engcom-team give me 2.2-develop instance to deploy test instance on Magento infrastructure.
    - If the issue is reproducible on 2.2-develop branch, please add the label Reproduced on 2.2.x

  • 6. Add label Issue: Confirmed once verification is complete.

  • 7. Make sure that automatic system confirms that report has been added to the backlog.

@ghost
Copy link

ghost commented Dec 10, 2018

Hi @Alex1844 thank you for you report please look at this issue -> #15115

@ghost ghost closed this as completed Dec 10, 2018
@TimQSO
Copy link

TimQSO commented Jan 22, 2019

In our case these errors are logged by new customers that signed up for an account, but not filled out an address yet.

The number between the brackets behind : getDefaultBilling of getDefaultShipping is the entity_id of the customer concerned. Which can be found in table 'customer_identity'

That way you can determine what customer is causing the errors, you can check the addresses and you could contact the customer to ask if he had any issues on your front end.

After filling out billing and shipping addresses for the customers account, the error will disappear.

@IgorSIT
Copy link

IgorSIT commented Oct 14, 2019

Hi,

I working on Magento 2.2.9 and I have this issue too:

main.WARNING: No such entity with addressId =
#0 .../vendor/magento/module-customer/Model/AddressRegistry.php(49): Magento\Framework\Exception\NoSuchEntityException::singleField('addressId', NULL)
#1 .../vendor/magento/module-customer/Model/ResourceModel/AddressRepository.php(172): Magento\Customer\Model\AddressRegistry->retrieve(NULL)
#2 .../vendor/vertex/module-tax/Model/AddressDeterminer.php(88): Magento\Customer\Model\ResourceModel\AddressRepository->getById(NULL)
#3 .../vertex/module-tax/Model/AddressDeterminer.php(73): Vertex\Tax\Model\AddressDeterminer->getDefaultBilling(#####)
.....

I think that these warning messages are wrote to log file during different actions of customer (create account, update cart, etc) when customer does not have address (addressId is NULL).

To fix it, I changed of the functions getDefaultBilling and getDefaultShipping in class vendor/vertex/module-tax/Model/AddressDeterminer.php :

getDefaultBilling function
from this:

           .....
            $addressId = $customer->getDefaultBilling();

            return $this->addressRepository->getById($addressId);
        } catch (\Exception $e) {
             .....

to this:

            .....
            $addressId = $customer->getDefaultBilling();

            return ($addressId) ? $this->addressRepository->getById($addressId) : null;
        } catch (\Exception $e) {
             .....

getDefaultShipping function
from this:

            .....
            $addressId = $customer->getDefaultShipping();

            return $this->addressRepository->getById($addressId);
        } catch (\Exception $e) {
             .....

to this:

            .....
            $addressId = $customer->getDefaultShipping();

            return ($addressId) ? $this->addressRepository->getById($addressId) : null;
        } catch (\Exception $e) {
            .....

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Issue: Format is not valid Gate 1 Failed. Automatic verification of issue format is failed
Projects
None yet
Development

No branches or pull requests

4 participants