Skip to content

Troubleshooting

nodemode-ai edited this page Dec 6, 2026 · 1 revision

Troubleshooting

What to check when FormChem does not start, an agent cannot reach it, or a build stops. The person's version of this page is the Troubleshooting section of docs/MANUAL.md.

First checks

Command What it tells you
./formchem doctor Node (20.19+ or 22.12+), npm, Python 3.12+, the backend venv and node_modules, whether FastAPI, uvicorn, RDKit and Indigo import, Rust for desktop builds, and whether ports 5220 and 8220 (or FORMCHEM_PORT) are free. Exit 1 on a FAIL line.
./formchem desktop check the Rust and Tauri toolchain: one rustup toolchain, rustc and cargo from the same install, the Xcode tools and Apple's strip on macOS, WebKitGTK 4.1 on Linux, the Tauri CLI against the tauri crate, and on macOS the engine folder (no symbolic links, no .framework)
curl http://127.0.0.1:8220/api/health whether the engine answers, and its version
Help > System Info the window's versions and folders

The engine's log is [data folder]/Logs/formchem-engine.log (~/formchem unless FORMCHEM_DATA_DIR says otherwise), rotated at 1 MB with three kept.

The engine does not start

What you see Why, and what to do
"could not start: its engine program is missing from the install" The frozen engine is not where the shell looks (Contents/Resources/engine on macOS, the formchem-engine sidecar elsewhere). Install the app again; for a local build, ./formchem freeze then build again.
"another copy of its engine holds its data folder" (engine exit code 2) engine.lock in the data folder belongs to a running engine: the app, ./formchem or ./formchem serve on the same folder. Stop the other, or run one of them with its own FORMCHEM_DATA_DIR. An engine whose app has gone is stopped by the next start.
"its engine stopped with code ... before the window could open" Read the last lines in the dialog and the log. Exit 5 means the data folder could not be used (permissions, a full disk).
"it waited 90 seconds for its engine to say which address it serves on" The engine is still loading or hung. On a slow first start under macOS this was the one-file engine (fixed in 0.7.0 by the engine folder); check the log for the step it reached.
"FormChem could not open its window" The webview failed. On Linux, check that WebKitGTK 4.1 is installed; on Windows, that WebView2 is.

The window

  • A second browser window gets no access. The engine hands its window key to one window per run. Stop the engine and start it again, or use the window you have.
  • Port 5220 or 8220 is in use. ./formchem doctor names it. The engine takes FORMCHEM_PORT; the Vite port 5220 is fixed (strictPort).
  • The 3D View is empty. 3Dmol.js needs WebGL: turn on hardware acceleration in the browser, or install Mesa drivers on Linux. The 0.10.0 to 0.12.0 checks ran on software WebGL.
  • Menus are missing on macOS. With Preferences > Interface > Menus in the window off, the menus are in the system menu bar.
  • A database opens read-only. Another engine holds [file].lock beside it. A lock whose process has gone on the same computer is taken over.

Agents

  • "No FormChem window is open": tools that need the window (render pictures, run commands, extensions, questions to you) wait for one. Start FormChem, then retry.
  • 401 from /mcp: the HTTP endpoint needs Authorization: Bearer <token>. ./formchem agents install writes the token into the configs; ./formchem agents token prints it. An agent set up before 0.8.0 needs the install once more.
  • Every change is refused: the person chose Deny, or turned off Preferences > Plugins > Outside Agents. A saved permission changed outside the window turns itself off, and Preferences says so.
  • The tools list is out of date: ./formchem agents sync regenerates the skills' tool reference; sync --check fails on drift.

Extensions

The Extensions panel shows a refused extension with its reason: a manifest that is not a formai-package, another product or API, a minimum_app newer than FormChem, an unknown permission, or an entry.ui outside the package. Extensions > Reload Extensions reads FormPortal's lists again. The full list is in docs/EXTENSIONS.md.

Building the desktop app

./build_app (build_app.bat on Windows) stops with the reason and keeps everything it printed in build_app.log.

Stop Fix
the Xcode Command Line Tools are missing xcode-select --install, then run it again
WebKitGTK 4.1 is missing (Linux) let the script install the packages with apt-get (--yes does it without asking), or install them yourself; the message lists them for Debian, Ubuntu and Fedora
rustc and cargo come from different Rust installs, or rustc is from Homebrew brew uninstall rust, then Rust from https://rustup.rs
rustc builds for x86_64 on an Apple silicon Mac rustup default stable-aarch64-apple-darwin
the Tauri CLI and the tauri crate differ pin @tauri-apps/cli in frontend/package.json to the crate's major.minor, then ./build_app --reinstall
a @tauri-apps/plugin-* package and its crate differ the same, for that plugin
THIRD-PARTY-NOTICES.txt is missing python3 setup/notices.py after ./formchem install
PyInstaller stopped it clears its cache and tries once more; a second failure shows the error above it
the frozen engine is missing modules its --selfcheck output names them
E0463 (a crate it had just built) it runs cargo clean and builds again
the .dmg step failed on macOS the .app is usable as it is; drag it to Applications

--clean removes earlier build output first, --reinstall reinstalls both package sets, and ./formchem clean --all also removes the venv and node_modules. See Desktop.

Reporting a problem

Help > Report an Issue... opens the issue page. Include the FormChem version (Help > About FormChem), the system, the last lines of the engine log, and for a build the end of build_app.log. Security problems go privately, as SECURITY.md describes.

Clone this wiki locally