ide更新后好像无法发现mdns信息了
发布于 5 年前 作者 rcai 6170 次浏览 来自 问答
  • 当前 Bug 的表现(可附上截图)
  • 预期表现
  • 复现路径
  • 提供一个最简复现 Demo
this.setData("systemInfo", wx.getSystemInfoSync());
 
let serviceType = '_sample_jmdns._tcp.';
 
wx.onLocalServiceFound(res=>{
 
console.log("onLocalServiceFound",res);
 
});
 
wx.onLocalServiceResolveFail(res => {
 
console.log("onLocalServiceResolveFail")
 
});
 
wx.onLocalServiceLost(res => {
 
console.log("onLocalServiceLost")
 
});
 
wx.onLocalServiceDiscoveryStop(res => {
 
console.log("onLocalServiceDiscoveryStop")
 
});
 
(new Promise(success => { wx.startWifi(); success("startWifi") }))
 
.then(res => { console.log(res); return new Promise(complete => { wx.startLocalServiceDiscovery({ serviceType, complete }) }) })
 
.then(console.log);
2 回复

请具体描述问题,并提供能复现问题的简单代码片段(https://developers.weixin.qq.com/miniprogram/dev/devtools/minicode.html)。

2个不同的serviceType的mdns,IDE工具只能搜索到1个,另外一个偶尔在localServiceLostCallback错误信息中显示出来。

appServiceSDKScriptError

“atob” failed;at api onLocalServiceEvent callback function

Error: “atob” failed

    at x (http://127.0.0.1:26223/appservice/__dev__/WAService.js:1:237311))

    at P (http://127.0.0.1:26223/appservice/__dev__/WAService.js:1:237608))

    at http://127.0.0.1:26223/appservice/__dev__/WAService.js:1:570945

    at Array.forEach (<anonymous>)

    at http://127.0.0.1:26223/appservice/__dev__/WAService.js:1:570858

    at http://127.0.0.1:26223/appservice/__dev__/WAService.js:1:259618

    at e (http://127.0.0.1:26223/appservice/appservice?t=1559631914438:2054:1896)

    at http://127.0.0.1:26223/appservice/appservice?t=1559631914438:2054:2163

    at http://127.0.0.1:26223/appservice/appservice?t=1559631914438:2054:10737

    at Array.forEach (<anonymous>)

回到顶部