You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I encountered a sharp edge building a simple useBootstrap app. I must have initialized useBootstrap with an empty or broken onNoDocument function, which resulted in the document ID being saved to localstorage, but the document itself not being created.
Whenever I tried to write anything, I got the following console.error: Uncaught Error: DocHandle#... is not ready. Check `handle.isReady()` before accessing the document.
It was not immediately obvious what was happening, and the error persisted between reloads. I have encountered this before and would like it to be easier to diagnose for someone unfamiliar with the library.
The error message could provide a link to a documentation page with more information?
The chrome devtools could log a message like "useBootstrap: loading existing documentId from localstorage"?
The text was updated successfully, but these errors were encountered:
For anyone encountering this error, what is happening is that automerge-repo is waiting for a peer to share the document (which won't happen as it doesn't exist). The solution is to delete the automergeUrl key from localstorage and the hash URL, or to change useBootstrap.key to something different.
A simple way to recreate this is to use useBootstrap without a repo storage adapter. This should be a supported use-case (I don't want persistent storage while I'm testing things).
I encountered a sharp edge building a simple
useBootstrap
app. I must have initialized useBootstrap with an empty or brokenonNoDocument
function, which resulted in the document ID being saved to localstorage, but the document itself not being created.Whenever I tried to write anything, I got the following console.error:
Uncaught Error: DocHandle#... is not ready. Check `handle.isReady()` before accessing the document.
It was not immediately obvious what was happening, and the error persisted between reloads. I have encountered this before and would like it to be easier to diagnose for someone unfamiliar with the library.
The text was updated successfully, but these errors were encountered: