Reference
Troubleshooting
The usual problems, and the checks that find them, in order. Most come down to an address that doesn't match a key, a missing height, or a content security policy.
Start with the browser's developer tools: the Console for errors, and the Network tab for the editor's requests (grant and export on your route in strict mode, or api.dorvyn.dev with a key in the page).
Nothing shows#
The editor's box is there, but empty or zero-height.
- Give it a height. The editor fills its box:
style="display: block; height: 100vh", orflex: 1in a flex column. In a layout of your own,<dorvyn-document>needs a size too. - The elements aren't registered. With plain HTML,
import "@dorvyn/elements/define"must run. In Vue, tell the compilerdorvyn-*tags are custom elements (HTML). In Angular, addCUSTOM_ELEMENTS_SCHEMA. - It never started. It starts once it has a
licenseor aserver-url. Check one of them is set, not empty. - Hidden at start. An editor inside a closed tab or modal may measure zero. Keep its container a real size, or create the editor when it's first shown.
The editor never becomes editable#
It shows, but stays read-only. Check editor.state.get() in the console (await document.querySelector("dorvyn-editor").whenReady() gives you the editor), or the full editor's status bar.
engine is "failed":
- The Console shows a CSP error: add
'wasm-unsafe-eval'toscript-srcand the CDN toconnect-src(Content security policy). - A firewall or proxy blocks
cdn.dorvyn.dev: allow it, or serve the engine yourself. - "The engine didn't match this SDK": you serve an engine from another version, or a proxy rewrites the file. Download the engine for the SDK version you installed, and serve it unchanged.
license is "unavailable":
- Strict mode: open the Network tab and find
grant.- No request at all:
server-urlisn't set, or the page has alicensetoo (the key wins). 401 Sign in to edit.: youruserfunction returns nothing. Log what it sees.404: the route isn't mounted at…/:action, orserver-urlhas a typo.server-urlis the path without/grant.500: read your server's log. UsuallyDORVYN_SECRET_KEYisn't set in that environment, or the server can't reach Dorvyn.401 This key can't be used here.: see that message.
- No request at all:
- A key in the page: the request to
api.dorvyn.devanswers with the reason. Usually the address isn't listed on the key exactly, a live key onlocalhost, or the plan isn't active.
license is "refused": the page is served at another address than the license was made for. A reverse proxy or CDN may be rewriting the host. Make sure the browser's address is the one on the key.
readOnly is true but license is "valid": the person chose Viewing. Switch back to Editing in the sidebar (or editor.commands.run("viewing", false)).
It works locally but not in production#
- Live keys. Production uses live keys: a live secret key in the server's environment, and a live publishable key listing the production address.
- The address.
https://app.example.comandhttps://www.example.comare different. List each one the editor runs on. - The environment variable.
DORVYN_SECRET_KEYis set in production's environment (not just.env.local), and the server was restarted or redeployed after. - The plan. Live keys need an active plan.
- CSP. Production often has a content security policy that development doesn't.
- Body size. A proxy or framework limit on request bodies (often 1 MB) blocks saving larger documents. Raise it for the route.
Saving as Word fails#
- "The license service can't be reached": wait, or save to your own storage meanwhile. Editing is safe.
413or a proxy error onexport: your server or a proxy limits request bodies. Raise it for the route.- "The plan's exports for today are used up": your daily limit; it resets at midnight UTC.
- "The document is larger than the plan allows": make pictures smaller.
- Strict mode, a
5xxonexport: your server's log has the details.
Every message is explained in Messages and errors.
Editing stops after a while#
- After about 10 minutes, then comes back: a renewal failed and then succeeded. Check your route's error rate.
- When the person signs out of your app: as intended. Editing stops at the next renewal.
- After a laptop sleeps: the license lapsed meanwhile. It renews within seconds of the connection returning, without a reload.
- Every day at the same time: your server's session expires. The editor needs the person signed in while it renews.
Drafts don't come back#
autosave-keymust be set, and the same on the next visit.- Private windows forget everything when closed.
- Another document's editor with the same key may have replaced it: use one key per document.
state.saveStatusis"toolarge": the browser has no room for it. Free space, or save the document yourself.
The page's styles change the document#
They shouldn't: the editor resets what pages commonly set on every element inside the document. Rules marked !important, or with two ids or more, still win. Keep those away from dorvyn-document (Theming and branding).
Keyboard shortcuts don't work#
- Your app may capture the same keys (Ctrl+K for its own search, say) before the editor. Stop your handler when the focus is inside
dorvyn-editor. - With several editors on one page, shortcuts go to the one that has the focus.
Still stuck?#
Collect what support will ask for, and you'll get an answer much sooner:
- the SDK version (
npm ls @dorvyn/elements), browser and OS; - what
editor.state.get()shows forengineandlicense; - the
grantorexportrequest's status and answer from the Network tab (never the full request or your keys); - your server's log line, if any;
- the time it happened, with your time zone.
Then email support@dorvyn.dev from your work address, with your organization's name. Never send a secret key to anyone, including Dorvyn.