Q:

Magento2 products errors: Item (Magento\Catalog\Model\Product\Interceptor) with the same ID "21" already exists

Since a while I get the following when i go to catalog->products

Item (Magento\Catalog\Model\Product\Interceptor) with the same ID "21"
  already exists

That is a product existing but its not duplicated.
Also there are no duplicated rewrite urls or anything. 
When i hard deleted the product entity from the DB i could get the table to load but still i get all kinds of popup with errors. 
There is no logging in exception.log debug.log or anything to pull in more info

A:

Then you can use the below module to resolve the above error.

Create new folders

RSCoder/DuplicateEntry in app/code Magento folder.

registration.php

<?php

\Magento\Framework\Component\ComponentRegistrar::register(
 \Magento\Framework\Component\ComponentRegistrar::MODULE,
 'RSCoder_DuplicateEntry',
 __DIR__
);

etc/module.xml

<?xml version="1.0"?>

<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Module/etc/module.xsd">
 <module name="RSCoder_DuplicateEntry" setup_version="1.0.1"></module>
</config>

etc/di.xml

<?xml version="1.0"?>

<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd">
 <type name="Magento\Eav\Model\Entity\Collection\AbstractCollection">
    <plugin name="find_duplicate_entry" type="RSCoder\DuplicateEntry\plugin\Collection" sortOrder="20"/>
 </type>
</config>

plugin/Collection.php

<?php
/**
 * Copyright © Magento, Inc. All rights reserved.
 */
namespace RSCoder\DuplicateEntry\plugin;
use Magento\Framework\Data\Collection\EntityFactoryInterface;
use Magento\Framework\Option\ArrayInterface;

class Collection
{
    /**
     * @param \Magento\Eav\Model\Entity\Collection\AbstractCollection $subject
     * @param \Closure $process
     * @param \Magento\Framework\DataObject $dataObject
     * @return $this
     */
    public function aroundAddItem(\Magento\Eav\Model\Entity\Collection\AbstractCollection $subject, \Closure $process, \Magento\Framework\DataObject $dataObject)
    {
        try{
            return $process($dataObject);
        }catch ( \Exception $e){
            return $this;
        }
    }
}

It's Work for me.
Reference Link

A:

As KAndy mentioned, it is a known bug and it is fixed on develop branch.
To quickly fixed it you can delete all rows that have duplicated products ids in cataloginventory_stock_item table.

