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

Not able to run detox test (Error: connect ECONNREFUSED) #597

Closed
jln-dk opened this issue Mar 4, 2018 · 1 comment
Closed

Not able to run detox test (Error: connect ECONNREFUSED) #597

jln-dk opened this issue Mar 4, 2018 · 1 comment

Comments

@jln-dk
Copy link

jln-dk commented Mar 4, 2018

Description

I followed the "Getting Started" guide carefully step by step, on a completely new React Native project (react-native init).
Running detox build works fine, but detox test does not. It results in this error:

screen shot 2018-03-04 at 11 37 17

I am not behind any specific/corporate proxy, and I have never met NPM connection errors like that before.

Steps to Reproduce

  1. Followed the "Getting Started" docs
  2. Install all the latest dependencies as of this date today
  3. Init a new React Native project
  4. Run detox build and then detox test

Detox, Node, Device, Xcode and macOS Versions

  • Detox: 7.1.0
  • Detox CLI: 7.0.0
  • Node: 8.9.4
  • Device: iPhone 7, 11.2
  • Xcode: 9.2, build 9C40b
  • macOS: 10.13.3 (17D102)

Device and verbose Detox logs

node_modules/.bin/mocha e2e --opts e2e/mocha.opts  --loglevel verbose


detox info 11:45:45: server listening on localhost:51743...
detox ERR! ws onError: Error: connect ECONNREFUSED ::1:51743
  1) "before all" hook

  0 passing (30s)
  1 failing

  1) "before all" hook:
     Error: connect ECONNREFUSED ::1:51743
      at Object._errnoException (util.js:1022:11)
      at _exceptionWithHostPort (util.js:1044:20)
      at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1182:14)




  0 passing (30s)
  1 failing

  1) "before all" hook:
     Error: connect ECONNREFUSED ::1:51743
      at Object._errnoException (util.js:1022:11)
      at _exceptionWithHostPort (util.js:1044:20)
      at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1182:14)



child_process.js:644
    throw err;
    ^

Error: Command failed: node_modules/.bin/mocha e2e --opts e2e/mocha.opts  --loglevel verbose
    at checkExecSyncError (child_process.js:601:13)
    at Object.execSync (child_process.js:641:13)
    at runMocha (/Users/jesperlund/dev/mobile-client/node_modules/detox/local-cli/detox-test.js:72:6)
    at Object.<anonymous> (/Users/jesperlund/dev/mobile-client/node_modules/detox/local-cli/detox-test.js:50:5)
    at Module._compile (module.js:643:30)
    at Object.Module._extensions..js (module.js:654:10)
    at Module.load (module.js:556:32)
    at tryModuleLoad (module.js:499:12)
    at Function.Module._load (module.js:491:3)
    at Function.Module.runMain (module.js:684:10)```
@LeoNatan
Copy link
Contributor

LeoNatan commented Mar 4, 2018

Something is blocking connection. Perhaps you have a firewall application that is preventing the server port opening.

@jln-dk jln-dk closed this as completed Mar 5, 2018
@wix wix locked and limited conversation to collaborators Jul 23, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants