wechaty/wechaty-puppet-padchat

padchat无法登录

Opened this issue · 0 comments

重要:请不要删除模板自行填写,所有不按照模板填写的issue,我们将不会处理。

0. 发 Issue 指南

  1. 请运行下面的命令,看问题是否可以被解决:
rm -rf package-lock.json
rm -rf node_modules
npm install

无法解决
2. 请在 FAQ 清单 看是否已有解决办法。
没有已有的解决办法
3. 请先在issue 中搜关键信息,确认你要发的内容和之前的issue 不重复。

1. 提供你的包版本信息

  • wechaty 版本:0.22.6
  • wechaty-puppet-padchat 版本:0.18.2
  • node 版本: (运行 node --version 获取版本) v10.15.3
  • 你使用的操作系统:Ubuntu 18.04

2. Bug 描述

请用精简的语言描述你遇到的bug
使用memory-card或者初始化扫码登录失败

3. 复现的步骤 (或者解决的步骤)

这一部分非常重要,如果你无法给出复现步骤,我们也很难提供相应的解决办法:

复现步骤中一定要给出复现代码

例子:

  • 第一步:
  • 第二步:
  • 。。。
  1. 使用示例代码starter-bot.js的代码
  2. 修改为pupeet-padchat购买的token及相关配置
  3. 使用memory-card保存的登录信息或者直接尝试扫码登录

4. 期待程序运行的结果

请用精简的语言描述你期待运行的结果
登录成功

5. 程序实际运行的结果

请用精简的语言或者截图描述实际运行的结果(请不要在这里粘贴日志截图

  • 使用memory-card登录卡在Starting
    /o/p/wechat-bot-wechaty wechaty-version npm run start

wechaty-getting-started@0.1.0 start /opt/projects/wechat-bot-wechaty
node examples/starter-bot.js

12:04:13 INFO Wechaty start() v0.22.6 is starting...

  • 尝试使用扫码登录:
    /o/p/wechat-bot-wechaty wechaty-version npm run start

wechaty-getting-started@0.1.0 start /opt/projects/wechat-bot-wechaty
node examples/starter-bot.js

12:05:01 INFO Wechaty start() v0.22.6 is starting...
Starter Bot Started.
12:05:02 WARN PuppetPadchatManager startCheckScan() unknown WXCheckQRCodeStatus: undefined

6. 完整的日志信息:

通过WECHATY_LOG=silly设定环境变量,将设置log 等级为 silly,获取最详细的日志信息(默认log 等级为 info)
请提供完整的日志信息(不要只提供部分的日志截图,请复制粘贴日志内容!)

Show Logs
$ WECHATY_LOG=silly node yourbot.js

wechaty-getting-started@0.1.0 start /opt/projects/wechat-bot-wechaty
node examples/starter-bot.js

12:05:49 SILL Accessory #0 constructor()
12:05:49 VERB Wechaty contructor()
12:05:49 VERB StateSwitch constructor(name=Wechaty)
12:05:49 VERB StateSwitch constructor(name=WechatyReady)
12:05:49 VERB Wechaty on(scan, function) registered
12:05:49 VERB Wechaty onFunction(scan)
12:05:49 VERB Wechaty on(login, function) registered
12:05:49 VERB Wechaty onFunction(login)
12:05:49 VERB Wechaty on(logout, function) registered
12:05:49 VERB Wechaty onFunction(logout)
12:05:49 VERB Wechaty on(message, function) registered
12:05:49 VERB Wechaty onFunction(message)
12:05:49 SILL Wechaty version() form development environment is not availble: ENOENT: no such file or directory, stat '/opt/projects/wechat-bot-wechaty/node_modules/wechaty/dist/.git'
12:05:49 INFO Wechaty start() v0.22.6 is starting...
12:05:49 VERB Wechaty puppet: wechaty-puppet-padchat
12:05:49 VERB Wechaty profile: xiaoan
12:05:49 VERB Wechaty id: cjyfaqni300003e9y8kxc6swi
12:05:49 SILL StateSwitch on() is false
12:05:49 SILL StateSwitch off() is true
12:05:49 VERB StateSwitch off(true) <- (true)
12:05:49 SILL StateSwitch on() is false
12:05:49 VERB StateSwitch on(pending) <- (false)
12:05:49 VERB MemoryCard constructor("xiaoan")
12:05:49 VERB MemoryCard getStorage() for storage type: N/A
12:05:49 VERB getStorage name: xiaoan, options: {"type":"file"}
12:05:49 VERB StorageFile constructor(xiaoan, ...)
12:05:49 VERB StorageBackend constructor(xiaoan, { type: file })
12:05:49 VERB MemoryCard load() from storage: StorageFile</opt/projects/wechat-bot-wechaty/xiaoan.memory-card.json>
12:05:49 VERB StorageFile load() from /opt/projects/wechat-bot-wechaty/xiaoan.memory-card.json
12:05:49 VERB MemoryCard load() file not exist, NOOP
12:05:49 VERB Wechaty initPuppet() wechaty-puppet-padchat
12:05:49 VERB MemoryCard multiplex(puppet)
12:05:49 VERB MemoryCard static multiplex(MemoryCard, puppet)
12:05:49 VERB MemoryCard constructor({"name":"xiaoan","multiplex":{"name":"puppet","parent":{"options":{"name":"xiaoan"},"name":"xiaoan","payload":{},"multiplexNameList":[],"storage":{"name":"xiaoan","options":{"type":"file"},"absFileName":"/opt/projects/wechat-bot-wechaty/xiaoan.memory-card.json"}}}})
12:05:49 VERB PuppetManager resolve({wechaty: Wechaty#cjyfaqni300003e9y8kxc6swi(xiaoan), puppet: wechaty-puppet-padchat, puppetOptions: {"token":"puppet_padchat_169039650e63d863"}})
12:05:49 VERB PuppetManager resolveName(wechaty-puppet-padchat)
12:05:49 VERB PuppetManager checkModule(wechaty-puppet-padchat)
12:05:49 SILL PuppetManager checkModule() wechaty-puppet-padchat installed version 0.16.2 satisfied range ^0.16.1
12:05:49 VERB Puppet constructor({"timeout":240,"token":"puppet_padchat_169039650e63d863"}) #0
12:05:49 VERB StateSwitch constructor(name=PuppetPadchat)
12:05:49 VERB MemoryCard constructor(undefined)
12:05:49 VERB MemoryCard getStorage() for storage type: N/A
12:05:49 VERB MemoryCard load() from storage: N/A
12:05:49 VERB MemoryCard load() no storage
12:05:49 VERB Puppet constructor() watchdog timeout set to 240 seconds
12:05:49 VERB HotImport callerResolve(., /opt/projects/wechat-bot-wechaty/node_modules/wechaty-puppet/dist/src/puppet.js)
12:05:49 SILL HotImport callerResolve() callsites() file=/opt/projects/wechat-bot-wechaty/node_modules/hot-import/dist/src/hot-import.js, type=Object
12:05:49 SILL HotImport callerResolve() callsites() file=/opt/projects/wechat-bot-wechaty/node_modules/wechaty-puppet/dist/src/puppet.js, type=null
12:05:49 SILL HotImport callerResolve() callsites() file=/opt/projects/wechat-bot-wechaty/node_modules/wechaty/node_modules/wechaty-puppet-padchat/dist/src/puppet-padchat.js, type=null
12:05:49 SILL HotImport callerResolve() callerFile=/opt/projects/wechat-bot-wechaty/node_modules/wechaty/node_modules/wechaty-puppet-padchat/dist/src/puppet-padchat.js
12:05:49 VERB Puppet constructor() childClassPath=/opt/projects/wechat-bot-wechaty/node_modules/wechaty/node_modules/wechaty-puppet-padchat/dist/src
12:05:49 VERB Puppet constructor() memory.load() done
12:05:49 VERB Puppet setMemory()
12:05:49 VERB Wechaty initPuppetEventBridge(Puppet#0(xiaoan)/PuppetPadchat#0)
12:05:49 VERB Wechaty initPuppetEventBridge() puppet.on(friendship) registered
12:05:49 VERB Wechaty initPuppetEventBridge() puppet.on(login) registered
12:05:49 VERB Wechaty initPuppetEventBridge() puppet.on(logout) registered
12:05:49 VERB Wechaty initPuppetEventBridge() puppet.on(message) registered
12:05:49 VERB Wechaty initPuppetEventBridge() puppet.on(room-invite) registered
12:05:49 VERB Wechaty initPuppetEventBridge() puppet.on(room-join) registered
12:05:49 VERB Wechaty initPuppetEventBridge() puppet.on(room-leave) registered
12:05:49 VERB Wechaty initPuppetEventBridge() puppet.on(room-topic) registered
12:05:49 VERB Wechaty initPuppetEventBridge() puppet.on(scan) registered
12:05:49 VERB Wechaty initPuppetEventBridge() puppet.on(dong) registered
12:05:49 VERB Wechaty initPuppetEventBridge() puppet.on(error) registered
12:05:49 VERB Wechaty initPuppetEventBridge() puppet.on(ready) registered
12:05:49 VERB Wechaty initPuppetEventBridge() puppet.on(reset) registered
12:05:49 VERB Wechaty initPuppetEventBridge() puppet.on(watchdog) registered
12:05:49 VERB Wechaty initAccessory(Puppet#0(xiaoan)/PuppetPadchat#0)
12:05:49 SILL Accessory static set wechaty = "Wechaty#cjyfaqni300003e9y8kxc6swi(xiaoan)"
12:05:49 SILL Accessory static set wechaty = "Wechaty#cjyfaqni300003e9y8kxc6swi(xiaoan)"
12:05:49 SILL Accessory static set wechaty = "Wechaty#cjyfaqni300003e9y8kxc6swi(xiaoan)"
12:05:49 SILL Accessory static set wechaty = "Wechaty#cjyfaqni300003e9y8kxc6swi(xiaoan)"
12:05:49 SILL Accessory static set wechaty = "Wechaty#cjyfaqni300003e9y8kxc6swi(xiaoan)"
12:05:49 SILL Accessory static set wechaty = "Wechaty#cjyfaqni300003e9y8kxc6swi(xiaoan)"
12:05:49 SILL Accessory static set puppet = "Puppet#0(xiaoan)/PuppetPadchat#0"
12:05:49 SILL Accessory static set puppet = "Puppet#0(xiaoan)/PuppetPadchat#0"
12:05:49 SILL Accessory static set puppet = "Puppet#0(xiaoan)/PuppetPadchat#0"
12:05:49 SILL Accessory static set puppet = "Puppet#0(xiaoan)/PuppetPadchat#0"
12:05:49 SILL Accessory static set puppet = "Puppet#0(xiaoan)/PuppetPadchat#0"
12:05:49 SILL Accessory static set puppet = "Puppet#0(xiaoan)/PuppetPadchat#0"
12:05:49 SILL Accessory set puppet = "Puppet#0(xiaoan)/PuppetPadchat#0"
12:05:49 VERB PuppetPadchat start() with xiaoan
12:05:49 SILL StateSwitch on() is false
12:05:49 SILL StateSwitch on() is false
12:05:49 VERB StateSwitch on(pending) <- (false)
12:05:49 VERB PadchatRpc constructor(ws://padchat.botorange.com/wx, puppet_padchat_169039650e63d863)
12:05:49 VERB PuppetPadchatManager constructor()
12:05:49 VERB PuppetPadchat startManager()
12:05:49 SILL StateSwitch off() is false
12:05:49 VERB PuppetPadchatManager start()
12:05:49 VERB PadchatRpc start()
12:05:49 VERB PadchatRpc initWebSocket()
12:05:50 SILL PadchatRpc initWebSocket() Promise() ws.on(open)
12:05:50 VERB PadchatRpc initJsonRpc()
12:05:50 VERB PadchatRpc startQueues()
12:05:50 VERB PadchatRpc initHeartbeat()
12:05:50 SILL PadchatRpc rpcCall(init, [])
12:05:50 SILL PadchatRpc pre login rpcCall(init, [])
12:05:50 SILL PadchatRpc initWebSocket() ws.on(message): {"apiName":"init","data":"%7B%22message%22%3A%22%E5%88%9D%E5%A7%8B%E5%8C%96%E8%BF%9E%E6%8E%A5%E6%88%
12:05:50 SILL PadchatRpc init result: {"message":"初始化连接成功","status":0}
12:05:50 VERB PadchatRpc WXInitialize()
12:05:50 SILL PadchatRpc rpcCall(WXInitialize, [])
12:05:50 SILL PadchatRpc pre login rpcCall(WXInitialize, [])
12:05:50 SILL PadchatRpc initWebSocket() ws.on(message): {"apiName":"WXInitialize","data":"%7B%22message%22%3A%22%E5%88%9D%E5%A7%8B%E5%8C%96%E5%BE%AE%E4%BF%A
12:05:50 SILL PadchatRpc WXInitialize result: {"message":"初始化微信信息成功","status":0}
12:05:50 VERB MemoryCard get(WECHATY_PUPPET_PADCHAT)
12:05:50 VERB PuppetPadchatManager tryLoad62Data()
12:05:50 SILL PuppetPadchatManager tryLoad62Data() 62 data not found
12:05:50 VERB PuppetPadchatManager tryAutoLogin(undefined)
12:05:50 SILL PuppetPadchatManager tryAutoLogin() currentUserId not found in memorySlot
12:05:50 VERB PuppetPadchatManager startCheckScan()
12:05:50 SILL PuppetPadchatManager startCheckScan() checkScanInternalLoop()
12:05:50 SILL PadchatRpc rpcCall(WXCheckQRCode, [])
12:05:50 SILL PadchatRpc pre login rpcCall(WXCheckQRCode, [])
12:05:50 SILL PuppetPadchatManager startCheckScan() checkScanInternalLoop() set
12:05:50 VERB PuppetPadchat startWatchdog()
12:05:50 SILL StateSwitch on() is pending
12:05:50 VERB StateSwitch on(true) <- (pending)
12:05:50 VERB Wechaty on(heartbeat, function) registered
12:05:50 VERB Wechaty onFunction(heartbeat)
12:05:50 SILL StateSwitch on() is pending
12:05:50 VERB StateSwitch on(true) <- (pending)
Starter Bot Started.
12:05:50 SILL PadchatRpc initWebSocket() ws.on(message): {"apiName":"WXCheckQRCode","data":"","msgId":"-9007199254740989","userId":"puppet_padchat_169039650e
12:05:50 SILL PadchatRpc onServerMessagePadchat() discard empty payload.data for apiName: WXCheckQRCode
12:05:50 SILL PadchatRpc WXCheckQRCode result: {}
12:05:50 WARN PuppetPadchatManager startCheckScan() unknown WXCheckQRCodeStatus: undefined
12:05:51 VERB PuppetPadchatManager emitLoginQrCode()
12:05:51 SILL PadchatRpc rpcCall(WXGetQRCode, [])
12:05:51 SILL PadchatRpc pre login rpcCall(WXGetQRCode, [])
12:05:51 SILL PadchatRpc initWebSocket() ws.on(message): {"apiName":"WXGetQRCode","data":"","msgId":"-9007199254740988","userId":"puppet_padchat_169039650e63
12:05:51 SILL PadchatRpc onServerMessagePadchat() discard empty payload.data for apiName: WXGetQRCode
12:05:51 VERB PuppetPadchatManager emitLoginQrCode() result not found. Call WXInitialize() and try again ...
12:05:51 VERB PadchatRpc WXInitialize()
12:05:51 SILL PadchatRpc rpcCall(WXInitialize, [])
12:05:51 SILL PadchatRpc pre login rpcCall(WXInitialize, [])
12:05:51 SILL PadchatRpc initWebSocket() ws.on(message): {"apiName":"WXInitialize","data":"%7B%22message%22%3A%22%E5%88%9D%E5%A7%8B%E5%8C%96%E5%BE%AE%E4%BF%A
12:05:51 SILL PadchatRpc WXInitialize result: {"message":"初始化微信信息成功","status":0}
12:05:52 VERB PuppetPadchatManager emitLoginQrCode()
12:05:52 SILL PadchatRpc rpcCall(WXGetQRCode, [])
12:05:52 SILL PadchatRpc pre login rpcCall(WXGetQRCode, [])
12:05:52 SILL PadchatRpc initWebSocket() ws.on(message): {"apiName":"WXGetQRCode","data":"","msgId":"-9007199254740986","userId":"puppet_padchat_169039650e63
12:05:52 SILL PadchatRpc onServerMessagePadchat() discard empty payload.data for apiName: WXGetQRCode
12:05:52 VERB PuppetPadchatManager emitLoginQrCode() result not found. Call WXInitialize() and try again ...
12:05:52 VERB PadchatRpc WXInitialize()
12:05:52 SILL PadchatRpc rpcCall(WXInitialize, [])
12:05:52 SILL PadchatRpc pre login rpcCall(WXInitialize, [])
12:05:52 SILL PadchatRpc initWebSocket() ws.on(message): {"apiName":"WXInitialize","data":"%7B%22message%22%3A%22%E5%88%9D%E5%A7%8B%E5%8C%96%E5%BE%AE%E4%BF%A
12:05:52 SILL PadchatRpc WXInitialize result: {"message":"初始化微信信息成功","status":0}
12:05:53 VERB PuppetPadchatManager emitLoginQrCode()
12:05:53 SILL PadchatRpc rpcCall(WXGetQRCode, [])
12:05:53 SILL PadchatRpc pre login rpcCall(WXGetQRCode, [])
12:05:53 SILL PadchatRpc initWebSocket() ws.on(message): {"apiName":"WXGetQRCode","data":"","msgId":"-9007199254740984","userId":"puppet_padchat_169039650e63
12:05:53 SILL PadchatRpc onServerMessagePadchat() discard empty payload.data for apiName: WXGetQRCode
12:05:53 VERB PuppetPadchatManager emitLoginQrCode() result not found. Call WXInitialize() and try again ...
12:05:53 VERB PadchatRpc WXInitialize()
12:05:53 SILL PadchatRpc rpcCall(WXInitialize, [])
12:05:53 SILL PadchatRpc pre login rpcCall(WXInitialize, [])
12:05:53 SILL PadchatRpc initWebSocket() ws.on(message): {"apiName":"WXInitialize","data":"%7B%22message%22%3A%22%E5%88%9D%E5%A7%8B%E5%8C%96%E5%BE%AE%E4%BF%A
12:05:53 SILL PadchatRpc WXInitialize result: {"message":"初始化微信信息成功","status":0}

7. 其他信息

有相关bug 的背景信息,可以在这里说明
2019/07/22 程序运行正常
2019/07/23 服务器重启后出现上述问题

[bug]