Open jnschaeffer opened 8 years ago
@jnschaeffer you are correct, GlobalContext is nil. I fixed it in https://github.com/keybase/client/pull/3164
Thanks for finding this!
BTW, are you also setting -H
for your commands? i.e.
keybase -H ~/projects/keybase/dev pgp import
?
@patrickxb I'm not, but setting -H
results in the same behavior. Does Keybase just discover the service it's supposed to connect to automatically?
Tested on the latest .deb and on HEAD with Ubuntu 16.04 built with the production build tag.
When trying to run
keybase pgp import
with a key coming in from stdin, the keybase client just returns an EOF error message. I decided to try building the client from source myself and ran the following to start the service:$ keybase -H ~/projects/keybase/dev -d service
After running
keybase -d pgp import
with a key from stdin, I got an error message from the client simply saying "[ERRO keybase standard.go:197] 022 EOF". Looking at the service logs shows that this is due to a nil pointer somewhere during the PGP key import engine initialization, specifically this function:It looks like the GlobalContext isn't being set for some reason. Replacing
g.Log.Warning(string(s))
withpanic(string(s))
shows a more useful error message:panic: Bad subkey: openpgp: invalid data: subkey signature invalid: openpgp: invalid signature: hash tag doesn't match
. This might be a bug in the Go OpenPGP library - I was using a key I generated and updated the expiry on, which seems to have caused problems for other people - but the service panic obscures the error output from that.It seems like the correct behavior should be to at the very least return and log the underlying error rather than panic, though I don't know enough about the codebase to be able to patch it myself.
Service panic output: