-
Notifications
You must be signed in to change notification settings - Fork 907
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
Upgrade to Electron 12 #2352
Comments
This would be very hand, because I updated to Fedora 35 which enables wayland and crashes mailspring and many other electron apps that doesn't update to the latest electrom version. |
fiwiw The flatpak version woorks just fine here on F35 (silverblue) running wayland. |
I am trying to take this over. However, my electron knowledge is quite limited. So if there is anybody willing to help with this, feel free to contribute :) Current Target Version: 16.0.0 (latest as of 28.11.2021) TODOs:
Issues List:Electron 9
Electron 10
Electron 11
Electron 12
Electron 13++
Development Branch: |
This issue has been mentioned on Mailspring Community. There might be relevant details there: https://community.getmailspring.com/t/electron-12-migration/504/6 |
Hi @Phylu . Hope you are doing well. The only issue I faced is:
So I just comment on these lines. |
@mamantoha Very nice. I stopped at Electron 10 due to time constraints and will pick up from there. If you proceeded with the upgrade, feel free to open an MR against my development branch. Would be really nice, if it can safe me some time. |
@mamantoha Thanks a lot! :) |
I am tracking my progress here: #2352 (comment) So far, I think that I can get it running, but it needs some work e.g. to get the spellchecker or the notifications on Mac up again. |
Hey gang! Ahh this would be wonderful - I think Electron 13 would actually be a better target because they built a spellchecker into Electron itself so we don't need to get an external one working. @Phylu if you've got some cycles, I actually have a branch I started in September but hadn't published with a bit of Electron 13 work! https://github.com/Foundry376/Mailspring/tree/bengotow/electron-13. Maybe you can cherry pick things from that into your branch. I think once we move to 12+, it'll be easier to continue keeping pace with the Electron releases. It's just that 8->12 is particularly painful... |
@bengotow Thanks for sharing the branch. I will definitely pick done things from there. Actually it currently looks quite similar to my development branch. ;-) As far as I understand all the spellchecker methods needed are already implemented in electron 12. What will be painful is the change from the remote module to using native IPC calls oder the remote method from the userland. If you have a preference here and probably some support (especially if we go for the IPC way) that would be great. But I think this would be a target for electron 13 or 14. |
@bengotow When trying to build Mailspring with Electron 13, it fails with the error below. I have tested this on macOS 12 and Ubuntu 21.10. Did you have the build from your branch running when you worked on it? I had no luck with any of the node versions I tried or different keytar versions. If you have any idea of why this is happening, let me know. As the native spellchecker is available in Electron 12, I will target this for now.
|
I figured out the problem... If the node version is too new, it breaks :( |
This issue has been mentioned on Mailspring Community. There might be relevant details there: https://community.getmailspring.com/t/unable-to-launch-the-app-on-fedora-35/3424/2 |
Oh wow good find! I bet we could fix that keytar issue, that library wraps a ton of native stuff to provide secure password storage but somehow it's always the first thing to break :-/ |
@bengotow I really hate npm and its versions. After updating electron further, I managed to build it with even newer node versions. So the build now works on my Ubuntu and my MacOS machines with the latest node and electron version. I would say that this is a win :) I am now back to fixing the issues that broke, but at least do not need to replace keytar for now. |
@bengotow I need some input from you again. Sorry for this. With the removal of the
Option 1 is straight forward, but will loose some functionality. I am still suggesting to go this way (see reasoning above). If that seems bad to you, I could opt for 2 or 3, but would need some pointers on where to add the service worker or the notifications in the main process not sure where to add this stuff to the codebase. |
Apart from the Mac notifications, which are currently more basic than they used to be, this is nearly finished. @mamantoha Would you be willing to do some test runs using a build from my development branch? That would be really great! The same – of course – applies to anybody else reading in here :) Especially tests on Windows are highly appreciated, as I currently don't have a test system available there. |
Hi @Phylu . Thanks for your work. I am mostly interested in Wayland support. So I downgrade to 15.3.2 for testing. It starts under both Xorg and Wayland. Issues:
|
Thanks a lot! I did not expect the election version being too new after I am went the effort if all the upgrades... I will follow the issue you mentioned and see that we use a working electron version in the end. Do you see any errors/logs when trying to open the "New message" window? |
Nevermind. A window is actually created but it is invisible. This is Wayland's only issue. With Xorg(XWayland) everything works fine. |
This is very strange on Wayland. Any ideas whether we can do anything about this on the Mailspring side?
Fixed this in my latest updates.
Fixed this in my latest updates. |
This is stranger than I thought 🤯 I accidentally noticed that It only not showing on my laptop with fractional scaling. I'm investigating where is an issue. |
Hey gang! Ahh I think #1 sounds fine for notifications - I'm not sure people use that "Inline Reply" feature in the notifications, and if they do we can come back to that and find another solution. Overall I think it's fine to cut things back a bit if it means easier Electron upgrades in the future. All the custom modules have really made the process difficult over the years... The Wayland issues are definitely interesting - I know in Electron 12 Wayland support was one of the big improvements... it looks like Electron 16.0 just came out a few weeks ago and it might be something they broke recently in the upgrade. Maybe try 13 or 14 and see if those work better? Thanks for all the hard work @Phylu that's super exciting this is pretty much working! If it's at a good point we can try making Travis builds and publish an "edge" Snapcraft release (currently the only real beta channel) for more folks to try! |
Electron 14.2.1 is the latest stable which works fine for me. So I think we can stay with it for now.
This would be great! |
I opened the PR in Draft mode now: #2357 I have installed it on my Mac Monterey and Ubuntu 20.14 and will use it for a few days to see if I encounter some more errors during daily use, that I missed so far. If I feel, it is safe, I will let you know. :) @bengotow Is there anything, I can do to help with the Travis? @mamantoha So 15.3.2 does not work for you, as you mentioned this earlier? I targeted this for now, as I assumed that it was safe, based on your tests. |
I have tested it for a few days now on Ubuntu and macOS, and I am satisfied with the result and ran into no more bugs so far. I also downgraded to the latest version that works for @mamantoha (15.2.1). So from my side this would be good to go. @bengotow Please let me know if I can do anything regarding the packaging/build pipeline/edge version. |
Thanks @Phylu for this. I am running it and will report on possible issues. |
This issue has been mentioned on Mailspring Community. There might be relevant details there: https://community.getmailspring.com/t/mailspring-for-apple-sillicon-macs/451/10 |
So far so good for me too. @bengotow, I could also possibly help for an AUR mailspring wayland version then. |
Just one small GUI mishap: right clicking to get a context menu pops up the menu way too far to the right (about 300/400 pixels). Not a big problem, but just mentioning. Using @Phylu's version as mentioned above. |
@frigaut I tried to reproduce this both on MacOS and Ubuntu 21.10. This does not happen for me on any of those two systems. Could this be an issue with the (dark) theme that you are using? Can you try with the default light theme? |
@frigaut I also can't reproduce on my Linux. |
@Phylu + @mamantoha Indeed this seems related to my config. I ran Mailspring in a separate account and the issue is not there. I'll continue investigating but right now can drop the issue.
I tried changing theme back to the default, no change. I looked up my environment but there is nothing in there that seems related to scaling, etc. My output/display wlroot scaling is 1.0 (using different value doesn't change the issue). Interestingly, using |
Found it! Now, why the gtk font scaling factor is affecting where the contextual menu pops up is beyond me. At first sight, it might be a bug, but unsure about the logic that's used for this. |
Hello again - A question: when running mailspring with the above |
Hi @frigaut . You can try without
|
Thanks @mamantoha . |
@frigaut I have exactly the same behavior on Wayland with KDE Plasma. It works with this command:
I'm not sure is an Electron or/and Wayland/Plasma issue. I saw similar problems with other Electron apps line GitHub Desktop, Slack, Postman. |
@mamantoha Thanks. Unfortunately, it doesn't work in my case (sway). I have tried your suggested command, plus a combination of with or without the "--disable-gpu", and adding other env variable like |
Because I guess we're beta-tester, I have this error (just occurred after sending new email, not sure it's linked). It might be benign (app doesn't crash nor anything, no visible adverse effects):
|
@frigaut Have you tried creating build using If you have problems with the build, I can also provide Linux and Mac packages from my branch if needed. |
Objective
It'd be very helpful if Mailspring was updated to use Electron 12 (instead of Electron 8). Upgrading to Electron 12 would make Mailspring arm64 compatible (much needed, since all future macs are going to be arm64 for a long period of time) and also unlock support for Wayland which is the standard for Linux GUIs.
Testing Notes
Tips
References
https://community.getmailspring.com/t/electron-12-migration/504/2
The text was updated successfully, but these errors were encountered: