Skip to content
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

The binary found in ~/.browserstack is of size 0KB #27

Closed
shanep2300 opened this issue Feb 14, 2017 · 6 comments
Closed

The binary found in ~/.browserstack is of size 0KB #27

shanep2300 opened this issue Feb 14, 2017 · 6 comments

Comments

@shanep2300
Copy link

shanep2300 commented Feb 14, 2017

This is after deleting the binary and re-initiating the test script to try and get a fresh binary.

Using version 1.3.0 on Windows 7.

@pulkitsharma07
Copy link
Contributor

Are you still facing after this #28 ?

@shanep2300
Copy link
Author

Yes, as I would rather use the default one rather than a defined path.

@vedharish
Copy link
Contributor

Hey @shanep2300,
I think this might be because of a failed download. Did you check/get some error object in the callback to start?

bs_local.start(bs_local_args, function(error) {
  console.log("Error:", error);
});

Also, a 0kb file in that particular path should not be an issue as this module re-downloads the binary if it cannot start the binary / the binary is corrupted. So the 0kb file should be fixed on re-downloading (or cough-up a LocalError object if it fails to do so)

@shanep2300
Copy link
Author

shanep2300 commented Feb 22, 2017

Hello @vedharish,
This is how it's set up:

console.log("Connecting local");
exports.bs_local = new browserstack.Local();
exports.bs_local.start({
    'key': exports.config.multiCapabilities['browserstack.key'],
    'localIdentifier': exports.config.multiCapabilities['browserstack.localIdentifier']}, function(error) {
  if (error) return reject(error);
  console.log('Connected. Now testing...');
  
  resolve();
});

This is the error I'm getting:

Error: spawn UNKNOWN
    at exports._errnoException (util.js:1022:11)
    at ChildProcess.spawn (internal/child_process.js:313:11)
    at exports.spawn (child_process.js:380:9)
    at Object.exports.execFile (child_process.js:143:15)

@shanep2300
Copy link
Author

Ashwin, from BrowserStack support, helped me fix the spawn issue. Well half of it. The path to the binary needed the .exe. os.homedir() +'/binaries/BrowserStackLocal.exe'. If it didn't have the .exe it would cause another spawn issue. I thought the path just had to point to the folder where the binary was located.

The other half of the problem still hasn't been fixed. I can't get this to work without the binary path defined.

@shanep2300
Copy link
Author

Found a better solution for the path.

var path = require('path');
'binarypath': path.resolve(process.cwd()) + '/binaries/BrowserStackLocal.exe'

This will point the path to the working directory instead of the home directory.

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

No branches or pull requests

4 participants