This is for those who build Electron apps with Meteor, using the Meteor-Desktop app.
I’m having a problem that any API call to Keytar has all of a sudden stopped working for my Windows users. It completely times out (I have a 60 seconds timeout period).
Unfortunately I use Keytar to retrieve important credentials from the respective “secure” storage.
I’m using the following versions:
Meteor 2.5.6
Node 14.19.1
Meteor-Desktop 3.0.1
Electron 10.1.3 (last working version for me)
Electron-builder 23.0.2
Electron-updater 4.3.9
However, it’s a long path to go from Electron 10.1.3 to version 15.
Two questions:
Has anyone else problems with Keytar?
Suggestions on how to go forward with upgrading from the current, last working versions? It’s unclear to me how the other Electron packages (eg @electron/osx-sign, electron-updater, electron-builder, electron-notarize and electron-rebuild are all required to have a specific version to work with a specific version of electron. Meaning to say, if I update electron, which other packages do I need to update as well and to what version?
Sounds very daunting but my Windows users (who are unfortunately the majority) can’t use an important part of my Electron app right now.
Any suggestions, tips are welcome. Thanks in advance!
Are you sure your keytar version matches your Electron version? There are builds on the keytar GitHub for each separate node (and Electron node) version if you need a specific one.
I had a similar issue one time and it was because the keytar version wasn’t matching the version of node bundled with Electron. My solution was to instead import the correct pre-built file directly after downloading it from the keytar GitHub releases. Note that the version of node bundled with your Electron is probably not the same version of node that Meteor uses.
For updating packages idk of any really easy way to go about it. You just need to determine which versions go together for any dependencies that you use and update all accordingly.
I think I need to first determine which Electron version I’m aiming for, meaning which new features are important to me that I want to upgrade to that version.
As you write, that will most likely determine dependencies on the other Electron packages, though I’d like to go with the most latest versions possible.
Having said that, Meteor (I can’t upgrade beyond 2.5.8) and my node version will restrict most likely how far I could aim.
But first I have to get the next, big feature out. One step at a time and once that is done and things will run smooth again this might be the next project.
That is unless there’s nothing much out there that is intriguing enough to go through upgrade hell LOL
Just an update on my success so far in updating the Electron packages.
I’ve started with upgrading electron-updater to version 5.0.5 (it was the most recent offered) and also upgrading electron-builder to version 23.1.0 (again, most recent one).
Building the app worked without problems for Windows, macOS and Linux.
Further to my earlier post I’ve successfully updated electron-rebuild to version 3.28 (latest version) and electron package itself to version 11.5.0 (last stable before version 12.0.0).
However, further upgrading to version 12.0.0 or any version above (including up to latest stable version 19.0.8) is giving an error that seems to originate from the cordova.js file.
If anyone has any fixes I will be happy to merge them and release them. Probably faster than me trying to do this (at least until I have the time to dive in deeper in this project).