craigburke / karma-gradle

Gradle Plugin for Running tests with Karma
Other
21 stars 11 forks source link

Unable to unpack phantomjs archive at Linux #10

Closed valfirst closed 8 years ago

valfirst commented 8 years ago

I use PhantomJS to run E2E tests. I've found that the tests have started failing at phantomjs archive unpacking step. I've not changed the configuration (I used karma-gradle 1.4.1). I've tried to switch to the latest version: 1.4.3. The error is still reproduced:

:karmaDependenciesError extracting archive
Phantom installation failed { [Error: Command failed: tar jxf /tmp/phantomjs/phantomjs-2.1.1-linux-x86_64.tar.bz2
tar (child): bzip2: Cannot exec: No such file or directory
tar (child): Error is not recoverable: exiting now
tar: Child returned status 2
tar: Error is not recoverable: exiting now
]
  killed: false,
  code: 2,
  signal: null,
  cmd: 'tar jxf /tmp/phantomjs/phantomjs-2.1.1-linux-x86_64.tar.bz2' } Error: Command failed: tar jxf /tmp/phantomjs/phantomjs-2.1.1-linux-x86_64.tar.bz2
tar (child): bzip2: Cannot exec: No such file or directory
tar (child): Error is not recoverable: exiting now
tar: Child returned status 2
tar: Error is not recoverable: exiting now

    at ChildProcess.exithandler (child_process.js:203:12)
    at emitTwo (events.js:87:13)
    at ChildProcess.emit (events.js:172:7)
    at maybeClose (internal/child_process.js:818:16)
    at Socket.<anonymous> (internal/child_process.js:319:11)
    at emitOne (events.js:77:13)
    at Socket.emit (events.js:169:7)
    at Pipe._onclose (net.js:469:12)
Error extracting archive
Phantom installation failed { [Error: Command failed: tar jxf /tmp/phantomjs/phantomjs-2.1.1-linux-x86_64.tar.bz2
tar (child): bzip2: Cannot exec: No such file or directory
tar (child): Error is not recoverable: exiting now
tar: Child returned status 2
tar: Error is not recoverable: exiting now
]
  killed: false,
  code: 2,
  signal: null,
  cmd: 'tar jxf /tmp/phantomjs/phantomjs-2.1.1-linux-x86_64.tar.bz2' } Error: Command failed: tar jxf /tmp/phantomjs/phantomjs-2.1.1-linux-x86_64.tar.bz2
tar (child): bzip2: Cannot exec: No such file or directory
tar (child): Error is not recoverable: exiting now
tar: Child returned status 2
tar: Error is not recoverable: exiting now

    at ChildProcess.exithandler (child_process.js:203:12)
    at emitTwo (events.js:87:13)
    at ChildProcess.emit (events.js:172:7)
    at maybeClose (internal/child_process.js:818:16)
    at Socket.<anonymous> (internal/child_process.js:319:11)
    at emitOne (events.js:77:13)
    at Socket.emit (events.js:169:7)
    at Pipe._onclose (net.js:469:12)
 FAILED

It looks like this issue is very similar to https://github.com/Medium/phantomjs/issues/467. I understand that the root cause is most likely not in karma-gradle plugin itself (maybe some dependency version update will be needed). But I'm not an expert in front end development, so I was not able follow a chain of dependencies to find out the root cause and propose a fix.

valfirst commented 8 years ago

I'm sorry for confusion, it was an external configuration issue not related to the plugin

craigburke commented 8 years ago

@valfirst cool, I'm glad you figured it out.

moisesrodriguez commented 7 years ago

@valfirst What did you end up doing to fix it? Having the same error

valfirst commented 7 years ago

@moisesrodriguez, in my case the issue was solved by installation of bzip2 utility

moisesrodriguez commented 7 years ago

@valfirst thank you. That did the trick.

PleaseCallMeKing commented 5 years ago

run command yum install bzip2 solved my question

kamalakarjana commented 5 years ago

run command yum install bzip2

its works