Magento 2: Continuously increasing system.log file with logging warning “main.WARNING: No such entity with addressId =”

magento.stackexchange https://magento.stackexchange.com/questions/274798

  •  01-03-2021
  •  | 
  •  

سؤال

I have facing issue in the system.log file to bulk up in GBs within couple of minutes. Upon in depth check, I found that Magento was logging warning “main.WARNING: No such entity with addressId =”.

I am using Magento ver. 2.2.4

Below is the system.log file which is the continuously logging warning.

system.log

main.WARNING: No such entity with addressId =

0 /vhosts/www.mywebsite.com/webroot/vendor/magento/module-customer/Model/AddressRegistry.php(49):

Magento\Framework\Exception\NoSuchEntityException::singleField('addressId', NULL)

1 /vhosts/www.mywebsite.com/webroot/vendor/magento/module-customer/Model/ResourceModel/AddressRepository.php(166):

Magento\Customer\Model\AddressRegistry->retrieve(NULL)

2 /vhosts/www.mywebsite.com/webroot/vendor/vertex/module-tax/Model/AddressDeterminer.php(88):

Magento\Customer\Model\ResourceModel\AddressRepository->getById(NULL)

3 /vhosts/www.mywebsite.com/webroot/vendor/vertex/module-tax/Model/AddressDeterminer.php(67):

Vertex\Tax\Model\AddressDeterminer->getDefaultBilling('13366')

4 /vhosts/www.mywebsite.com/webroot/vendor/vertex/module-tax/Model/VertexUsageDeterminer.php(61):

Vertex\Tax\Model\AddressDeterminer->determineAddress(Object(Magento\Customer\Model\Data\Address), '13366', true)

5 /vhosts/www.mywebsite.com/webroot/vendor/vertex/module-tax/Model/Plugin/TaxCalculationPlugin.php(132):

Vertex\Tax\Model\VertexUsageDeterminer->shouldUseVertex('1', Object(Magento\Customer\Model\Data\Address), '13366', true)

6 /vhosts/www.mywebsite.com/webroot/vendor/vertex/module-tax/Model/Plugin/TaxCalculationPlugin.php(65):

Vertex\Tax\Model\Plugin\TaxCalculationPlugin->useVertex(Object(Magento\Tax\Model\Sales\Quote\QuoteDetails), '1', true)

7 /vhosts/www.mywebsite.com/webroot/vendor/magento/framework/Interception/Interceptor.php(135):

Vertex\Tax\Model\Plugin\TaxCalculationPlugin->aroundCalculateTax(Object(Magento\Tax\Model\TaxCalculation\Interceptor), Object(Closure), Object(Magento\Tax\Model\Sales\Quote\QuoteDetails), '1')

8 /vhosts/www.mywebsite.com/webroot/vendor/magento/framework/Interception/Interceptor.php(153):

Magento\Tax\Model\TaxCalculation\Interceptor->Magento\Framework\Interception{closure}(Object(Magento\Tax\Model\Sales\Quote\QuoteDetails), '1')

Any help will appreciate. Thanks.

هل كانت مفيدة؟

المحلول

Have you try this solution?

check in \Magento\Customer\Model\AddressRegistry class

From this:

$address->load($addressId);
if (!$address->getId()) {
    throw NoSuchEntityException::singleField('addressId', $addressId);
}

To this

//if addressId is null or 0 we don't try to load it to avoid annoying log

      if($addressId != 0 && $addressId != null){
          $address->load($addressId);
           if (!$address->getId()) {
          throw NoSuchEntityException::singleField('addressId', $addressId);
           }
        }
مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى magento.stackexchange
scroll top