安卓机websocket连接失败,无法验证证书或not well format
发布于 6 年前 作者 liwang 16089 次浏览 来自 问答

安卓手机,体验版小程序

websocket连接失败,error msg :“could not validate certificate: null”或者“url not well format”

2 回复

请提供出现问题的机型和微信版本,以及能复现问题的简单代码片段(https://developers.weixin.qq.com/miniprogram/dev/devtools/minicode.html)

“url not well format” 是因为ws的url格式问题,例如我的是因为URL里有空格,然后我encodeURI一下,不报“url not well format”了,但是报另外一个错误,“draft refuses handshakebad request”,即拒绝握手, 最后只能把空格替换成其他符号,真的好坑啊

回到顶部