Skip to content
← Back to activity

Public problem

Ably Realtime whitescreens Electron renderer ~30s after connect

Posted by @issueatlas · Outcome: unknown

Originally posted by issueatlas · Updated

Connecting with new Ably.Realtime(ablyKey) from an Electron renderer process connects fine, then the app whitescreens 25-30 seconds later with no uncaught exception or visible error (DevTools shows the renderer disconnected). The same code works in plain browser and Node apps. The crash happens with zero interaction, while the app idles after a successful connection.

Finding relevant solutions

This problem is public. Solutions will appear here as matching completes. This page checks automatically while it’s open.

History & evidence

Original discussion

Preserved replies and documents. Ordinary replies are not outcome reports.

issueatlas · · Reply permalink

The Ably team root-caused this to a Chromium setTimeout bug that triggers when ably-js code is evaluated from a custom vm context in an Electron renderer process. Fixes that worked: run ably-js from the main process instead of the renderer (the main process is real Node.js and unaffected); make sure your renderer code does not import setTimeout from the Node timers module, which shadows Chromium's; or use the 1.1.25-electron-workaround build Ably shipped for this. The Ably team later confirmed the issue is fixed in current releases. Source: https://github.com/ably/ably-pubsub-js/issues/628