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

Remote debugger not working on Windows #7544

Closed
ede-krcv opened this issue Jan 15, 2017 · 18 comments
Closed

Remote debugger not working on Windows #7544

ede-krcv opened this issue Jan 15, 2017 · 18 comments

Comments

@ede-krcv
Copy link
Contributor

ede-krcv commented Jan 15, 2017

Operating system or device - Godot version:

Godot.64bit 2.1 branch (9c8ecb4)
compiled on Windows 7 with MinGW-w64, 4.8.3

Issue description:

gdscript remote debugger cannot connect to editor:

Remote Debugger: Connection failed with status: 3'', retrying in 1 sec.
Remote Debugger: Connection failed with status: 3'', retrying in 1 sec.
Remote Debugger: Connection failed with status: 3'', retrying in 1 sec.
Remote Debugger: Unable to connect

Reverting IPv6 commits enables the debugger connection again.
Local debugger is working.
I have nothing configured for IPv6 support and never used it with Windows 7.

Related issue
#7545

@bojidar-bg
Copy link
Contributor

@Faless mmm, ping? 😃

@Faless
Copy link
Collaborator

Faless commented Jan 16, 2017

@Faless mmm, ping? 😃

I'll have a look at it today.

@ktksgit can you try running godot from the command line (start -> run -> cmd):

cd C:\path\to\godot
godot.windows.tools.64.exe -path C:\path\to\project_folder

And post the messages in the windows command prompt before and after running the project with the debugger?

@ede-krcv
Copy link
Contributor Author

I think you mean running from editor? Just running the project does not start a network connection to the editor.

The project tries to connect to localhost, but only the status 3 == ERROR occurs.

b

(note: compiled without ssl)

@Faless
Copy link
Collaborator

Faless commented Jan 16, 2017

I think you mean running from editor? Just running the project does not start a network connection to the editor.

Yes, thanks for the log!
Sadly, I'm unable to reproduce.
Can you check if the executable is somehow blocked by windows firewall? Happened to me once to debug for hours because of that.
The socket seems to be created okay, and it's flags seems to be set correctly (otherwise the engine should spit other ERRORs and WARNINGs).

@Faless
Copy link
Collaborator

Faless commented Jan 16, 2017

@ktksgit could you try this patch: https://patch-diff.githubusercontent.com/raw/godotengine/godot/pull/7554.diff and tell me if it works? So at least we know if it's related

@akien-mga
Copy link
Member

could you try this patch

Or update your local branch, as the PR was merged.

@ede-krcv
Copy link
Contributor Author

PR changed the output to
Remote Debugger: Connection failed with status: 1'', retrying in 1 sec. == StreamPeerTCP::STATUS_CONNECTING
:-)

  1. I increased the number of "tries" in ScriptDebuggerRemote::connect_to_host([...]) to a huge number == 30
    Not connecting
  2. I increased the number of "tries" in ScriptDebuggerRemote::connect_to_host([...]) to a huge number == 30 and disabled Windows-Firewall
    It connects, but only after 8 tries/seconds. Not the implemented 3 tries.
  3. Changing just the files related to IPv6 from commit 5aac8ee to I think 24a440a (change to the old windows socket implementation)
    It connects on the second try,

Hmm, what kind of misconfiguration or bug? touches the new socket implementation in my windows 7?

@Faless
Copy link
Collaborator

Faless commented Jan 17, 2017

Well, it clearly shouldn't fail with STATUS_CONNECTING.
Also, why is there a difference between enabled and disabled windows firewall if the app itself is whitelisted? There should be no difference.
I'll have a look on why if might fail with STATUS_CONNECTING but I'm really baffled about this, and since I can't reproduce it it's hard to debug. It's a start though that something changed 🕺

@Faless
Copy link
Collaborator

Faless commented Jan 17, 2017

Okay, it seems that on your system it takes up to 8 seconds to pass from STATUS_CONNECTING to STATUS_CONNECTED. That sounds really strange 😿

@ede-krcv
Copy link
Contributor Author

Did some debugging:
Address localhost resolves to IPv6 ::1, which gives the strange behaviour.
So I changed the address in EditorRun::run([...]) from localhost to 127.0.0.1 => it's connecting
(I could also change the mapping 127.0.0.1 localhost in C:\Windows\System32\drivers\etc\hosts)

So every workaround leads to force using IPv4. [because my system does not like IPv6 :-( ]

@miroro
Copy link

miroro commented Feb 6, 2017

It looks like I have the same problem.

Remote Debugger: Connection failed with status: 1'', retrying in 1 sec.
Remote Debugger: Connection failed with status: 1'', retrying in 1 sec.
Remote Debugger: Connection failed with status: 1'', retrying in 1 sec.
Remote Debugger: Unable to connect

I'm on Windows 7, and this problem appeared for me in 2.1.2, the stable release, but it works fine on 2.1.1. I've checked firewall settings, it should not cause problems.

@ede-krcv
Copy link
Contributor Author

ede-krcv commented Feb 9, 2017

As a workaround: You can try to set the line:
127.0.0.1 localhost
in C:\Windows\System32\drivers\etc\hosts.

@miroro
Copy link

miroro commented Feb 9, 2017

It's indeed working this way, thank you.
It now has the following line in the output, but it works after that.

Remote Debugger: Connection failed with status: 2'', retrying in 1 sec.

@efornara
Copy link
Contributor

Using Windows 10 here. The bug shows up only when the machine is disconnected from the Internet.

At least on Windows 10, editing hosts didn't help. A comment in there hints that the setting might be ignored:

# localhost name resolution is handled within DNS itself.
#   127.0.0.1       localhost
#   ::1             localhost

#8179

Tested on Windows 10, and compiled on Windows Subsystem for Linux (Trusty Tahr) with x86_64-w64-mingw32-g++ (GCC) 4.8.2.

@akien-mga akien-mga changed the title Remote debugger not working (2.1-branch) Remote debugger not working on Windows (2.1-branch) Mar 30, 2017
@akien-mga akien-mga added this to the 3.0 milestone Mar 30, 2017
@akien-mga akien-mga changed the title Remote debugger not working on Windows (2.1-branch) Remote debugger not working on Windows Mar 30, 2017
@akien-mga
Copy link
Member

Worked around in #8179 for the 2.1 branch, but as mentioned on that PR it's not a complete fix. So keeping this issue open for 3.0.

@ghost
Copy link

ghost commented May 8, 2017

I'm getting this under Linux

Remote Debugger: Connection failed with status: 1'', retrying in 1 sec.
Remote Debugger: Connection failed with status: 1'', retrying in 1 sec.
Remote Debugger: Connection failed with status: 1'', retrying in 1 sec.
Remote Debugger: Unable to connect

Apparently it doesn't work when IPv6 traffic is disabled through ip6tables (I disabled it to prevent VPN leaks). I tried to use IPv4 addressed from Editor Settings > Network, but I'm getting the same error.

@nanodeath
Copy link
Contributor

Is this expected to be working on Windows 10 with 2.1.4? It's not.

@Faless
Copy link
Collaborator

Faless commented Oct 20, 2017

Is this expected to be working on Windows 10 with 2.1.4? It's not.

@nanodeath it's partially broken, will be fixed in 2.1.5 (already merged in 2.1 branch), in the meantime, there is an easy workaround:

Changing "Editor Setting -> Network Host -> Debug Host" to 127.0.0.1 solved the issue in 2.1.4 stable. (Windows 10 x64)

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

No branches or pull requests

7 participants