If a window in io.Connect Desktop stops updating or stops responding to input, the logs will usually contain an “unresponsive” message. io.Connect Desktop writes log lines in this form when an app stops responding, and again when it recovers:
application name: <app-name> is unresponsive...
application name: <app-name> is responsive again...
This message is based on Electron’s unresponsive event, which fires when a renderer process hangs for an excessive period of time. The detection happens at the Electron/renderer level, it is not generated by a specific io.Connect service such as the Gateway.
Getting a JavaScript call stack for an unresponsive app
io.Connect Desktop enables JavaScript call stacks for unresponsive renderers by default for all apps. This capability comes from Electron (introduced in Electron 34), thus needs io.Connect Desktop 9.9 and above.
When Electron is able to provide it, the call stack is logged right after the unresponsive message:
application name: <app-name> call stack:
at ...
at ...
A JavaScript call stack can help identify blocking JavaScript in the app. Note, however, that Electron may be unable to collect one in every case (see below).
“Website owner has not opted in for JS call stacks in crash reports”
Sometimes, instead of a call stack, you will see:
application name: <app-name> call stack: Website owner has not opted in for JS call stacks in crash reports.
Electron’s opt-in for this data is controlled by a response header:
'Document-Policy': 'include-js-call-stacks-in-crash-reports'
io.Connect Desktop applies this opt-in to all apps by default.
Gateway memory-diagnostics log messages
The Gateway log (gw.log) may contain periodic heap-statistics lines and a warning similar to:
used heap <N> bytes exceeds memory limit 0 bytes
The io.Connect Gateway can be configured to take heap memory snapshots when its heap exceeds a predefined limit; those Memory Diagnostics settings are documented in the system configuration. You can use these for additional diagnostics and analysis.
Getting more information from an app
If the call stack is not enough to determine why an app hangs, you can enable additional logging for the specific app. Since io.Connect Desktop 9.9, an app definition can capture browser-console output, network-request errors and unhandled errors through the app definition’s details.logging settings (this is disabled by default). See the Logging documentation for details.