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

Migrate to newer electron #220

Open
DaniD3v opened this issue Jun 6, 2024 · 4 comments
Open

Migrate to newer electron #220

DaniD3v opened this issue Jun 6, 2024 · 4 comments

Comments

@DaniD3v
Copy link

DaniD3v commented Jun 6, 2024

Electron v18 has been out of support for quite some time now. Please consider updating to a newer version.
Here is a list of the current electron versions.

Why is this an issue?
Quite a lot of linux distributions don't package outdated electron versions as they could be insecure. This not only makes it impossible for packagers to add GMEdit to the official repositories but it also makes it inconvinient for users that want to compile from source.

On nix the prebuild version doesnt work (because of nix linker shenanigans, don't worry abt it I didn't expect it to work).
When I tried the app-only build it would've worked if I could have used a newer electron version.

@YellowAfterlife
Copy link
Owner

If you have time and enthusiasm, you can try updating the dependency and seeing whether everything/anything still works - from experience I already know that the "breaking changes" page doesn't actually list every breaking change (let alone bugs that have been introduced since then), so the cost of updating Electron is largely unpredictable.

@DaniD3v
Copy link
Author

DaniD3v commented Jun 6, 2024

Sorry I don't think I'll be able to do that. Never worked with anything electron or js related. I wouldn't even know how to update the dependency...

If I find some free time on the weekend I might look into it but I'm more or less certain I can't pull this off by myself.

@DaniD3v
Copy link
Author

DaniD3v commented Jun 6, 2024

K I did some research

Electron 24 (which is also EOL) still works fine. Just the following warning:

electron .
TypeError: app.setUserTasks is not a function
    at Object.<anonymous> (/home/notyou/Downloads/foragerModding/gmedit/main.js:227:7)
    at Module._compile (node:internal/modules/cjs/loader:1241:14)
    at Module._extensions..js (node:internal/modules/cjs/loader:1296:10)
    at Module.load (node:internal/modules/cjs/loader:1096:32)
    at Module._load (node:internal/modules/cjs/loader:937:12)
    at f._load (node:electron/js2c/asar_bundle:2:13377)
    at loadApplicationPackage (/nix/store/i9qxr0n0bkj5ihdmq10w2fk17pv5v16k-electron-24.8.6/libexec/electron/resources/default_app.asar/main.js:121:16)
    at Object.<anonymous> (/nix/store/i9qxr0n0bkj5ihdmq10w2fk17pv5v16k-electron-24.8.6/libexec/electron/resources/default_app.asar/main.js:233:9)
    at Module._compile (node:internal/modules/cjs/loader:1241:14)
    at Module._extensions..js (node:internal/modules/cjs/loader:1296:10)
DRM kernel driver 'nvidia-drm' in use. NVK requires nouveau.
[69717:0607/000027.140730:ERROR:gl_surface_presentation_helper.cc(260)] GetVSyncParametersIfAvailable() failed for 1 times!
[69717:0607/000027.144175:ERROR:gl_surface_presentation_helper.cc(260)] GetVSyncParametersIfAvailable() failed for 2 times!

You can ignore DRM kernel driver 'nvidia-drm' in use. NVK requires nouveau.. That's linux related and I also get that in chrome. The first one is a bit weird but not version related because I also get it with electron 18.

[69717:0607/000027.140730:ERROR:gl_surface_presentation_helper.cc(260)] GetVSyncParametersIfAvailable() failed for 3 times!

This is the relevant one. No clue what it means tho.

When using >24 The editor doesn't load:
image

Note that that is not my color theme so it crashed before it selected a theme. Nothing important in the logs searching for the error sounds like a nightmare ngl.

@YellowAfterlife
Copy link
Owner

YellowAfterlife commented Jun 6, 2024

Just the following warning:

That's slightly more than a warning, a (yet another) function has been removed from the "render process" (where the UI is) in the name of security (?).

Effectively GMEdit doesn't become any more or less secure from all these changes as the only thing that GMEdit accesses on the internet is a JSON file with function definitions for auto-completion.

When using >24 The editor doesn't load:

You'd want to uncomment the

wnd.webContents.openDevTools()

call in main.js, JS console is slightly less noisy. It's most likely more functions being removed though.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants