-
Notifications
You must be signed in to change notification settings - Fork 96
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ws://localhost:5678/socketcluster/ 不在以下合法域名列表中,请参考文档 #2
Comments
因为微信小程序用websocket的话,需要在小程序后台配置一个合法的域名,而且不能有端口号。所以我在代码里面默认注掉了。 如果要用的话,要么开 无appid的,要嘛就得在本地配置一下
我没有没有实测,不过思路大概是这样的。 |
@charleyw 试了一下没有无appid的,但是我这边提示 是版本不对么? |
我完了试一下,最近没弄,不知道微信是不是有更新 |
@xiaoguozi 我也遇到这个问题 |
@charleyw 一样的问题,求解 |
不好意思,好久没用了。这个问题的原因是因为微信的开发工具的运行环境里面不让使用 window 变量。而在那个 devtools的源码里面有一些地方使用了 window 变量,在执行过程中 window 是 undefined 所以会报错。 我把临时把源码改了,你更新一下代码应该就好了。 然后,微信开发工具提供了在开发环境不检查安全域名,所以,不需要使用我上面说的那么复杂的办法配置了。把 可以看一下 readme 我也更新了。 |
用remotedev启动后,小程序报ws://localhost:5678/socketcluster/ 不在以下合法域名列表中 这个怎么解决的
The text was updated successfully, but these errors were encountered: