Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fails to start with Electron 5.x #9562

Closed
ArchangeGabriel opened this issue Apr 25, 2019 · 5 comments · Fixed by #10392
Closed

Fails to start with Electron 5.x #9562

ArchangeGabriel opened this issue Apr 25, 2019 · 5 comments · Fixed by #10392
Labels
T-Task Tasks for the team like planning

Comments

@ArchangeGabriel
Copy link

Description

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)

Steps to reproduce

  • Build and launch (or just launch if using external electron) riot-desktop with electron 5.x in a terminal.

Version information

  • Platform: desktop
  • OS: Arch Linux
  • Version: 1.0.8
@jryans
Copy link
Collaborator

jryans commented Apr 25, 2019

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.

@jryans jryans added T-Task Tasks for the team like planning and removed T-Defect labels Apr 25, 2019
@uhoreg
Copy link
Member

uhoreg commented Apr 25, 2019

see https://gist.github.com/dbkr/e898624be6d53590ebf494521d868fec

@ArchangeGabriel
Copy link
Author

@uhoreg Thanks, this patch works. :)

@freedomtrain
Copy link

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...

@JeffJassky
Copy link

I got around this by using registerSchemesAsPrivileged instead of registerStandardSchemes.

protocol.registerSchemesAsPrivileged([{ scheme: 'app', privileges: { standard: true, secure: true, supportFetchAPI: true } }]);

jryans added a commit that referenced this issue Jul 22, 2019
The APIs related to custom protocols went through some changes for Electron 5.x,
so adjusts Riot's usages to match.

I have scanned the Electron 5.x release notes, and I can't see anything else
that requires immediate changes. Things appear to be working well after the
upgrade.

Fixes #10296
Fixes #9562
su-ex added a commit to SchildiChat/element-web that referenced this issue Nov 25, 2022
* Make clear notifications work with threads ([\element-hq#9575](matrix-org/matrix-react-sdk#9575)). Fixes element-hq#23751.
* Change "None" to "Off" in notification options ([\element-hq#9539](matrix-org/matrix-react-sdk#9539)). Contributed by @Arnei.
* Advanced audio processing settings ([\element-hq#8759](matrix-org/matrix-react-sdk#8759)). Fixes element-hq#6278. Contributed by @MrAnno.
* Add way to create a user notice via config.json ([\element-hq#9559](matrix-org/matrix-react-sdk#9559)).
* Improve design of the rich text editor ([\element-hq#9533](matrix-org/matrix-react-sdk#9533)). Contributed by @florianduros.
* Enable user to zoom beyond image size ([\element-hq#5949](matrix-org/matrix-react-sdk#5949)). Contributed by @jaiwanth-v.
* Fix: Move "Leave Space" option to the bottom of space context menu ([\element-hq#9535](matrix-org/matrix-react-sdk#9535)). Contributed by @hanadi92.
* Make build scripts work on NixOS ([\element-hq#23740](element-hq#23740)).
* Fix integration manager `get_open_id_token` action and add E2E tests ([\element-hq#9520](matrix-org/matrix-react-sdk#9520)).
* Fix links being mangled by markdown processing ([\element-hq#9570](matrix-org/matrix-react-sdk#9570)). Fixes element-hq#23743.
* Fix: inline links selecting radio button ([\element-hq#9543](matrix-org/matrix-react-sdk#9543)). Contributed by @hanadi92.
* Fix wrong error message in registration when phone number threepid is in use. ([\element-hq#9571](matrix-org/matrix-react-sdk#9571)). Contributed by @bagvand.
* Fix missing avatar for show current profiles ([\element-hq#9563](matrix-org/matrix-react-sdk#9563)). Fixes element-hq#23733.
* Fix read receipts trickling down correctly ([\element-hq#9567](matrix-org/matrix-react-sdk#9567)). Fixes element-hq#23746.
* Resilience fix for homeserver without thread notification support ([\element-hq#9565](matrix-org/matrix-react-sdk#9565)).
* Don't switch to the home page needlessly after leaving a room ([\element-hq#9477](matrix-org/matrix-react-sdk#9477)).
* Differentiate download and decryption errors when showing images ([\element-hq#9562](matrix-org/matrix-react-sdk#9562)). Fixes element-hq#3892.
* Close context menu when a modal is opened to prevent user getting stuck ([\element-hq#9560](matrix-org/matrix-react-sdk#9560)). Fixes element-hq#15610 and element-hq#10781.
* Fix TimelineReset handling when no room associated ([\element-hq#9553](matrix-org/matrix-react-sdk#9553)).
* Always use current profile on thread events ([\#9524](matrix-org/matrix-react-sdk#9524)). Fixes element-hq#23648.
* Fix `ThreadView` tests not using thread flag ([\element-hq#9547](matrix-org/matrix-react-sdk#9547)). Contributed by @MadLittleMods.
* Handle deletion of `m.call` events ([\element-hq#9540](matrix-org/matrix-react-sdk#9540)). Fixes element-hq#23663.
* Fix incorrect notification count after leaving a room with notifications ([\element-hq#9518](matrix-org/matrix-react-sdk#9518)). Contributed by @Arnei.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
T-Task Tasks for the team like planning
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants