- 小程序编译出现异常,几个小程序都出现同样异常,换了基础库不行,一样报错,如图,什么原因?
[图片][图片]
09-26 - 微信小程序连接后台websocket总是失败,以前是可以的,是什么原因吗,怎么解决?
错误提示为:webSocket connection to wss failed:(env windows,mp,1.06.2210310;lib:2.25.0) 微信前端程序: wx.connectSocket({ url: 'wss://52954z94s9.imdo.co', //url: 'ws://61.183.215.162:9082', header:{ 'content-type': 'application/json' }, success: () => { console.log('connectSocket 连接成功') }, }) } 后台代码用c#所写: WebSocketServer server = new WebSocketServer("ws://127.0.0.1:9082/ws"); server.RestartAfterListenError = true; server.Start(socket => { socket.OnOpen = () => { string clientUrl = socket.ConnectionInfo.ClientIpAddress + ":" + socket.ConnectionInfo.ClientPort; dic_Sockets.Add(clientUrl, socket); Console.WriteLine(DateTime.Now.ToString() + "|服务器:和客户端⽹页:" + clientUrl + " 建⽴WebSock连接!"); }; socket.OnClose = () => { string clientUrl = socket.ConnectionInfo.ClientIpAddress + ":" + socket.ConnectionInfo.ClientPort; if (dic_Sockets.ContainsKey(clientUrl)) { dic_Sockets.Remove(clientUrl); } Console.WriteLine(DateTime.Now.ToString() + "|服务器:和客户端⽹页:" + clientUrl + " 断开WebSock连接!"); };
09-19 - 使用公网ip能和微信小程序互通吗?
微信小程序真机调试可以连接到公网ip地址运行成功,但是上传代码后,运行体验版失败,什么原因呢?我没有使用域名
2023-01-05