html5 websocket 手机,websocket在h5上正常,编译到手机上就连不上

对接的网易云信微信IM SDK,在h5上能建立起连接,在手机端不行,截图是h5的链接,下面是app的日志:

20:10:34.247 连接websocket参数"wss://wlnimsc0.netease.im/socket.io/1/websocket/378166b5-af18-4372-a0a5-05aee5a1d882" at uni-app:///sdk/yunxin-wx/vendors/NIM_Web_NIM_weixin_v6.8.0.js:5334

20:10:34.270 wx::ws: sockets build succeed ... at uni-app:///sdk/yunxin-wx/vendors/NIM_Web_NIM_weixin_v6.8.0.js:5343

20:10:34.289 连接websocket结果socketTask{"CONNECTING":0,"OPEN":1,"CLOSING":2,"CLOSED":3,"readyState":0} at uni-app:///sdk/yunxin-wx/vendors/NIM_Web_NIM_weixin_v6.8.0.js:5346

20:10:42.255 "[NIM LOG 08-16 20:10:49:080 IM] link::reconnect: on socket closed" at uni-app:///sdk/yunxin-wx/vendors/NIM_Web_NIM_weixin_v6.8.0.js:13763

20:10:42.276 wx::ws:close WebSocket force close: readystate 0 at uni-app:///sdk/yunxin-wx/vendors/NIM_Web_NIM_weixin_v6.8.0.js:5397

20:10:42.295 WebSocket connection to 'wss://wlnimsc0.netease.im/socket.io/1/websocket/378166b5-af18-4372-a0a5-05aee5a1d882' failed: WebSocket is closed before the connection is established. at __uniappservice.html:0

20:10:42.315 wx::ws: onerror undefined at uni-app:///sdk/yunxin-wx/vendors/NIM_Web_NIM_weixin_v6.8.0.js:5421

20:10:42.335 wx::ws: onclose {} at uni-app:///sdk/yunxin-wx/vendors/NIM_Web_NIM_weixin_v6.8.0.js:5359

20:10:42.355 "[NIM LOG 08-16 20:10:49:120 IM] link::reconnect: on connectionOver" at uni-app:///sdk/yunxin-wx/vendors/NIM_Web_NIM_weixin_v6.8.0.js:13763

20:10:42.375 "[NIM LOG 08-16 20:10:49:124 IM] link::reconnect: will retry after 1605ms, retryCount 1" at uni-app:///sdk/yunxin-wx/vendors/NIM_Web_NIM_weixin_v6.8.0.js:13763

20:10:42.395 [object CloseEvent] at uni-app:///sdk/yunxin-wx/store/actions/initNimSDK.js:142

20:10:43.915 "[NIM LOG 08-16 20:10:50:736 IM] link::connectToUrl: https://wlnimsc0.netease.im:443" at uni-app:///sdk/yunxin-wx/vendors/NIM_Web_NIM_weixin_v6.8.0.js:13763

20:10:43.955 "[NIM LOG 08-16 20:10:50:772 IM] link::connectToUrl: socket url: https://wlnimsc0.netease.im:443, transports: [\"websocket\"]" at uni-app:///sdk/yunxin-wx/vendors/NIM_Web_NIM_weixin_v6.8.0.js:13763

我换了3台手机都不行,使用的hbuilderX版本是最新的2.2.1.20190813,他的onerror也不报具体错误,就是连不上

你可能感兴趣的:(html5,websocket,手机)