Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wechat帐号界面语言设为中文环境下:wechaty的room-join room-leave room-topic 事件无法触发 #52

Closed
lijiarui opened this issue Oct 19, 2016 · 9 comments

Comments

@lijiarui
Copy link
Member

room-join
room-leave
room-topic
以上三个event,无法成功触发

代码如下:

import {
  Wechaty
  , log
} from '../'

const bot = Wechaty.instance({ profile: 'TestFun' })

bot
.on('login'   , user => log.info('Bot', `${user.name()} logined`))
.on('logout'  , user => log.info('Bot', `${user.name()} logouted`))
.on('error'   , e => log.info('Bot', 'error: %s', e))
.on('scan', (url, code) => {
  if (!/201|200/.test(String(code))){
    let loginUrl = url.replace(/\/qrcode\//, '/l/')
    require('qrcode-terminal').generate(loginUrl)
  }
  console.log(`${url}\n[${code}] Scan QR Code in above url to login: `)
})

.on('room-join', (room, invitee, inviter) => {
  console.log("room-join@@@@@@@@@@@@@")
})

.on('room-leave', (room, leaver) => {
  console.log("room-leave!!!!!!!!")
})

.on('room-topic', (room, topic, oldTopic, changer) => {
  try {
    console.log('room-topic##############')
  } catch (e) {
    log.error('Bot', 'room-topic event exception: %s', e.stack)
  }
})

.on('message', m => {
  m.ready()
  .then(msg => {

  const room    = msg.room()
  const sender  = msg.from()

  console.log((room ? '[' + room.topic() + ']' : '')
              + '<' + sender.name() + '>'
              + ':' + msg.toStringDigest()
  )

  })
  .catch(e => log.error('Bot', 'ready: %s' , e))
})

bot.init()
.catch(e => {
  log.error('Bot', 'init() fail: %s', e)
  bot.quit()
  process.exit(-1)
})

当群中拉入成员、删除成员、修改群名,理应打印出:

room-join@@@@@@@@@@@@@
room-leave!!!!!!!!
room-topic##############

实际上并没有打印出以上内容,仅仅作为消息形式,日志输出如下:(加入好友的情况)

SILL Message ready()
SILL Contact constructor(@@dfd07c3e0246851cc2084e1ffc9983d2d5d833331b6b2e1c64c41b206035b176)
SILL Room constructor(@@dfd07c3e0246851cc2084e1ffc9983d2d5d833331b6b2e1c64c41b206035b176)
SILL Contact ready()
SILL Contact get contact via PuppetWeb
SILL PuppetWebBridge getContact() retryPromise: attampt 1/35 time for timeout 306250
SILL PuppetWebBrowser Browser.execute("return typeof WechatyBro === "undefined"")
SILL PuppetWebBrowser dead()
SILL PuppetWebBrowser Browser.execute(" const callback = arguments[arguments.length - 1] const isAsync = (typeof ... ")
SILL PuppetWebBrowser dead()
SILL Contact contactGetter(@@dfd07c3e0246851cc2084e1ffc9983d2d5d833331b6b2e1c64c41b206035b176) resolved
SILL Contact ready()
SILL Room ready()
SILL PuppetWebBridge getContact() retryPromise: attampt 1/35 time for timeout 306250
SILL PuppetWebBrowser Browser.execute("return typeof WechatyBro === "undefined"")
SILL PuppetWebBrowser dead()
SILL PuppetWebBrowser Browser.execute(" const callback = arguments[arguments.length - 1] const isAsync = (typeof ... ")
SILL PuppetWebBrowser dead()
SILL Room contactGetter(@@dfd07c3e0246851cc2084e1ffc9983d2d5d833331b6b2e1c64c41b206035b176) resolved
SILL Contact constructor(@7e50d293942e6e283a3143c3dd42fb05afc9647b2c2d4ce68dab17a3fe13810d)
SILL Contact ready()
SILL Contact ready()
SILL Contact get contact via PuppetWeb
SILL PuppetWebBridge getContact() retryPromise: attampt 1/35 time for timeout 306250
SILL PuppetWebBrowser Browser.execute("return typeof WechatyBro === "undefined"")
SILL PuppetWebBrowser dead()
SILL PuppetWebBrowser Browser.execute(" const callback = arguments[arguments.length - 1] const isAsync = (typeof ... ")
SILL PuppetWebBrowser dead()
SILL Contact contactGetter(@7e50d293942e6e283a3143c3dd42fb05afc9647b2c2d4ce68dab17a3fe13810d) resolved
VERB PuppetWebFirer fireRoomJoin(你邀请"李佳芮"加入了群聊)
VERB PuppetWebFirer checkRoomJoin()
VERB PuppetWebFirer fireRoomLeave(你邀请"李佳芮"加入了群聊)
SILL Message ready()
SILL Contact ready()
SILL Contact ready()
SILL Room ready()
SILL Message ready()
SILL Contact ready()
SILL Contact ready()
SILL Room ready()
[ding哦哦]<ding哦哦>:{SYS}你邀请"李佳芮"加入了群聊
SILL Message ready()
SILL Contact ready()
SILL Contact ready()
SILL Room ready()
SILL Message ready()
SILL Contact ready()
SILL Contact ready()
SILL Room ready()
SILL Message ready()
SILL Contact ready()
SILL Contact ready()
SILL Room ready()
[ding哦哦]<wuli舞哩>:{TEXT}wuli舞哩:欢迎 @李佳芮 入群

在移除好友时:

SILL Message ready()
SILL Contact ready()
SILL Contact ready()
SILL Room ready()
VERB PuppetWebFirer fireRoomJoin(你将"李佳芮"移出了群聊)
VERB PuppetWebFirer checkRoomJoin()
VERB PuppetWebFirer fireRoomLeave(你将"李佳芮"移出了群聊)
SILL Message ready()
SILL Contact ready()
SILL Contact ready()
SILL Room ready()
SILL Message ready()
SILL Contact ready()
SILL Contact ready()
SILL Room ready()
[ding哦哦]<ding哦哦>:{SYS}你将"李佳芮"移出了群聊

在修改群名称时:

SILL Message ready()
SILL Contact ready()
SILL Contact ready()
SILL Room ready()
VERB PuppetWebFirer fireRoomJoin("李佳芮"修改群名为“ding”)
VERB PuppetWebFirer checkRoomJoin()
VERB PuppetWebFirer fireRoomLeave("李佳芮"修改群名为“ding”)
SILL Message ready()
SILL Contact ready()
SILL Contact ready()
SILL Room ready()
SILL Message ready()
SILL Contact ready()
SILL Contact ready()
SILL Room ready()
[ding哦哦]<ding哦哦>:{SYS}"李佳芮"修改群名为“ding”

为什么会没有触发到
.on('room-join', (room, invitee, inviter)
.on('room-leave', (room, leaver)
.on('room-topic', (room, topic, oldTopic, changer)
里面的内容呢?

谢谢!

@huan
Copy link
Member

huan commented Oct 19, 2016

this bug is expected because I only had tested the events under english locale of wechat, so the code can not recognize the chinese message.

according to your logs, there should add 3 type of sys message to code:

  1. 你邀请"李佳芮"加入了群聊
  2. 你将"李佳芮"移出了群聊
  3. "李佳芮"修改群名为“ding”

thanks for the detail log, will fix later.

huan added a commit that referenced this issue Oct 19, 2016
@huan
Copy link
Member

huan commented Oct 19, 2016

@lijiarui code updated, I did not test it yet, but I hope it should work as well.

please notice me if it works not as expected.

BTW: friend event should not work under chinese wechat, too. because I only has english version of regex string: /^You have added (.+) as your WeChat contact. Start chatting!$/. could you please get a chinese version string and post here for me? so I can fix it as well.

thanks.

@kangyue92
Copy link

@zixia Chinese version string is:

你已添加了XX,现在可以开始聊天了。

huan added a commit that referenced this issue Oct 19, 2016
@huan
Copy link
Member

huan commented Oct 19, 2016

@ky1000ky2000 thanks!

code updated. hope it works ...

@lijiarui
Copy link
Member Author

lijiarui commented Oct 20, 2016

room-leave
room-topic
两个个event,可以成功触发

但是room-join依然无法成功触发

具体日志如下:

INFO Bot 桔子蜜小妞 logined

room-leave!!!!!!!!
[ding]:{SYS}你将"李佳芮"移出了群聊

可以检测到room-leave 事件

[ding]:{SYS}你邀请"李佳芮"加入了群聊
[ding]<wuli舞哩>:{TEXT}wuli舞哩:欢迎 @李佳芮 入群

无法检测到room-join 事件

room-leave!!!!!!!!
[ding]:{SYS}你将"wuli舞哩"移出了群聊

可以检测到room-leave 事件

[ding]:{SYS}你邀请"wuli舞哩"加入了群聊
[ding]<wuli舞哩>:{TEXT}wuli舞哩:欢迎 @桔子蜜小妞 入群

无法检测到room-join 事件

room-topic##############
[dinglala]:{SYS}"李佳芮"修改群名为“dinglala”
room-topic##############
[ding]:{SYS}"李佳芮"修改群名为“ding”

可以检测到room-topic 事件

祝好!

@huan
Copy link
Member

huan commented Oct 20, 2016

@lijiarui please provide detail log with WECHATY_LOG=silly for diagnosis.

huan added a commit that referenced this issue Oct 20, 2016
@huan huan changed the title wechaty的room-join room-leave room-topic 事件无法触发 Wechat帐号界面语言设为中文环境下:wechaty的room-join room-leave room-topic 事件无法触发 Oct 20, 2016
@lijiarui
Copy link
Member Author

lijiarui commented Oct 20, 2016

Thanks!

我将三个事件执行后的日志分为三个部分粘贴在下面,以供参考对比。

room-join event 监控失败,日志内容相对比另外两个event,显得格外冗长,因此我将这一部分分为了正常日志和异常日志。

room-join正常日志的显示,和room-leave以及room-topic的长度相近,内容相似。
room-join异常日志部分,希望可以找到无法监控的原因。

1、room-join event log:(fail to listen)

个人认为以下信息为此事件的正常日志:

SILL Message ready()
SILL Contact ready()
SILL Contact ready()
SILL Room ready()
VERB PuppetWebFirer fireRoomJoin(你邀请"kz社区"加入了群聊)
VERB PuppetWebFirer checkRoomJoin()
SILL PuppetWebFirer fireRoomJoin() inviteeList: kz社区, inviter: 你
SILL PuppetWebFirer fireRoomJoin() retryPromise() attempt 1 with timeout 60000
SILL Room ready()
SILL PuppetWebBridge getContact() retryPromise: attampt 1/35 time for timeout 306250
SILL PuppetWebBrowser Browser.execute("return typeof WechatyBro === "undefined"")
SILL PuppetWebBrowser dead() checking ...
VERB PuppetWebFirer fireRoomLeave(你邀请"kz社区"加入了群聊)
SILL Message ready()
SILL Contact ready()
SILL Contact ready()
SILL Room ready()
SILL PuppetWebBridge getContact() retryPromise: attampt 1/35 time for timeout 306250
SILL PuppetWebBrowser Browser.execute("return typeof WechatyBro === "undefined"")
SILL PuppetWebBrowser dead() checking ...
SILL PuppetWebBrowser Browser.execute(" const callback = arguments[arguments.length - 1] const isAsync = (typeof ... ")
SILL PuppetWebBrowser dead() checking ...
SILL PuppetWebBrowser Browser.execute(" const callback = arguments[arguments.length - 1] const isAsync = (typeof ... ")
SILL PuppetWebBrowser dead() checking ...
SILL Room contactGetter(@@22e41057b789d5e07962ffb8c91a346112661b71fa9940cd7c26676868e8d6eb) resolved
SILL Contact ready()
SILL Contact ready()
SILL Contact ready()
VERB Room member(kz社区)
SILL Room member() check nickMap: {"@b7eda8f896b085a136feb200ccbdc0a8b4531660ddce7e68ec8081c55b243c5c":"桔子蜜小妞","@db9dcc9dadc34bd9132dcbd19ab69b53":"李佳芮","@a877c351af0362a8a5175d859257a5c642b290ae6144f05d79fcb87892c79d7f":"kz社区"}
VERB Room member(你)
SILL Room member() check nickMap: {"@b7eda8f896b085a136feb200ccbdc0a8b4531660ddce7e68ec8081c55b243c5c":"桔子蜜小妞","@db9dcc9dadc34bd9132dcbd19ab69b53":"李佳芮","@a877c351af0362a8a5175d859257a5c642b290ae6144f05d79fcb87892c79d7f":"kz社区"}
SILL Room contactGetter(@@22e41057b789d5e07962ffb8c91a346112661b71fa9940cd7c26676868e8d6eb) resolved
SILL Contact ready()
SILL Contact ready()
SILL Contact ready()
SILL Message ready()
SILL Contact ready()
SILL Contact ready()
SILL Room ready()
[ding]:{SYS}你邀请"kz社区"加入了群聊

个人认为以下信息可能是此事件异常日志:

SILL PuppetWebFirer fireRoomJoin() retryPromise() attempt 2 with timeout 60000
SILL Room ready()
SILL PuppetWebBridge getContact() retryPromise: attampt 1/35 time for timeout 306250
SILL PuppetWebBrowser Browser.execute("return typeof WechatyBro === "undefined"")
SILL PuppetWebBrowser dead() checking ...
SILL PuppetWebBrowser Browser.execute(" const callback = arguments[arguments.length - 1] const isAsync = (typeof ... ")
SILL PuppetWebBrowser dead() checking ...
SILL Room contactGetter(@@22e41057b789d5e07962ffb8c91a346112661b71fa9940cd7c26676868e8d6eb) resolved
SILL Contact ready()
SILL Contact ready()
SILL Contact ready()
VERB Room member(你)
SILL Room member() check nickMap: {"@b7eda8f896b085a136feb200ccbdc0a8b4531660ddce7e68ec8081c55b243c5c":"桔子蜜小妞","@db9dcc9dadc34bd9132dcbd19ab69b53":"李佳芮","@a877c351af0362a8a5175d859257a5c642b290ae6144f05d79fcb87892c79d7f":"kz社区"}
SILL PuppetWebFirer fireRoomJoin() retryPromise() attempt 3 with timeout 60000
SILL Room ready()
SILL PuppetWebBridge getContact() retryPromise: attampt 1/35 time for timeout 306250
SILL PuppetWebBrowser Browser.execute("return typeof WechatyBro === "undefined"")
SILL PuppetWebBrowser dead() checking ...
SILL PuppetWebBrowser Browser.execute(" const callback = arguments[arguments.length - 1] const isAsync = (typeof ... ")
SILL PuppetWebBrowser dead() checking ...
SILL Room contactGetter(@@22e41057b789d5e07962ffb8c91a346112661b71fa9940cd7c26676868e8d6eb) resolved
SILL Contact ready()
SILL Contact ready()
SILL Contact ready()
VERB Room member(你)
SILL Room member() check nickMap: {"@b7eda8f896b085a136feb200ccbdc0a8b4531660ddce7e68ec8081c55b243c5c":"桔子蜜小妞","@db9dcc9dadc34bd9132dcbd19ab69b53":"李佳芮","@a877c351af0362a8a5175d859257a5c642b290ae6144f05d79fcb87892c79d7f":"kz社区"}
SILL PuppetWebFirer fireRoomJoin() retryPromise() attempt 4 with timeout 60000
SILL Room ready()
SILL PuppetWebBridge getContact() retryPromise: attampt 1/35 time for timeout 306250
SILL PuppetWebBrowser Browser.execute("return typeof WechatyBro === "undefined"")
SILL PuppetWebBrowser dead() checking ...
SILL PuppetWebBrowser Browser.execute(" const callback = arguments[arguments.length - 1] const isAsync = (typeof ... ")
SILL PuppetWebBrowser dead() checking ...
SILL Room contactGetter(@@22e41057b789d5e07962ffb8c91a346112661b71fa9940cd7c26676868e8d6eb) resolved
SILL Contact ready()
SILL Contact ready()
SILL Contact ready()
VERB Room member(你)
SILL Room member() check nickMap: {"@b7eda8f896b085a136feb200ccbdc0a8b4531660ddce7e68ec8081c55b243c5c":"桔子蜜小妞","@db9dcc9dadc34bd9132dcbd19ab69b53":"李佳芮","@a877c351af0362a8a5175d859257a5c642b290ae6144f05d79fcb87892c79d7f":"kz社区"}
SILL PuppetWebFirer fireRoomJoin() retryPromise() attempt 5 with timeout 60000
SILL Room ready()
SILL PuppetWebBridge getContact() retryPromise: attampt 1/35 time for timeout 306250
SILL PuppetWebBrowser Browser.execute("return typeof WechatyBro === "undefined"")
SILL PuppetWebBrowser dead() checking ...
SILL PuppetWebBrowser Browser.execute(" const callback = arguments[arguments.length - 1] const isAsync = (typeof ... ")
SILL PuppetWebBrowser dead() checking ...
SILL Room contactGetter(@@22e41057b789d5e07962ffb8c91a346112661b71fa9940cd7c26676868e8d6eb) resolved
SILL Contact ready()
SILL Contact ready()
SILL Contact ready()
VERB Room member(你)
SILL Room member() check nickMap: {"@b7eda8f896b085a136feb200ccbdc0a8b4531660ddce7e68ec8081c55b243c5c":"桔子蜜小妞","@db9dcc9dadc34bd9132dcbd19ab69b53":"李佳芮","@a877c351af0362a8a5175d859257a5c642b290ae6144f05d79fcb87892c79d7f":"kz社区"}
SILL PuppetWebFirer fireRoomJoin() retryPromise() attempt 6 with timeout 60000
SILL Room ready()
SILL PuppetWebBridge getContact() retryPromise: attampt 1/35 time for timeout 306250
SILL PuppetWebBrowser Browser.execute("return typeof WechatyBro === "undefined"")
SILL PuppetWebBrowser dead() checking ...
SILL PuppetWebBrowser Browser.execute(" const callback = arguments[arguments.length - 1] const isAsync = (typeof ... ")
SILL PuppetWebBrowser dead() checking ...
SILL Room contactGetter(@@22e41057b789d5e07962ffb8c91a346112661b71fa9940cd7c26676868e8d6eb) resolved
SILL Contact ready()
SILL Contact ready()
SILL Contact ready()
VERB Room member(你)
SILL Room member() check nickMap: {"@b7eda8f896b085a136feb200ccbdc0a8b4531660ddce7e68ec8081c55b243c5c":"桔子蜜小妞","@db9dcc9dadc34bd9132dcbd19ab69b53":"李佳芮","@a877c351af0362a8a5175d859257a5c642b290ae6144f05d79fcb87892c79d7f":"kz社区"}
SILL PuppetWebFirer fireRoomJoin() retryPromise() attempt 7 with timeout 60000
SILL Room ready()
SILL PuppetWebBridge getContact() retryPromise: attampt 1/35 time for timeout 306250
SILL PuppetWebBrowser Browser.execute("return typeof WechatyBro === "undefined"")
SILL PuppetWebBrowser dead() checking ...
SILL PuppetWebBrowser Browser.execute(" const callback = arguments[arguments.length - 1] const isAsync = (typeof ... ")
SILL PuppetWebBrowser dead() checking ...
SILL Room contactGetter(@@22e41057b789d5e07962ffb8c91a346112661b71fa9940cd7c26676868e8d6eb) resolved
SILL Contact ready()
SILL Contact ready()
SILL Contact ready()
VERB Room member(你)
SILL Room member() check nickMap: {"@b7eda8f896b085a136feb200ccbdc0a8b4531660ddce7e68ec8081c55b243c5c":"桔子蜜小妞","@db9dcc9dadc34bd9132dcbd19ab69b53":"李佳芮","@a877c351af0362a8a5175d859257a5c642b290ae6144f05d79fcb87892c79d7f":"kz社区"}
SILL PuppetWebEvent onServerDing(heartbeat@browser)
SILL PuppetWebWatchdog onFeed: 60000, HEARTBEAT:[heartbeat@browser]
SILL PuppetWebWatchdog clearWatchDogTimer() [45] seconds left
SILL PuppetWebWatchdog setWatchDogTimer(60000, HEARTBEAT:[heartbeat@browser])
SILL PuppetWebWatchdog monitorScan(HEARTBEAT)
SILL PuppetWebWatchdog autoSaveSession()
SILL PuppetWebFirer fireRoomJoin() retryPromise() attempt 8 with timeout 60000
SILL Room ready()
SILL PuppetWebBridge getContact() retryPromise: attampt 1/35 time for timeout 306250
SILL PuppetWebBrowser Browser.execute("return typeof WechatyBro === "undefined"")
SILL PuppetWebBrowser dead() checking ...
SILL PuppetWebBrowser Browser.execute(" const callback = arguments[arguments.length - 1] const isAsync = (typeof ... ")
SILL PuppetWebBrowser dead() checking ...
SILL Room contactGetter(@@22e41057b789d5e07962ffb8c91a346112661b71fa9940cd7c26676868e8d6eb) resolved
SILL Contact ready()
SILL Contact ready()
SILL Contact ready()
VERB Room member(你)
SILL Room member() check nickMap: {"@b7eda8f896b085a136feb200ccbdc0a8b4531660ddce7e68ec8081c55b243c5c":"桔子蜜小妞","@db9dcc9dadc34bd9132dcbd19ab69b53":"李佳芮","@a877c351af0362a8a5175d859257a5c642b290ae6144f05d79fcb87892c79d7f":"kz社区"}
SILL PuppetWebFirer fireRoomJoin() retryPromise() attempt 9 with timeout 60000
SILL Room ready()
SILL PuppetWebBridge getContact() retryPromise: attampt 1/35 time for timeout 306250
SILL PuppetWebBrowser Browser.execute("return typeof WechatyBro === "undefined"")
SILL PuppetWebBrowser dead() checking ...
SILL PuppetWebBrowser Browser.execute(" const callback = arguments[arguments.length - 1] const isAsync = (typeof ... ")
SILL PuppetWebBrowser dead() checking ...
SILL Room contactGetter(@@22e41057b789d5e07962ffb8c91a346112661b71fa9940cd7c26676868e8d6eb) resolved
SILL Contact ready()
SILL Contact ready()
SILL Contact ready()
VERB Room member(你)
SILL Room member() check nickMap: {"@b7eda8f896b085a136feb200ccbdc0a8b4531660ddce7e68ec8081c55b243c5c":"桔子蜜小妞","@db9dcc9dadc34bd9132dcbd19ab69b53":"李佳芮","@a877c351af0362a8a5175d859257a5c642b290ae6144f05d79fcb87892c79d7f":"kz社区"}
SILL PuppetWebFirer fireRoomJoin() retryPromise() attempt 10 with timeout 60000
SILL Room ready()
SILL PuppetWebBridge getContact() retryPromise: attampt 1/35 time for timeout 306250
SILL PuppetWebBrowser Browser.execute("return typeof WechatyBro === "undefined"")
SILL PuppetWebBrowser dead() checking ...
SILL PuppetWebBrowser Browser.execute(" const callback = arguments[arguments.length - 1] const isAsync = (typeof ... ")
SILL PuppetWebBrowser dead() checking ...
SILL Room contactGetter(@@22e41057b789d5e07962ffb8c91a346112661b71fa9940cd7c26676868e8d6eb) resolved
SILL Contact ready()
SILL Contact ready()
SILL Contact ready()
VERB Room member(你)
SILL Room member() check nickMap: {"@b7eda8f896b085a136feb200ccbdc0a8b4531660ddce7e68ec8081c55b243c5c":"桔子蜜小妞","@db9dcc9dadc34bd9132dcbd19ab69b53":"李佳芮","@a877c351af0362a8a5175d859257a5c642b290ae6144f05d79fcb87892c79d7f":"kz社区"}
SILL PuppetWebFirer fireRoomJoin() retryPromise() attempt 11 with timeout 60000
SILL Room ready()
SILL PuppetWebBridge getContact() retryPromise: attampt 1/35 time for timeout 306250
SILL PuppetWebBrowser Browser.execute("return typeof WechatyBro === "undefined"")
SILL PuppetWebBrowser dead() checking ...
SILL PuppetWebBrowser Browser.execute(" const callback = arguments[arguments.length - 1] const isAsync = (typeof ... ")
SILL PuppetWebBrowser dead() checking ...
SILL Room contactGetter(@@22e41057b789d5e07962ffb8c91a346112661b71fa9940cd7c26676868e8d6eb) resolved
SILL Contact ready()
SILL Contact ready()
SILL Contact ready()
VERB Room member(你)
SILL Room member() check nickMap: {"@b7eda8f896b085a136feb200ccbdc0a8b4531660ddce7e68ec8081c55b243c5c":"桔子蜜小妞","@db9dcc9dadc34bd9132dcbd19ab69b53":"李佳芮","@a877c351af0362a8a5175d859257a5c642b290ae6144f05d79fcb87892c79d7f":"kz社区"}
SILL PuppetWebFirer fireRoomJoin() retryPromise() attempt 12 with timeout 60000
SILL Room ready()
SILL PuppetWebBridge getContact() retryPromise: attampt 1/35 time for timeout 306250
SILL PuppetWebBrowser Browser.execute("return typeof WechatyBro === "undefined"")
SILL PuppetWebBrowser dead() checking ...
SILL PuppetWebBrowser Browser.execute(" const callback = arguments[arguments.length - 1] const isAsync = (typeof ... ")
SILL PuppetWebBrowser dead() checking ...
SILL Room contactGetter(@@22e41057b789d5e07962ffb8c91a346112661b71fa9940cd7c26676868e8d6eb) resolved
SILL Contact ready()
SILL Contact ready()
SILL Contact ready()
VERB Room member(你)
SILL Room member() check nickMap: {"@b7eda8f896b085a136feb200ccbdc0a8b4531660ddce7e68ec8081c55b243c5c":"桔子蜜小妞","@db9dcc9dadc34bd9132dcbd19ab69b53":"李佳芮","@a877c351af0362a8a5175d859257a5c642b290ae6144f05d79fcb87892c79d7f":"kz社区"}
SILL PuppetWebFirer fireRoomJoin() retryPromise() attempt 13 with timeout 60000
SILL Room ready()
SILL PuppetWebBridge getContact() retryPromise: attampt 1/35 time for timeout 306250
SILL PuppetWebBrowser Browser.execute("return typeof WechatyBro === "undefined"")
SILL PuppetWebBrowser dead() checking ...
SILL PuppetWebEvent onServerDing(heartbeat@browser)
SILL PuppetWebWatchdog onFeed: 60000, HEARTBEAT:[heartbeat@browser]
SILL PuppetWebWatchdog clearWatchDogTimer() [45] seconds left
SILL PuppetWebWatchdog setWatchDogTimer(60000, HEARTBEAT:[heartbeat@browser])
SILL PuppetWebWatchdog monitorScan(HEARTBEAT)
SILL PuppetWebWatchdog autoSaveSession()
SILL PuppetWebBrowser Browser.execute(" const callback = arguments[arguments.length - 1] const isAsync = (typeof ... ")
SILL PuppetWebBrowser dead() checking ...
SILL Room contactGetter(@@22e41057b789d5e07962ffb8c91a346112661b71fa9940cd7c26676868e8d6eb) resolved
SILL Contact ready()
SILL Contact ready()
SILL Contact ready()
VERB Room member(你)
SILL Room member() check nickMap: {"@b7eda8f896b085a136feb200ccbdc0a8b4531660ddce7e68ec8081c55b243c5c":"桔子蜜小妞","@db9dcc9dadc34bd9132dcbd19ab69b53":"李佳芮","@a877c351af0362a8a5175d859257a5c642b290ae6144f05d79fcb87892c79d7f":"kz社区"}
SILL PuppetWebFirer fireRoomJoin() retryPromise() attempt 14 with timeout 60000
SILL Room ready()
SILL PuppetWebBridge getContact() retryPromise: attampt 1/35 time for timeout 306250
SILL PuppetWebBrowser Browser.execute("return typeof WechatyBro === "undefined"")
SILL PuppetWebBrowser dead() checking ...
SILL PuppetWebBrowser Browser.execute(" const callback = arguments[arguments.length - 1] const isAsync = (typeof ... ")
SILL PuppetWebBrowser dead() checking ...
SILL Room contactGetter(@@22e41057b789d5e07962ffb8c91a346112661b71fa9940cd7c26676868e8d6eb) resolved
SILL Contact ready()
SILL Contact ready()
SILL Contact ready()
VERB Room member(你)
SILL Room member() check nickMap: {"@b7eda8f896b085a136feb200ccbdc0a8b4531660ddce7e68ec8081c55b243c5c":"桔子蜜小妞","@db9dcc9dadc34bd9132dcbd19ab69b53":"李佳芮","@a877c351af0362a8a5175d859257a5c642b290ae6144f05d79fcb87892c79d7f":"kz社区"}
SILL PuppetWebFirer fireRoomJoin() retryPromise() attempt 15 with timeout 60000
SILL Room ready()
SILL PuppetWebBridge getContact() retryPromise: attampt 1/35 time for timeout 306250
SILL PuppetWebBrowser Browser.execute("return typeof WechatyBro === "undefined"")
SILL PuppetWebBrowser dead() checking ...
SILL PuppetWebBrowser Browser.execute(" const callback = arguments[arguments.length - 1] const isAsync = (typeof ... ")
SILL PuppetWebBrowser dead() checking ...
SILL Room contactGetter(@@22e41057b789d5e07962ffb8c91a346112661b71fa9940cd7c26676868e8d6eb) resolved
SILL Contact ready()
SILL Contact ready()
SILL Contact ready()
VERB Room member(你)
SILL Room member() check nickMap: {"@b7eda8f896b085a136feb200ccbdc0a8b4531660ddce7e68ec8081c55b243c5c":"桔子蜜小妞","@db9dcc9dadc34bd9132dcbd19ab69b53":"李佳芮","@a877c351af0362a8a5175d859257a5c642b290ae6144f05d79fcb87892c79d7f":"kz社区"}
SILL PuppetWebFirer fireRoomJoin() retryPromise() attempt 16 with timeout 60000
SILL Room ready()
SILL PuppetWebBridge getContact() retryPromise: attampt 1/35 time for timeout 306250
SILL PuppetWebBrowser Browser.execute("return typeof WechatyBro === "undefined"")
SILL PuppetWebBrowser dead() checking ...
SILL PuppetWebBrowser Browser.execute(" const callback = arguments[arguments.length - 1] const isAsync = (typeof ... ")
SILL PuppetWebBrowser dead() checking ...
SILL Room contactGetter(@@22e41057b789d5e07962ffb8c91a346112661b71fa9940cd7c26676868e8d6eb) resolved
SILL Contact ready()
SILL Contact ready()
SILL Contact ready()
VERB Room member(你)
SILL Room member() check nickMap: {"@b7eda8f896b085a136feb200ccbdc0a8b4531660ddce7e68ec8081c55b243c5c":"桔子蜜小妞","@db9dcc9dadc34bd9132dcbd19ab69b53":"李佳芮","@a877c351af0362a8a5175d859257a5c642b290ae6144f05d79fcb87892c79d7f":"kz社区"}
SILL PuppetWebEvent onServerDing(heartbeat@browser)
SILL PuppetWebWatchdog onFeed: 60000, HEARTBEAT:[heartbeat@browser]
SILL PuppetWebWatchdog clearWatchDogTimer() [45] seconds left
SILL PuppetWebWatchdog setWatchDogTimer(60000, HEARTBEAT:[heartbeat@browser])
SILL PuppetWebWatchdog monitorScan(HEARTBEAT)
SILL PuppetWebWatchdog autoSaveSession()
SILL PuppetWebFirer fireRoomJoin() retryPromise() attempt 17 with timeout 60000
SILL Room ready()
SILL PuppetWebBridge getContact() retryPromise: attampt 1/35 time for timeout 306250
SILL PuppetWebBrowser Browser.execute("return typeof WechatyBro === "undefined"")
SILL PuppetWebBrowser dead() checking ...
SILL PuppetWebBrowser Browser.execute(" const callback = arguments[arguments.length - 1] const isAsync = (typeof ... ")
SILL PuppetWebBrowser dead() checking ...
SILL Room contactGetter(@@22e41057b789d5e07962ffb8c91a346112661b71fa9940cd7c26676868e8d6eb) resolved
SILL Contact ready()
SILL Contact ready()
SILL Contact ready()
VERB Room member(你)
SILL Room member() check nickMap: {"@b7eda8f896b085a136feb200ccbdc0a8b4531660ddce7e68ec8081c55b243c5c":"桔子蜜小妞","@db9dcc9dadc34bd9132dcbd19ab69b53":"李佳芮","@a877c351af0362a8a5175d859257a5c642b290ae6144f05d79fcb87892c79d7f":"kz社区"}
SILL PuppetWebFirer fireRoomJoin() retryPromise() attempt 18 with timeout 60000
SILL Room ready()
SILL PuppetWebBridge getContact() retryPromise: attampt 1/35 time for timeout 306250
SILL PuppetWebBrowser Browser.execute("return typeof WechatyBro === "undefined"")
SILL PuppetWebBrowser dead() checking ...
SILL PuppetWebBrowser Browser.execute(" const callback = arguments[arguments.length - 1] const isAsync = (typeof ... ")
SILL PuppetWebBrowser dead() checking ...
SILL Room contactGetter(@@22e41057b789d5e07962ffb8c91a346112661b71fa9940cd7c26676868e8d6eb) resolved
SILL Contact ready()
SILL Contact ready()
SILL Contact ready()
VERB Room member(你)
SILL Room member() check nickMap: {"@b7eda8f896b085a136feb200ccbdc0a8b4531660ddce7e68ec8081c55b243c5c":"桔子蜜小妞","@db9dcc9dadc34bd9132dcbd19ab69b53":"李佳芮","@a877c351af0362a8a5175d859257a5c642b290ae6144f05d79fcb87892c79d7f":"kz社区"}
SILL PuppetWebFirer fireRoomJoin() retryPromise() attempt 19 with timeout 60000
SILL Room ready()
SILL PuppetWebBridge getContact() retryPromise: attampt 1/35 time for timeout 306250
SILL PuppetWebBrowser Browser.execute("return typeof WechatyBro === "undefined"")
SILL PuppetWebBrowser dead() checking ...
SILL PuppetWebBrowser Browser.execute(" const callback = arguments[arguments.length - 1] const isAsync = (typeof ... ")
SILL PuppetWebBrowser dead() checking ...
SILL Room contactGetter(@@22e41057b789d5e07962ffb8c91a346112661b71fa9940cd7c26676868e8d6eb) resolved
SILL Contact ready()
SILL Contact ready()
SILL Contact ready()
VERB Room member(你)
SILL Room member() check nickMap: {"@b7eda8f896b085a136feb200ccbdc0a8b4531660ddce7e68ec8081c55b243c5c":"桔子蜜小妞","@db9dcc9dadc34bd9132dcbd19ab69b53":"李佳芮","@a877c351af0362a8a5175d859257a5c642b290ae6144f05d79fcb87892c79d7f":"kz社区"}
SILL PuppetWebEvent onServerDing(heartbeat@browser)
SILL PuppetWebWatchdog onFeed: 60000, HEARTBEAT:[heartbeat@browser]
SILL PuppetWebWatchdog clearWatchDogTimer() [45] seconds left
SILL PuppetWebWatchdog setWatchDogTimer(60000, HEARTBEAT:[heartbeat@browser])
SILL PuppetWebWatchdog monitorScan(HEARTBEAT)
SILL PuppetWebWatchdog autoSaveSession()
SILL PuppetWebFirer fireRoomJoin() retryPromise() attempt 20 with timeout 60000
SILL Room ready()
SILL PuppetWebBridge getContact() retryPromise: attampt 1/35 time for timeout 306250
SILL PuppetWebBrowser Browser.execute("return typeof WechatyBro === "undefined"")
SILL PuppetWebBrowser dead() checking ...
SILL PuppetWebBrowser Browser.execute(" const callback = arguments[arguments.length - 1] const isAsync = (typeof ... ")
SILL PuppetWebBrowser dead() checking ...
SILL Room contactGetter(@@22e41057b789d5e07962ffb8c91a346112661b71fa9940cd7c26676868e8d6eb) resolved
SILL Contact ready()
SILL Contact ready()
SILL Contact ready()
VERB Room member(你)
SILL Room member() check nickMap: {"@b7eda8f896b085a136feb200ccbdc0a8b4531660ddce7e68ec8081c55b243c5c":"桔子蜜小妞","@db9dcc9dadc34bd9132dcbd19ab69b53":"李佳芮","@a877c351af0362a8a5175d859257a5c642b290ae6144f05d79fcb87892c79d7f":"kz社区"}
SILL PuppetWebFirer fireRoomJoin() reject() inviteeContactList: kz社区, inviterContact: 你
ERR PuppetWebFirer firmRoomJoin() inivter not found for 你 , room-join & join event will not fired

2.room-leave event log:(works as expected)

SILL Message ready()
SILL Contact ready()
SILL Contact ready()
SILL Room ready()
VERB PuppetWebFirer fireRoomJoin(你将"李佳芮"移出了群聊)
VERB PuppetWebFirer checkRoomJoin()
VERB PuppetWebFirer fireRoomLeave(你将"李佳芮"移出了群聊)
SILL PuppetWebFirer fireRoomLeave() got leaver: 李佳芮
VERB Room member(李佳芮)
SILL Room member() check nickMap: {"@b7eda8f896b085a136feb200ccbdc0a8b4531660ddce7e68ec8081c55b243c5c":"桔子蜜小妞","@fe9249d3bcde111444c6fe84165106e3c9c9f69aa7e40a89d74a2dc025bd9db8":"wuli舞哩","@db9dcc9dadc34bd9132dcbd19ab69b53":"李佳芮"}
SILL Contact ready()
SILL Message ready()
SILL Contact ready()
SILL Room ready()
SILL Contact ready()
room-leave!!!!!!!!
SILL Room ready()
SILL PuppetWebBridge getContact() retryPromise: attampt 1/35 time for timeout 306250
SILL PuppetWebBrowser Browser.execute("return typeof WechatyBro === "undefined"")
SILL PuppetWebBrowser dead() checking ...
SILL Room ready()
SILL PuppetWebBridge getContact() retryPromise: attampt 1/35 time for timeout 306250
SILL PuppetWebBrowser Browser.execute("return typeof WechatyBro === "undefined"")
SILL PuppetWebBrowser dead() checking ...
SILL PuppetWebBrowser Browser.execute(" const callback = arguments[arguments.length - 1] const isAsync = (typeof ... ")
SILL PuppetWebBrowser dead() checking ...
SILL Room contactGetter(@@22e41057b789d5e07962ffb8c91a346112661b71fa9940cd7c26676868e8d6eb) resolved
SILL Contact ready()
SILL Contact ready()
SILL PuppetWebBrowser Browser.execute(" const callback = arguments[arguments.length - 1] const isAsync = (typeof ... ")
SILL PuppetWebBrowser dead() checking ...
SILL Room contactGetter(@@22e41057b789d5e07962ffb8c91a346112661b71fa9940cd7c26676868e8d6eb) resolved
SILL Contact ready()
SILL Contact ready()
SILL Message ready()
SILL Contact ready()
SILL Contact ready()
SILL Room ready()
[ding啊啊啊啊]:{SYS}你将"李佳芮"移出了群聊

3.room-topic event log:(works as expected)

SILL Message ready()
SILL Contact ready()
SILL Contact ready()
SILL Room ready()
VERB PuppetWebFirer fireRoomJoin("李佳芮"修改群名为“ding啊啊啊啊”)
VERB PuppetWebFirer checkRoomJoin()
VERB PuppetWebFirer fireRoomLeave("李佳芮"修改群名为“ding啊啊啊啊”)
VERB Room member(李佳芮)
SILL Room member() check nickMap: {"@b7eda8f896b085a136feb200ccbdc0a8b4531660ddce7e68ec8081c55b243c5c":"桔子蜜小妞","@fe9249d3bcde111444c6fe84165106e3c9c9f69aa7e40a89d74a2dc025bd9db8":"wuli舞哩","@db9dcc9dadc34bd9132dcbd19ab69b53":"李佳芮"}
SILL Contact ready()
SILL Message ready()
SILL Contact ready()
SILL Room ready()
SILL Contact ready()
room-topic##############
SILL Room ready()
SILL PuppetWebBridge getContact() retryPromise: attampt 1/35 time for timeout 306250
SILL PuppetWebBrowser Browser.execute("return typeof WechatyBro === "undefined"")
SILL PuppetWebBrowser dead() checking ...
SILL Room ready()
SILL PuppetWebBridge getContact() retryPromise: attampt 1/35 time for timeout 306250
SILL PuppetWebBrowser Browser.execute("return typeof WechatyBro === "undefined"")
SILL PuppetWebBrowser dead() checking ...
SILL PuppetWebBrowser Browser.execute(" const callback = arguments[arguments.length - 1] const isAsync = (typeof ... ")
SILL PuppetWebBrowser dead() checking ...
SILL PuppetWebBrowser Browser.execute(" const callback = arguments[arguments.length - 1] const isAsync = (typeof ... ")
SILL PuppetWebBrowser dead() checking ...
SILL Room contactGetter(@@22e41057b789d5e07962ffb8c91a346112661b71fa9940cd7c26676868e8d6eb) resolved
SILL Contact ready()
SILL Contact ready()
SILL Contact ready()
SILL Room contactGetter(@@22e41057b789d5e07962ffb8c91a346112661b71fa9940cd7c26676868e8d6eb) resolved
SILL Contact ready()
SILL Contact ready()
SILL Contact ready()
SILL Message ready()
SILL Contact ready()
SILL Contact ready()
SILL Room ready()
[ding啊啊啊啊]:{SYS}"李佳芮"修改群名为“ding啊啊啊啊”

@huan
Copy link
Member

huan commented Oct 20, 2016

it seems your code is out dated, not the latest version.

you need to git pull first, and re-test. if this issue still exist, please run npm run doctor to get debug information, and post here again with new logs.

@lijiarui
Copy link
Member Author

it works as expected!
thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants