Weekly Update 4 - Auto Update Service


I have refactored the code and I created a new service which is started after the application is ready.

I have searched other open-source applications to see how they handle updates. This is the list:

  1. GitHub - lutzroeder/netron: Visualizer for neural network, deep learning and machine learning models (suggested last week)
  2. GitHub - element-hq/element-desktop: A glossy Matrix collaboration client for desktop.
  3. GitHub - atom/atom: ⚛ The hackable text editor
  4. GitHub - oktapodia/coinwatch: Track your cryptocurrencies from your Osx menubar

Currently, the application checks for updates in the background, and if an update is available, a dialog is shown to the user, asking if he/she wants to install the update now or later. (Last week this was done by showing a notification).


I know that in the project's description, the emphasis was on "silent updates". I was wondering if you would like me to show maybe a progression bar for downloading the updates, or a message that informs the user if the application checks for updates, if the application has/hasn't available any updates (+ version), etc. If so, where would you like me to add these? (I was thinking inside the sidebar, under the "Synchronize" button). Depending on your answers, I will plan it to be implemented either in Week 5 or Week 6.

My focus in Week 5 will be on solving some issues that are slowing the development a lot (check 'Problems' section) and adding tests if I fix them faster.


There are some problems that I would like to fix by next week:

  • The fact that I can't test my service in the dev environment is a very big issue. This is the same problem as last week, when the autoUpdater won't work in dev mode (even though, with some configurations, it should). Since I had to write additional code and restructure it a little, it took a lot of time to test my changes by running the command "yarn dist" and installing the app each time. This is the most important that should be fixed, it has the higher priority. I tried fixingit this Monday, but no progress.

  • Right now, even if I close the application (or even uninstall it), the server still checks for updates, which I think is weird. I want to investigate this. It is not hard to solve it.

  • The dialog that informs the user there is an update available will open regardless if another dialog is already opened or not. So if the user doesn't close the first dialog, a second one will appear on the screen. I can fix this in two ways:

    • Only show the dialog when the application starts.
    • Only show once the dialog. That means that if there is a possibility that, if the user closes the dialog, another one will open if enough time passes.
1 Like

Yes that seems extremely time consuming. Could you maybe create a pull request with your current code and maybe we can suggest something to help with testing?

Does it mean we need a server to use this solution? I thought it would be possible to host the release files on GitHub, like we do now?

In terms of UI, I think it should show some non-intrusive notification (like on VSCode for example) to show that the update is ready to install. But it shouldn't show any notification when a new update is available or when it's being downloaded. For now at least, but indeed maybe later we can consider providing more information.

Yes, I wanted to wait a week to see if I can solve it on my own, but right now there is no progress, so I will create a PR. I will add the soltutions that I have tried before to my code and I will open the PR tomorrow, I will post the link here or on Discord.

When I say "server" I am referring to the local server I have created for testing, to see that the update is done correctly by replacing "Notebooks" with "Notebooks update!"

Regarding the non-intrusive part, I think you are right. While I was developing and testing, it was getting annoying to see the dialog. VSCode shows a little notification in the right down corner, with the text "Restart Visual Studio Code to apply the latest update." and the options "Update Now", "Later", "Release Notes". VSCode is also open source, so it would be a good ideea for me to check their code to see how they implemented updates. Regarding the notification, I saw a function in Joplin's code, "renderNotificationMessage", so I will assume that the logic for notifications exists. I think I will have to implement this flow: the main process checks the updates, and if the update is available, communicates with the renderer process that notifies the user.

Indeed we have this renderNotificationMessage function which display the large orange banner at the top of the screen.

But for update I wonder if something like the trash notification when we delete a note would be better. It's more discreet and looks nicer. The code is in TrashNotification

1 Like

I forgot to ask ... do you want to remove the code manual checks for update ? For example the one from the menu above the application.

We will keep this, as it can be useful for a user to manually check for updates