jpohjolainen / atom-gpg

5 stars 7 forks source link

Uncaught TypeError: Cannot read property 'stdin' of undefined #10

Closed sumdp closed 7 years ago

sumdp commented 7 years ago

[Enter steps to reproduce:]

  1. Select text
  2. Right-click and select GPG Encrypt from drop-down menu

I am not sure I have set this up right, but in Settings I have the following: Gpg Executable /Users/dp/.gnupg

Gpg Home Dir /Users/dp/.gnupg

Gpg Recipients /Users/dp/.gnupg

Gpg Recipients File /Users/dp/.gnupg

Atom: 1.21.1 x64 Electron: 1.6.15 OS: Mac OS X 10.12.6 Thrown From: atom-gpg package 0.6.0

Stack Trace

Uncaught TypeError: Cannot read property 'stdin' of undefined

At /Users/dp/.atom/packages/atom-gpg/lib/gpg.coffee:41

TypeError: Cannot read property 'stdin' of undefined
    at gpgCommand (/packages/atom-gpg/lib/gpg.coffee:41:13)
    at /packages/atom-gpg/lib/gpg.coffee:99:3)
    at Object.run (/packages/atom-gpg/lib/main.coffee:116:7)
    at /packages/atom-gpg/lib/main.coffee:23:42)
    at CommandRegistry.handleCommandEvent (/Applications/Atom.app/Contents/Resources/app/src/command-registry.js:381:36)
    at CommandRegistry.dispatch (/Applications/Atom.app/Contents/Resources/app/src/command-registry.js:266:23)
    at AtomEnvironment.module.exports.AtomEnvironment.dispatchContextMenuCommand (/Applications/Atom.app/Contents/Resources/app/src/atom-environment.js:1354:34)
    at EventEmitter.outerCallback (/Applications/Atom.app/Contents/Resources/app/src/application-delegate.js:348:31)
    at emitThree (events.js:116:13)
    at EventEmitter.emit (events.js:194:7)

Commands

     -4:10.5.0 core:confirm (input.hidden-input)
     -3:58.5.0 core:backspace (input.hidden-input)
     -0:56.3.0 core:paste (input.hidden-input)
     -0:55.3.0 core:undo (input.hidden-input)
     -0:54 core:paste (input.hidden-input)
     -0:53.1.0 core:backspace (input.hidden-input)
     -0:50.7.0 core:paste (input.hidden-input)
  2x -0:50 core:backspace (input.hidden-input)
     -0:47.6.0 core:paste (input.hidden-input)
     -0:46.9.0 core:backspace (input.hidden-input)
     -0:40.2.0 core:cut (input.hidden-input)
  3x -0:38 core:backspace (input.hidden-input)
     -0:28.3.0 atom-gpg:encrypt-selections (div.line)

Non-Core Packages

atom-beautify 0.30.4 
atom-gpg 0.6.0 
change-case 0.6.5 
color-picker 2.2.5 
delete-lines 0.5.0 
file-icons 2.1.9 
highlight-selected 0.13.1 
Hydrogen 2.0.1 
json-converter 0.2.4 
minimap 4.29.3 
multi-cursor 2.1.5 
pretty-json 1.6.4 
regex-railroad-diagram 0.19.3 
tablr 1.8.3 
wordcount 2.10.4 
jpohjolainen commented 7 years ago

Hi. Seems you have configured it wrong.

Here is the document:

Settings

Gpg Executable - Path to GPG binary. Defaults to 'gpg'

Gpg Home Dir - Path to GPG key directory.

Gpg Recipients - Recipient User IDs seperated by comma (,). Add your own User ID here so you can decrypt text.

Gpg Recipients File -  File of recipient User IDs that are appended to Gpg Recipients. If only filename is given, it's searched from project workdir or same directory as text buffer file is in.

You have specified Gpg Home Dir to all the settings, which is not correct. By default you should leave all values empty.

sumdp commented 7 years ago

Yes, thank you! I didn't understand the settings, the issue is now resolved!