sqlite-wasm icon indicating copy to clipboard operation
sqlite-wasm copied to clipboard

Added forceReinitIfPreviouslyFailed to installOpfsSAHPoolVfs options

Open jurerotar opened this issue 1 month ago • 6 comments

Added forceReinitIfPreviouslyFailed to installOpfsSAHPoolVfs options, based on the discussion in https://github.com/sqlite/sqlite-wasm/issues/79

jurerotar avatar Oct 27 '25 17:10 jurerotar

FYIW, as the person who very reluctantly added the forceReinitIfPreviouslyFailed flag (#79): DO NOT USE THAT FLAG. It's a workaround for one specific buggy browser and actively supporting buggy browsers is how the world got stuck with MSIE6 for so long.

i strongly recommend leaving it out of any public interface. It's an ugly kludge for a buggy browser, not a solution to a real problem.

sgbeal avatar Oct 27 '25 19:10 sgbeal

First of all, thank you for implementing the fix (hack?)! 😄

The reason I've opened this PR is because I've encountered that same bug today. In my humble opinion, regardless whether this flag should exist, it seems there is currently still a need for it. The hope is of course that this will eventually get fixed on a browser-level, but until then, it may solve some users' problems (and save them some time by not having to dig through the whole https://github.com/sqlite/sqlite-wasm/issues/79 issue thread 😆).

I hope this makes sense, but feel free to close the PR in case my reasoning doesn't convince you!

jurerotar avatar Oct 27 '25 19:10 jurerotar

Is there a browser bug you could nudge with the negative impact caused by this and a small reproduction case for the engineers to look at? I understand you're vague on purpose, but I think in this case at least linking from said bug report (which hopefully exists) to here would be an option.

tomayac avatar Oct 27 '25 19:10 tomayac

Here's the bug I raised a couple of hours ago to WebKit: https://bugs.webkit.org/show_bug.cgi?id=301520 (it seems to only be happening there, haven't been able to reproduce elsewhere).

The issue appears very similar to the one described in https://github.com/sqlite/sqlite-wasm/issues/79.

jurerotar avatar Oct 27 '25 20:10 jurerotar

@karlcow This is a WebKit compat issue that currently affects users of SQLite Wasm. Any chance for someone from the team to take a look? Merci :-)

tomayac avatar Oct 27 '25 20:10 tomayac

Thanks @tomayac and @jurerotar for the heads up. Let me check.

karlcow avatar Oct 27 '25 22:10 karlcow