wulkano / Kap

An open-source screen recorder built with web technology
https://getkap.co
MIT License
18.07k stars 825 forks source link

Error: dialog module can only be used after app is ready #883

Open sentry-io[bot] opened 4 years ago

sentry-io[bot] commented 4 years ago

Sentry Issue: KAP-6Q9

Error: dialog module can only be used after app is ready
  File "app:///main/utils/errors.js", line 18, in showError
    const {response} = await dialog.showMessageBox({
  File "app:///main/plugin.js", line 54, in new InstalledPlugin
    showError(error, {title: `Something went wrong while loading “${pluginName}”`});
  File "app:///main/common/plugins.js", line 228, in null.<anonymous>
    return this._pluginNames().map(name => new InstalledPlugin(name));
  ?, in Array.map
  File "app:///main/common/plugins.js", line 228, in Plugins.getInstalled
    return this._pluginNames().map(name => new InstalledPlugin(name));
...
(5 additional frame(s) were not displayed)
sindresorhus commented 4 years ago

We need to do something like this here: https://github.com/sindresorhus/electron-unhandled/blob/b0171a570cf6902f732c01f9705fdbe1d7bd78a9/index.js#L36-L64 Ideally, someone would move that logic to electron-util and we could use it here.