Timeout was reached
when running with sudo
#164
Comments
I've tested this with |
And here's the output of
|
This is a dependency for building the library, and isn't needed at runtime (i.e. in a packaged app).
This looks like the |
@shiftkey Makes sense. Is there any way to use keytar with sudo? It seems as though this should be possible, since the root user should always be able to |
Ok, so after some investigation it turns out that this is a result of keytar being unable to talk with the secrets service over dbus. In order to connect to dbus as necessary there are two requirements:
Fixing the euid issue is easy enough: // Drop down to the logname user.
process.seteuid("yourusername");
// Do keytar stuff.
const tokensString = await keytar.getPassword(SERVICE, KEYNAME);
// Return to root.
process.seteuid(0); Fixing the |
Any update on this issue ... |
Keytar seems to run just fine in user-mode, but when running with sudo I get the following error trying to load credentials:
This is on Ubuntu 18.10.
The text was updated successfully, but these errors were encountered: