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

Gauge error while running Selenium scripts in debug mode , Java Intellij Unable to open debugger port java.net.connectException "Connection refused: connect" #2017

Open
hcsan opened this issue Jun 15, 2021 · 5 comments

Comments

@hcsan
Copy link

hcsan commented Jun 15, 2021

Hi Team,

Nee your help on fixing Gauge java script execution in debug mode

Describe the bug
Gauge error while running in debug mode , Java Intellij Unable to open debugger port java.net.connectException "Connection refused: connect"

To Reproduce
Steps (or project) to reproduce the behavior:

  1. Gauge maven project
  2. Windows VDI ( virtual desktop ) machine not works on debug mode
  3. Same works fine other laptops
  4. Tried rerun - getting same issue
  5. Tried restart IDE - getting same issue
  6. Tried restarting machine - not worked
$ gauge init java 

Logs

Paste any log or error messages here

Expected behavior
A clear and concise description of what you expect to happen.

Screenshots
image

Versions:

gauge -v
Gauge version: 1.1.8
Commit Hash: b1501f4

Plugins
-------
flash (0.0.2)
html-report (4.0.12)
java (0.7.15)
screenshot (0.0.1)
xml-report (0.2.3)

Thanks
Shc

@sriv
Copy link
Member

sriv commented Jun 26, 2021

It seems that the target machine may not be allowing the port in that range. You can try choosing a port that is allowed, and set GAUGE_DEBUG_OPTS=<port>

@alpha1592
Copy link

I get a similar issue when using IntelliJ.
It seems that when you run a gauge test in debug mode, two tabs get created in IntelliJ.
One that has the name of your test, and one tab that doesn't have any name (tiny little tab).

By default, the tab with no name gets selected as default. You have to switch to the tab with your test name to see the console logs etc.

Similarly, if you click the debug icon on the debug screen when the no-name tab is selected, you will get the error. If you switch to the tab with your test name, the test will run fine; at least it does for me.

Give it a try and see if that works. It's an annoyance of course, but I am unsure where the issue lies; IntelliJ? Gauge IntelliJ plugin? or Gauge?

Hope this helps!

debug_error

@0vid1u
Copy link

0vid1u commented Aug 4, 2021

hi, mostly probably the Intellij plug-in doesn't work fine with gauge-java >=0.7.8. to make it work try to downgrade the gauge-java to version 0.7.7

@0vid1u
Copy link

0vid1u commented Aug 4, 2021

@sriv the same project template run in debug mode via IntelliJ will fail with timeout error and using vs code will works as expected, also added a firewall rule to keep open all tcp ports during this test, setting up the GAUGE_DEBUG_OPTS doesn't help.
Could you take a look at this issue with your expertise? would be great to know witch component cause the issue.

@0vid1u
Copy link

0vid1u commented Aug 4, 2021

relates to
getgauge/gauge-java#619

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

4 participants