使用 uniapp 开发的程序:
在PC端,能正常进行 wss//xny.world:18283/ws 的连接建立,消息的发送与接收都是正常的,运行到 “微信开发者工具”中 无法访问,真机调试 也是不行。报错:
[worker] reportRealtimeAction:fail not support
WebSocket connection to 'wss://xny.world:18283/ws/' failed: WebSocket is closed before the connection is established.
你没搞错吧,难道配上域名,你代码怎么写服务怎么部署就能ok了?
[wxapplib]] Uncaught (in promise) FrameworkError {“errno”:101,“errMsg”:“private_getBackgroundFetchData:fail private_getBackgroundFetchData:fail:jsapi invalid request data”}
[wxapplib]] Uncaught (in promise) FrameworkError {“errMsg”:“closeSocket:fail:The code must be either 1000, or between 3000 and 4999”}
见多识广的朋友,请帮忙分析一下!
不用uniapp呢?能不能用小程序无法写个代码片段
AppID:wx10dd6c67bc7c45cb
[worker] reportRealtimeAction:fail not support
WebSocket connection to 'wss://xny.world:18283/ws/' failed: WebSocket is closed before the connection is established.
请帮忙分析一下