2.2.0 Update Duplicate entry '1-nfDiscord'

During the update I get the following error:

Code:
    XF\Db\DuplicateKeyException: MySQL query error [1062]: Duplicate entry '1-nfDiscord' for key 'PRIMARY' src/XF/Db/AbstractStatement.php:217

    Generated by: Tealk Apr 20, 2019 at 2:55 PM

Stack trace

UPDATE  `xf_user_connected_account` SET `provider` = ? WHERE provider = ?
------------

#0 src/XF/Db/Mysqli/Statement.php(196): XF\Db\AbstractStatement->getException('MySQL query err...', 1062, '23000')
#1 src/XF/Db/Mysqli/Statement.php(77): XF\Db\Mysqli\Statement->getException('MySQL query err...', 1062, '23000')
#2 src/XF/Db/AbstractAdapter.php(94): XF\Db\Mysqli\Statement->execute()
#3 src/XF/Db/AbstractAdapter.php(322): XF\Db\AbstractAdapter->query('UPDATE  `xf_use...', Array)
#4 src/addons/NF/Discord/Setup.php(47): XF\Db\AbstractAdapter->update('xf_user_connect...', Array, 'provider = ?', 'discord')
#5 src/addons/NF/Discord/Setup.php(87): NF\Discord\Setup->applyConnectedAccountProvider()
#6 src/XF/AddOn/StepRunnerUpgradeTrait.php(122): NF\Discord\Setup->upgrade2020005Step2(Array)
#7 src/XF/AddOn/StepRunnerUpgradeTrait.php(71): NF\Discord\Setup->upgradeStepRunner(2020005, 2, Array, NULL)
#8 src/XF/Admin/Controller/AddOn.php(575): NF\Discord\Setup->upgrade(Array)
#9 src/XF/Mvc/Dispatcher.php(321): XF\Admin\Controller\AddOn->actionUpgrade(Object(XF\Mvc\ParameterBag))
#10 src/XF/Mvc/Dispatcher.php(244): XF\Mvc\Dispatcher->dispatchClass('XF:AddOn', 'Upgrade', Object(XF\Mvc\RouteMatch), Object(XF\Admin\Controller\AddOn), NULL)
#11 src/XF/Mvc/Dispatcher.php(100): XF\Mvc\Dispatcher->dispatchFromMatch(Object(XF\Mvc\RouteMatch), Object(XF\Admin\Controller\AddOn), NULL)
#12 src/XF/Mvc/Dispatcher.php(50): XF\Mvc\Dispatcher->dispatchLoop(Object(XF\Mvc\RouteMatch))
#13 src/XF/App.php(2177): XF\Mvc\Dispatcher->run()
#14 src/XF.php(390): XF\App->run()
#15 admin.php(13): XF::runApp('XF\\Admin\\App')
#16 {main}

Request state

array(4) {
  ["url"] => string(37) "/admin.php?add-ons/NF-Discord/upgrade"
  ["referrer"] => string(58) "https://anzahcraft.de/admin.php?add-ons/NF-Discord/upgrade"
  ["_GET"] => array(1) {
    ["add-ons/NF-Discord/upgrade"] => string(0) ""
  }
  ["_POST"] => array(7) {
    ["_xfProcessing"] => string(1) "1"
    ["continue"] => string(1) "1"
    ["confirm"] => string(1) "1"
    ["params"] => string(2) "[]"
    ["count"] => string(1) "1"
    ["finished"] => string(1) "0"
    ["_xfToken"] => string(8) "********"
  }
}
 
Out of curiosity, have you installed anything else that adds a Discord provider?
 
Strange. This should be fixed in 2.2.1. Seems to have been triggered if you have multiple connected accounts for Discord but not entirely sure how that's happened in your case.
 
Back
Top