Error: SystemError (appServiceSDKScriptError)
{"errMsg":"closeSocket:fail Failed to execute 'close' on 'WebSocket': The code must be either 1000, or between 3000 and 4999. 1006 is neither."}
at Function.errorReport (WAServiceMainContext.js?t=wechat&v=3.9.3:1)
at Object.<anonymous> (WAServiceMainContext.js?t=wechat&v=3.9.3:1)
at Object.cb (WAServiceMainContext.js?t=wechat&v=3.9.3:1)
at J._privEmit (WAServiceMainContext.js?t=wechat&v=3.9.3:1)
at J.emit (WAServiceMainContext.js?t=wechat&v=3.9.3:1)
at WAServiceMainContext.js?t=wechat&v=3.9.3:1
at n (WAServiceMainContext.js?t=wechat&v=3.9.3:1)
at Ue (WAServiceMainContext.js?t=wechat&v=3.9.3:1)
at Object.Ge (WAServiceMainContext.js?t=wechat&v=3.9.3:1)
at ne (WAServiceMainContext.js?t=wechat&v=3.9.3:1)(env: Windows,mp,1.06.2504030; lib: 3.9.3)
WebSocket connection to 'ws://198.18.0.1:8090/mp-weixin_aQhvt2' failed: (env: Windows,mp,1.06.2504030; lib: 3.9.3)

- 发布:2025-09-15 11:52
- 更新:2025-09-15 13:03
- 阅读:34
产品分类: uniapp/小程序/微信
PC开发环境操作系统: Windows
PC开发环境操作系统版本号: 3.9.3
HBuilderX类型: 正式
HBuilderX版本号: 4.76
第三方开发者工具版本号: 1.06.2504030win32-x64
基础库版本号: 3.9.3
项目创建方式: HBuilderX
示例代码:
操作步骤:
运行小程序打开就报错,刷新也报
运行小程序打开就报错,刷新也报
预期结果:
Error: SystemError (appServiceSDKScriptError)
{"errMsg":"closeSocket:fail Failed to execute 'close' on 'WebSocket': The code must be either 1000, or between 3000 and 4999. 1006 is neither."}
at Function.errorReport (WAServiceMainContext.js?t=wechat&v=3.9.3:1)
at Object.<anonymous> (WAServiceMainContext.js?t=wechat&v=3.9.3:1)
at Object.cb (WAServiceMainContext.js?t=wechat&v=3.9.3:1)
at J._privEmit (WAServiceMainContext.js?t=wechat&v=3.9.3:1)
at J.emit (WAServiceMainContext.js?t=wechat&v=3.9.3:1)
at WAServiceMainContext.js?t=wechat&v=3.9.3:1
at n (WAServiceMainContext.js?t=wechat&v=3.9.3:1)
at Ue (WAServiceMainContext.js?t=wechat&v=3.9.3:1)
at Object.Ge (WAServiceMainContext.js?t=wechat&v=3.9.3:1)
at ne (WAServiceMainContext.js?t=wechat&v=3.9.3:1)(env: Windows,mp,1.06.2504030; lib: 3.9.3)
WebSocket connection to 'ws://198.18.0.1:8090/mp-weixin_aQhvt2' failed: (env: Windows,mp,1.06.2504030; lib: 3.9.3)
Error: SystemError (appServiceSDKScriptError)
{"errMsg":"closeSocket:fail Failed to execute 'close' on 'WebSocket': The code must be either 1000, or between 3000 and 4999. 1006 is neither."}
at Function.errorReport (WAServiceMainContext.js?t=wechat&v=3.9.3:1)
at Object.<anonymous> (WAServiceMainContext.js?t=wechat&v=3.9.3:1)
at Object.cb (WAServiceMainContext.js?t=wechat&v=3.9.3:1)
at J._privEmit (WAServiceMainContext.js?t=wechat&v=3.9.3:1)
at J.emit (WAServiceMainContext.js?t=wechat&v=3.9.3:1)
at WAServiceMainContext.js?t=wechat&v=3.9.3:1
at n (WAServiceMainContext.js?t=wechat&v=3.9.3:1)
at Ue (WAServiceMainContext.js?t=wechat&v=3.9.3:1)
at Object.Ge (WAServiceMainContext.js?t=wechat&v=3.9.3:1)
at ne (WAServiceMainContext.js?t=wechat&v=3.9.3:1)(env: Windows,mp,1.06.2504030; lib: 3.9.3)
WebSocket connection to 'ws://198.18.0.1:8090/mp-weixin_aQhvt2' failed: (env: Windows,mp,1.06.2504030; lib: 3.9.3)
实际结果:
Error: SystemError (appServiceSDKScriptError)
{"errMsg":"closeSocket:fail Failed to execute 'close' on 'WebSocket': The code must be either 1000, or between 3000 and 4999. 1006 is neither."}
at Function.errorReport (WAServiceMainContext.js?t=wechat&v=3.9.3:1)
at Object.<anonymous> (WAServiceMainContext.js?t=wechat&v=3.9.3:1)
at Object.cb (WAServiceMainContext.js?t=wechat&v=3.9.3:1)
at J._privEmit (WAServiceMainContext.js?t=wechat&v=3.9.3:1)
at J.emit (WAServiceMainContext.js?t=wechat&v=3.9.3:1)
at WAServiceMainContext.js?t=wechat&v=3.9.3:1
at n (WAServiceMainContext.js?t=wechat&v=3.9.3:1)
at Ue (WAServiceMainContext.js?t=wechat&v=3.9.3:1)
at Object.Ge (WAServiceMainContext.js?t=wechat&v=3.9.3:1)
at ne (WAServiceMainContext.js?t=wechat&v=3.9.3:1)(env: Windows,mp,1.06.2504030; lib: 3.9.3)
WebSocket connection to 'ws://198.18.0.1:8090/mp-weixin_aQhvt2' failed: (env: Windows,mp,1.06.2504030; lib: 3.9.3)
Error: SystemError (appServiceSDKScriptError)
{"errMsg":"closeSocket:fail Failed to execute 'close' on 'WebSocket': The code must be either 1000, or between 3000 and 4999. 1006 is neither."}
at Function.errorReport (WAServiceMainContext.js?t=wechat&v=3.9.3:1)
at Object.<anonymous> (WAServiceMainContext.js?t=wechat&v=3.9.3:1)
at Object.cb (WAServiceMainContext.js?t=wechat&v=3.9.3:1)
at J._privEmit (WAServiceMainContext.js?t=wechat&v=3.9.3:1)
at J.emit (WAServiceMainContext.js?t=wechat&v=3.9.3:1)
at WAServiceMainContext.js?t=wechat&v=3.9.3:1
at n (WAServiceMainContext.js?t=wechat&v=3.9.3:1)
at Ue (WAServiceMainContext.js?t=wechat&v=3.9.3:1)
at Object.Ge (WAServiceMainContext.js?t=wechat&v=3.9.3:1)
at ne (WAServiceMainContext.js?t=wechat&v=3.9.3:1)(env: Windows,mp,1.06.2504030; lib: 3.9.3)
WebSocket connection to 'ws://198.18.0.1:8090/mp-weixin_aQhvt2' failed: (env: Windows,mp,1.06.2504030; lib: 3.9.3)
bug描述:
Error: SystemError (appServiceSDKScriptError)
{"errMsg":"closeSocket:fail Failed to execute 'close' on 'WebSocket': The code must be either 1000, or between 3000 and 4999. 1006 is neither."}
at Function.errorReport (WAServiceMainContext.js?t=wechat&v=3.9.3:1)
at Object.<anonymous> (WAServiceMainContext.js?t=wechat&v=3.9.3:1)
at Object.cb (WAServiceMainContext.js?t=wechat&v=3.9.3:1)
at J._privEmit (WAServiceMainContext.js?t=wechat&v=3.9.3:1)
at J.emit (WAServiceMainContext.js?t=wechat&v=3.9.3:1)
at WAServiceMainContext.js?t=wechat&v=3.9.3:1
at n (WAServiceMainContext.js?t=wechat&v=3.9.3:1)
at Ue (WAServiceMainContext.js?t=wechat&v=3.9.3:1)
at Object.Ge (WAServiceMainContext.js?t=wechat&v=3.9.3:1)
at ne (WAServiceMainContext.js?t=wechat&v=3.9.3:1)(env: Windows,mp,1.06.2504030; lib: 3.9.3)
WebSocket connection to 'ws://198.18.0.1:8090/mp-weixin_aQhvt2' failed: (env: Windows,mp,1.06.2504030; lib: 3.9.3)
1 个回复
DCloud_UNI_JBB
微信小程序开发工具的服务端口打开了嘛?