Skip to content
This repository has been archived by the owner on Jul 24, 2019. It is now read-only.

v1.9.2: EACCESS error on first install #102

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

v1.9.2: EACCESS error on first install #102

zkat opened this issue Sep 10, 2013 · 13 comments

Comments

@zkat
Copy link

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
Copy link

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

@gmcguire
Copy link

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
Copy link
Contributor

dpup commented Dec 3, 2013

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

@gmcguire
Copy link

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
Copy link
Contributor

dpup commented Dec 3, 2013

If you run phantomjs without sudo it also fails?

@gmcguire
Copy link

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
Copy link
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
Copy link

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
Copy link

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
Copy link

+1 only works with sudo.

@ykt
Copy link

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
Copy link

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
Copy link
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 subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

9 participants