Encryption is not available
🔍 Is there already an issue for your problem?
- [x] I have checked older issues, open and closed
📝 Description
I recently notice that I didn't get upgrades anymore and was logged out. I tried to login again but it seems my system has some missing dependencies.
I'm not able to login with OAuth or with the token method and in the logs I see the issue with Encryption is not available. I guess the storage system can't be encrypted which is an issue by my system but just wanted to ask if there is maybe a missing requirement or at least capture the error properly to show a hint.
My guess is that this pr is related to it #1800 but not 100% sure.
My system is ArchLinux Node: v22.14.0
🪜 Steps To Reproduce
- Well install arch linux
- Have a missing dependency for electron
- Failed login without any warning or error (Besides terminal/Journal)
🪵 Log Excerpts
This error is the failed login for the browser session. If you want I can also add the logs for the PAT but I guess it's the same issue.
[98103:0429/114254.667532:ERROR:gl_surface_presentation_helper.cc(260)] GetVSyncParametersIfAvailable() failed for 1 times!
[98103:0429/114257.685543:ERROR:gl_surface_presentation_helper.cc(260)] GetVSyncParametersIfAvailable() failed for 2 times!
[98103:0429/114257.688279:ERROR:gl_surface_presentation_helper.cc(260)] GetVSyncParametersIfAvailable() failed for 3 times!
Opening in existing browser session.
11:43:01.305 › [main:second-instance] Second instance was launched. extracting command to forward
11:43:01.308 › [main:handleUrl] forwarding URL gitify://auth?code=<some-code> to renderer process
11:43:01.308 › [renderer:auth-callback] received authentication callback URL gitify://auth?code=<some-code>
Error occurred in handler for 'gitify:safe-storage-encrypt': Error: Error while encrypting the text provided to safeStorage.encryptString. Encryption is not available.
at /usr/lib/gitify/app.asar/build/main.js:2:289919
at WebContents.<anonymous> (node:electron/js2c/browser_init:2:87415)
at WebContents.emit (node:events:524:28)
11:43:01.615 › [loginWithGitHubApp] failed to login with GitHub Error: Error invoking remote method 'gitify:safe-storage-encrypt': Error: Error while encrypting the text provided to safeStorage.encryptString. Encryption is not available.
at IpcRenderer.invoke (node:electron/js2c/renderer_init:2:7076)
at async t.encryptValue (file:///usr/lib/gitify/app.asar/build/renderer.js:61:469855)
at async t.addAccount (file:///usr/lib/gitify/app.asar/build/renderer.js:61:499005)
at async file:///usr/lib/gitify/app.asar/build/renderer.js:2:276348
at async file:///usr/lib/gitify/app.asar/build/renderer.js:2:46655
Gitify Version
6.2.1
Operating System
Linux
GitHub Account
GitHub Cloud
📸 Screenshots
No response
Thanks for reporting.
I wonder what it is with your OS that causes the safeStorage API to fail
I thought somebody of you have already an idea about this, but I can have a look tomorrow to see what it is. With this issue I would aim for a better error message and maybe check beforehand if the safeStorage is working. But you should not fallback to insecure storage tbh. I guess it's a edge case issue so I will take a look and report it back.
Getting the same error. Running on Arch
13:10:35.953 › [loginWithOAuthApp] Failed to login with OAuth App Error: Error invoking remote method 'gitify:safe-storage-encrypt': Error: Error while encrypting the text provided to safeStorage.encryptString. Encryption is not available. at IpcRenderer.invoke (node:electron/js2c/renderer_init:2:7078) at async t.encryptValue (file:///usr/share/gitify/app.asar/build/renderer.js:61:471426) at async t.addAccount (file:///usr/share/gitify/app.asar/build/renderer.js:61:501688) at async file:///usr/share/gitify/app.asar/build/renderer.js:2:302727 at async file:///usr/share/gitify/app.asar/build/renderer.js:61:637639
Getting the same errors for all 3 login methods
EDIT: solved by using gitify --password-store="gnome-libsecret"
Glad to hear you found a workaround @LajnaLegenden
Perhaps we should raise an issue on https://github.com/electron/electron to extend the default use of gnome_libsecret for this linux desktop environment. Currently it supports the following
gnome_libsecret - When the desktop environment is X-Cinnamon, Deepin, GNOME, Pantheon, XFCE, UKUI, unity or if the following command line flag is provided --password-store="gnome-libsecret".
Or we could use this in our auth module as a fallback for linux users - https://www.electronjs.org/docs/latest/api/safe-storage#safestoragesetuseplaintextencryptionuseplaintext
https://github.com/electron/electron/issues/32598
I've documented the workaround that @LajnaLegenden shared above as a new https://gitify.io/faq/
For now, I'll be closing this ticket. Happy to reopen if there is further thoughts.