[英]How do I resolve this issue where my Meteor Android app doesn't connect?
I'm trying to run my Meteor Android app on my phone, the app installs on the phone as expected but it doesn't connect, it seems to be a problem creating a websocket based on the IP address of the phone.我正在尝试在我的手机上运行我的 Meteor Android 应用程序,该应用程序按预期安装在手机上但未连接,根据手机的 IP 地址创建 websocket 似乎是一个问题。
Could this be an something relating to setting up a proxy service on Windows 11 to allow connections to the WSL virtual machine?这可能与在 Windows 11 上设置代理服务以允许连接到 WSL 虚拟机有关吗?
Update
: I've installed a.network analysis app on my phone and I can ping my Ubuntu IP address 192.168.115.214
but port 3000 is blocked. Update
:我在我的手机上安装了一个网络分析应用程序,我可以 ping 我的 Ubuntu IP 地址192.168.115.214
但端口 3000 被阻止。 If I open a browser on my win 11 laptop and go to 192.168.115.214:3000
my app appears.如果我在 win 11 笔记本电脑和 go 到
192.168.115.214:3000
上打开浏览器,我的应用程序就会出现。
in the dev tools I get this:在开发工具中我得到这个:
In my app:在我的应用程序中:
ROOT_URL=https://192.168.1.101:3000 meteor run --mobile-server 192.168.1.101:3000 android-device --port=3000
Mobile Phone IP:手机IP:
192.168.1.101
Windows (11): Windows (11):
PS C:\WINDOWS\system32> ipconfig
Windows IP Configuration
Wireless LAN adapter Local Area Connection* 1:
Media State . . . . . . . . . . . : Media disconnected
Connection-specific DNS Suffix . :
Wireless LAN adapter Local Area Connection* 2:
Media State . . . . . . . . . . . : Media disconnected
Connection-specific DNS Suffix . :
Wireless LAN adapter WiFi:
Connection-specific DNS Suffix . :
IPv6 Address. . . . . . . . . . . : ::acdb:90ff:ec22:b5d
Temporary IPv6 Address. . . . . . : ::f1a3:d3f5:e2f1:8baa
Link-local IPv6 Address . . . . . : fe80::acdb:90ff:ec22:b5d%8
IPv4 Address. . . . . . . . . . . : 192.168.1.105
Subnet Mask . . . . . . . . . . . : 255.255.255.0
Default Gateway . . . . . . . . . : 192.168.1.1
Ethernet adapter Bluetooth Network Connection:
Media State . . . . . . . . . . . : Media disconnected
Connection-specific DNS Suffix . :
Ethernet adapter vEthernet (WSL):
Connection-specific DNS Suffix . :
Link-local IPv6 Address . . . . . : fe80::d510:778:9360:2b5c%25
IPv4 Address. . . . . . . . . . . : 192.168.112.1
Subnet Mask . . . . . . . . . . . : 255.255.240.0
Default Gateway . . . . . . . . . :
PS C:\WINDOWS\system32>
Ubuntu (WSL): Ubuntu (华语):
$ ifconfig
eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 192.168.115.214 netmask 255.255.240.0 broadcast 192.168.127.255
inet6 fe80::215:5dff:fe08:2510 prefixlen 64 scopeid 0x20<link>
ether 00:15:5d:08:25:10 txqueuelen 1000 (Ethernet)
RX packets 90695 bytes 28825428 (28.8 MB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 19863 bytes 3402580 (3.4 MB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
Your phone should be connected to the same Wifi.network and you need to enter your.network ip address您的手机应该连接到同一个 Wifi.network 并且您需要输入您的.network ip 地址
and you can run你可以跑
meteor run --settings settings.json android-device --port http://<IP-ADDR>:3000 --mobile-server=http://<IP-ADDR>:3000
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.