davidtall
davidtall
  • 发布:2023-10-21 14:47
  • 更新:2023-10-21 15:06
  • 阅读:446

【报Bug】连接wireguard 建立VPN后真机调试会提示同步资源失败

分类:uni-app

通过adb 网络调试真机,手机通过wifi 接入,在不连接wireguard 的情况下可以正常同步资源。连接wireguard 后,会生成tun虚拟网卡,IP地址为 10.8.1.20 ,物理网卡局域网的IP地址是172.18.1.13 这时候真机调试会提示同步资源失败

14:25:54.018 检测到当前使用的ADB不支持反向代理,如果出现连接不上的问题,请更换HBuilder自带的ADB进行真机运行或保持手机和电脑在同一个局域网下
14:25:55.739 手机端调试基座版本号为1.0.10, 版本号相同,跳过基座更新
14:26:30.201 同步资源失败,未得到同步资源的授权,请停止运行后重新运行,并注意手机上的授权提示
14:26:30.201 如果此时手机没有任何反应,请检查自定义基座是否正确;如果是离线制作的自定义基座包,请检查离线包制作是否正确!

通过查看adb 日志,是由于真机连接了tun网卡的IP地址,而不是物理网卡的IP地址,这种情况应该如何解决?平时开发时需要连接VPN,但用了VPN又不能真机调试。

adb 日志如下:

10-21 14:25:59.715 21131 21175 D libEGL : loaded /system/lib/egl/libGLES_mali.so
10-21 14:25:59.723 1803 1880 I [Gralloc]: ion_alloc from ion_client:17 via heap type CARVEOUT(mask:4) for 8355840 Bytes uncached buffer successfully, usage = 0x00000900
10-21 14:25:59.763 21131 21131 D NetworkSecurityConfig: No Network Security Config specified, using platform default
10-21 14:25:59.777 21131 21131 D aaa : initWebSocket() : ws://10.8.1.20:8006
10-21 14:25:59.831 21131 21175 I OpenGLRenderer: Initialized EGL, version 1.4
10-21 14:25:59.831 21131 21175 D OpenGLRenderer: Swap behavior 1
10-21 14:25:59.846 1803 1882 I [Gralloc]: ion_alloc from ion_client:17 via heap type CARVEOUT(mask:4) for 8294400 Bytes uncached buffer successfully, usage = 0x00000f02
10-21 14:25:59.885 1803 1882 I [Gralloc]: ion_alloc from ion_client:17 via heap type CARVEOUT(mask:4) for 8294400 Bytes uncached buffer successfully, usage = 0x00000f02
10-21 14:25:59.887 2394 2875 W WindowManager: android.provider.Settings$SettingNotFoundException: IgnoreAppOrientation
10-21 14:25:59.903 2394 2875 I ActivityManager: Displayed com.woquapps.meiershi/io.dcloud.debug.PullDebugActivity: +677ms
10-21 14:25:59.912 1803 1882 I [Gralloc]: ion_alloc from ion_client:17 via heap type CARVEOUT(mask:4) for 8294400 Bytes uncached buffer successfully, usage = 0x00000f02
10-21 14:25:59.935 1803 1880 I [Gralloc]: ion_alloc from ion_client:17 via heap type CARVEOUT(mask:4) for 8294400 Bytes uncached buffer successfully, usage = 0x00000f02
10-21 14:26:04.296 2394 3253 D BackgroundManagerService: readMemInfo: freeMem=269471744,threshold=150994944
10-21 14:26:09.227 2394 2771 W ActivityManager: Launch timeout has expired, giving up wake lock!
10-21 14:26:56.483 4172 4214 D LogService: check mobile network..
10-21 14:26:56.483 4172 4229 D TelephonyMonitor: check mobile network..
10-21 14:26:56.494 4172 4229 D ConnectivityManager: getMobileDataEnabled()+ subId=0
10-21 14:26:56.502 4172 4229 D ConnectivityManager: getMobileDataEnabled()- subId=0 retVal=true
10-21 14:26:56.502 4172 4229 D MobileDataUtils: getMobileDataEnabled: true
10-21 14:26:56.508 4172 4229 D TelephonyMonitor: not using mobile network: 1
10-21 14:26:56.509 4172 4214 D LogService: not using mobile network: 1
10-21 14:26:56.523 4172 4214 D LogService: monitoring delay time: 300000
10-21 14:26:59.861 21131 21185 D aaa : onFailure()connect timed out
10-21 14:26:59.862 21131 21185 D aaa : onFailure() 断连的地址 :http://10.8.1.20:8006/

2023-10-21 14:47 负责人:无 分享
已邀请:
davidtall

davidtall (作者)

解决了,我把物理网卡 以太网的跃点数改成1 就能用了

davidtall

davidtall (作者)

解决了,我把物理网卡 以太网的跃点数改成1 就能用了

要回复问题请先登录注册