Mastermindzh / tidal-hifi

The web version of Tidal running in electron with hifi support thanks to widevine.
Other
1.01k stars 56 forks source link

MacOS Settings pane doesn't load with error #344

Closed agnosticlines closed 7 months ago

agnosticlines commented 7 months ago
Uncaught Exception:
TypeError: Cannot read properties of undefined (reading 'webContents')
at showSettingsWindow (/Applications/tidal-hifi.app/Contents/Resources/app.asar/ts-dist/scripts/settings.js:101:20)
at IpcMainImpl.<anonymous> (/Applications/tidal-hifi.app/Contents/Resources/app.asar/ts-dist/main.js:194:39)
at IpcMainImpl.emit (node:events:517:28)
at WebContents.<anonymous> (node:electron/js2c/browser_init:2:87575)
at WebContents.emit (node:events:517:28)

I get this when I hit control+0 on the main page, doesn't seem to be another way to get to the settings to enable plugins

Can be fixed by adding this code:

export const showSettingsWindow = function (tab = "general") {
  if (!settingsWindow) {
    console.log("Settings window is not initialized. Attempting to create it.");
    createSettingsWindow();
  }

to settings.ts showSettingsWindow