New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

v1.9.2: EACCESS error on first install #102

Closed
zkat opened this Issue Sep 10, 2013 · 13 comments

Comments

Projects
None yet
9 participants
@zkat

zkat commented Sep 10, 2013

I installed phantomjs@1.9.2-0 globally with npm and got an error when I tried to run it as a user.

Steps:

  • $ sudo npm install -g phantomjs@1.9.2-0
  • $ phantomjs

Results:

Error executing phantom at /opt/local/lib/node_modules/phantomjs/lib/phantom/bin/phantomjs
Error: spawn EACCES
    at errnoException (child_process.js:980:11)
    at Process.ChildProcess._handle.onexit (child_process.js:771:34)
execvp(): Permission denied

Notes

However, this works:

$ sudo phantomjs
2013-09-10 16:14:04.943 phantomjs[25505:707] *** WARNING: Method userSpaceScaleFactor in class NSView is deprecated on 10.7 and later. It should not be used in new applications. Use convertRectToBacking: instead. 
phantomjs> ^D
$ phantomjs
2013-09-10 16:15:05.790 phantomjs[25510:707] *** WARNING: Method userSpaceScaleFactor in class NSView is deprecated on 10.7 and later. It should not be used in new applications. Use convertRectToBacking: instead. 
phantomjs>

I can execute phantomjs normally from then on, without any problems.

I tested this phantomjs@1.9.1-0, and didn't get this error.

@emirotin

This comment has been minimized.

emirotin commented Oct 16, 2013

+1 for the problem and for the work-around
Thanks @sykopomp

@gmcguire

This comment has been minimized.

gmcguire commented Dec 3, 2013

+1, for me at least, this seems to be an OS X 10.8 -> 10.9 (Mavericks) upgrade issue.

@dpup

This comment has been minimized.

Contributor

dpup commented Dec 3, 2013

Works fine for me on mavericks. What's the exact error you are seeing.

@gmcguire

This comment has been minimized.

gmcguire commented Dec 3, 2013

Running PhantomJS via Karma:

Running "karma:unit-continuous" (karma) task
INFO [karma]: Karma server started at http://localhost:11080/__testacular/
INFO [launcher]: Starting browser PhantomJS
ERROR [launcher]: Cannot start PhantomJS
    Error: spawn EACCES
INFO [launcher]: Trying to start PhantomJS again.
ERROR [launcher]: Cannot start PhantomJS
    Error: spawn EACCES
INFO [launcher]: Trying to start PhantomJS again.
ERROR [launcher]: Cannot start PhantomJS
    Error: spawn EACCES
Warning: Task "karma:unit-continuous" failed. Use --force to continue.

Then load the console:

greg$ sudo phantomjs 
phantomjs> ^D 

Then Karma is able to load PhantomJS:

Running "karma:unit-continuous" (karma) task
INFO [karma]: Karma server started at http://localhost:11080/__testacular/
INFO [launcher]: Starting browser PhantomJS
INFO [PhantomJS 1.9 (Mac)]: Connected on socket id fMYJPR3jnv3PoSNiFmUd
........................................
PhantomJS 1.9 (Mac): Executed 40 of 40 SUCCESS (0.497 secs / 0.252 secs)

Done, without errors.

Using karma@0.10.2, karma-phantomjs-launcher@0.1.0, phantomjs@1.9.2-2. Do you think this an npm and/or Mavericks issue and not phantomjs?

@dpup

This comment has been minimized.

Contributor

dpup commented Dec 3, 2013

If you run phantomjs without sudo it also fails?

@gmcguire

This comment has been minimized.

gmcguire commented Dec 3, 2013

Yes, it gave me the same error as @sykopomp. Once I ran it once under sudo it runs fine as me. I confirmed I am the file's owner and it has permissions 755. This seems more like an OS X issue frankly.

@dpup

This comment has been minimized.

Contributor

dpup commented Dec 3, 2013

yeah, very strange.

-- Dan

On Tue, Dec 3, 2013 at 7:54 AM, Greg McGuire notifications@github.comwrote:

Yes, it gave me the same error as @sykopomp https://github.com/sykopomp.
Once I ran it once under sudo it runs fine as me. I confirmed I am the
file's owner and it has permissions 755. This seems more like an OS X issue
frankly.


Reply to this email directly or view it on GitHubhttps://github.com//issues/102#issuecomment-29721448
.

@spwizard

This comment has been minimized.

spwizard commented Dec 6, 2013

Running OSX 10.9 and have the same issue, launch with sudo and all is fine, thats an hour I'll never get back ;)

@PunkChameleon

This comment has been minimized.

PunkChameleon commented Jan 30, 2014

Having this issue as well. Is there any workaround? I want to automate something and have it work OS-agnostic so we can't run sudo everytime :(

@seanislegend

This comment has been minimized.

seanislegend commented Feb 12, 2014

+1 only works with sudo.

@ykt

This comment has been minimized.

ykt commented Feb 18, 2014

The problem seems because it is installed in the not writable folder. Another workaround that works for me is having phantomjs installed in the writable folder, e.g.:

setenv PATH "`echo $PATH`:./node_modules/phantomjs/bin/"
@rtkpmcalpine

This comment has been minimized.

rtkpmcalpine commented Mar 11, 2014

If I just run it once with sudo it works after that. I'm just running this after I install it:
sudo phantomjs --version

@dpup

This comment has been minimized.

Contributor

dpup commented May 23, 2014

I don't have enough information to fix this so am going to close. If any of you can isolate the issue and propose a patch I'd happily review.

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