You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
PortMappingListener fails with IGD v2 and ui4 port arguments #366
I got this issue with Forge using jupnp 3.0.3 on a network with a Netgear configured as an access point (192.168.1.2) behind a D-Link gateway (192.168.1.1).
Just for the record, Forge is an open-source implementation of Magic the gathering. The desktop client provides an online multiplayer feature that uses jupnp to automatically configure port forwarding when hosting a lobby.
So, when Forge starts its multiplayer server, jupnp discovers both devices. The RAX10 is correctly ignored because it doesn't expose a compatible IGD service. The D-Link is advertised as an 'InternetGatewayDevice:2' with a 'WANPPPConnection:1' service, but the mapping fails for port '36743'.
Here the exception I got while testing:
18:22:44 [INFO ] FServerManager: Starting Multiplayer Server
18:22:44 [INFO ] FServerManager$ForgePortMappingListener: UPnP device ignored (no compatible IGD WAN service): WPS Access Point [urn:schemas-wifialliance-org:device:WFADevice:1] at 192.168.1.2
18:22:44 [INFO ] FServerManager$ForgePortMappingListener: UPnP gateway candidate discovered: D-Link router [urn:schemas-upnp-org:device:InternetGatewayDevice:2] at 192.168.1.1 using urn:schemas-upnp-org:service:WANPPPConnection:1
18:22:44 [WARN ] DefaultUpnpServiceConfiguration$JUPnPExecutor: Thread terminated org.jupnp.registry.RemoteItems$$Lambda/0x0000028daf6c5ad8@a1d406d abruptly: org.jupnp.model.types.InvalidValueException: Invalid value for (UnsignedIntegerFourBytesDatatype): 36743
at org.jupnp.model.VariableValue.<init>(VariableValue.java:76)
at org.jupnp.model.action.ActionArgumentValue.<init>(ActionArgumentValue.java:33)
at org.jupnp.model.action.ActionInvocation.setInput(ActionInvocation.java:123)
at org.jupnp.support.igd.callback.PortMappingAdd.<init>(PortMappingAdd.java:44)
at org.jupnp.support.igd.PortMappingListener$1.<init>(PortMappingListener.java:109)
at org.jupnp.support.igd.PortMappingListener.deviceAdded(PortMappingListener.java:109)
at forge.gamemodes.net.server.FServerManager$ForgePortMappingListener.deviceAdded(FServerManager.java:774)
at org.jupnp.registry.DefaultRegistryListener.remoteDeviceAdded(DefaultRegistryListener.java:50)
at org.jupnp.registry.RemoteItems.lambda$0(RemoteItems.java:115)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642)
at java.base/java.lang.Thread.run(Thread.java:1583)
jupnp-9 > org.jupnp.model.types.InvalidValueException: Invalid value for (UnsignedIntegerFourBytesDatatype): 36743
at org.jupnp.model.VariableValue.<init>(VariableValue.java:76)
at org.jupnp.model.action.ActionArgumentValue.<init>(ActionArgumentValue.java:33)
at org.jupnp.model.action.ActionInvocation.setInput(ActionInvocation.java:123)
at org.jupnp.support.igd.callback.PortMappingAdd.<init>(PortMappingAdd.java:44)
at org.jupnp.support.igd.PortMappingListener$1.<init>(PortMappingListener.java:109)
at org.jupnp.support.igd.PortMappingListener.deviceAdded(PortMappingListener.java:109)
at forge.gamemodes.net.server.FServerManager$ForgePortMappingListener.deviceAdded(FServerManager.java:774)
at org.jupnp.registry.DefaultRegistryListener.remoteDeviceAdded(DefaultRegistryListener.java:50)
at org.jupnp.registry.RemoteItems.lambda$0(RemoteItems.java:115)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642)
at java.base/java.lang.Thread.run(Thread.java:1583)
While the port number is valid, the router describes the port arguments as 'ui4' instead of 'ui2'. Also, the current listener does not accept the IGD v2 device, so Forge cannot create the automatic port mapping and hosting a lobby requires manual port forwarding.
Sorry it took a bit longer @GiovanniMenzano. 😊
You can already try the 3.0.5-SNAPSHOT which is published on Maven Central.
With #380 creating new releases should be very easy.
Activity
Support IGD v2 port mappings
GiovanniMenzano commentedon Jul 29, 2026
Hi, any idea when the new version is coming out? I’d like to update the Forge project too
wborn commentedon Jul 29, 2026
I'll first add a release job to the GitHub Actions workflows and then use that for creating the release.
Should take less than a week I think. 🙂
Support IGD v2 port mappings (jupnp#367)
GiovanniMenzano commentedon Jul 29, 2026
Perfect! Thanks
wborn commentedon Aug 7, 2026
Sorry it took a bit longer @GiovanniMenzano. 😊
You can already try the 3.0.5-SNAPSHOT which is published on Maven Central.
With #380 creating new releases should be very easy.
GiovanniMenzano commentedon Aug 7, 2026
Yeah, the Maven Central publishing seems great! Thank you for the update