Replies: 3 comments 4 replies
-
Facing the same issue |
Beta Was this translation helpful? Give feedback.
0 replies
-
@elwin212 The code you provided is invalid: "SQLite" is not defined. When I fixed that it worked fine for me. Perhaps your problem has something to do with Vite, or some other build/deploy step? |
Beta Was this translation helpful? Give feedback.
3 replies
-
@elwin212 @rscalderon here is how to correctly use OPFSCoopSyncVFS with Vite. Put this in a worker.
|
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi, thanks for the great project!
I’ve been trying to use
OPFSCoopSyncVFS
and have been following the example here.However, I keep getting an error when opening the database.
I'm running in a worker context and using
Comlink
to communicate with the web worker and Vite. I’m able to successfully useAccessHandlePoolVFS
to persist data in the browser, but I just can’t seem to get theOPFSCoopSyncVFS
working.The error message looks like this:
After doing some debugging, I logged the
OPFSCoopSyncVFS
instance and noticed that lastError shows:Error: File /%E0%B2%80 not found at OPFSCoopSyncVFS.jOpen.
The
zName
it pass to thexOpen
method isಀ
which is%E0%B2%80
.No matter what file name I pass in, I always get the same error message.
When I inspect the file system I can see it create
.ahp-random-string
but it didn't create files like thewa-sqlite
example such ashello
/hello-journal
/hello-wal
.Also, when I log the
flags
in thejOpen
method, it's anProxy(DataView)
not thenumber
.Any guidance on how to get this working would be much appreciated!
Beta Was this translation helpful? Give feedback.
All reactions