Skip to content

Exception while running local test on Windows #27

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

Open
ckzgraphics opened this issue Apr 5, 2019 · 2 comments
Open

Exception while running local test on Windows #27

ckzgraphics opened this issue Apr 5, 2019 · 2 comments

Comments

@ckzgraphics
Copy link

ckzgraphics commented Apr 5, 2019

🔴 Error-

{{ Connecting local
C:\Users\<User>\Documents\nightwatch-browserstack\scripts\local.runner.js:14
if (error) throw error;
^
LocalError
at C:\Users\<User>\Documents\nightwatch-browserstack\node_modules\browserstack-local\lib\Local.js:58:20
at ChildProcess.exithandler (child_process.js:280:7)
at ChildProcess.emit (events.js:182:13)
at maybeClose (internal/child_process.js:962:16)
at Process.ChildProcess._handle.onexit (internal/child_process.js:251:5 }}

Steps to reproduce-

  1. Clone the git repo- https://github.com/browserstack/nightwatch-browserstack
  2. Complete the steps mentioned in the README.md file
  3. Execute the command- npm run local

System Details- Windows 10

@JohnamLane
Copy link

I had this same issue. On line 14 of local.runner.js, the BROWSERSTACK_ACCESS_KEY is pulled from .env
This assumes you are pulling this secret from a local .env file.

I fixed this by adding the dotenv NPM package to my package.json, then adding the following to the top of local.runner.js:
require('dotenv').config();

From there, make sure you have a .env in your project with the following in it:
BROWSERSTACK_ACCESS_KEY=<Your Key>

@vedharish
Copy link
Contributor

@ckzgraphics Can you share local.log file generated in the working directory from the code? Check

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

3 participants