Skip to content

Cannot read property 'getType' of null at getWindowFromWebContents #150

@ym13349140

Description

@ym13349140

Hi! @sindresorhus I'm using electron-dl@3.2.1 in my project.
I have a problem. When my computer is offline, the downloadItem always triggers onStared event after a few seconds, during this time, the downloadItem is not available yet, if I close the download window before onStared is triggered, then I will get an error Cannot read property 'getType' of null at getWindowFromWebContents. even though the download window is destroyed, the download event doesn't stopped at all, it's still running in the main process, then caused this error.
So, how can I solve this problem? Is there any ways to force the download event stop when I close my window before onStarted triggered?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions