Open Leader-board opened 2 years ago
I think that the main issue is that neither of the addresses http://0.0.0.0:8080/
and http://127.0.0.1:8080/
you used on the emulated browser are correct:
0.0.0.0
is the wildcard address, which you can't really connect to on the client side (you can only bind to it on server to say that "I want to listen for connections on all interfaces").127.0.0.1
is the local loopback address, which in the emulated mobile browser points to the emulated device itself. Browservice is on the host Windows system; thus the local loopback address can't work for connecting to Browservice.Instead of these addresses, you should connect to an IP address that points to the host Windows system. I'm not familiar with Microsoft Device Emulator, so I don't know what this address is; you should consult the emulator documentation to find it out. Depending on your network configuration, one possibility would be to connect to the LAN IP of the host system. On the Browservice server side, the wildcard 0.0.0.0
should work as the bind address (but you should make sure that you are protected by a firewall so that Browservice can't be reached from the outside).
This issue is not really specific to Browservice; I expect that you will face similar issues when connecting to any HTTP server running on the host Windows machine (for example, if you have Python, you can try its internal HTTP server by running python3 -m http.server 8080
in an empty directory). Connecting to the host should be a fairly common use case for Microsoft Device Emulator, so there probably is a solution (enabling Host-only networking
may help, but you still need to know which IP address connects to the host).
http://10.0.2.15:8080
works as expected.I'm stuck at this point.
The IP address 10.0.2.15
seems suspicious; are you sure it is the IP address of the main network adaptor? I remember that some virtual machine systems use it for their virtual networking adapter (VMware/VirtualBox/QEMU, I don't remember which one). The ipconfig
command is useful for finding out the IP addresses of all network interfaces.
I don't expect that installing a loopback adaptor helps here; loopback connections are for connections from the machine to itself, but here you need to make connections between the host and the emulated machine.
By the looks of it, this is not a Browservice issue (as you will get the same issue when trying to connect to any server running on the host machine from the emulated device); thus you might get better advice from people familiar with Microsoft Device Emulator.
This is what ipconfig
returned on the Windows 7 virtual machine hosting Microsoft Device Emulator (which is run on an Ubuntu lab machine). Trying the "autoconfiguration IP address" listed didn't work; unlike the other cases, it hangs at "Locating" before returning the classic error message.
C:\Users\Leaderboard>ipconfig
Windows IP Config16uration
Ethernet adapter Local Area Connection 2:
Connection-specific DNS Suffix . :
Link-local IPv6 Address . . . . . : fe80::cdcb:6e9f:5de7:e568%14
Autoconfiguration IPv4 Address. . : 169.254.229.104
Subnet Mask . . . . . . . . . . . : 255.255.0.0
Default Gateway . . . . . . . . . :
Ethernet adapter Local Area Connection:
Connection-specific DNS Suffix . : [university address]
Link-local IPv6 Address . . . . . : fe80::c463:1c87:89e3:9ebb%11
IPv4 Address. . . . . . . . . . . : 10.0.2.15
Subnet Mask . . . . . . . . . . . : 255.255.255.0
Default Gateway . . . . . . . . . : 10.0.2.2
Tunnel adapter isatap.[university address]:
Media State . . . . . . . . . . . : Media disconnected
Connection-specific DNS Suffix . : [university address]
Tunnel adapter isatap.{72B00AD9-3B7A-48EB-8FDE-8A9017ABEEE1}:
Media State . . . . . . . . . . . : Media disconnected
Connection-specific DNS Suffix . :
Indeed, 10.0.2.15
has got to do with VirtualBox. I also tried getting the physical IP address of the parent machine (using the ifconfig
command on Linux). it returns something like this:
eno1: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 146.169.53.2 netmask 255.255.254.0 broadcast 146.169.53.255
inet6 2a0c:5bc0:40:11c4:8be9:e059:18c9:79b9 prefixlen 64 scopeid 0x0<global>
inet6 fe80::2644:2113:5b51:b5a7 prefixlen 64 scopeid 0x20<link>
inet6 2a0c:5bc0:40:11c4:45f5:b1dc:5955:1159 prefixlen 64 scopeid 0x0<global>
Unfortunately, 146.169.53.2
didn't work either.
Regarding your suggestion, problem is that Microsoft Device Emulator is quite old (and not officially supported anymore) - but I'll try.
Windows Embedded Standard 7, Microsoft Device Emulator V3, emulator in screenshot is that of Windows Mobile 6. The picture tells a lot of the story; more description follows below.
I want to run Browservice on a Windows Mobile emulator, but for some reason, it does not work. Nothing seems to appear on the command log (what's on the screenshot appears to be in the past), and Internet Explorer gives an error. Some notes:
http://0.0.0.0:8080/
orhttp://127.0.0.1:8080/
on the emulator gives the same error.I guess the problem is with the way Browservice tries to bind the network port - but I'm not sure if there is a way around that.