Search code examples
google-chrome-devtoolsdexie

How to Troubleshoot Dexie bound on IDBKeyRange Error


I'm using Dexie.js version 3.0.3-rc.3 in a Vue JS project and I occasionally run into this exception in Chrome (86):

Failed to execute 'bound' on 'IDBKeyRange': The parameter is not a valid key.↵ DataError: Failed to execute 'bound' on 'IDBKeyRange': The parameter is not a valid key.

Here's a screenshot of the full error:

enter image description here

I'm fairly certain the problem lies with something in my data being undefined, but I'm trying to find a good way to troubleshoot this. I paused the Chrome dev tools on exceptions and inspected the code around this particular part of Dexie, but it doesn't reveal what data was used to make this exception occur.

Does anyone have any suggestions on how to find out what's actually wrong? It feels a bit like a needle in a haystack.

== Update ==

Below is the full call stack:

enter image description here


Solution

  • Try inspecting the call stack. I know it can be long until you reach a frame within your application code, but the failing call should be there!

    enter image description here