0

State for the same indexer already exists

> [ERROR] Magento\Framework\Setup\Exception: State for the same indexer
> already exists. in
> C:\xampp\htdocs\magento\vendor\magento\framework\Setup\Patch\PatchApplier.php:167
> Stack trace: #0
> C:\xampp\htdocs\magento\setup\src\Magento\Setup\Model\Installer.php(1002):
> Magento\Framework\Setup\Patch\PatchApplier->applyDataPatch('Magento_Indexer')
> #1 C:\xampp\htdocs\magento\setup\src\Magento\Setup\Model\Installer.php(874):
> Magento\Setup\Model\Installer->handleDBSchemaData(Object(Magento\Setup\Module\DataSetup),
> 'data', Array) #2 [internal function]:
> Magento\Setup\Model\Installer->installDataFixtures(Array) #3
> C:\xampp\htdocs\magento\setup\src\Magento\Setup\Model\Installer.php(367):
> call_user_func_array(Array, Array) #4
> C:\xampp\htdocs\magento\setup\src\Magento\Setup\Controller\Install.php(109):
> Magento\Setup\Model\Installer->install(Array) #5
> C:\xampp\htdocs\magento\vendor\zendframework\zend-mvc\src\Controller\AbstractActionController.php(84):
> Magento\Setup\Controller\Install->startAction() #6 [internal
> function]:
> Zend\Mvc\Controller\AbstractActionController->onDispatch(Object(Zend\Mvc\MvcEvent))
> #7 C:\xampp\htdocs\magento\vendor\zendframework\zend-eventmanager\src\EventManager.php(490):
> call_user_func(Array, Object(Zend\Mvc\MvcEvent)) #8
> C:\xampp\htdocs\magento\vendor\zendframework\zend-eventmanager\src\EventManager.php(260):
> Zend\EventManager\EventManager->triggerListeners('dispatch',
> Object(Zend\Mvc\MvcEvent), Object(Closure)) #9
> C:\xampp\htdocs\magento\vendor\zendframework\zend-mvc\src\Controller\AbstractController.php(118):
> Zend\EventManager\EventManager->triggerEventUntil(Object(Closure),
> Object(Zend\Mvc\MvcEvent)) #10
> C:\xampp\htdocs\magento\vendor\zendframework\zend-mvc\src\DispatchListener.php(118):
> Zend\Mvc\Controller\AbstractController->dispatch(Object(Zend\Http\PhpEnvironment\Request),
> Object(Zend\Http\PhpEnvironment\Response)) #11 [internal function]:
> Zend\Mvc\DispatchListener->onDispatch(Object(Zend\Mvc\MvcEvent)) #12
> C:\xampp\htdocs\magento\vendor\zendframework\zend-eventmanager\src\EventManager.php(490):
> call_user_func(Array, Object(Zend\Mvc\MvcEvent)) #13
> C:\xampp\htdocs\magento\vendor\zendframework\zend-eventmanager\src\EventManager.php(260):
> Zend\EventManager\EventManager->triggerListeners('dispatch',
> Object(Zend\Mvc\MvcEvent), Object(Closure)) #14
> C:\xampp\htdocs\magento\vendor\zendframework\zend-mvc\src\Application.php(340):
> Zend\EventManager\EventManager->triggerEventUntil(Object(Closure),
> Object(Zend\Mvc\MvcEvent)) #15
> C:\xampp\htdocs\magento\setup\index.php(39):
> Zend\Mvc\Application->run() #16 {main}
0

The problem is, that your MySQL user does not have the permission to drop the trigger, which does the index update after the object is updated.

Please provide the full privilege to MySQL user.

Let me know if you still getting the error.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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