Closed SpencerSharkey closed 2 years ago
Checking against this constant is not the best idea, as it'd disable encryption everywhere including where it'd be supported. A more transparent way of dealing with it would be to append a mock safeStorage to the Electron export proxy in the main thread (where we inject the BrowserWindow) if safeStorage isn't present:
electron.safeStorage || { isEncryptionAvailable: () => false, encryptString: () => { throw new Error('Unavailable') }, decryptString: () => { throw new Error('Unavailable') } }
I implemented my suggested fix in 19f06b4501a7522baf0f03320c9fbe6ab888116e, let me know if it does the trick
I implemented my suggested fix in 19f06b4, let me know if it does the trick
confirmed this fixed the problem
discord added a null check around the safeStorage usage, so this isn’t relevant anymore
Discord backported Electron's safeStorage API into their own build, which isn't availble for people using vanilla Electron 13 on linux.
This change gets the app launching again by overriding the event listener.
Original crash bug:
Fixes #618 probably