Troubleshooting¶
Audience: anyone whose IDE, build or command did something unexpected · about 5 minutes to find your entry · Prerequisites: none.
Find your problem by what you saw: the exact message if there was one, otherwise the symptom. Each entry gives the cause and the fix. Messages are quoted as the app prints them (in the German or Dutch UI they appear translated, see Localization). Commands run from the repository root unless stated.
Index by message¶
| You saw | Go to |
|---|---|
Not run: fix the reported errors first (see Problems). |
Running programs |
Preview not run: ... |
Running programs |
No python interpreter found on this host's PATH. |
Running programs |
Timed out (30s) or Input cancelled — run stopped |
Running programs |
Not run: a debug session is already running in another tab. Stop it there first. |
Running programs |
Failed to open project: ..., Failed to load model "...": ..., Failed to load language "...": ... |
Opening projects and models |
STRUKT-LANG-UNTRUSTED (CLI; the IDE does not prompt) |
Trust prompts |
Extension "x" is not on this deployment's extension allowlist. |
Extensions |
Host not allowed or Cross-origin request denied |
Extensions |
Checkout failed, Commit failed, Merge failed |
Source control |
Could not connect to the collaboration server (...), Insecure relay server URL |
Collaboration |
Couldn't find a ready language model for agent struktJS |
The AI chat |
unknown project "x", STRUKT-LANG-UNTRUSTED, STRUKT-LOAD, launcher failure |
The command-line tool |
| Blank page, stale app, terminal crashes, build fails | Building and starting |
Building and starting¶
The build fails during install or theia build¶
- Check your Node version: the project supports Node 20.x to 22.x. Native modules (
node-pty,drivelist, the file watcher) are compiled against the Node you installed with, so keep the same version for install and run, and reinstall after switching. - Install all the dependency folders, not just the root:
npm installat the root,npm installintheia-extension/, andyarn installintheia-app/(browser) ortheia-electron-app/(desktop). A missing one shows up as unresolved@theia/...imports or a missingtheiacommand. - A native-module compile error on Windows usually means the Visual Studio C++ build tools are not installed or not on the shell's environment.
npm start prints an error that the address is in use¶
Another process holds the port (Theia defaults to 3000). Stop it, or choose another:
npm start -- --port 3001
npm start binds to 127.0.0.1, so it is only reachable from the same machine. Do not change that casually;
the IDE includes a terminal and file access. See Security and privacy.
The browser shows a blank page, or only a bare Welcome tab with failing requests¶
The backend started, but the struktJS webview did not load (its assets 404). Usual causes:
- No build yet, or a stale one. Run
npm run build, thennpm start. - The dev link is mis-wired. If you ran
npm run dev:link-ext(a developer shortcut that symlinks build output) and later installed or rebuilt, two copies of@theia/corecan end up being loaded, and the backend silently skips struktJS's own routes. Re-runnpm run dev:link-ext, and start withnpm start(which setsNODE_OPTIONS=--preserve-symlinks) rather than callingtheia startdirectly. For a normal run you can drop the link and rebuild:npm run build.
I changed code but the running app does not reflect it¶
Several build caches can serve old output without any error:
- Webview changes (
src/, plugins, samples, styles) only neednpm run build:webview(ornpm run dev:webviewfor a watch build) and a browser refresh. A full rebuild is not required. - Changes under
theia-extension/src/browser/are part of Theia's own bundle, which is also served as precompressed.gz/.brfiles. A baretheia buildordev:app-watchdoes not regenerate them, so the browser keeps getting the old copy. Runnpm run build:appto refresh them. theia-extension/TypeScript is compiled incrementally. A staletheia-extension/.tsbuildinfocan maketscskip a changed file with exit code 0. Delete it (rm -f theia-extension/.tsbuildinfo) and rebuild.- Backend changes (
theia-extension/src/node/) need a restart ofnpm start.
The dev workflow page has the full loop.
The desktop app starts but the terminal or file watching crashes¶
The native modules were built for the wrong ABI. The Electron build runs theia rebuild:electron to compile
them against Electron's Node; running a plain theia build in theia-electron-app skips that. Use
npm run build:electron.
The desktop app opens with no struktJS inside it¶
If theia build logged "Cannot resolve package @alexanderpann/struktjs-theia-extension", the extension was
not built or copied before the app bundle. Build in order with npm run build:electron (webview, extension,
sync, then the app) rather than building only the app shell.
npm run clean removed my data¶
npm run clean is for developers: besides build artifacts it deletes theia-app/data and ~/.struktjs,
which is where the IDE keeps its per-user state. Do not run it on a machine whose projects live there.
A customer or reduced build is missing plugins or samples¶
npm run build:webview re-stages the full plugin and sample set first and overwrites a customer profile you
staged. See Customer builds for the correct order.
Running programs¶
| Message or symptom | Cause and fix |
|---|---|
Not run: fix the reported errors first (see Problems). |
The model has an error. Open Problems, fix it. Warnings do not block. Run, Run with Debugger and Run with Coverage all check first |
Preview not run: fix the reported errors first (see Problems). |
Same cause, for Open Preview |
Not run: fix the generator error first (see Problems). |
The language runs a generator before executing and the generator reported an error. See Generators and previews |
Not run: this sample is illustrative only and isn't meant to run end to end. |
The sample says it is not runnable. Open another sample, or edit it into something runnable |
No python interpreter found on this host's PATH. |
Core programs run on a real Python on the machine hosting the IDE. Install Python 3 so python3 or python resolves in that machine's PATH, then restart the IDE. (In the browser IDE this is the server machine, not the one with the browser) |
Timed out (30s) |
A program computed for more than 30 seconds. Look for an endless loop, or reduce the work. Waiting on input() has a much longer limit |
Input cancelled — run stopped |
You dismissed an input() prompt. Run again and type an answer (an empty answer is fine) |
Preview not run: this program reads interactive input (input()), which Open Preview's output view can't provide. Use Run Program instead. |
Open Preview cannot answer input(). Use Run Program |
Not run: a debug session is already running in another tab. Stop it there first. |
Only one debug session can run at a time. Stop the first one (or close its tab) |
Not run: this language declares supportsHostExecution but no hostExecutorId. |
A language authoring mistake: the language says programs run on the host but names no interpreter. Language authors: set hostExecutorId. See Authoring languages |
| The program does not stop at a breakpoint | F5 (Run Program) ignores breakpoints. Use Run with Debugger (Shift+F9) |
| Generated output is empty or errors | Read the Messages panel: generator errors are reported per node |
Tests pane says No TestSuite found in the current document. |
The open document has no test suite. See Writing and running tests |
Tests pane says No test runner configured |
The language of the open model has no test-runner provider |
Opening projects and models¶
| Message or symptom | Cause and fix |
|---|---|
Failed to open project: <reason> |
The folder could not be read or is not a project. The reason (after the colon) is the operating system's or the loader's own message, for example a permission error. Check the folder exists and you can read it |
Failed to load model "<path>": <reason> |
One model in the project could not be parsed or its language could not be resolved. Open that model's file; the reason names the problem. The other models still load |
Failed to load language "<name>" (also in the browser console as [project] Failed to load language) |
A language the project imports could not be loaded. Install or enable that language plugin, or fix its .lang.js |
Language '<name>' not found |
The named language is not installed. Install the language plugin, or import it |
Failed to parse model file body: ... or Failed to parse model section: ... |
A model file is not valid source for its language's grammar (.model.py is parsed as Python). Fix the file text; the reason carries the parser's message |
| A model shows wrong content after editing its file by hand | The file must be valid source for the language's grammar. A model reloads when its file changes on disk; check the Messages panel for a parse error. Keep the # key: value header lines at the top, before the first blank line |
Couldn't open model.json / Couldn't open project.json |
The file could not be opened in the editor. It may be missing or unreadable |
Failed to write model.json: ... / Failed to write project.json: ... / Save failed: ... |
The file could not be written: a read-only folder, a full disk, or a permission problem |
Project created, but git init failed: ... |
The project folder was made but git init failed. Is git installed and on your PATH? Run git init in the folder yourself |
Trust prompts¶
The IDE does not show a trust dialog: since commit 11bc6e67 the default policy is "allow all", so project
languages, imported languages and folder plugins run as soon as they load. You will only meet a trust refusal in the
command-line tool, which stops with STRUKT-LANG-UNTRUSTED (exit code 1) on a project that has its own *.lang.js.
- In the IDE, open only content you would run as source.
- In the CLI, read the
*.lang.jsfiles, then add--trust-project-code.
Source control¶
| Message | Cause and fix |
|---|---|
Checkout failed, Commit failed, Merge failed |
Git refused the operation. The pane shows git's own explanation: uncommitted changes that would be overwritten, nothing staged, or a conflict. Fix the cause it names and retry. After a conflicted Pull use Abort merge in the pane to go back. See Resolving conflicts |
No commits yet. / No file changes. / No stashed changes. |
Not errors: the repository has no history, no changes or no stashes |
| Git operations fail on a project in a read-only or system folder | The backend refuses paths under credential and system folders (for example ~/.ssh, /etc). Keep projects in your normal workspace |
Extensions and the backend¶
| Message | Cause and fix |
|---|---|
Extension "<id>" is not on this deployment's extension allowlist. By default only these publishers are allowed: ... |
Installation is default-deny. Add the id (or publisher.*) to ~/.struktjs/extension-allowlist.json; a non-empty file replaces the built-in list, so include publishers you still want. STRUKTJS_EXTENSION_ALLOW_ALL=1 disables the check (not recommended). See Security and privacy |
Host not allowed (HTTP 403 from /api/struktjs/...) |
You reached the IDE through a hostname that is not loopback. Open http://localhost:3000 or http://127.0.0.1:3000, or, if you deliberately serve it elsewhere behind your own protection, list the hostname in the STRUKTJS_ALLOWED_HOSTS environment variable (comma-separated) |
Cross-origin request denied |
A page on another origin tried to call the IDE's API, or you proxied it through a different host name than the one in the address bar. Use the same host name in the browser as the server sees |
Access to <something> is not allowed |
A file request pointed into a protected folder (credentials, system folders) or outside STRUKTJS_ALLOWED_ROOTS if you set it |
Editing¶
- A key does nothing. Cell-level keys need the editor focused (click a cell, or press Escape and then click back into the editor). A browser or OS shortcut may be claiming the combination; use the menu entry instead. See Editor basics.
- The editor is read-only. The status bar shows "Read-Only Mode". Run Toggle Read-Only Mode (View > Toggle, or the Command Palette) to switch it off.
- Enter shakes the cell and does nothing. You are in a language whose file format has room for exactly one top-level thing; there is nothing to insert.
- I deleted something by mistake. Mod+Z undoes structurally; Alt+Backspace restores the last deleted nodes.
- Paste does nothing, or
Clipboard appears empty or unreadable./Clipboard access failed: .... The browser blocked clipboard access or the clipboard holds nothing the editor can read. Allow clipboard access for the page (it needshttps://orlocalhost), or paste as text in a cell. - Manual checks: n issue(s) found — see Problems. Not a failure: it is the result of Run Manual Checks (and its Model and Project variants).
Open a model first.The command needs an open model. Open one from the Explorer.
Collaboration¶
If Share Model Session or Join Model Session cannot connect, the relay is unreachable. Check the relay URL preference (Relay server URL) and that a relay is running; see Running a collaboration relay and Live collaboration.
- "Could not connect to the collaboration server (...)". The message ends with the real cause reported by the browser (refused, unreachable, rejected). A relay that does not answer within 15 seconds is reported as not responding instead of hanging. Nothing is left half-started: just fix the URL and try again.
- "Insecure relay server URL". Only
https:///wss://relays, orhttp://to this machine, are accepted by default. For a relay on your own network (a192.168.x.x/10.x.x.x/172.16-31.x.xaddress, a link-local address or a*.localname) turn on Allow plain-HTTP relay on a local network in Settings > Collaboration. A page loaded overhttps://cannot reach a plain-http://relay at all (the browser blocks it); use anhttps://relay or open the IDE overhttp://. - I typed just
host:8100. That is accepted:http://is added for this machine and local-network hosts,https://for everything else. - The relay requires an OAuth login. struktJS only drives a relay's username-only login; the error says so when the relay offers nothing else.
- My session did not come back after a reload. The session is only resumed if the page reloads within about 20 seconds and the relay is reachable and still holds your seat. Otherwise you are told it could not be resumed and can start or join again; it is never shown as connected when it is not.
- Copy buttons say the clipboard is unavailable. The browser only exposes the clipboard on
https://orlocalhostpages. Copy the room code or link by hand from the message instead.
The command-line tool¶
Symptoms of npm run strukts -- ... or node dist/strukts-cli/strukts.mjs .... Exit codes are in
CLI exit codes and JSON.
| Message or symptom | Cause and fix |
|---|---|
unknown project "x" (try \strukts list`)(exit 2) |--projecttakes a shipped project's folder name. Runstrukts listand copy anid. For your own folder use--project-dir` |
|
check requires --project <id>, --all, or --project-dir <dir> (exit 2) |
You gave no target. Add one of the three |
unknown verb "x" — expected list, info, check, generate, test or package (exit 2) |
A typo in the verb. strukts help prints usage (it omits package, which does exist) |
--fail-on must be "error" or "warning" / --timeout must be a positive number of milliseconds / only --format json is supported (exit 2) |
A flag has a bad value |
STRUKT-LANG-UNTRUSTED ... pass --trust-project-code to load them (exit 1) |
The project has its own *.lang.js, which is JavaScript. Review it, then add --trust-project-code |
STRUKT-LOAD ... loading <dir> failed: ENOENT ... (exit 1) |
The --project-dir folder does not exist or is unreadable. Relative paths resolve from the directory you ran the command in |
STRUKT-LANG-UNRESOLVED / STRUKT-LANG-LOAD (exit 1) |
A model imports a language the CLI cannot find or load. The CLI knows the built-in plugins and the project's own root-level *.lang.js, not languages installed into ~/.struktjs/languages/ |
STRUKT-PARSE diagnostic |
A model file does not parse, or parsed with a syntax error. Fix the file; check still reports the other roots |
generate exits 4 with "status": "skipped" |
You named one project that has nothing to generate: its model.json says "generatable": false, or it is a plan language (add --plans). Inside --all such projects are skipped without failing |
test reports needs a DOM (jsdom), which this build does not have — run from a source checkout |
A test replays a keypress or intention and needs jsdom, which the standalone bundle does not include. Run npm install jsdom where you run it, run from a checkout, or pass --skip-unsupported |
cancelled after <n> ms (--timeout) (exit 5) |
A test run exceeded --timeout. Raise it, or fix the endless loop. The timeout is cooperative: a runner that never yields cannot be interrupted |
no test language provider is registered (exit 1) |
No test language loaded at all. Run strukts info and check the language count and grammars |
strukts info shows a grammar failed: ... or typeshedModules: 0 |
The bundle's wasm/ or typeshed/ folder did not travel with strukts.mjs. Copy the whole dist/strukts-cli/ folder |
[strukts] launcher failure: ... a grammar named "python" is already registered |
Seen once in the dev launcher (npm run strukts) while other tooling was using the repository at the same time; running it again succeeded. If it repeats, use the standalone bundle, and report it |
check --all exits 3 on a fresh checkout |
Expected: several shipped samples are deliberately illustrative and contain findings |
The first npm run strukts call is slow (several seconds) |
It starts a private Vite module runner and compiles language plugins. The standalone bundle starts much faster |
| Output in a build log is not valid JSON | Progress goes to standard error. Capture standard output alone (> out.json); do not merge the streams (2>&1) |
The AI chat¶
See AI features for setup.
| Message or symptom | Cause and fix |
|---|---|
Couldn't find a ready language model for agent struktJS |
No model is mapped to the agent. Make sure Ollama is running with a model pulled, then reload the window; or list the model name in the preference ai-features.ollama.ollamaModels |
| Chat has no models although Ollama is running | Auto-discovery asks Ollama with a very short timeout at startup. If Ollama was starting at that moment, reload the window. If you moved Ollama, set ai-features.ollama.ollamaHost. If ai-features.ollama.ollamaModels is non-empty, auto-discovery is off |
| Models you pulled later are missing | Discovery runs at startup; reload the window |
| The assistant answers with code but nothing changes | Small models sometimes paste code instead of calling a tool. Ask it to apply the change, or use /fix. Check that you answered the confirmation prompt: an unanswered prompt means the edit has not happened |
| An AI edit disappeared | The edit was rolled back automatically because it introduced a new check problem. Ask again with more detail, or make the change yourself |
| A tool reports it timed out, or says there is no active document | The editor did not answer in a few seconds, or no model is open. Open a model and try again |
| A tool is blocked or asks every time | Per-tool confirmation is set by ai-features.chat.toolConfirmation; see AI features |
| Web search fails | The search request goes to DuckDuckGo from the IDE backend; the backend machine needs internet access |
| Reasoning or answers are poor | The model is too small for tool calling. Try a larger Qwen, Llama or Mistral family model |
| No AI Chat panel | Use View > Tool Windows > AI Chat. The AI features exist only in the Theia IDE, not in the standalone npm run dev preview |
Still stuck?¶
Use Help > Report Issue… and include the build line from the status bar (name, version, commit) and the contents of the Messages panel. The FAQ covers common questions. For a command-line problem, also paste the full JSON output and the exit code.