wuba / taro-playground

The Taro Playground App is a cross-platform application developed using Taro, to help developers develop and debug Taro applications.
https://wuba.github.io/taro-playground/
Apache License 2.0
246 stars 51 forks source link

手机软件扫码、手动输入服务地址时无法正常预览 #76

Closed 1511pzz closed 1 year ago

1511pzz commented 1 year ago
  1. 测试项目,https://github.com/wuba/Taro-Mortgage-Calculator
  2. 昨天在自己家里网络是可以正常预览的,到了公司环境后无法预览
  3. 电脑和手机连接的同一个wifi,经过测试网络是通的。我在电脑上随便启动了个服务,手机通过局域网ip,http协议可以访问到,但是taro rn启动的应用,就无法预览
  4. 手机为苹果,手机软件版本为1.7.0,taro-rn应用依赖包通过yarn安装,启动脚本为:npm run dev:rn 36179219c8a029247c07031d4ef9bfc
zhiqingchen commented 1 year ago

https://github.com/NervJS/taro/issues/12688

参考操作

zhiqingchen commented 1 year ago

或者使用抓包软件看看网络过程

zhiqingchen commented 1 year ago

尝试换个端口 -p 8082

1511pzz commented 1 year ago

尝试换个端口 -p 8082

我在本地启动了两个服务,taro-rn端口8082,spring项目端口8083。 192.168.1.107为电脑内网ip, http://192.168.1.107:8082/index.bundle?platform=ios&dev=true,电脑通,手机不通http://192.168.1.107:8083,电脑通,手机通。 我在手机上尝试用Stream软件抓包,里面taro-rn的请求都没有成功,没有响应体。 以下为通过电脑访问的请求返回内容 image

1511pzz commented 1 year ago

最新情况,我把本地的端口,通过内网穿透代理到了互联网,手机可以访问到【ip/index.bundle?platform=ios&dev=true】。 但是taro-playground还是不能预览,输入地址后,不报错,也没有任何提示,没有任何反应。

zhiqingchen commented 1 year ago

是否有 bundle 加载过程

1511pzz commented 1 year ago

是否有 bundle 加载过程

没有,在taro-playground输入访问地址,app上没有任何反应,电脑控制台里也没有打印任何东西

1511pzz commented 1 year ago

哎,搞个这玩意搞得血压都要高了

zhiqingchen commented 1 year ago

http://192.168.1.107:8082/status

是否显示 packager-status:running

zhiqingchen commented 1 year ago

以及本地网络是否开启

1511pzz commented 1 year ago

http://192.168.1.107:8082/status packager-status:running,正常显示

没理解本地网络是否开启是什么意思

有技术交流群吗,沟通方便点

zhiqingchen commented 1 year ago

taro 项目 issue 有提供 https://github.com/NervJS/taro/issues/198

1511pzz commented 1 year ago

taro 项目 issue 有提供 NervJS/taro#198

加了这里面的群了,但是里面都是用户,问题没有官方人员回答

1511pzz commented 1 year ago

有没有官方技术支持能详细解答一下啊,根据官方教程建得一个最简单小demo都无法正常使用

zhiqingchen commented 1 year ago

检查下自身网络,已验证没有问题。