Skip to content

Error: spawn ETXTBSY #19

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

Closed
lukewaite opened this issue Aug 31, 2016 · 8 comments · Fixed by #23
Closed

Error: spawn ETXTBSY #19

lukewaite opened this issue Aug 31, 2016 · 8 comments · Fixed by #23

Comments

@lukewaite
Copy link

I'm getting the following error when attempting to use this extension in CI.

Error: spawn ETXTBSY
    at exports._errnoException (util.js:893:11)
    at ChildProcess.spawn (internal/child_process.js:302:11)
    at exports.spawn (child_process.js:367:9)
    at Object.exports.execFile (child_process.js:139:15)
    at /builds/intouch-capture/app/node_modules/browserstack-local/lib/Local.js:31:34
    at /builds/intouch-capture/app/node_modules/browserstack-local/lib/LocalBinary.js:44:11
    at FSReqWrap.oncomplete (fs.js:82:15)

Is this possibly a race condition where the Binary is being executed while it is being moved into place?

@ChrisZieba
Copy link

Also seeing this issue

@eljefedelrodeodeljefe
Copy link

dito

@ngsankha
Copy link

Are you on a Linux VM hosted on a Windows machine via Vagrant or something similar?

@lukewaite
Copy link
Author

I'm inside a docker container running on Ubuntu 16.04.

@eljefedelrodeodeljefe
Copy link

eljefedelrodeodeljefe commented Oct 16, 2016

For me it is a CircleCI machine.

@ChrisZieba
Copy link

@sankha93

This is the circle.yaml file I'm using, the container is running Ubuntu 14.04.

machine:
  node:
    version: 6.1.0
  services:
    - redis

dependencies:
  cache_directories:
     - mongodb-linux-x86_64-3.2.8
  pre:
    - if [[ ! -d mongodb-linux-x86_64-3.2.8 ]]; then wget http://downloads.mongodb.org/linux/mongodb-linux-x86_64-3.2.8.tgz && tar xvzf mongodb-linux-x86_64-3.2.8.tgz; fi
    - sudo /etc/init.d/mongod stop
    - sudo cp mongodb-linux-x86_64-3.2.8/bin/* /usr/bin
    - sudo /etc/init.d/mongod start

test:
  override:
    - NODE_ENV=test ./node_modules/cucumber/bin/cucumber.js ./client/test/features/hello-localize.feature

Here is the test it is running:

'use strict';

const assert = require('cucumber-assert');
const config = require('config');
require('selenium-webdriver');

module.exports = function() {

  this.When(/^I open the homepage$/, function(next) {
    this.driver.get(`http://localhost:${config.ports.web}`);
    next();
  });

  this.Then(/^I should see "([^"]*)"$/, function(sourceMatch, next) {
    this.driver.getPageSource()
      .then(function(source) {
        assert.equal(source.indexOf(sourceMatch) > -1, true, next, 'Expected source to contain ' + sourceMatch);
      });
  });
};

and the feature file

Feature: Homepage testing

Scenario: Can check the homepage
When I open the homepage
Then I should see "Ready for the world?"

@Shilpi3
Copy link

Shilpi3 commented Oct 20, 2016

I am also getting the same error. I have tried installing browserstack-local globally. Any updates??

@vedharish
Copy link
Contributor

During the download, the bindings used to pipe the response to the file and proceed on the response end event. This might have a race condition when the response finished but the filestream was still being written to. Changed this to process on close event for the filestream.

Also added retries if the binary execution failed. So, this issue should not happen again and if it does, the binary should automatically retry download. Please reopen this issue if you still face this still.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants