I get this error when trying to register an account :

No such entity with customerId = 13818

I think it might be some old custom attribute that is the root of the problem.

How can I clean the customer_eav_table and customer_eav_website tables from all custom attributes ? I would like to clean everything up.

Magento 2.2.6

3 Answers 3


I think the answer is actually here github issue - 23411, meaning it is a false positive.

I have created a patch that downgrades the message from 'error' to 'info'. So that visibility is maintained, but severity is downgraded.
file: patches/no_entity_with_customer_id.patch

--- Model/Session.php   2019-11-13 09:59:47.214035581 +0000
+++ Model/Session.php   2019-11-13 10:25:54.187217836 +0000
@@ -274,7 +274,13 @@
                         $quote = $this->quoteRepository->getActiveForCustomer($customerId);
                     } catch (\Magento\Framework\Exception\NoSuchEntityException $e) {
-                        $this->logger->critical($e);
+                       $this->logger->info(
+                           'Failed to find active quote for customer',
+                           [
+                               'customerId' => $customerId,
+                               'error' => $e->getMessage(),
+                           ]
+                       );
                 } else {

Then add the following to your patches configuration

  "patches": {
    "magento/module-checkout": {
      "no such entity with customerId, false positive (https://github.com/magento/magento2/issues/23411#issuecomment-508426676)": "patches/no_entity_with_customer_id.patch"

this would require cweagans/composer-patches to be installed.

  • Isn't the info level written to the system.log in production as well? This would not really solve the problem.
    – fritzmg
    Commented Nov 13, 2019 at 14:44
  • It depends what your log level is. If you are only logging errors on production, then this would stop it from being logged. The point is this isn't an error. By downgrading this to an info output, it stops it being identified as an error that needs attention
    – Adam
    Commented Nov 13, 2019 at 20:57
  • Magento also logs info by default in production mode. It doesn't log debug.
    – fritzmg
    Commented Nov 14, 2019 at 7:19

This will now be fixed in the upcoming Magento 2.3.5 release, according to github.com/magento/magento2/issues/23411#issuecomment-554132357. The implementation simply gets rid of any such logging, as it was unnecessary to log this exception at all.


For info, there no customer_eav_table, but customer_eav_attribute instead.

I suggest you to try first this solution.

You ask how to remove customer custom attribute :


If you have an existing module, try UpgradeData.php instead of InstallData.php

namespace {Vendor}\{Module}\Setup;

use Magento\Eav\Setup\EavSetup;
use Magento\Eav\Setup\EavSetupFactory;
use Magento\Framework\Setup\InstallDataInterface;
use Magento\Framework\Setup\ModuleContextInterface;
use Magento\Framework\Setup\ModuleDataSetupInterface;

class InstallData implements InstallDataInterface
    private $eavSetupFactory;

    public function __construct(EavSetupFactory $eavSetupFactory) {
        $this->eavSetupFactory = $eavSetupFactory;

    public function install(ModuleDataSetupInterface $setup, ModuleContextInterface $context){
        $eavSetup = $this->eavSetupFactory->create(['setup' => $setup]);
            'attribute_name'); //Attribute name here
  • Thanks! I don't have a custom module. I've migrated customers from magento 1.9 and I think the customer attributes was created with that tool. Now I just want to start over again. Can I truncate customer_eav_attribute and customer_eav_website and Import the default values? If I can, where can I find the sql that creates the default database when setting up magento2?
    – ski3r
    Commented Oct 10, 2018 at 12:54
  • If you migrated from M1 to M2, I'm afraid it creates problems if you truncate these tables. First do some backup, and try magento.stackexchange.com/questions/155922/…
    – PЯINCƎ
    Commented Oct 10, 2018 at 13:03

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.