|
| 1 | +--- |
| 2 | +title: "Electron SDK troubleshooting" |
| 3 | +description: "Troubleshoot missing Electron RUM data, process bridging, Session Replay, and stack symbolication" |
| 4 | +keywords: ["RUM", "Electron SDK", "troubleshooting", "Session Replay", "bridge", "source maps"] |
| 5 | +--- |
| 6 | + |
| 7 | +Use the symptom you see in the application or Flashduty console to find the relevant checks. |
| 8 | + |
| 9 | +<AccordionGroup> |
| 10 | +<Accordion title="Why is there no data in the console?"> |
| 11 | +Check the following in order: |
| 12 | + |
| 13 | +1. Confirm that main-process `init()` returns `true`, and check the main-process console for configuration errors. |
| 14 | +2. Confirm that `applicationId`, `clientToken`, and `service` are non-empty strings. |
| 15 | +3. Confirm that the application can reach `https://browser.flashcat.cloud/api/v2/rum` or your self-hosted endpoint. |
| 16 | +4. Wait for one upload cycle. Regular RUM events upload every 10 seconds by default. |
| 17 | +5. Filter with `source:electron OR container.source:electron` in the Explorer. |
| 18 | + |
| 19 | +During integration testing, set `batchSize: 'SMALL'` and `uploadFrequency: 'FREQUENT'` to shorten the wait. |
| 20 | +</Accordion> |
| 21 | + |
| 22 | +<Accordion title="Why do I only see main-process data?"> |
| 23 | +If `source: electron` events appear but renderer views, actions, and resources do not, check that: |
| 24 | + |
| 25 | +1. The renderer installs and initializes `@flashcatcloud/browser-rum`. |
| 26 | +2. The main process finishes `init()` before creating a `BrowserWindow`. |
| 27 | +3. For an unbundled main process, `instrument` is imported before `electron`. |
| 28 | +4. For a bundled main process, the matching Vite, Webpack, or esbuild plugin is configured. |
| 29 | + |
| 30 | +After successful renderer integration, renderer events contain `container.source: electron`. |
| 31 | +</Accordion> |
| 32 | + |
| 33 | +<Accordion title="Why is container.source missing from renderer events?"> |
| 34 | +A missing `container.source` means the Browser SDK did not use the Electron bridge and uploaded as a standalone web page. |
| 35 | + |
| 36 | +Common causes include: |
| 37 | + |
| 38 | +- The main process did not start instrumentation. |
| 39 | +- The bundle did not preserve the Electron SDK or its preload. |
| 40 | +- SDK initialization failed. |
| 41 | + |
| 42 | +First, verify the build setup under [Integration steps](/en/rum/sdk/electron/sdk-integration#integration-steps), then restart the application. |
| 43 | + |
| 44 | +The current window does not need `allowedWebViewHosts`. Use that option only for third-party pages in a `<webview>` or `BrowserView`. |
| 45 | +</Accordion> |
| 46 | + |
| 47 | +<Accordion title="Why is Session Replay missing?"> |
| 48 | +Check each requirement: |
| 49 | + |
| 50 | +1. `@flashcatcloud/browser-rum` is version 0.0.7 or later. |
| 51 | +2. The renderer sets both `sessionReplaySampleRate` and `sessionReplayDirectUpload: true`. |
| 52 | +3. `sessionReplaySampleRate` is greater than 0 and the current session is sampled. |
| 53 | +4. The page CSP allows `worker-src blob:`. |
| 54 | +5. The CSP `connect-src` contains the actual replay upload endpoint. |
| 55 | +6. A self-hosted deployment sets `proxy` in the renderer. |
| 56 | + |
| 57 | +Open the renderer DevTools Console and Network panels. A blocked Worker produces a CSP error in Console. An invalid upload endpoint produces failed replay requests in Network. |
| 58 | +</Accordion> |
| 59 | + |
| 60 | +<Accordion title="Why is part of a replay missing or visually corrupted?"> |
| 61 | +The renderer uploads replay segments directly and does not use the main-process disk buffer. |
| 62 | + |
| 63 | +When the device is truly offline, the Browser SDK places segments in an in-memory queue and retries after connectivity returns. If the device appears online but a request fails because of DNS, a proxy, gateway, security software, or an intake outage, the failed segment is not queued. Later segments may not contain the full snapshot needed to reconstruct the page, causing a gap or visual corruption. |
| 64 | + |
| 65 | +Check that: |
| 66 | + |
| 67 | +- Firewalls and endpoint security software allow the upload host. |
| 68 | +- DNS and proxy settings can reach the endpoint reliably. |
| 69 | +- The page CSP allows the actual replay endpoint. |
| 70 | +- Your self-hosted forwarding service remains available. |
| 71 | + |
| 72 | +A segment that was already dropped cannot be recovered from main-process storage. |
| 73 | +</Accordion> |
| 74 | + |
| 75 | +<Accordion title="Why does a self-hosted deployment receive regular events but no replay?"> |
| 76 | +Regular RUM events and Session Replay use separate upload paths: |
| 77 | + |
| 78 | +- Regular events are bridged to the main process and use main-process `site` or `proxy`. |
| 79 | +- Replay segments upload directly from the renderer and use the renderer Browser SDK `proxy`. |
| 80 | + |
| 81 | +Configuring only the main process does not change the replay endpoint. Set `proxy` in `flashcatRum.init()` and add it to the page CSP `connect-src` directive. |
| 82 | + |
| 83 | +See [Custom upload endpoints](/en/rum/sdk/electron/advanced-config#custom-upload-endpoints) for a complete example. |
| 84 | +</Accordion> |
| 85 | + |
| 86 | +<Accordion title="Why did a source map upload succeed without restoring the stack?"> |
| 87 | +Flashduty matches source maps using `service`, `version`, and the minified file path. Check that: |
| 88 | + |
| 89 | +1. `--service` matches the process that produced the error. |
| 90 | +2. `--release-version` matches that process's `version`. |
| 91 | +3. The renderer also sets `version`; the main-process version does not propagate to renderer events. |
| 92 | +4. `--minified-path-prefix` matches the directory in the stack frame shown in error details. |
| 93 | +5. Main-process and renderer artifacts were uploaded separately. |
| 94 | + |
| 95 | +For `app:///dist/renderer/index.js`, use `/dist/renderer` as the prefix. Do not include `app:///`. |
| 96 | + |
| 97 | +See [Electron error symbolication](/en/rum/sdk/electron/error-symbolication#symbolicate-javascript-errors) for the complete workflow. |
| 98 | +</Accordion> |
| 99 | + |
| 100 | +<Accordion title="Why do native crash stacks contain only addresses?"> |
| 101 | +Native minidumps do not use JavaScript source maps. Upload Breakpad symbols that match the exact application release, operating system, and CPU architecture. |
| 102 | + |
| 103 | +Start with the official symbol bundle for your Electron version. If the application includes native modules or `.node` plugins, generate and upload `.sym` files for those modules as well. |
| 104 | + |
| 105 | +After upload, historical crashes can also be symbolicated when viewed. See [Symbolicate native crashes](/en/rum/sdk/electron/error-symbolication#symbolicate-native-crashes). |
| 106 | +</Accordion> |
| 107 | +</AccordionGroup> |
| 108 | + |
| 109 | +## If the issue continues |
| 110 | + |
| 111 | +When you contact support, include: |
| 112 | + |
| 113 | +- Electron, `@flashcatcloud/electron-sdk`, and `@flashcatcloud/browser-rum` versions |
| 114 | +- Bundler and module format |
| 115 | +- Main-process initialization options with the Client Token removed |
| 116 | +- Main-process and renderer console errors |
| 117 | +- Failed request URL, status code, and error type |
| 118 | + |
| 119 | +Do not send Client Tokens, server-side keys, or data that contains user-sensitive information. |
0 commit comments