As mentioned on Discord, this also happens with install wizard ip detection.
To clarify, this problem only occurs when your desired network adapter does not have the highest priority on the list. I personally experienced this with a VirtualBox adapter that jumped to the top of a list of several adapters, and UPnP would not work as expected until that adapter was disabled.
Apparently there's a nice function gethostbynamel() which returns a list of internal IP addresses. Unfortunately, it seems that trying to portforward to one wacky IP address breaks UPnP forwarding for all the other addresses. I'm experiencing this currently with VirtualBox net adapter in the way. I'm still trying to get to the bottom of that.
Turns out the cause is pretty obvious... you can't map a port to more than 1 IP at a time. This means it's necessary to find some other way to identify the correct internal IP address.
Most helpful comment
Apparently there's a nice function
gethostbynamel()which returns a list of internal IP addresses. Unfortunately, it seems that trying to portforward to one wacky IP address breaks UPnP forwarding for all the other addresses. I'm experiencing this currently with VirtualBox net adapter in the way. I'm still trying to get to the bottom of that.