Skip to content
This repository has been archived by the owner on Aug 23, 2020. It is now read-only.

[Bug] Cannot read property 'webContents' of null #126

Open
yafp opened this issue May 11, 2020 · 0 comments
Open

[Bug] Cannot read property 'webContents' of null #126

yafp opened this issue May 11, 2020 · 0 comments
Assignees
Labels
bug Something isn't working
Milestone

Comments

@yafp
Copy link
Owner

yafp commented May 11, 2020

via sentry: MEDIA-DUPES-JB - https://sentry.io/organizations/yafp/issues/1581597457/

TypeError PowerMonitor.(main)
fatalCannot read property 'webContents' of null

...

app:///main.js in PowerMonitor. at line 896:20

    */
    function powerMonitorInit () {
        const { powerMonitor } = require('electron') // This module cannot be used until the ready event of the app module is emitted.
        // suspend
        powerMonitor.on('suspend', () => {
            doLog('warn', 'powerMonitorInit ::: The system is going to sleep (event: suspend)')
            mainWindow.webContents.send('todoListTryToSave') // try to save the todolist - see #79
            powerMonitorNotify('warning', 'The system is going to sleep (event: suspend)', 0)
        })
        // resume
        powerMonitor.on('resume', () => {
            doLog('info', 'powerMonitorInit ::: The system is resuming (event: resume)')
            mainWindow.webContents.send('todoListCheck') // search if there are urls to restore

@yafp yafp added the bug Something isn't working label May 11, 2020
@yafp yafp self-assigned this May 11, 2020
@yafp yafp added this to the 0.10.0 milestone May 11, 2020
@yafp yafp modified the milestones: 0.10.0, later, next Jun 7, 2020
@yafp yafp modified the milestones: 0.10.2, later Jul 30, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant