Switching desktop edition to Electron platform

Starting from version 25.8.23, the desktop edition will now be based on the Electron platform.

This should resolve a few bugs, improve Linux compatibility, and allow for offline PDF generation.

The cost is that the desktop edition installation package will more than double in size because Electron embeds Chromium. However, it seems like Electron is a good fit for Manager Desktop.

Feel free to install the latest version of desktop edition and let me know your feedback. It is backwards compatible with previous version so if something goes wrong, you can always uninstall it and install the previous one from here.

Here are some of the notable things to keep in mind:

Change Data Folder

The change data folder is in a different location now.

You will need to click File in the top menu and then click Change Data Folder...

It’s now Electron saving the custom data folder location in its config path, which solves the issue in this topic.

Work Across Multiple Windows

Go to Window, then click New Window.

This will open Manager in a new window so you can have two or more windows running at the same time. This is useful if one window is used for data entry and another for viewing reports. Or if you are working across multiple businesses at once.

I know you could do this by opening the desktop edition in a web browser, but this feels more consistent with the desktop edition approach.

Print Preview Will Need to Be Built from Ground Up

One issue with Electron is that it doesn’t come with a Print preview. I’ve recreated a print preview dialog that is similar to what web browsers have, but there is more work to do. This is clearly a regression, but on the flip side, I can add more functionality based on what’s needed.

WebView2 Runtime No Longer Required on Windows

Previously, users would have to install and keep up to date with WebView2 Runtime on Windows. This is no longer necessary. Electron includes Chromium, and Manager Desktop includes Chromium. So all the dependencies are in the installation file.

WKWebView No Longer Used on Mac OS X

Another dependency that was causing issues was WKWebView. For example, the Print button was broken, and it was not possible to fix it. Switching from WKWebView to Electron solves this issue.

libwebkit2gtk-4.0so.37 No Longer Required on Linux

libwebkit2gtk-4.0so.37 is obsolete, and the desktop edition of Manager stopped working on many Linux distributions. Switching to Electron has solved this issue.

PDF button is now generating PDF locally

When you use PDF button in desktop edition, you will notice it will generate PDF nearly instantly with full HTML/CSS support. So this gives unlimited possibilities how your invoices and other documents can look.

7 Likes

Overall, the performance is better than before using Electron, and the process of displaying the print preview is also much faster compared to the previous version.

The extension itself works well.

Regarding the relay, there is an issue when it is opened in the first window.

However, if you open a new window from several links (using Ctrl + Click) and run the relay from that window, the relay works properly.

Additionally, if you access Manager directly from the browser at http://127.0.0.1:{{active port}}, the relay also works fine.

Tested on Windows 11, Manager version 25.8.23.2701.

2 Likes

This is great! I really like that the Print to PDF chooses the customer name in the file name. I no longer need to use the old PDF extension. BTW, how does one remove the obsolete PDF extension now?

I noticed zooming doesn’t work with Ctrl++ etc or Ctrl+mouse scroll, but it does work from the View menu.

[Manager 25.8.23.2701, Win 11 + Ubuntu 24.04.3 LTS]

Yeah, Manager doesn’t detect whether external link is GET or POST request. It treats them all as GET requests which means data from POST requests are lost.

It’s possible to check for that but it does add extra complexity which I’m not sure is justified as I consider relays obsolete and extensions should be used instead going forward.

Thanks. Fixed in the latest version (25.8.24). I’ve also added support for Ctrl+mouse scroll.

1 Like

on screen fonts looks finer also!

1 Like

Does Electron call home when running Manger desktop indicating using un-patched chromium instead of https://github.com/ungoogled-software/ungoogled-chromium is a privcy / user data security issue of for Electron & Manager https://github.com/electron/electron/issues/14784

A Firefox / Gecko implementation would be significantly better for privacy / user data security but appears to not be available.

I can’t answer this. Manager itself contains no code that would call home other than PDF button which I will make work offline now that Electron does support offline PDF generation.

If anyone is concerned about Chromium, you can now run server edition in desktop mode.

ManagerServer --urls=http://127.0.0.1:55667 --edition=desktop

Then you can open https://127.0.0.1:55667 in your web-browser and it will be exactly like desktop edition without Electron.

4 Likes

@lubos

I understand your point, but the challenge I face is that whenever I rely on a feature in the program, after some time it’s marked as deprecated and I’m forced to update and start over.
For example, we had to move from old themes, then depend on footers, and later go back again to new themes. This is just one example, but it shows the difficulty of building on something that may be declared obsolete later.

As always, thanks for the quality free beer.

My use case/features needed from Manager (desktop) are very simple. Two items of feedback, based on 25.8.24.2706 on Win11.

  1. This isn’t exactly new, but I’ve noticed the ‘Releases’ page on the main manager site is pretty light on details since Feb, and I’d consider this a significant enough change to document.
  2. I’ve been used to middle-clicking on links in manager when I need to do some light multitasking. This still works in Manager with the latest update, but given the multi-window functionality introduced, can “open in new window/tab” in the right-click options be implemented in Manager? I’m not sure how that could introduce conflicts within the application, so maybe there’s good reason to discourage that user behavior - I don’t know.
1 Like

Added to the latest version (25.8.25.2708).

It seems like tabs are not viable in Electron at this time. So it will be just “open in new window” for now.

1 Like

Actually, it turns out there is a way to implement tabs in Electron apps. Check the latest version (25.8.25.11) to test it out.

The tabs work but take up quite a bit of screen space

Edit: Ctrl+T gives me a Javascript uncaught exception error.

If you open the same screen in a web browser, about the same amount of space would be taken at the top before the content begins, so I’m not sure how big of an issue this is.

Fixed in the latest version (25.8.25.2714)

Fair enough. It takes up similar space to my browser window even though it is more than the pre-Electron Manager versions. Could one hide the tab bar if only one tab is open or display the tabs in the title bar, or does that make it less user friendly?

Many thanks

Calling home (or not) may not be the only security issue with Electron. And not the most serious risk associated with its use. That is: attacks by malicious outsiders.

Kaspersky has an interesting article on security issues with Electron, and in particular with its use of embedded Chromium (https://www.kaspersky.com/blog/electron-framework-security-issues/49035/). Their argument goes as follows.

  • Security holes are found in Chromium very frequently: “New, serious vulnerabilities pop up almost weekly in a popular browser like Chrome/Chromium: so far this year more than 70 high, and three critical severity-level vulnerabilities have been found in Chromium as of the time of writing [september 14, 2023]. Worse yet, exploits for the world’s most popular browser’s vulnerabilities appear really quick. This means that a good part of Chrome/Chromium holes are not just abstract bugs you treat as a matter of routine — they’re vulnerabilities that can be used for attacks by cybercriminals out in the wild.”

  • For stand-alone Chrome browsers this may not be a big problem, because Google “is very quick to release patches and rather persistent in convincing users to install them and restart their browser”.

  • But the same does not necessarily apply to third party applications that incorporate Chromium. First of all, the app developer would need to put out new versions with security fixes as soon as they are available, on average once a week, and users would also need to install those versions immediately to remain protected.

Kaspersky gives one example: "And here’s a fresh example: On September 11, Google fixed the CVE-2023-4863 vulnerability in Google Chrome. At that point, it was already actively exploited in the wild. It allows a remote attacker to perform an out of bounds memory write via a crafted HTML page, which can lead to the execution of arbitrary code. Of course, this bug is present in Chromium and all Electron-based applications. So, all companies using it in their applications will have to work on updates."

It seems to me that switching to Electron creates quite a risk for Manager Desktop and its users.

I know a bit about cyber security, although I cannot call myself an expert. I do not want to cause alarm. But the above has me worried. I hope others can shed some light on it. If it appears I am mistaken I will gladly retract this post.

@jeroen1 Even if Chromium has a security issue, that does not automatically mean it is exploitable in the context of Manager Desktop.

Take your example:

It allows a remote attacker to perform an out of bounds memory write via a crafted HTML page, which can lead to the execution of arbitrary code.

For this to matter, an attacker would first need to get their crafted HTML page to load inside Manager Desktop. Unlike a web browser, Manager Desktop does not freely visit arbitrary sites, open links, or render untrusted web content. There is no easy mechanism for an attacker to deliver such a page into the application. Without that delivery vector, the vulnerability is irrelevant to Manager Desktop.

Not to mention, Electron doesn’t change anything in this context. Desktop edition was always embedding web-browser view based on Chromium. By using Electron, we are making desktop edition more secure because we always ship the latest version of Electron rather than relying on often outdated Chromium within user’s operating system.

3 Likes

@lubos: Thank you for your clarification. I am satisfied.

I’ve installed 25.8.27 Mac Desktop and it feels snappier. I like the Change Data Folder being moved from a button to a file menu.

My data folder is in Dropbox and works fine. The only change I’ve noticed from last month’s release is that when I start Manager, it defaults to a centred window and does not remember my previous window state from when I last quit.

Am I missing a setting somewhere? I’d like Manager to remember the previous window state when I next open it.

Manager is still an amazing app.

Love the removal of the data file from my Documents folder (as you know). :grinning_face_with_smiling_eyes:

And the PDF button produces a pretty darn good PDF of my custom HTML/CSS themed invoices—wonderful! Now, if there is any way to output the PDF without the big white margin, I would be absolutely over the moon. :blush:

Implemented in the latest version (25.8.29.2728)

Pretty sure it should be possible. Can you create some minimal HTML/CSS theme where you get margin so I can reproduce it myself?