This repository has been archived by the owner. It is now read-only.

Install Error #297

Open
mrjabba opened this Issue Jun 11, 2012 · 16 comments

Comments

Projects
None yet
10 participants
@mrjabba

mrjabba commented Jun 11, 2012

This seems similar to this closed issue. However, I do not have a file called /etc/resolver
#296

I'm using OS X 10.7.4

curl get.pow.cx | sh
There is a long delay of over a minute between the connection error and the rest of the error.
Where can I look to resolve this issue?

*** Installing Pow 0.4.0...
*** Installing local configuration files...
Jun 11 17:49:26 ha001835.wvrgroup.internal node[40750] : kCGErrorFailure: Set a breakpoint @ CGErrorBreakpoint() to catch errors as they are logged.
_RegisterApplication(), FAILED TO establish the default connection to the WindowServer, _CGSDefaultConnection() is NULL.

/Users/lakhutson/Library/Application Support/Pow/Versions/0.4.0/lib/command.js:19
throw err;
^
Error: ENOENT, open '/tmp/pow.40750.1339454966270.44405'

I checked /tmp for a file starting with pow*. There's no file.

Any ideas?

@mrjabba

This comment has been minimized.

Show comment
Hide comment
@mrjabba

mrjabba Jun 12, 2012

Also I went ahead and installed node using homebrew. I wasn't sure if that was needed?
Same result as above.

Then, I tried installing from source. I have tried this with my normal account and with an account with administrative priv's.

$ git clone https://github.com/37signals/pow.git
$ cd pow
$ npm --global install

I've pasted the contents of npm-debug.log into this gist:
https://gist.github.com/2919245

I have concerns about the phrase "ERR! Please try running this command again as root/Administrator." Seriously?
Please advise.

mrjabba commented Jun 12, 2012

Also I went ahead and installed node using homebrew. I wasn't sure if that was needed?
Same result as above.

Then, I tried installing from source. I have tried this with my normal account and with an account with administrative priv's.

$ git clone https://github.com/37signals/pow.git
$ cd pow
$ npm --global install

I've pasted the contents of npm-debug.log into this gist:
https://gist.github.com/2919245

I have concerns about the phrase "ERR! Please try running this command again as root/Administrator." Seriously?
Please advise.

@deivers

This comment has been minimized.

Show comment
Hide comment
@deivers

deivers Jul 25, 2012

I have a very similar issue with install. Anyone have a suggestion?

deivers commented Jul 25, 2012

I have a very similar issue with install. Anyone have a suggestion?

@deivers

This comment has been minimized.

Show comment
Hide comment
@deivers

deivers Jul 26, 2012

For me the issue was that my env shell was set to tsch. Even though I was running bash in Terminal, the env setting seemed to be the issue that prevented the install script from completing (as shown in original post).

deivers commented Jul 26, 2012

For me the issue was that my env shell was set to tsch. Even though I was running bash in Terminal, the env setting seemed to be the issue that prevented the install script from completing (as shown in original post).

@swaits

This comment has been minimized.

Show comment
Hide comment
@swaits

swaits Oct 14, 2012

Nothing to add other than confirming Pow definitely fails to install if tcsh is your default shell.

swaits commented Oct 14, 2012

Nothing to add other than confirming Pow definitely fails to install if tcsh is your default shell.

@callumlocke

This comment has been minimized.

Show comment
Hide comment
@callumlocke

callumlocke Nov 11, 2012

I have this problem too. I am not using tcsh or anything unusual. I'm on a new Macbook Pro with Mountain Lion, and all I've done is install Node/npm, homebrew, rvm and Yeoman, using normal methods.

This is the output from curl get.pow.cx | sh:

  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  6887  100  6887    0     0  14876      0 --:--:-- --:--:-- --:--:-- 23266
*** Installing Pow 0.4.0...
*** Installing local configuration files...
*** Installing system configuration files as root...
Password:

/Users/callum.locke/Library/Application Support/Pow/Versions/0.4.0/lib/command.js:19
      throw err;
            ^
Error: ENOENT, open '/tmp/pow.87588.1352661160427.21167'

I've checked in /tmp and there's no such file there, hence the ENOENT. The installation doesn't seem to cause any new files to appear in /tmp at any stage.

Any ideas?

I have this problem too. I am not using tcsh or anything unusual. I'm on a new Macbook Pro with Mountain Lion, and all I've done is install Node/npm, homebrew, rvm and Yeoman, using normal methods.

This is the output from curl get.pow.cx | sh:

  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  6887  100  6887    0     0  14876      0 --:--:-- --:--:-- --:--:-- 23266
*** Installing Pow 0.4.0...
*** Installing local configuration files...
*** Installing system configuration files as root...
Password:

/Users/callum.locke/Library/Application Support/Pow/Versions/0.4.0/lib/command.js:19
      throw err;
            ^
Error: ENOENT, open '/tmp/pow.87588.1352661160427.21167'

I've checked in /tmp and there's no such file there, hence the ENOENT. The installation doesn't seem to cause any new files to appear in /tmp at any stage.

Any ideas?

@take

This comment has been minimized.

Show comment
Hide comment
@take

take Feb 8, 2013

having the same problem :( im not using tcsh or something as well.

[1:29:49] Takehiro:~ $ curl get.pow.cx | sh
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  6887  100  6887    0     0   5761      0  0:00:01  0:00:01 --:--:-- 10644
*** Installing Pow 0.4.0...
*** Installing local configuration files...

/Users/Takehiro/Library/Application Support/Pow/Versions/0.4.0/lib/command.js:19
      throw err;
            ^
Error: ENOENT, open '/var/folders/1c/025l_w_52n90qdq48psqj7f80000gn/T/pow.4754.1360341001118.15328'

take commented Feb 8, 2013

having the same problem :( im not using tcsh or something as well.

[1:29:49] Takehiro:~ $ curl get.pow.cx | sh
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  6887  100  6887    0     0   5761      0  0:00:01  0:00:01 --:--:-- 10644
*** Installing Pow 0.4.0...
*** Installing local configuration files...

/Users/Takehiro/Library/Application Support/Pow/Versions/0.4.0/lib/command.js:19
      throw err;
            ^
Error: ENOENT, open '/var/folders/1c/025l_w_52n90qdq48psqj7f80000gn/T/pow.4754.1360341001118.15328'
@adrianmendozaux

This comment has been minimized.

Show comment
Hide comment
@adrianmendozaux

adrianmendozaux Feb 11, 2013

Any one fins a fix. I just got the same error

Any one fins a fix. I just got the same error

@jaredmoody

This comment has been minimized.

Show comment
Hide comment

+1

@mraaroncruz

This comment has been minimized.

Show comment
Hide comment
@mraaroncruz

mraaroncruz Mar 20, 2013

I hacked a super ugly solution for this.
I am using zsh and that seems to be a problem for installing pow. I even ran

bash
export SHELL=/bin/bash
echo SHELL   #=> /bin/bash

and it still broke

I had to clone pow and edit the lib/util.js file
Pow still thought my SHELL env var was set to /bin/zsh I found out by doing some logging.
So I hard coded /bin/bash where it grabs my SHELL var

  getUserShell = function(callback) {
    var command;
    command = "dscl . -read '/Users/" + process.env.LOGNAME + "' UserShell";
    return exec(command, function(err, stdout, stderr) {
      var match, matches, shell;
      return callback("/bin/bash")  // HERE IS THE LINE I ADDED
      if (err) {
        return callback(process.env.SHELL);
      } else {
        if (matches = stdout.trim().match(/^UserShell: (.+)$/)) {
          match = matches[0], shell = matches[1];
          return callback(shell);
        } else {
          return callback(process.env.SHELL);
        }
      }
    });
  };

I left the rest of the function here for some context.
Now I can install and uninstall and install again. I am using powder to stop and start Pow and it works great.

I am possibly setting my SHELL var incorrectly. I hope someone comes along with a cleaner solution.

I hacked a super ugly solution for this.
I am using zsh and that seems to be a problem for installing pow. I even ran

bash
export SHELL=/bin/bash
echo SHELL   #=> /bin/bash

and it still broke

I had to clone pow and edit the lib/util.js file
Pow still thought my SHELL env var was set to /bin/zsh I found out by doing some logging.
So I hard coded /bin/bash where it grabs my SHELL var

  getUserShell = function(callback) {
    var command;
    command = "dscl . -read '/Users/" + process.env.LOGNAME + "' UserShell";
    return exec(command, function(err, stdout, stderr) {
      var match, matches, shell;
      return callback("/bin/bash")  // HERE IS THE LINE I ADDED
      if (err) {
        return callback(process.env.SHELL);
      } else {
        if (matches = stdout.trim().match(/^UserShell: (.+)$/)) {
          match = matches[0], shell = matches[1];
          return callback(shell);
        } else {
          return callback(process.env.SHELL);
        }
      }
    });
  };

I left the rest of the function here for some context.
Now I can install and uninstall and install again. I am using powder to stop and start Pow and it works great.

I am possibly setting my SHELL var incorrectly. I hope someone comes along with a cleaner solution.

@mraaroncruz

This comment has been minimized.

Show comment
Hide comment
@mraaroncruz

mraaroncruz Mar 20, 2013

I just read in the troubleshooting that I shouldn't install in iTerm2 or tmux... I was using tmux in iTerm2. Maybe this is my cleaner solution :P

I just read in the troubleshooting that I shouldn't install in iTerm2 or tmux... I was using tmux in iTerm2. Maybe this is my cleaner solution :P

@mraaroncruz

This comment has been minimized.

Show comment
Hide comment
@mraaroncruz

mraaroncruz Mar 22, 2013

Here is another solution but assumes you don't have /bin/bash as your login shell.

It seems like what process.env.SHELL grabs isn't your $SHELL variable but your login shell. A solution to this would be to run

chsh -s /bin/bash
exit
# log back in (sometimes you have to reboot your system)
curl get.pow.cx | sh
chsh -s /bin/tcsh  # or /bin/zsh or whatever your previous shell was

nicer than hacking the javascript. I haven't tried this, but I am pretty confident that it will work.
But @tkhr wrote that he wasn't "using tcsh or something" and if that means he was using bash then we still have a problem here :(

Here is another solution but assumes you don't have /bin/bash as your login shell.

It seems like what process.env.SHELL grabs isn't your $SHELL variable but your login shell. A solution to this would be to run

chsh -s /bin/bash
exit
# log back in (sometimes you have to reboot your system)
curl get.pow.cx | sh
chsh -s /bin/tcsh  # or /bin/zsh or whatever your previous shell was

nicer than hacking the javascript. I haven't tried this, but I am pretty confident that it will work.
But @tkhr wrote that he wasn't "using tcsh or something" and if that means he was using bash then we still have a problem here :(

@take

This comment has been minimized.

Show comment
Hide comment
@take

take Mar 22, 2013

@pferdefleisch

oooo this worked for me, my login shell was zsh :(

thx! :D i can rock on with pow again XD

take commented Mar 22, 2013

@pferdefleisch

oooo this worked for me, my login shell was zsh :(

thx! :D i can rock on with pow again XD

@callumlocke

This comment has been minimized.

Show comment
Hide comment
@callumlocke

callumlocke Nov 14, 2013

Still have this problem :(

$ curl get.pow.cx | sh
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  6887  100  6887    0     0   8740      0 --:--:-- --:--:-- --:--:--  8739
*** Installing Pow 0.4.1...
*** Installing local configuration files...
*** Installing system configuration files as root...

/Users/callum.locke/Library/Application Support/Pow/Versions/0.4.1/lib/command.js:20
      throw err;
            ^
Error: ENOENT, open '/tmp/pow.76801.1384412008217.42927'

Still have this problem :(

$ curl get.pow.cx | sh
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  6887  100  6887    0     0   8740      0 --:--:-- --:--:-- --:--:--  8739
*** Installing Pow 0.4.1...
*** Installing local configuration files...
*** Installing system configuration files as root...

/Users/callum.locke/Library/Application Support/Pow/Versions/0.4.1/lib/command.js:20
      throw err;
            ^
Error: ENOENT, open '/tmp/pow.76801.1384412008217.42927'
@brentdax

This comment has been minimized.

Show comment
Hide comment
@brentdax

brentdax Dec 16, 2014

I'm experiencing this problem on Yosemite (10.10.1). Although I normally use fish, it occurs even when I switch to bash. I do not use iTerm.

Although I have no node experience, I did manage to instrument several things in pow to try to figure out what's going on, most notably the execFile() call. I observe very long (multi-minute) hangs on line 4 of this transcript:

Brents-MacBook-Pro:~ root# ~brent/Library/Application\ Support/Pow/Current/bin/node ~brent/Library/Application\ Support/Pow/Current/bin/pow --install-system
execFile('/usr/bin/env' 'dscl' '.' '-read' '/Users/root' 'UserShell')
execFile('/usr/bin/env' 'dscl' '.' '-read' '/Users/root' 'UserShell') -> null
execFile('/usr/bin/env' 'login' '-qf' 'root' '/bin/sh' '-i' '-c' 'exec env > '/tmp/pow.6854.1418720624398.37948'')
execFile('/usr/bin/env' 'login' '-qf' 'root' '/bin/sh' '-i' '-c' 'exec env > '/tmp/pow.6854.1418720624398.37948'') -> null
readFile error Error: ENOENT, open '/tmp/pow.6854.1418720624398.37948'

/Users/brent/Library/Application Support/Pow/Versions/0.5.0/lib/command.js:20
      throw err;
            ^
Error: ENOENT, open '/tmp/pow.6854.1418720624398.37948'

Given that a call to env should take only a couple seconds at worst, something must be going wrong to cause such a long delay. I can't seem to access the child process's stdout or stderr to see what the command is outputting, but when I copy it from the execFile() logging and run it in my shell, this is what happens, with a long hang on line 3:

Brents-MacBook-Pro:~ root# '/usr/bin/env' 'login' '-qf' 'root' '/bin/sh' '-i' '-c' 'exec env > /tmp/pow.6854.1418720624398.37948'
Login incorrect
login: 
login: Login timed out after 300 seconds

I can't confirm that pow's call experiences the same "Login incorrect" message, but my best guess is that this is what's happening to pow: login is prompting for a username and password, pow is not prepared for it, and it just sits there until login times out and returns control to pow.

What I don't understand is what this message could mean. If I'm sudoed over to root, why would login reject this call with "Login incorrect"? The login man page seems to indicate that -f is only valid for root or a user logging in as themselves—but in this case, both of these things are true simultaneously! It seems like there's no way this should fail, and yet somehow, it clearly does.

I'm experiencing this problem on Yosemite (10.10.1). Although I normally use fish, it occurs even when I switch to bash. I do not use iTerm.

Although I have no node experience, I did manage to instrument several things in pow to try to figure out what's going on, most notably the execFile() call. I observe very long (multi-minute) hangs on line 4 of this transcript:

Brents-MacBook-Pro:~ root# ~brent/Library/Application\ Support/Pow/Current/bin/node ~brent/Library/Application\ Support/Pow/Current/bin/pow --install-system
execFile('/usr/bin/env' 'dscl' '.' '-read' '/Users/root' 'UserShell')
execFile('/usr/bin/env' 'dscl' '.' '-read' '/Users/root' 'UserShell') -> null
execFile('/usr/bin/env' 'login' '-qf' 'root' '/bin/sh' '-i' '-c' 'exec env > '/tmp/pow.6854.1418720624398.37948'')
execFile('/usr/bin/env' 'login' '-qf' 'root' '/bin/sh' '-i' '-c' 'exec env > '/tmp/pow.6854.1418720624398.37948'') -> null
readFile error Error: ENOENT, open '/tmp/pow.6854.1418720624398.37948'

/Users/brent/Library/Application Support/Pow/Versions/0.5.0/lib/command.js:20
      throw err;
            ^
Error: ENOENT, open '/tmp/pow.6854.1418720624398.37948'

Given that a call to env should take only a couple seconds at worst, something must be going wrong to cause such a long delay. I can't seem to access the child process's stdout or stderr to see what the command is outputting, but when I copy it from the execFile() logging and run it in my shell, this is what happens, with a long hang on line 3:

Brents-MacBook-Pro:~ root# '/usr/bin/env' 'login' '-qf' 'root' '/bin/sh' '-i' '-c' 'exec env > /tmp/pow.6854.1418720624398.37948'
Login incorrect
login: 
login: Login timed out after 300 seconds

I can't confirm that pow's call experiences the same "Login incorrect" message, but my best guess is that this is what's happening to pow: login is prompting for a username and password, pow is not prepared for it, and it just sits there until login times out and returns control to pow.

What I don't understand is what this message could mean. If I'm sudoed over to root, why would login reject this call with "Login incorrect"? The login man page seems to indicate that -f is only valid for root or a user logging in as themselves—but in this case, both of these things are true simultaneously! It seems like there's no way this should fail, and yet somehow, it clearly does.

@brentdax

This comment has been minimized.

Show comment
Hide comment
@brentdax

brentdax Dec 18, 2014

I've spoken to an Apple engineer and he believes the login issue I described may be a bug in OS X. I've filed a bug with them (19290901, not that it helps, since their bug tracker is private) and I'll let you guys know if I hear anything.

I've spoken to an Apple engineer and he believes the login issue I described may be a bug in OS X. I've filed a bug with them (19290901, not that it helps, since their bug tracker is private) and I'll let you guys know if I hear anything.

@youpy

This comment has been minimized.

Show comment
Hide comment
@youpy

youpy Jan 30, 2015

Enabling root user seems be the solution.
(You should disable root again after installing.)

youpy commented Jan 30, 2015

Enabling root user seems be the solution.
(You should disable root again after installing.)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.