Linux / Debian 12. / Electron Window Errors: TypeError when accessing window properties
Closed this issue · 0 comments
jadmadi commented
Description:
I'm encountering errors related to accessing window properties in the Strut application, which appears to be built with Electron. Specifically, the errors occur when attempting to read properties of a BrowserWindow or WebContents instance, suggesting potential null reference issues.
Steps to Reproduce:
Launch the Strut application.
The errors are logged to the console immediately after the application starts.
Error Logs:
21:49:44.380 › [main]: Window opened at {x: undefined, y: undefined, width: 1200, height: 800}
21:49:44.430 › [main]: App ready
Error occurred in handler for 'window.id': TypeError: Cannot read properties of null (reading 'getOwnerBrowserWindow')
at Function.fromWebContents (node:electron/js2c/browser_init:2:11123)
at ks (/tmp/.mount_StrutwCFjcY/resources/app.asar/main.js:565:34608)
at /tmp/.mount_StrutwCFjcY/resources/app.asar/main.js:565:35644
at WebContents.<anonymous> (node:electron/js2c/browser_init:2:88656)
at WebContents.emit (node:events:514:28)
at WebContents.emit (node:domain:489:12)
at t.emit (/tmp/.mount_StrutwCFjcY/resources/app.asar/main.js:426:4333)
[preload]: User app subscribed to found-in-page:undefined
Error occurred in handler for 'window.getType': TypeError: Cannot read properties of null (reading 'getOwnerBrowserWindow')
at Function.fromWebContents (node:electron/js2c/browser_init:2:11123)
at ks (/tmp/.mount_StrutwCFjcY/resources/app.asar/main.js:565:34608)
at /tmp/.mount_StrutwCFjcY/resources/app.asar/main.js:565:35118
at Array.find (<anonymous>)
at t (/tmp/.mount_StrutwCFjcY/resources/app.asar/main.js:565:35100)
at /tmp/.mount_StrutwCFjcY/resources/app.asar/main.js:565:35443
at WebContents.<anonymous> (node:electron/js2c/browser_init:2:88656)
at WebContents.emit (node:events:514:28)
at WebContents.emit (node:domain:489:12)
at t.emit (/tmp/.mount_StrutwCFjcY/resources/app.asar/main.js:426:4333)```
The errors seem to be related to accessing properties of BrowserWindow or WebContents instances when they are null or not properly initialized