Fixed Another UC Browser issue?

rdn

Well-known member
Affected version
2.1.0
Code:
Server error log

XF\Db\DuplicateKeyException: MySQL query error [1062]: Duplicate entry '175ab7aafceaeff8eb28e753ec99bf18' for key 'endpoint_hash' src/XF/Db/AbstractStatement.php:217
Generated by: User Feb 7, 2019 at 10:49 AM
Stack trace
INSERT  INTO `xf_user_push_subscription` (`endpoint_hash`, `endpoint`, `user_id`, `data`, `last_seen`) VALUES (?, ?, ?, ?, ?)
------------

#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(89): XF\Db\Mysqli\Statement->execute()
#3 src/XF/Db/AbstractAdapter.php(169): XF\Db\AbstractAdapter->query('INSERT  INTO `x...', Array)
#4 src/XF/Repository/UserPush.php(44): XF\Db\AbstractAdapter->insert('xf_user_push_su...', Array)
#5 src/XF/Pub/Controller/Misc.php(431): XF\Repository\UserPush->insertUserPushSubscription(Object(Datio\AllowedEmails\XF\Entity\User), Array)
#6 src/XF/Mvc/Dispatcher.php(321): XF\Pub\Controller\Misc->actionUpdatePushSubscription(Object(XF\Mvc\ParameterBag))
#7 src/XF/Mvc/Dispatcher.php(244): XF\Mvc\Dispatcher->dispatchClass('XF:Misc', 'UpdatePushSubsc...', Object(XF\Mvc\RouteMatch), Object(XF\Pub\Controller\Misc), NULL)
#8 src/XF/Mvc/Dispatcher.php(100): XF\Mvc\Dispatcher->dispatchFromMatch(Object(XF\Mvc\RouteMatch), Object(XF\Pub\Controller\Misc), NULL)
#9 src/XF/Mvc/Dispatcher.php(50): XF\Mvc\Dispatcher->dispatchLoop(Object(XF\Mvc\RouteMatch))
#10 src/XF/App.php(2177): XF\Mvc\Dispatcher->run()
#11 src/XF.php(390): XF\App->run()
#12 index.php(20): XF::runApp('XF\\Pub\\App')
#13 {main}
Request state
array(4) {
  ["url"] => string(40) "/index.php?misc/update-push-subscription"
  ["referrer"] => string(35) "https://www.site.net/forums/74/"
  ["_GET"] => array(1) {
    ["misc/update-push-subscription"] => string(0) ""
  }
  ["_POST"] => array(7) {
    ["endpoint"] => string(164) "https://uccm-intl.ucweb.com/wpush/m/OubiKvYghPgsDty9SQI86tsdlAiZ3TZJETKbSdI_35vYUyJyAxiADymnYaaWWi6ZegaFhH3DMgF81eeREkBrdc6QQnwFHDjzCj2WY5angIIyGQumDMrs-NukAfZDC1nR"
    ["key"] => string(88) "BLa4JU096j102kciz4nSJBd2uCbHLOQ2l3Hczb46ggGhxuCxP27NrnTbWAGXBCXrmoXudJCS4Muoj7cwmH5DNf0="
    ["token"] => string(24) "g/DAtSiYLl0lycmXXW+OHQ=="
    ["encoding"] => string(6) "aesgcm"
    ["unsubscribed"] => string(1) "0"
    ["_xfResponseType"] => string(4) "json"
    ["_xfToken"] => string(8) "********"
  }
}
 
Thank you for reporting this issue. It has now been resolved and we are aiming to include it in a future XF release (2.1.1).

Change log:
Prevent duplicate key error from push subscription update.
Any changes made as a result of this issue being resolved may not be rolled out here until later.
 
Back
Top Bottom