Debugging
Common issues and fixes.
Connection problems
- Ensure Dot X is running before starting your plugin (the plugin server starts automatically with the app)
- The plugin server listens on
http://127.0.0.1:3001by default; override withDOTX_PLUGIN_PORTenv var - The SDK retries up to 5 times with a 2-second delay before giving up — watch the output for retry messages
- Check that
waitForConnection()resolves (rarely needed;onLoad()already guarantees a live connection) - Review app logs and
plugin.loginside your plugin folder
Timeouts
- API calls fail after 30 seconds if the host doesn't respond
- Increase
apiTimeoutin theConnectionConfigpassed torunPlugin()if needed:tsrunPlugin(MyPlugin, { apiTimeout: 60000 });
Manifest validation errors
- The runtime validates all required fields on startup; check the app logs or plugin output for a list of errors
versionmust be valid semver (e.g.1.0.0)dotxVersionmust be a semver range (e.g.>=2.0.0)
Clean restarts
- Implement
onUnload()to stop timers and close network handles - Keep
onUnloadidempotent so rapid restarts don't leave stale state