When trying to start riot-desktop with Electron 5.x I get this:
App threw an error during load
TypeError: protocol.registerStandardSchemes is not a function
at Object.<anonymous> (/usr/lib/riot/electron_app/src/electron-main.js:209:10)
at Module._compile (internal/modules/cjs/loader.js:808:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:820:10)
at Module.load (internal/modules/cjs/loader.js:677:32)
at tryModuleLoad (internal/modules/cjs/loader.js:609:12)
at Function.Module._load (internal/modules/cjs/loader.js:601:3)
at loadApplicationPackage (/usr/lib/electron/resources/default_app.asar/main.js:105:12)
at Object.<anonymous> (/usr/lib/electron/resources/default_app.asar/main.js:153:5)
at Module._compile (internal/modules/cjs/loader.js:808:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:820:10)
Unhandled exception TypeError: protocol.registerStandardSchemes is not a function
at Object.<anonymous> (/usr/lib/riot/electron_app/src/electron-main.js:209:10)
at Module._compile (internal/modules/cjs/loader.js:808:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:820:10)
at Module.load (internal/modules/cjs/loader.js:677:32)
at tryModuleLoad (internal/modules/cjs/loader.js:609:12)
at Function.Module._load (internal/modules/cjs/loader.js:601:3)
at loadApplicationPackage (/usr/lib/electron/resources/default_app.asar/main.js:105:12)
at Object.<anonymous> (/usr/lib/electron/resources/default_app.asar/main.js:153:5)
at Module._compile (internal/modules/cjs/loader.js:808:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:820:10)
This is broadly speaking "expected": it's related to a breaking change in Electron 5, so we'll need to change this bit when upgrading.
@uhoreg Thanks, this patch works. :)
I'am having the same issue on macOS Mojave "App threw an error during load
TypeError: protocol.registerStandardSchemes is not a function"
I applied @uhoreg 's patch and running the desktop with yarn 'yarn electron' works but when a build the app install and start it ....the main window does not open.....Is there a way to debug this...? Because the main window did not open I do not have access to the dev tools...
I got around this by using registerSchemesAsPrivileged instead of registerStandardSchemes.
protocol.registerSchemesAsPrivileged([{
scheme: 'app',
privileges: {
standard: true,
secure: true,
supportFetchAPI: true
}
}]);
Most helpful comment
I got around this by using registerSchemesAsPrivileged instead of registerStandardSchemes.
protocol.registerSchemesAsPrivileged([{ scheme: 'app', privileges: { standard: true, secure: true, supportFetchAPI: true } }]);