I am using Java. I am trying to automate a scenario, where am trying to search all details of an ID, it works fine when I test the scenario manually. It fails when I automate the scenario.

Note: I was able to successfully automate this scenario earlier.

I am getting the below response when I automate it:

{"errors":[{"message":"Context creation failed: connect ECONNREFUSED","extensions":{"code":"INTERNAL_SERVER_ERROR","exception":{"stacktrace":["Error: connect ECONNREFUSED","    at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1141:16)"]}}}]}
  • Whether the testing is carried out in different devices?? Like you are doing manual testing in an machine which is getting passed and automation in another machine which is getting failed – Mohamed Sulaimaan Sheriff May 3 '20 at 18:12
  • No same machine, even I cleared the browser cache and also run in incognito it was success when I do manual . – ansh May 3 '20 at 19:31
  • It fails if I try manually in the browser launched by driver. – ansh May 3 '20 at 20:06
  • It seems your application is calling the app running on the port 80 of your local machine. Is this expected? – João Farias May 3 '20 at 20:22
  • I guess your testing with url "" where port is 80. So your actual url is Make a try with your local network link. where is your machine ip. – Mohamed Sulaimaan Sheriff May 3 '20 at 22:15

I was getting this because I had set capability

:- chromeOptions.addArguments("--disable-web-security");

After removing this it's all fine .

Origin was not going in request headers, which is used in facade layer. if undefined then it gets replaced by local.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.