Troubleshooting & FAQ

Updated Jun 19, 2026
DataMagik Application Designer

Troubleshooting & FAQ

A call fails with "not_declared"

The resource you tried to use is not in the app's manifest. Add it to dm.config.json (or grant it in the designer for a layout app), run dm typegen, and republish. Declarations are enforced server-side on every call, so the resource must be declared and exist in your company.

dm typegen errors on placeholder ids

Starters ship demo placeholder resources. dm typegen fetches every declared resource, so it errors until you replace the placeholders with real ids (use dm add). dm dev tolerates this — it falls back to the bundled demo types — so develop with dm dev and run dm typegen once your resources are real.

dm login does not work / which token?

Create an API key in the platform UI under your profile's API Keys — it looks like dcp_... — and paste it into dm login --url <host>, or pass --token. Credentials are stored at ~/.config/datamagik/credentials.json (mode 0600). The browser-OAuth login flow is a planned enhancement; for now use the pasted API key.

My assets 404 or the app is blank in production

SPA apps are served from an opaque-origin sandbox and require relative asset paths. The CLI forces Vite base: './' — keep it. Absolute paths (/assets/...) will not resolve.

fetch / XHR is blocked

That is by design. The sandbox sets connect-src 'none', so apps cannot reach the network directly. Route all platform access through the @datamagik/app-sdk bridge. For external systems, call them from a server-side script (declared as a source) instead.

Publish is rejected for size

Bundles must be ≤ 30 MiB zipped, ≤ 100 MiB uncompressed, and ≤ 1,000 files. Trim dependencies, enable build minification, and avoid bundling large static assets.

The in-host dev server will not open

To test inside the real sandboxed host, set ALLOW_SPA_DEV_SERVER=true on a non-production environment and open /datamagik/app-designer/<appId>/view?dev_server=http://localhost:5173. The URL must be localhost and you need Builder permission; production refuses it.

Can I write rows or capture images from a SPA?

Not in v1. dm.data.writeRow and dm.capture.* are not yet part of the SPA SDK surface — use a layout app's editable components for those flows, or a server-side script. Reading data, running scripts, generating serials, and printing all work from a SPA.

Should I build a layout app or a SPA app?

Start with a layout app — the visual designer covers most needs with no code. Move to a SPA app when you need custom components, bespoke client logic, or a specific UX the canvas cannot express. Both run on the same surfaces with the same permissions, so you can choose per app.

Where does my app run once published?

Everywhere: the DataMagik website, inside Plex via the datamagik extend extension, and the mobile app — from a single published version. See Publishing, Versions & Rollback.

Was this page helpful?