Skip to content

Error: spawn ETXTBSY #19

Description

@lukewaite

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?

Activity

  1. ChrisZieba commented on Oct 13, 2016

    @ChrisZieba

    Also seeing this issue

  2. eljefedelrodeodeljefe commented on Oct 15, 2016

    @eljefedelrodeodeljefe

    dito

  3. ngsankha commented on Oct 16, 2016

    @ngsankha

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

  4. lukewaite commented on Oct 16, 2016

    @lukewaite
    Author

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

  5. eljefedelrodeodeljefe commented on Oct 16, 2016

    @eljefedelrodeodeljefe

    For me it is a CircleCI machine.

  6. ChrisZieba commented on Oct 17, 2016

    @ChrisZieba

    @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?"
    
  7. Shilpi3 commented on Oct 20, 2016

    @Shilpi3

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

  8. vedharish commented on Oct 25, 2016

    @vedharish
    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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions