datahike

2026-03-08T13:21:04.964259Z

I'm having trouble using the :tiered storage with indexedDB in the browser. I get an assertion error -blob-exists? requires async, got env: {:sync? true} when I try to query it. I made a minimal repro of my problem https://github.com/madstap/datahike-indexeddb-repro/blob/main/src/repro/main.cljs. Am I holding it wrong or is this a bug? I assume the former, but you never know...

👋 1
whilo 2026-03-18T08:36:18.104829Z

I think I found the bug, will let you know once it is fixed.

whilo 2026-03-09T21:34:04.932649Z

Hey @madstap. Thanks for reporting! Remove https://github.com/madstap/datahike-indexeddb-repro/blob/main/src/repro/main.cljs#L9 and https://github.com/madstap/datahike-indexeddb-repro/blob/main/src/repro/main.cljs#L12. That should do the trick (I can check againif it doesn't). Only the backend needs to be async here. We probably should have better error messages for this... Lmk how it goes.

whilo 2026-03-09T21:35:54.545429Z

We basically use the memory store to keep the query engine runnable fully in synchronous mode (it cannot do async yet, one reason being is that we don't want to take a speed penalty by being async by default).

2026-03-09T22:54:51.162249Z

The behavior I'm seeing is that on first load it works and then on subsequent loads with the same uuid I get that error. If I try to remove those lines it's still broken in the same way.

whilo 2026-03-09T22:55:14.572169Z

Ok, I will take a closer look later.

1
whilo 2026-03-11T17:24:19.731509Z

Haven't gotten to it yet, hopefully on the weekend.