- Ably FAQs
- Realtime API and client libraries
- Common issues
-
Account billing and packages
-
General
-
Realtime API and client libraries
-
Troubleshooting
-
Channels
-
REST API and client libraries
-
Ably error codes
-
Account and app setup and configuration
-
Ably architecture, transports, and security
-
Performance and Redundancy
-
Push Notifications
-
Reactor Queues, Events and Firehose
-
Migrating to Ably from an existing service
-
API Streamer
-
Connections
When using ably-js in Electron from a renderer process, the renderer process crashes after ~30s
The cause of the issue appears to be a bug in Electron when chromium's setTimeout function is called by an electron renderer (BrowserWindow) process from a script evaluated in a custom vm context (which ably-js does).
One solution is to use Ably from the main process (or a worker thread spawned off from it), instead of from a renderer process. Since the main process is a normal node.js process, it does not suffer from the same issue.
If you must run Ably from a renderer process, as a workaround we have a build of ably-js that avoids using a custom vm context. If you would like to use this, please contact us to ask how. This is so we can keep track of who is using the workaround, and let them know when we have a more permanent solution. We are in the process of evaluating more permanent solutions.