keybase / keybase/keybase-issues
EINVAL, invalid argument in net.js:157 while running command line app in Cygwin and MinTTY
- Dominant language
- No language data
- Stars
- 899
- Forks
- 40
- PR merge metrics
- No merged PRs in 30d
Description
Getting the following error while running commands like `keybase login` or `keybase version` while running it on Windows 7 under Cygwin and the MinTTY terminal.
```
net.js:157
this._handle.open(options.fd);
^
Error: EINVAL, invalid argument
```
The output of `keybase version is`:
```
keybase (keybase.io CLI) v0.4.0
- node.js v0.10.20
- gpg (GnuPG) 1.4.15
- Copyright (C) 2013 Free Software Foundation, Inc.
Identifies as: 'keybase.io node.js client v0.4.0 win32'
```
The version of the MinTTY terminal is 1.1.3. This issue seems to be terminal related as it does not occur when running `keybase` commands from standard Windows terminal either under `cmd.exe` or Powershell.
The issue does not occur while running from Cygwin in the ConEmu terminal so. As such it is probably a low priority issue affecting only a small group of users with a niche setup.
Full stack trace for the error for refference:
```
keybase version
net.js:157
this._handle.open(options.fd);
^
Error: EINVAL, invalid argument
at new Socket (net.js:157:18)
at process.stdin (node.js:660:19)
at C:\Users\luke\AppData\Roaming\npm\node_modules\keybase\node_modules\iced-spawn\lib\cmd.js:143:22
at SpawnEngine.exports.SpawnEngine.SpawnEngine._node_v0_10_workarounds (C:\Users\luke\AppData\Roaming\npm\node_modules\keybase\node_modules\iced-spawn\lib\cmd.js:191:15)
at C:\Users\luke\AppData\Roaming\npm\node_modules\keybase\node_modules\iced-spawn\lib\cmd.js:211:21
at C:\Users\luke\AppData\Roaming\npm\node_modules\keybase\node_modules\iced-spawn\lib\cmd.js:215:15
at SpawnEngine.exports.SpawnEngine.SpawnEngine._node_workarounds (C:\Users\luke\AppData\Roaming\npm\node_modules\keybase\node_modules\iced-spawn\lib\cmd.js:220:15)
at _this.pid (C:\Users\luke\AppData\Roaming\npm\node_modules\keybase\node_modules\iced-spawn\lib\cmd.js:246:17)
at SpawnEngine.exports.SpawnEngine.SpawnEngine._run (C:\Users\luke\AppData\Roaming\npm\node_modules\keybase\node_modules\iced-spawn\lib\cmd.js:251:15)
at SpawnEngine.exports.SpawnEngine.SpawnEngine.run (C:\Users\luke\AppData\Roaming\npm\node_modules\keybase\node_modules\iced-spawn\lib\cmd.js:231:12)
at Object.exports.run.run [as run] (C:\Users\luke\AppData\Roaming\npm\node_modules\keybase\node_modules\iced-spawn\lib\cmd.js:418:9)
at C:\Users\luke\AppData\Roaming\npm\node_modules\keybase\node_modules\gpg-wrapper\lib\gpg.js:51:18
at MasterKeyRing.exports.GPG.GPG.test (C:\Users\luke\AppData\Roaming\npm\node_modules\keybase\node_modules\gpg-wrapper\lib\gpg.js:66:15)
at C:\Users\luke\AppData\Roaming\npm\node_modules\keybase\lib\command\all.js:404:37
at C:\Users\luke\AppData\Roaming\npm\node_modules\keybase\lib\command\all.js:414:15
at Main.init_gpg (C:\Users\luke\AppData\Roaming\npm\node_modules\keybase\lib\command\all.js:422:15)
at iced.Deferrals.parent (C:\Users\luke\AppData\Roaming\npm\node_modules\keybase\lib\command\all.js:498:21)
at C:\Users\luke\AppData\Roaming\npm\node_modules\keybase\lib\command\all.js:502:15
at Deferrals.runtime.Deferrals.Deferrals._call (C:\Users\luke\AppData\Roaming\npm\node_modules\keybase\node_modules\iced-coffee-script\lib\coffee-script\iced.js:113:18)
at C:\Users\luke\AppData\Roaming\npm\node_modules\keybase\node_modules\iced-coffee-script\lib\coffee-script\iced.js:125:28
at Object.runtime.trampoline (C:\Users\luke\AppData\Roaming\npm\node_modules\keybase\node_modules\iced-coffee-script\lib\coffee-script\iced.js:92:16)
at Deferrals.runtime.Deferrals.Deferrals._fulfill (C:\Users\luke\AppData\Roaming\npm\node_modules\keybase\node_modules\iced-coffee-script\lib\coffee-script\iced.js:123:26)
at ret (C:\Users\luke\AppData\Roaming\npm\node_modules\keybase\node_modules\iced-coffee-script\lib\coffee-script\iced.js:63:20)
at C:\Users\luke\AppData\Roaming\npm\node_modules\keybase\node_modules\iced-error\index.js:92:22
at C:\Users\luke\AppData\Roaming\npm\node_modules\keybase\lib\command\all.js:167:18
at Deferrals.runtime.Deferrals.Deferrals._call (C:\Users\luke\AppData\Roaming\npm\node_modules\keybase\node_modules\iced-coffee-script\lib\coffee-script\iced.js:113:18)
at C:\Users\luke\AppData\Roaming\npm\node_modules\keybase\node_modules\iced-coffee-script\lib\coffee-script\iced.js:125:28
at Object.runtime.trampoline (C:\Users\luke\AppData\Roaming\npm\node_modules\keybase\node_modules\iced-coffee-script\lib\coffee-script\iced.js:92:16)
at Deferrals.runtime.Deferrals.Deferrals._fulfill (C:\Users\luke\AppData\Roaming\npm\node_modules\keybase\node_modules\iced-coffee-script\lib\coffee-script\iced.js:123:26)
at ret (C:\Users\luke\AppData\Roaming\npm\node_modules\keybase\node_modules\iced-coffee-script\lib\coffee-script\iced.js:63:20)
at C:\Users\luke\AppData\Roaming\npm\node_modules\keybase\lib\config.js:78:20
at C:\Users\luke\AppData\Roaming\npm\node_modules\keybase\lib\config.js:74:22
at C:\Users\luke\AppData\Roaming\npm\node_modules\keybase\lib\config.js:76:13
at Deferrals.runtime.Deferrals.Deferrals._call (C:\Users\luke\AppData\Roaming\npm\node_modules\keybase\node_modules\iced-coffee-script\lib\coffee-script\iced.js:113:18)
at C:\Users\luke\AppData\Roaming\npm\node_modules\keybase\node_modules\iced-coffee-script\lib\coffee-script\iced.js:125:28
at Object.runtime.trampoline (C:\Users\luke\AppData\Roaming\npm\node_modules\keybase\node_modules\iced-coffee-script\lib\coffee-script\iced.js:92:16)
at Deferrals.runtime.Deferrals.Deferrals._fulfill (C:\Users\luke\AppData\Roaming\npm\node_modules\keybase\node_modules\iced-coffee-script\lib\coffee-script\iced.js:123:26)
at ret (C:\Users\luke\AppData\Roaming\npm\node_modules\keybase\node_modules\iced-coffee-script\lib\coffee-script\iced.js:63:20)
at Object.cb [as oncomplete] (fs.js:168:19)
```
Contributor guide
No contributing guide indexed for this repository
Research direction
Reproduce `keybase login` or `keybase version` under Windows 7 with Cygwin and MinTTY, then compare with cmd.exe, PowerShell, and ConEmu. Start at `net.js:157` and `iced-spawn/lib/cmd.js:143`, following the stdin handling shown in the stack trace. Done means these commands no longer fail with `EINVAL` in MinTTY.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- node.js
- Domain
- cli, operating-systems
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100