1

I'm trying to debug an error with Magento Analytics.

If I try to reauthorize the user in System --> Integrations I have the following error.

Ideas to debug?

Api are working with another shipping service, I see records in oauth_token.

[2019-07-16 09:55:38] main.CRITICAL: SQLSTATE[23000]: Integrity constraint violation: 1452 Cannot add or update a child row: a foreign key constraint fails (`oauth_token`, CONSTRAINT `OAUTH_TOKEN_CONSUMER_ID_OAUTH_CONSUMER_ENTITY_ID` FOREIGN KEY (`consumer_id`) REFERENCES `oauth_consumer` (`entity_id`) ON DELETE C), query was: INSERT INTO `oauth_token` (`consumer_id`, `type`, `token`, `secret`, `verifier`, `callback_url`, `user_type`) VALUES (?, ?, ?, ?, ?, ?, ?) {"exception":"[object] (Zend_Db_Statement_Exception(code: 23000): SQLSTATE[23000]: Integrity constraint violation: 1452 Cannot add or update a child row: a foreign key constraint fails (`oauth_token`, CONSTRAINT `OAUTH_TOKEN_CONSUMER_ID_OAUTH_CONSUMER_ENTITY_ID` FOREIGN KEY (`consumer_id`) REFERENCES `oauth_consumer` (`entity_id`) ON DELETE C), query was: INSERT INTO `oauth_token` (`consumer_id`, `type`, `token`, `secret`, `verifier`, `callback_url`, `user_type`) VALUES (?, ?, ?, ?, ?, ?, ?) at /vendor/magento/zendframework1/library/Zend/Db/Statement/Pdo.php:235, PDOException(code: 23000): SQLSTATE[23000]: Integrity constraint violation: 1452 Cannot add or update a child row: a foreign key constraint fails (`oauth_token`, CONSTRAINT `OAUTH_TOKEN_CONSUMER_ID_OAUTH_CONSUMER_ENTITY_ID` FOREIGN KEY (`consumer_id`) REFERENCES `oauth_consumer` (`entity_id`) ON DELETE C) at /vendor/magento/zendframework1/library/Zend/Db/Statement/Pdo.php:228)"} []

Your Answer

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

Browse other questions tagged or ask your own question.