javascriptgoogle-chromeindexeddbservice-workerdomexception

What is "DOMException: Entry already exists"?


tl;dr My web app is getting the error "DOMException: Entry already exists" and I have no idea what it means. I haven't been able to find an explanation for this error on the internet; possibly my googlefoo is inadequate.


Longer version.

I have fairly straightforward todolist es6 app that

Everything works great. But every once and awhile, the service worker gives off the errors...

Uncaught (in promise) TypeError: network error at TypeError (native) (program:1)
Uncaught (in promise) DOMException: Entry already exists. (program:1)

...chrome (45.0.2454.93 (64-bit) on ubuntu) slows to a crawl, and nothing works until I go to chrome://serviceworker-internals and stop the service worker. After that everything is fine for another couple days.

Hard to debug since the error doesn't tell me what line of my code initiated the problem.


Solution

  • As noted in the comments, but to answer more definitively:

    This was tracked down to a Windows-specific bug in the Cache API implementation in Chrome - https://crbug.com/542668

    A fix is in progress, with code going in. The fix should wind its way through the normal Chrome release process - Canary build within a day or two, Beta in a few weeks, and Stable release ~6 weeks after that.