常见问题

  1. 在小程序环境下,遇事不决,请重启 开发者工具,再不决,请重启电脑试试。

  2. 小程序环境,page.screenshot() 接口调用失败。

    fail to capture screenshot
    at Transport.Connection.onMessage.e (node_modules/miniprogram-automator/out/Connection.js:1:986)
    at WebSocket.Transport.e.addEventListener.e (node_modules/miniprogram-automator/out/Transport.js:1:219)
    at WebSocket.onMessage (node_modules/miniprogram-automator/node_modules/ws/lib/event-target.js:120:16)
    at Receiver.receiverOnMessage (node_modules/miniprogram-automator/node_modules/ws/lib/websocket.js:789:20)
    at Receiver.dataMessage (node_modules/miniprogram-automator/node_modules/ws/lib/receiver.js:422:14)
    at Receiver.getData (node_modules/miniprogram-automator/node_modules/ws/lib/receiver.js:352:17)
    at Receiver.startLoop (node_modules/miniprogram-automator/node_modules/ws/lib/receiver.js:138:22)
    at Receiver._write (node_modules/miniprogram-automator/node_modules/ws/lib/receiver.js:74:10)
    at Socket.socketOnData (node_modules/miniprogram-automator/node_modules/ws/lib/websocket.js:864:35)

    这是微信小程序基础库的 Bug,官方已在 2.11.1 版本修复了该问题。低于 2.11.1 版本的基础库可以通过清除开发者工具缓存解决:【微信开发者工具】-【工具】-【清除缓存】-【全部清除】。

  3. AnyProxy 启动异常。

    UnhandledPromiseRejectionWarning: Error: EEXIST: file already exists, mkdir '/Users/cenjunwei/.anyproxy/cache/cache_r191475'
    at Object.mkdirSync (fs.js:757:3)
    at getCacheDir (/Users/cenjunwei/Documents/develop/jd/tiga/node_modules/anyproxy/lib/recorder.js:36:6)
    at new Recorder (/Users/cenjunwei/Documents/develop/jd/tiga/node_modules/anyproxy/lib/recorder.js:87:22)
    at new ProxyServer (/Users/cenjunwei/Documents/develop/jd/tiga/node_modules/anyproxy/proxy.js:314:22)
    at Promise (/Users/cenjunwei/Documents/develop/jd/tiga/src/proxy-server/server.ts:52:24)
    at process._tickCallback (internal/process/next_tick.js:68:7)

    重启 SDK 即可。

  4. 已经信任了证书,但依然报证书异常。

    [Tiga] ERROR: 证书已存在,但未被信任

    目测是证书校验脚本有问题,后续安排修复。