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

UPNP.add_port_mapping() outputs error regarding delete_port_mapping() #38149

Closed
Aeropulu opened this issue Apr 23, 2020 · 2 comments · Fixed by #63809
Closed

UPNP.add_port_mapping() outputs error regarding delete_port_mapping() #38149

Aeropulu opened this issue Apr 23, 2020 · 2 comments · Fixed by #63809

Comments

@Aeropulu
Copy link

Godot version:
3.2.1 stable

OS/device including version:
Windows 10
The router I use is a Orange Livebox, I'm not sure what parts of the description .xml might be useful and safe to share. Also I don't have admin access to it.

Issue description:
Adding a port mapping outputs an error regarding delete_port_mapping. The port mapping seems to get properly added and can be deleted later with no error.
Issue described in this question https://godotengine.org/qa/65365/delete_port_mapping-condition-i-0-is-true
Outputs E 0:00:03.211 delete_port_mapping: Condition "i != (0)" is true. Returned: UPNP::upnp_result(i) <C++ Source> modules/upnp/upnp_device.cpp:90 @ delete_port_mapping() <Stack Trace> UPNPTest.gd:8 @ _ready()

Steps to reproduce:
Run the following:
var upnp = UPNP.new()
upnp.discover()
upnp.add_port_mapping(4200)
Minimal reproduction project:
upnp bug repro.zip

@JotaFaD
Copy link

JotaFaD commented Jun 19, 2020

This is a pretty annoying bug that is also happening in my project.

EDIT: If anyone has this same bug and finds this issue, you can bypass the error by adding the port mapping directly to the default gateway, which is the same thing upnp.add_port_mapping does, minus trying to delete a non existing port.

upnp = UPNP.new()
var result = upnp.discover()
if result == UPNP.UPNP_RESULT_SUCCESS:
    var gateway = upnp.get_gateway()
    gateway.add_port_mapping(4200)

@mhilbrunner
Copy link
Member

PR to fix this behaviour: #63809
Notably, this is only a cosmetic log message that shouldn't effect anything, so you can just ignore the message.

@akien-mga akien-mga added this to the 3.5 milestone Aug 2, 2022
@mhilbrunner mhilbrunner modified the milestones: 3.5, 3.x Aug 27, 2022
@akien-mga akien-mga modified the milestones: 3.x, 3.6 Aug 27, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants