#SQLite duplicate entries (user_push_subscription table)

7 messages · Page 1 of 1 (latest)

wet iron
#

Discussion about the related github issue #2265

@fleet cobalt I'm going to be away for NYE so I won't be able to assist in troubleshooting until I get back unfortunately. Just let me know what you want to test. This is my deployment (https://github.com/tscibilia/home-ops/blob/main/kubernetes/apps/media/seerr/app/helmrelease.yaml)

GitHub

Description I'm having an issue with the latest develop commit -- d0c9afc It's failing to start and the logs report a SQLite database constraint violation with duplicate entries in the user...

GitHub

Wife-tolerated HomeOps driven by Kubernetes and Gitops via Flux c/o onedr0p's template. - tscibilia/home-ops

fleet cobalt
#

I suspect you (or some of your users) have duplicate web push subscriptions (same endpoint but different auth key), which the uniq constraint should prevent now

#

Executing this could give us a clue

SELECT *
FROM user_push_subscription
WHERE (userId, endpoint) IN (
  SELECT userId, endpoint
  FROM user_push_subscription
  GROUP BY userId, endpoint
  HAVING COUNT(*) > 1
)
ORDER BY userId, endpoint, createdAt DESC;
lean schooner
#

Would it be safe to just delete one of the rows in the user_push_subscruption table?

fleet cobalt
#

As soon as the endpoint is the same, yes it's safe

lean schooner
#

Yep, tht fixed it. Back up and running. Thank you for the super fast response.