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

msg.say()返回no id报错(然而可正常发送文本消息,但不能连续发送) #58

Closed
bigbrother666sh opened this issue Jan 13, 2022 · 14 comments

Comments

@bigbrother666sh
Copy link

bigbrother666sh commented Jan 13, 2022

目前已经确认 puppet-xp暂时不支持filebox。大概率目前只能发送纯文本信息

如果使用msg.say ()发送纯文本信息会返回no id 错误:
详细的错误信息:

10:42:02 ERR PuppetServiceImpl grpcError() messagePayload() rejection: no id
Error: no id
    at PuppetXp.messagePayload (file:///C:/Users/Zhao/wechaty-puppet-xp/node_modules/wechaty-puppet/dist/esm/src/mixins/message-mixin.js:31:23)
    at messagePayload (file:///C:/Users/Zhao/wechaty-puppet-xp/node_modules/wechaty-puppet-service/dist/esm/src/server/puppet-implementation.js:563:46)
    at Object.messagePayload (file:///C:/Users/Zhao/wechaty-puppet-xp/node_modules/wechaty-puppet-service/dist/esm/src/auth/auth-impl-token.js:26:28)
    at handleUnary (C:\Users\Zhao\wechaty-puppet-xp\node_modules\@grpc\grpc-js\build\src\server.js:664:13)
    at processTicksAndRejections (node:internal/process/task_queues:96:5

推测大概率是 puppet-xp和python-wechaty的msg.say()之间还存在什么bug,建议目前使用talker.say () 或者 room.say() 发纯文本不会报错,也可以连续发送

@huan
Copy link
Member

huan commented Jan 13, 2022

It's great to see you are trying to run Puppet XP with Token Gateway!

I'd like to link this issue to:

Please keep updated to let us know your progress, thank you very much!

@huan
Copy link
Member

huan commented Jan 14, 2022

We have published an NPM version of Wechaty Token Gateway:

I'd like to suggest that you use the below command and let me know whether it works for you or not:

$ npm install -g [email protected] wechaty-puppet-xp
$ wechaty gateway --puppet wechaty-puppet-xp

@bigbrother666sh
Copy link
Author

bigbrother666sh commented Jan 16, 2022

We have published an NPM version of Wechaty Token Gateway:

I'd like to suggest that you use the below command and let me know whether it works for you or not:

$ npm install -g [email protected] wechaty-puppet-xp
$ wechaty gateway --puppet wechaty-puppet-xp

我已经试过了NPM wechaty gateway的方式,虽然这确实带来很大的便利性,但是配合python-wechaty问题依然:1)发送文本消息会报错 no id,然而消息可以发送,只是不能连续发送;2)发送filebox,会报错 no url。【为方便阅读,我把详细的报错信息放在最后】我现在有点怀疑是不是python-wachaty这边的bug?

另外,也许值得一提的是,作为本地gateway服务,还是需要在启动wechaty gateway前设定WECHATY_PUPPET_SERVICE_NO_TLS_INSECURE_SERVER=true
不然windows系统下,服务端口是连不上的……


以下为no id 和 no url的详细报错信息

python-wechaty 配合 puppet-xp gateway本地服务,文本消息报错 no id:

服务窗口:

21:42:08 INFO IoClient 晓燕 logged in
21:42:08 WARN PuppetServer start() TLS disabled: INSECURE!
21:43:46 ERR PuppetServiceImpl stop() eventStreamManager is not busy?
21:43:46 WARN PuppetLoginMixin logonoff() is deprecated, use `isLoggedIn` instead:
Error
    at PuppetXp.logonoff (file:///C:/Users/Zhao/AppData/Roaming/npm/node_modules/wechaty-puppet-xp/node_modules/wechaty-puppet/dist/esm/src/mixins/login-mixin.js:86:101)
    at PuppetXp.onStop (file:///C:/Users/Zhao/AppData/Roaming/npm/node_modules/wechaty-puppet-xp/dist/esm/src/puppet-xp.js:203:18)
    at PuppetXp.stop (file:///C:/Users/Zhao/AppData/Roaming/npm/node_modules/wechaty-puppet-xp/node_modules/state-switch/dist/esm/src/service-ctl/service-ctl.js:108:28)
    at PuppetXp.stop (file:///C:/Users/Zhao/AppData/Roaming/npm/node_modules/wechaty-puppet-xp/node_modules/wechaty-puppet/dist/esm/src/mixins/service-mixin.js:25:25)
    at stop (file:///C:/Users/Zhao/AppData/Roaming/npm/node_modules/wechaty/node_modules/wechaty-puppet-service/dist/esm/src/server/puppet-implementation.js:1085:45)
    at Object.stop (file:///C:/Users/Zhao/AppData/Roaming/npm/node_modules/wechaty/node_modules/wechaty-puppet-service/dist/esm/src/auth/auth-impl-token.js:26:28)
    at handleUnary (C:\Users\Zhao\AppData\Roaming\npm\node_modules\wechaty\node_modules\@grpc\grpc-js\build\src\server.js:667:13)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
21:43:46 INFO IoClient 晓燕 logged out
21:43:46 INFO IoClient 晓燕 logged in
----------------------------------------
1
许久不见,过的如何?
----------------------------------------
21:44:53 ERR PuppetServiceImpl grpcError() messagePayload() rejection: no id
Error: no id
    at PuppetXp.messagePayload (file:///C:/Users/Zhao/AppData/Roaming/npm/node_modules/wechaty-puppet-xp/node_modules/wechaty-puppet/dist/esm/src/mixins/message-mixin.js:31:23)
    at messagePayload (file:///C:/Users/Zhao/AppData/Roaming/npm/node_modules/wechaty/node_modules/wechaty-puppet-service/dist/esm/src/server/puppet-implementation.js:563:46)
    at Object.messagePayload (file:///C:/Users/Zhao/AppData/Roaming/npm/node_modules/wechaty/node_modules/wechaty-puppet-service/dist/esm/src/auth/auth-impl-token.js:26:28)
    at handleUnary (C:\Users\Zhao\AppData\Roaming\npm\node_modules\wechaty\node_modules\@grpc\grpc-js\build\src\server.js:667:13)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)

python-wechaty程序窗口:

2022-01-16 21:44:49,036 - Contact - INFO - load contact <Contact <wxid_tnv0hd5hj3rs11> <无空>>
2022-01-16 21:44:49,037 - Wechaty - INFO - receive message <Message#message_type_text[🗣 Contact <wx id_tnv0hd5hj3rs11> <无空>   许久不见,过的如何?>
2022-01-16 21:44:52,992 - Message - INFO - say() <许久不见,过的如何?我不知道,我只是想说,其实我一直在想你,想和你在一起,风里雨里,想和你在一起!>
Exception in callback AsyncIOEventEmitter._emit_run.<locals>._callback(<Task finishe...ertionError()>) at C:\Python310\lib\site-packages\pyee\_asyncio.py:57
handle: <Handle AsyncIOEventEmitter._emit_run.<locals>._callback(<Task finishe...ertionError()>) at C:\Python310\lib\site-packages\pyee\_asyncio.py:57>
Traceback (most recent call last):
  File "C:\Python310\lib\asyncio\events.py", line 80, in _run
    self._context.run(self._callback, *self._args)
  File "C:\Python310\lib\site-packages\pyee\_asyncio.py", line 64, in _callback
    self.emit("error", exc)
  File "C:\Python310\lib\site-packages\wechaty\wechaty.py", line 288, in emit
    super().emit(event, *args, **kwargs)
  File "C:\Python310\lib\site-packages\pyee\_base.py", line 118, in emit
    self._emit_handle_potential_error(event, args[0] if args else None)
  File "C:\Python310\lib\site-packages\pyee\_base.py", line 88, in _emit_handle_potential_error
    raise error
  File "C:\Users\Zhao\python-wechaty-getting-started\examples\ding-dong-bot.py", line 47, in on_message
    await msg.say(results[0][0])
  File "C:\Python310\lib\site-packages\wechaty\user\message.py", line 176, in say
    await message.ready()
  File "C:\Python310\lib\site-packages\wechaty\user\message.py", line 459, in ready
    self.payload = await self.puppet.message_payload(self.message_id)
  File "C:\Python310\lib\site-packages\wechaty_puppet_service\puppet.py", line 435, in message_payload
    response = await self.puppet_stub.message_payload(id=message_id)
  File "C:\Python310\lib\site-packages\wechaty_grpc\wechaty\__init__.py", line 321, in message_payload
    return await self._unary_unary(
  File "C:\Python310\lib\site-packages\betterproto\__init__.py", line 1125, in _unary_unary
    assert response is not None
AssertionError

python-wechaty 配合 puppet-xp gateway本地服务,filebox消息报错 no url:

服务窗口:

22:22:23 INFO IoClient 晓燕 logged in
22:22:23 WARN PuppetServer start() TLS disabled: INSECURE!
22:23:13 ERR PuppetServiceImpl stop() eventStreamManager is not busy?
22:23:13 WARN PuppetLoginMixin logonoff() is deprecated, use `isLoggedIn` instead:
Error
    at PuppetXp.logonoff (file:///C:/Users/Zhao/AppData/Roaming/npm/node_modules/wechaty-puppet-xp/node_modules/wechaty-puppet/dist/esm/src/mixins/login-mixin.js:86:101)
    at PuppetXp.onStop (file:///C:/Users/Zhao/AppData/Roaming/npm/node_modules/wechaty-puppet-xp/dist/esm/src/puppet-xp.js:203:18)
    at PuppetXp.stop (file:///C:/Users/Zhao/AppData/Roaming/npm/node_modules/wechaty-puppet-xp/node_modules/state-switch/dist/esm/src/service-ctl/service-ctl.js:108:28)
    at PuppetXp.stop (file:///C:/Users/Zhao/AppData/Roaming/npm/node_modules/wechaty-puppet-xp/node_modules/wechaty-puppet/dist/esm/src/mixins/service-mixin.js:25:25)
    at stop (file:///C:/Users/Zhao/AppData/Roaming/npm/node_modules/wechaty/node_modules/wechaty-puppet-service/dist/esm/src/server/puppet-implementation.js:1085:45)
    at Object.stop (file:///C:/Users/Zhao/AppData/Roaming/npm/node_modules/wechaty/node_modules/wechaty-puppet-service/dist/esm/src/auth/auth-impl-token.js:26:28)
    at handleUnary (C:\Users\Zhao\AppData\Roaming\npm\node_modules\wechaty\node_modules\@grpc\grpc-js\build\src\server.js:667:13)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
22:23:13 INFO IoClient 晓燕 logged out
22:23:13 INFO IoClient 晓燕 logged in
----------------------------------------
1
ding
----------------------------------------
22:23:35 ERR PuppetServiceImpl grpcError() messageSendFile() rejection: no url
Error: no url
    at new FileBox (file:///C:/Users/Zhao/AppData/Roaming/npm/node_modules/wechaty/node_modules/file-box/dist/esm/src/file-box.js:355:27)
    at Function.fromUrl (file:///C:/Users/Zhao/AppData/Roaming/npm/node_modules/wechaty/node_modules/file-box/dist/esm/src/file-box.js:81:16)
    at Function.fromJSON (file:///C:/Users/Zhao/AppData/Roaming/npm/node_modules/wechaty/node_modules/file-box/dist/esm/src/file-box.js:223:35)
    at messageSendFile (file:///C:/Users/Zhao/AppData/Roaming/npm/node_modules/wechaty/node_modules/wechaty-puppet-service/dist/esm/src/server/puppet-implementation.js:627:45)
    at Object.messageSendFile (file:///C:/Users/Zhao/AppData/Roaming/npm/node_modules/wechaty/node_modules/wechaty-puppet-service/dist/esm/src/auth/auth-impl-token.js:26:28)
    at handleUnary (C:\Users\Zhao\AppData\Roaming\npm\node_modules\wechaty\node_modules\@grpc\grpc-js\build\src\server.js:667:13)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)

python-wechaty程序:

Contact <lonely2012> <晓燕>
2022-01-16 22:23:35,208 - Contact - INFO - load contact <Contact <wxid_tnv0hd5hj3rs11> <无空>>
2022-01-16 22:23:35,208 - Wechaty - INFO - receive message <Message#message_type_text[🗣 Contact <wx id_tnv0hd5hj3rs11> <无空>   ding>
2022-01-16 22:23:35,209 - Message - INFO - say() <<wechaty_puppet.file_box.file_box.FileBox object at 0x0000023574D22D60>>
Exception in callback AsyncIOEventEmitter._emit_run.<locals>._callback(<Task finishe...ertionError()>) at C:\Python310\lib\site-packages\pyee\_asyncio.py:57
handle: <Handle AsyncIOEventEmitter._emit_run.<locals>._callback(<Task finishe...ertionError()>) at C:\Python310\lib\site-packages\pyee\_asyncio.py:57>
Traceback (most recent call last):
  File "C:\Python310\lib\asyncio\events.py", line 80, in _run
    self._context.run(self._callback, *self._args)
  File "C:\Python310\lib\site-packages\pyee\_asyncio.py", line 64, in _callback
    self.emit("error", exc)
  File "C:\Python310\lib\site-packages\wechaty\wechaty.py", line 288, in emit
    super().emit(event, *args, **kwargs)
  File "C:\Python310\lib\site-packages\pyee\_base.py", line 118, in emit
    self._emit_handle_potential_error(event, args[0] if args else None)
  File "C:\Python310\lib\site-packages\pyee\_base.py", line 88, in _emit_handle_potential_error
    raise error
  File "C:\Users\Zhao\python-wechaty-getting-started\examples\dd-bot.py", line 42, in on_message
    await msg.say(file_box)
  File "C:\Python310\lib\site-packages\wechaty\user\message.py", line 161, in say
    message_id = await self.puppet.message_send_file(
  File "C:\Python310\lib\site-packages\wechaty_puppet_service\puppet.py", line 376, in message_send_file
    response = await self.puppet_stub.message_send_file(
  File "C:\Python310\lib\site-packages\wechaty_grpc\wechaty\__init__.py", line 312, in message_send_file
    return await self._unary_unary(
  File "C:\Python310\lib\site-packages\betterproto\__init__.py", line 1125, in _unary_unary
    assert response is not None
AssertionError

@huan
Copy link
Member

huan commented Jan 16, 2022

另外,也许值得一提的是,作为本地gateway服务,还是需要在启动wechaty gateway前设定WECHATY_PUPPET_SERVICE_NO_TLS_INSECURE_SERVER=true 不然windows系统下,服务端口是连不上的……

This is because Python Wechaty does not support TLS yet.

我现在有点怀疑是不是python-wachaty这边的bug?

To confirm that, you can try to use the TypeScript version of the Wechaty to see if the same functions work as expected or not:

  1. If the TS version works, then it's related to python-wechaty
  2. If the TS version does not work, please file an issue and provide the TS code for reproducing (with steps)

@bigbrother666sh
Copy link
Author

经过尝试,TS version下(我使用的是https://github.com/wechaty/getting-started),发送文本消息没有 no id 报错。
但是一段时间没有收到消息会触发watchdog,有错误提示,但是貌似不影响,错误信息如下

16:01:52 WARN PuppetWatchdogAgent start() reset() reason: {"data":"onGrpcStreamEvent(EVENT_TYPE_MESSAGE)","timeoutMilliseconds":60000}
16:01:58 ERR Config ###########################
16:01:58 ERR Config Wechaty uncaughtException: Error: WatchdogAgent reset: lastFood: "{"data":"onGrpcStreamEvent(EVENT_TYPE_MESSAGE)","timeoutMilliseconds":60000}"
    at Watchdog.reset (file:///C:/Users/Zhao/getting-started/node_modules/wechaty-puppet/src/agents/watchdog-agent.ts:65:33)
    at Watchdog.emit (node:events:390:28)
    at Watchdog.emit (node:domain:475:12)
    at Timeout._onTimeout (file:///C:/Users/Zhao/getting-started/node_modules/watchdog/src/watchdog.ts:115:12)
    at listOnTimeout (node:internal/timers:557:17)
    at processTimers (node:internal/timers:500:7) uncaughtException
16:01:58 ERR Config ###########################

另外,不知道为什么,如果我仅是set WECHATY_PUPPET=wechaty-puppet-service,则TS wechaty连接不上puppetgateway,会提示timeout,我最终set WECHATY_PUPPET_SERVICE_ENDPOINT=127.0.0.1:8080 才能连接上,不知道是否有关系……

@huan
Copy link
Member

huan commented Jan 18, 2022

另外,不知道为什么,如果我仅是set WECHATY_PUPPET=wechaty-puppet-service,则TS wechaty连接不上puppetgateway,会提示timeout,我最终set WECHATY_PUPPET_SERVICE_ENDPOINT=127.0.0.1:8080 才能连接上,不知道是否有关系……

The full output of the command wechaty gateway --puppet wechaty-puppet-xp with verbose log level would be helpful to analyze this problem.

@bigbrother666sh
Copy link
Author

bigbrother666sh commented Jan 18, 2022

wechaty gateway --puppet wechaty-puppet-xp

我尝试在运行 wechaty gateway --puppet wechaty-puppet-xp 前先 set WECHATY_LOG=verbose,这回空置一段时间后启动watchdog会导致wechaty退出,gateway还正常。

完整的gateway-puppet-xp verbose log输出如下:

`C:\Users\Zhao>set WECHATY_LOG=verbose

C:\Users\Zhao>wechaty gateway --puppet wechaty-puppet-xp
17:04:05 INFO Config registering process.on("unhandledRejection") for development/debug
17:04:05 VERB Config constructor()
17:04:05 VERB wechaty-puppet-service monkeyPatchMetadataFromHttp2Headers()
17:04:05 VERB PoolifyMixin poolifyMixin(EventEmitter)
17:04:05 VERB WechatifyMixin wechatifyMixin(AbstractPoolifyMixin)
17:04:05 VERB ValidationMixin validationMixin(ContactMixin)
17:04:05 VERB ValidationMixin validationMixin(ContactImplBase)
17:04:05 VERB PoolifyMixin poolifyMixin(ContactImpl)
17:04:05 VERB ValidationMixin validationMixin(ContactSelfMixin)
17:04:05 VERB WechatifyMixin wechatifyMixin(EmptyBase)
17:04:05 VERB ValidationMixin validationMixin(FavoriteMixin)
17:04:05 VERB WechatifyMixin wechatifyMixin(EventEmitter)
17:04:05 VERB ValidationMixin validationMixin(FriendshipMixin)
17:04:05 VERB WechatifyMixin wechatifyMixin(EmptyBase)
17:04:05 VERB ValidationMixin validationMixin(ImageMixin)
17:04:05 VERB WechatifyMixin wechatifyMixin(EmptyBase)
17:04:05 VERB ValidationMixin validationMixin(LocationMixin)
17:04:05 VERB WechatifyMixin wechatifyMixin(EmptyBase)
17:04:05 VERB ValidationMixin validationMixin(UrlLinkMixin)
17:04:05 VERB WechatifyMixin wechatifyMixin(EmptyBase)
17:04:05 VERB ValidationMixin validationMixin(MiniProgramMixin)
17:04:05 VERB WechatifyMixin wechatifyMixin(EventEmitter)
17:04:05 VERB ValidationMixin validationMixin(MessageMixin)
17:04:05 VERB ValidationMixin validationMixin(MessageImplBase)
17:04:05 VERB WechatifyMixin wechatifyMixin(EmptyBase)
17:04:05 VERB ValidationMixin validationMixin(MomentMixin)
17:04:05 VERB WechatifyMixin wechatifyMixin(EmptyBase)
17:04:05 VERB ValidationMixin validationMixin(MoneyMixin)
17:04:05 VERB PoolifyMixin poolifyMixin(EventEmitter)
17:04:05 VERB WechatifyMixin wechatifyMixin(AbstractPoolifyMixin)
17:04:05 VERB ValidationMixin validationMixin(RoomMixin)
17:04:05 VERB WechatifyMixin wechatifyMixin(EmptyBase)
17:04:05 VERB ValidationMixin validationMixin(RoomInvitationMixin)
17:04:05 VERB WechatifyMixin wechatifyMixin(EmptyBase)
17:04:05 VERB PoolifyMixin poolifyMixin(AbstractWechatifyMixin)
17:04:05 VERB ValidationMixin validationMixin(TagMixin)
17:04:05 VERB WechatifyMixin wechatifyMixin(EmptyBase)
17:04:05 VERB ValidationMixin validationMixin(DelayMixin)
17:04:05 VERB WechatyGErrorMixin gErrorMixin(WechatySkeleton)
17:04:05 VERB WechatifyUserModuleMixin wechatifyUserModuleMixin(GErrorMixin)
17:04:05 VERB WechatyIoMixin ioMixin(WechatifyUserModuleMixin)
17:04:05 VERB WechatyPluginMixin pluginMixin(ServiceCtlMixin)
17:04:05 VERB WechatyPuppetMixin puppetMixin(PluginMixin)
17:04:05 VERB WechatyLoginMixin loginMixin(PuppetMixin)
17:04:05 VERB WechatyMiscMixin miscMixin(LoginMixin)
17:04:05 VERB ValidationMixin validationMixin(WechatyBase)
17:04:05 VERB ValidationMixin validationMixin(WechatyImplBase)
17:04:05 VERB Wechaty init() Raven disabled (import("raven") failed)
17:04:05 INFO Gateway Wechaty version 1.11.41
17:04:05 INFO Gateway no `--token` specified, generating random Wechaty Puppet Service TOKEN ...
17:04:05 INFO Gateway Wechaty Puppet Service TOKEN: insecure_105cbaf1-e2a5-49fe-82de-ce771f1a3543
17:04:05 INFO Gateway no `--port` specified, selecting random free Wechaty Puppet Service Server Port ...
17:04:05 INFO Gateway Wechaty Puppet Service Server Port: 8788
17:04:05 INFO Gateway Wechaty Puppet Provider: wechaty-puppet-xp
17:04:05 INFO Gateway no `--puppet-token` specified, reading from environment variable `WECHATY_PUPPET_TOKEN` for your Wechaty Puppet Provider ...
17:04:05 INFO Gateway WECHATY_PUPPET_TOKEN environment variable not available. Token disabled.
17:04:05 INFO Gateway Wechaty Puppet Provider Token: disabled
17:04:05 VERB WechatyBuilder singleton()
17:04:05 VERB WechatyBuilder newInstance()
17:04:05 VERB WechatyLoginMixin constructor()
17:04:05 VERB WechatyPuppetMixin construct()
17:04:05 VERB WechatyIoMixin constructor()
17:04:05 VERB WechatifyUserModuleMixin constructor()
17:04:05 VERB WechatySkeleton constructor()
17:04:05 VERB ServiceCtl<Wechaty> constructor()
17:04:05 VERB StateSwitch constructor(Wechaty, "{"log":{"enableTimestamp":true,"logLevel":4,"prefixFilter":{}}}")
17:04:05 VERB StateSwitch constructor(WechatyReset, "{"log":{"enableTimestamp":true,"logLevel":4,"prefixFilter":{}}}")
17:04:05 VERB StateSwitch constructor(WechatyReady, "{"log":{"enableTimestamp":true,"logLevel":4,"prefixFilter":{}}}")
17:04:05 VERB Wechaty constructor()
17:04:05 VERB IoClient constructor({port:8788, token:insecure_105cbaf1-e2a5-49fe-82de-ce771f1a3543, wechaty:Wechaty#7e2fd255-1269-48fd-b3b4-585970845dec<wechaty-puppet-xp>()})
17:04:05 VERB StateSwitch constructor(IoClient, "{"log":{"enableTimestamp":true,"logLevel":4,"prefixFilter":{}}}")
17:04:05 VERB IoClient start()
17:04:05 VERB StateSwitch <IoClient> active(pending) <- (false)
17:04:05 VERB IoClient hookWechaty()
17:04:05 VERB WechatySkeleton on(login, listener) registering... listenerCount: 0
17:04:05 VERB WechatySkeleton on(logout, listener) registering... listenerCount: 0
17:04:05 VERB WechatySkeleton on(message, listener) registering... listenerCount: 0
17:04:05 VERB WechatySkeleton on(scan, listener) registering... listenerCount: 0
17:04:05 INFO Gateway Registering Wechaty Puppet Token Gateway Service Discovery ...
17:04:05 VERB IoClient startIo() with token insecure_105cbaf1-e2a5-49fe-82de-ce771f1a3543
17:04:05 VERB StateSwitch constructor(Io, "{"log":{"enableTimestamp":true,"logLevel":4,"prefixFilter":{}}}")
17:04:05 VERB Io instantiated with apihost[api.chatie.io], token[insecure_105cbaf1-e2a5-49fe-82de-ce771f1a3543], protocol[io|0.0.1], cuid[7e2fd255-1269-48fd-b3b4-585970845dec]
17:04:05 VERB Io start()
17:04:05 VERB StateSwitch <Io> active(pending) <- (false)
17:04:05 VERB Io initEventHook()
17:04:05 VERB WechatySkeleton on(error, listener) registering... listenerCount: 0
17:04:05 VERB WechatySkeleton on(heartbeat, listener) registering... listenerCount: 0
17:04:05 VERB WechatySkeleton on(login, listener) registering... listenerCount: 1
17:04:05 VERB WechatySkeleton on(logout, listener) registering... listenerCount: 1
17:04:05 VERB WechatySkeleton on(message, listener) registering... listenerCount: 1
17:04:05 VERB WechatySkeleton on(scan, listener) registering... listenerCount: 1
17:04:05 VERB Io initWebSocket()
17:04:06 VERB Io initWebSocket() connected with protocol [io|0.0.1|7e2fd255-1269-48fd-b3b4-585970845dec||8788]
17:04:06 VERB WechatySkeleton on(login, listener) registering... listenerCount: 2
17:04:06 VERB WechatySkeleton on(scan, listener) registering... listenerCount: 2
17:04:06 VERB StateSwitch <Io> active(true) <- (pending)
17:04:06 VERB WechatyLoginMixin start()
17:04:06 VERB WechatyPuppetMixin start()
17:04:06 VERB WechatyPuppetMixin start() super.start() ...
17:04:06 VERB WechatyPluginMixin start()
17:04:06 VERB ServiceCtl<Wechaty> start()
17:04:06 VERB StateSwitch <Wechaty> active(pending) <- (false)
17:04:06 VERB ServiceCtl<Wechaty> start() super.start() ...
17:04:06 VERB WechatyIoMixin start()
17:04:06 VERB WechatifyUserModuleMixin start()
17:04:06 VERB WechatySkeleton start()
17:04:06 VERB WechatifyUserModuleMixin _wechatifyUserModules()
17:04:06 VERB WechatifyUserModuleMixin _wechatifyUserModules() initializing Wechaty User Module (WUM) ...
17:04:06 VERB WechatifyMixin wechatifyUserModule(ContactImpl)
17:04:06 VERB WechatifyMixin wechatifyUserModule(ContactImpl)(Wechaty#7e2fd255-1269-48fd-b3b4-585970845dec<wechaty-puppet-xp>(Gateway))
17:04:06 VERB WechatifyMixin wechatifyUserModule(ContactSelfImpl)
17:04:06 VERB WechatifyMixin wechatifyUserModule(ContactSelfImpl)(Wechaty#7e2fd255-1269-48fd-b3b4-585970845dec<wechaty-puppet-xp>(Gateway))
17:04:06 VERB WechatifyMixin wechatifyUserModule(DelayImpl)
17:04:06 VERB WechatifyMixin wechatifyUserModule(DelayImpl)(Wechaty#7e2fd255-1269-48fd-b3b4-585970845dec<wechaty-puppet-xp>(Gateway))
17:04:06 VERB WechatifyMixin wechatifyUserModule(FriendshipImpl)
17:04:06 VERB WechatifyMixin wechatifyUserModule(FriendshipImpl)(Wechaty#7e2fd255-1269-48fd-b3b4-585970845dec<wechaty-puppet-xp>(Gateway))
17:04:06 VERB WechatifyMixin wechatifyUserModule(ImageImpl)
17:04:06 VERB WechatifyMixin wechatifyUserModule(ImageImpl)(Wechaty#7e2fd255-1269-48fd-b3b4-585970845dec<wechaty-puppet-xp>(Gateway))
17:04:06 VERB WechatifyMixin wechatifyUserModule(LocationImpl)
17:04:06 VERB WechatifyMixin wechatifyUserModule(LocationImpl)(Wechaty#7e2fd255-1269-48fd-b3b4-585970845dec<wechaty-puppet-xp>(Gateway))
17:04:06 VERB WechatifyMixin wechatifyUserModule(MessageImpl)
17:04:06 VERB WechatifyMixin wechatifyUserModule(MessageImpl)(Wechaty#7e2fd255-1269-48fd-b3b4-585970845dec<wechaty-puppet-xp>(Gateway))
17:04:06 VERB WechatifyMixin wechatifyUserModule(MiniProgramImpl)
17:04:06 VERB WechatifyMixin wechatifyUserModule(MiniProgramImpl)(Wechaty#7e2fd255-1269-48fd-b3b4-585970845dec<wechaty-puppet-xp>(Gateway))
17:04:06 VERB WechatifyMixin wechatifyUserModule(RoomImpl)
17:04:06 VERB WechatifyMixin wechatifyUserModule(RoomImpl)(Wechaty#7e2fd255-1269-48fd-b3b4-585970845dec<wechaty-puppet-xp>(Gateway))
17:04:06 VERB WechatifyMixin wechatifyUserModule(RoomInvitationImpl)
17:04:06 VERB WechatifyMixin wechatifyUserModule(RoomInvitationImpl)(Wechaty#7e2fd255-1269-48fd-b3b4-585970845dec<wechaty-puppet-xp>(Gateway))
17:04:06 VERB WechatifyMixin wechatifyUserModule(TagImpl)
17:04:06 VERB WechatifyMixin wechatifyUserModule(TagImpl)(Wechaty#7e2fd255-1269-48fd-b3b4-585970845dec<wechaty-puppet-xp>(Gateway))
17:04:06 VERB WechatifyMixin wechatifyUserModule(UrlLinkImpl)
17:04:06 VERB WechatifyMixin wechatifyUserModule(UrlLinkImpl)(Wechaty#7e2fd255-1269-48fd-b3b4-585970845dec<wechaty-puppet-xp>(Gateway))
17:04:06 VERB WechatifyUserModuleMixin _wechatifyUserModules() initializing Wechaty User Module (WUM) ... done
17:04:06 VERB ServiceCtl<Wechaty> start() super.start() ... done
17:04:06 VERB ServiceCtl<Wechaty> start() this.onStart() ...
17:04:06 VERB Wechaty onStart()
17:04:06 VERB Wechaty <wechaty-puppet-xp>(Gateway) onStart() v1.11.41 is starting...
17:04:06 VERB Wechaty id: 7e2fd255-1269-48fd-b3b4-585970845dec
17:04:07 VERB Wechaty onStart() ... done
17:04:07 VERB ServiceCtl<Wechaty> start() this.onStart() ... done
17:04:07 VERB StateSwitch <Wechaty> active(true) <- (pending)
17:04:07 VERB ServiceCtl<Wechaty> start() ... done
17:04:07 VERB WechatyPluginMixin start() installing plugins(global/0, instance/0) ...
17:04:07 VERB WechatyPluginMixin __activePlugin()
17:04:07 VERB WechatyPluginMixin start() installing plugins(global/0, instance/0) ... done
17:04:07 VERB WechatyPuppetMixin start() super.start() ... done
17:04:07 VERB WechatyPuppetMixin start() initializing puppet instance ...
17:04:07 VERB WechatyPuppetMixin __initPuppetInstance() wechaty-puppet-xp
17:04:07 VERB WechatyPuppetMixin __initPuppetInstance() instanciating puppet instance ...
17:04:07 VERB Puppet resolvePuppet({puppet: wechaty-puppet-xp, puppetOptions: {}})
17:04:07 VERB Puppet resolvePuppet() resolving name "wechaty-puppet-xp" ...
17:04:07 VERB Puppet resolvePuppetName(wechaty-puppet-xp)
17:04:07 VERB Puppet resolvePuppetName(wechaty-puppet-xp): ESM resolved
17:04:07 VERB Puppet resolvePuppet() resolving name "wechaty-puppet-xp" ... done
17:04:07 VERB Puppet resolvePuppet() instanciating puppet ...
17:04:07 VERB PuppetSkeleton constructor({})
17:04:07 VERB PuppetMemoryMixin constructor()
17:04:07 VERB PuppetLoginMixin constructor()
17:04:07 VERB PuppetCacheMixin constructor()
17:04:07 VERB PuppetCacheAgent constructor()
17:04:07 VERB PuppetContactMixin constructor()
17:04:07 VERB PuppetRoomMemberMixin constructor()
17:04:07 VERB PuppetRoomMixin constructor()
17:04:07 VERB PuppetFriendshipMixin constructor()
17:04:07 VERB PuppetTagMixin constructor()
17:04:07 VERB PuppetRoomInvitationMixin constructor()
17:04:07 VERB PuppetMessageMixin constructor()
17:04:07 VERB PuppetMiscMixin constructor()
17:04:07 VERB ServiceCtl<PuppetServiceMixin> constructor()
17:04:07 VERB StateSwitch constructor(PuppetServiceMixin, "{"log":{"enableTimestamp":true,"logLevel":4,"prefixFilter":{}}}")
17:04:07 VERB StateSwitch constructor(PuppetServiceMixinReset, "{"log":{"enableTimestamp":true,"logLevel":4,"prefixFilter":{}}}")
17:04:07 VERB PuppetServiceMixin constructor() #0
17:04:07 VERB PuppetWatchdogAgent constructor(1209333f-80c4-4610-afbd-b3d593366681)
17:04:07 VERB PuppetWatchdogAgent constructor() timeout 60 seconds
17:04:07 VERB Puppet constructor({})
17:04:07 VERB PuppetXp constructor({})
17:04:07 VERB Puppet resolvePuppet() instanciating puppet ... done
17:04:07 VERB WechatyPuppetMixin __initPuppetInstance() instanciating puppet instance ... done
17:04:07 VERB WechatyPuppetMixin __initPuppetInstance() setting memory ...
17:04:07 VERB PuppetMemoryMixin setMemory(Gateway)
17:04:07 VERB WechatyPuppetMixin __initPuppetInstance() setting memory ... done
17:04:07 VERB WechatyPuppetMixin __initPuppetInstance() setting up events ...
17:04:07 VERB WechatyPuppetMixin __setupPuppetEvents(Puppet<PuppetXp>(Gateway))
17:04:07 VERB PuppetMixin __setupPuppetEvents() puppet.on(friendship) (listenerCount:0) registering...
17:04:07 VERB PuppetMixin __setupPuppetEvents() puppet.on(login) (listenerCount:0) registering...
17:04:07 VERB PuppetMixin __setupPuppetEvents() puppet.on(logout) (listenerCount:0) registering...
17:04:07 VERB PuppetMixin __setupPuppetEvents() puppet.on(message) (listenerCount:0) registering...
17:04:07 VERB PuppetMixin __setupPuppetEvents() puppet.on(room-invite) (listenerCount:0) registering...
17:04:07 VERB PuppetMixin __setupPuppetEvents() puppet.on(room-join) (listenerCount:0) registering...
17:04:07 VERB PuppetMixin __setupPuppetEvents() puppet.on(room-leave) (listenerCount:0) registering...
17:04:07 VERB PuppetMixin __setupPuppetEvents() puppet.on(room-topic) (listenerCount:0) registering...
17:04:07 VERB PuppetMixin __setupPuppetEvents() puppet.on(scan) (listenerCount:0) registering...
17:04:07 VERB PuppetMixin __setupPuppetEvents() puppet.on(dirty) (listenerCount:0) registering...
17:04:07 VERB PuppetMixin __setupPuppetEvents() puppet.on(dong) (listenerCount:0) registering...
17:04:07 VERB PuppetMixin __setupPuppetEvents() puppet.on(error) (listenerCount:0) registering...
17:04:07 VERB PuppetMixin __setupPuppetEvents() puppet.on(heartbeat) (listenerCount:0) registering...
17:04:07 VERB PuppetMixin __setupPuppetEvents() puppet.on(ready) (listenerCount:0) registering...
17:04:07 VERB PuppetMixin __setupPuppetEvents() puppet.on(reset) (listenerCount:0) registering...
17:04:07 VERB WechatyPuppetMixin __setupPuppetEvents() ... done
17:04:07 VERB WechatyPuppetMixin __initPuppetInstance() setting up events ... done
17:04:07 VERB WechatyPuppetMixin __initPuppetInstance() emitting "puppet" event ...
17:04:07 VERB WechatyPuppetMixin __initPuppetInstance() emitting "puppet" event ... done
17:04:07 VERB WechatyPuppetMixin start() initializing puppet instance ... done
17:04:07 VERB WechatyPuppetMixin start() starting puppet ...
17:04:07 VERB PuppetServiceMixin start()
17:04:07 VERB ServiceCtl<PuppetServiceMixin> start()
17:04:07 VERB StateSwitch <PuppetServiceMixin> active(pending) <- (false)
17:04:07 VERB ServiceCtl<PuppetServiceMixin> start() super.start() ...
17:04:07 VERB PuppetCacheMixin start()
17:04:07 VERB PuppetLoginMixin start()
17:04:07 VERB PuppetMemoryMixin start()
17:04:07 VERB PuppetSkeleton start()
17:04:07 VERB PuppetCacheAgent start()
17:04:07 VERB PuppetCacheAgent clear()
17:04:07 VERB PuppetCacheMixin start() "dirty" event listener added
17:04:07 VERB ServiceCtl<PuppetServiceMixin> start() super.start() ... done
17:04:07 VERB ServiceCtl<PuppetServiceMixin> start() this.onStart() ...
17:04:07 VERB PuppetXp onStart()
17:04:08 INFO Io on(jsonrpc): [object Object]
17:04:08 VERB Io on(jsonrpc) send({"id":-9007199254686046,"jsonrpc":"2.0","result":8788})
17:04:08 INFO Gateway Registering Wechaty Puppet Token Gateway Service Discovery ... success


    Your have successfully ran Wechaty Token Gateway with the below settings:
      1. token: insecure_105cbaf1-e2a5-49fe-82de-ce771f1a3543
      2. port: 8788
      3. puppet: wechaty-puppet-xp
      4. puppetToken:

    The Wechaty Puppet Token Gateway Service Address is 140.206.194.150:8788, please make sure it can be public accessed via the internet.

    You can save the below command to restore the token gateway in future:

    $ wechaty gateway --token insecure_105cbaf1-e2a5-49fe-82de-ce771f1a3543 --port 8788 --puppet wechaty-puppet-xp --puppet-token

    You can set the below environment variables for your Wechaty program to use the DIY token provided by this gateway:
    __________________________________________________________________________
    $ export WECHATY_PUPPET=wechaty-puppet-service
    $ export WECHATY_PUPPET_SERVICE_TOKEN=insecure_105cbaf1-e2a5-49fe-82de-ce771f1a3543
    $ npm start

    Please file an issue if you found any bug or have feature request at https://github.com/wechaty/wechaty/issues
    Join the Wechaty Community Gitter Channel at https://gitter.im/wechaty/wechaty if you have any questions.


17:04:09 VERB PuppetXp login()
17:04:09 VERB PuppetLoginMixin login(lonely2012)
17:04:09 VERB PoolifyMixin get pool() init pool
17:04:09 VERB PuppetXp---------------------- contactRawPayload(lonely2012)
17:04:09 VERB ServiceCtl<PuppetServiceMixin> start() this.onStart() ... done
17:04:09 VERB StateSwitch <PuppetServiceMixin> active(true) <- (pending)
17:04:09 VERB ServiceCtl<PuppetServiceMixin> start() ... done
17:04:09 VERB PuppetWatchdogAgent start() "heartbeat" event listener added
17:04:09 VERB PuppetWatchdogAgent start() "reset" event listener added
17:04:09 VERB ContactSelf name()
17:04:09 INFO IoClient 晓燕 logged in
17:04:09 VERB WechatyPuppetMixin start() starting puppet ... done
17:04:09 VERB IoClient startPuppetServer()
17:04:09 VERB PuppetServer constructor({endpoint: "0.0.0.0:8788", puppet: "Puppet<PuppetXp>(Gateway)", token: "insecure_105cbaf1-e2a5-49fe-82de-ce771f1a3543"})
17:04:09 VERB PuppetServer start()
17:04:09 VERB PuppetServer start() initializing FileBox UUID URN Registry ...
17:04:09 VERB PuppetServer start() initializing FileBox UUID URN Registry ... done
17:04:09 VERB PuppetServer start() initializing gRPC Server with options "{}"
17:04:09 VERB PuppetServer start() initializing gRPC Server ... done
17:04:09 VERB PuppetServer start() initializing puppet implementation with FileBoxUuid...
17:04:09 VERB EventStreamManager constructor(Puppet<PuppetXp>(Gateway))
17:04:09 VERB PuppetServer start() initializing puppet implementation with FileBoxUuid... done
17:04:09 VERB PuppetServer start() initializing authorization with token ...
17:04:09 VERB wechaty-puppet-service authImplToken()
17:04:09 VERB wechaty-puppet-service auth/auth-impl-token.ts authWrapHandlerToken(insecure_105cbaf1-e2a5-49fe-82de-ce771f1a3543)(contactAlias)
17:04:09 VERB wechaty-puppet-service auth/auth-impl-token.ts authWrapHandlerToken(insecure_105cbaf1-e2a5-49fe-82de-ce771f1a3543)(contactAvatar)
17:04:09 VERB wechaty-puppet-service auth/auth-impl-token.ts authWrapHandlerToken(insecure_105cbaf1-e2a5-49fe-82de-ce771f1a3543)(contactCorporationRemark)
17:04:09 VERB wechaty-puppet-service auth/auth-impl-token.ts authWrapHandlerToken(insecure_105cbaf1-e2a5-49fe-82de-ce771f1a3543)(contactDescription)
17:04:09 VERB wechaty-puppet-service auth/auth-impl-token.ts authWrapHandlerToken(insecure_105cbaf1-e2a5-49fe-82de-ce771f1a3543)(contactList)
17:04:09 VERB wechaty-puppet-service auth/auth-impl-token.ts authWrapHandlerToken(insecure_105cbaf1-e2a5-49fe-82de-ce771f1a3543)(contactPayload)
17:04:09 VERB wechaty-puppet-service auth/auth-impl-token.ts authWrapHandlerToken(insecure_105cbaf1-e2a5-49fe-82de-ce771f1a3543)(contactPhone)
17:04:09 VERB wechaty-puppet-service auth/auth-impl-token.ts authWrapHandlerToken(insecure_105cbaf1-e2a5-49fe-82de-ce771f1a3543)(contactSelfName)
17:04:09 VERB wechaty-puppet-service auth/auth-impl-token.ts authWrapHandlerToken(insecure_105cbaf1-e2a5-49fe-82de-ce771f1a3543)(contactSelfQRCode)
17:04:09 VERB wechaty-puppet-service auth/auth-impl-token.ts authWrapHandlerToken(insecure_105cbaf1-e2a5-49fe-82de-ce771f1a3543)(contactSelfSignature)
17:04:09 VERB wechaty-puppet-service auth/auth-impl-token.ts authWrapHandlerToken(insecure_105cbaf1-e2a5-49fe-82de-ce771f1a3543)(ding)
17:04:09 VERB wechaty-puppet-service auth/auth-impl-token.ts authWrapHandlerToken(insecure_105cbaf1-e2a5-49fe-82de-ce771f1a3543)(dirtyPayload)
17:04:09 VERB wechaty-puppet-service auth/auth-impl-token.ts authWrapHandlerToken(insecure_105cbaf1-e2a5-49fe-82de-ce771f1a3543)(event)
17:04:09 VERB wechaty-puppet-service auth/auth-impl-token.ts authWrapHandlerToken(insecure_105cbaf1-e2a5-49fe-82de-ce771f1a3543)(friendshipAccept)
17:04:09 VERB wechaty-puppet-service auth/auth-impl-token.ts authWrapHandlerToken(insecure_105cbaf1-e2a5-49fe-82de-ce771f1a3543)(friendshipAdd)
17:04:09 VERB wechaty-puppet-service auth/auth-impl-token.ts authWrapHandlerToken(insecure_105cbaf1-e2a5-49fe-82de-ce771f1a3543)(friendshipPayload)
17:04:09 VERB wechaty-puppet-service auth/auth-impl-token.ts authWrapHandlerToken(insecure_105cbaf1-e2a5-49fe-82de-ce771f1a3543)(friendshipSearchPhone)
17:04:09 VERB wechaty-puppet-service auth/auth-impl-token.ts authWrapHandlerToken(insecure_105cbaf1-e2a5-49fe-82de-ce771f1a3543)(friendshipSearchWeixin)
17:04:09 VERB wechaty-puppet-service auth/auth-impl-token.ts authWrapHandlerToken(insecure_105cbaf1-e2a5-49fe-82de-ce771f1a3543)(logout)
17:04:09 VERB wechaty-puppet-service auth/auth-impl-token.ts authWrapHandlerToken(insecure_105cbaf1-e2a5-49fe-82de-ce771f1a3543)(messageContact)
17:04:09 VERB wechaty-puppet-service auth/auth-impl-token.ts authWrapHandlerToken(insecure_105cbaf1-e2a5-49fe-82de-ce771f1a3543)(messageFile)
17:04:09 VERB wechaty-puppet-service auth/auth-impl-token.ts authWrapHandlerToken(insecure_105cbaf1-e2a5-49fe-82de-ce771f1a3543)(messageFileStream)
17:04:09 VERB wechaty-puppet-service auth/auth-impl-token.ts authWrapHandlerToken(insecure_105cbaf1-e2a5-49fe-82de-ce771f1a3543)(messageForward)
17:04:09 VERB wechaty-puppet-service auth/auth-impl-token.ts authWrapHandlerToken(insecure_105cbaf1-e2a5-49fe-82de-ce771f1a3543)(messageImage)
17:04:09 VERB wechaty-puppet-service auth/auth-impl-token.ts authWrapHandlerToken(insecure_105cbaf1-e2a5-49fe-82de-ce771f1a3543)(messageImageStream)
17:04:09 VERB wechaty-puppet-service auth/auth-impl-token.ts authWrapHandlerToken(insecure_105cbaf1-e2a5-49fe-82de-ce771f1a3543)(messageLocation)
17:04:09 VERB wechaty-puppet-service auth/auth-impl-token.ts authWrapHandlerToken(insecure_105cbaf1-e2a5-49fe-82de-ce771f1a3543)(messageMiniProgram)
17:04:09 VERB wechaty-puppet-service auth/auth-impl-token.ts authWrapHandlerToken(insecure_105cbaf1-e2a5-49fe-82de-ce771f1a3543)(messagePayload)
17:04:09 VERB wechaty-puppet-service auth/auth-impl-token.ts authWrapHandlerToken(insecure_105cbaf1-e2a5-49fe-82de-ce771f1a3543)(messageRecall)
17:04:09 VERB wechaty-puppet-service auth/auth-impl-token.ts authWrapHandlerToken(insecure_105cbaf1-e2a5-49fe-82de-ce771f1a3543)(messageSendContact)
17:04:09 VERB wechaty-puppet-service auth/auth-impl-token.ts authWrapHandlerToken(insecure_105cbaf1-e2a5-49fe-82de-ce771f1a3543)(messageSendFile)
17:04:09 VERB wechaty-puppet-service auth/auth-impl-token.ts authWrapHandlerToken(insecure_105cbaf1-e2a5-49fe-82de-ce771f1a3543)(messageSendFileStream)
17:04:09 VERB wechaty-puppet-service auth/auth-impl-token.ts authWrapHandlerToken(insecure_105cbaf1-e2a5-49fe-82de-ce771f1a3543)(messageSendLocation)
17:04:09 VERB wechaty-puppet-service auth/auth-impl-token.ts authWrapHandlerToken(insecure_105cbaf1-e2a5-49fe-82de-ce771f1a3543)(messageSendMiniProgram)
17:04:09 VERB wechaty-puppet-service auth/auth-impl-token.ts authWrapHandlerToken(insecure_105cbaf1-e2a5-49fe-82de-ce771f1a3543)(messageSendText)
17:04:09 VERB wechaty-puppet-service auth/auth-impl-token.ts authWrapHandlerToken(insecure_105cbaf1-e2a5-49fe-82de-ce771f1a3543)(messageSendUrl)
17:04:09 VERB wechaty-puppet-service auth/auth-impl-token.ts authWrapHandlerToken(insecure_105cbaf1-e2a5-49fe-82de-ce771f1a3543)(messageUrl)
17:04:09 VERB wechaty-puppet-service auth/auth-impl-token.ts authWrapHandlerToken(insecure_105cbaf1-e2a5-49fe-82de-ce771f1a3543)(roomAdd)
17:04:09 VERB wechaty-puppet-service auth/auth-impl-token.ts authWrapHandlerToken(insecure_105cbaf1-e2a5-49fe-82de-ce771f1a3543)(roomAnnounce)
17:04:09 VERB wechaty-puppet-service auth/auth-impl-token.ts authWrapHandlerToken(insecure_105cbaf1-e2a5-49fe-82de-ce771f1a3543)(roomAvatar)
17:04:09 VERB wechaty-puppet-service auth/auth-impl-token.ts authWrapHandlerToken(insecure_105cbaf1-e2a5-49fe-82de-ce771f1a3543)(roomCreate)
17:04:09 VERB wechaty-puppet-service auth/auth-impl-token.ts authWrapHandlerToken(insecure_105cbaf1-e2a5-49fe-82de-ce771f1a3543)(roomDel)
17:04:09 VERB wechaty-puppet-service auth/auth-impl-token.ts authWrapHandlerToken(insecure_105cbaf1-e2a5-49fe-82de-ce771f1a3543)(roomInvitationAccept)
17:04:09 VERB wechaty-puppet-service auth/auth-impl-token.ts authWrapHandlerToken(insecure_105cbaf1-e2a5-49fe-82de-ce771f1a3543)(roomInvitationPayload)
17:04:09 VERB wechaty-puppet-service auth/auth-impl-token.ts authWrapHandlerToken(insecure_105cbaf1-e2a5-49fe-82de-ce771f1a3543)(roomList)
17:04:09 VERB wechaty-puppet-service auth/auth-impl-token.ts authWrapHandlerToken(insecure_105cbaf1-e2a5-49fe-82de-ce771f1a3543)(roomMemberList)
17:04:09 VERB wechaty-puppet-service auth/auth-impl-token.ts authWrapHandlerToken(insecure_105cbaf1-e2a5-49fe-82de-ce771f1a3543)(roomMemberPayload)
17:04:09 VERB wechaty-puppet-service auth/auth-impl-token.ts authWrapHandlerToken(insecure_105cbaf1-e2a5-49fe-82de-ce771f1a3543)(roomPayload)
17:04:09 VERB wechaty-puppet-service auth/auth-impl-token.ts authWrapHandlerToken(insecure_105cbaf1-e2a5-49fe-82de-ce771f1a3543)(roomQRCode)
17:04:09 VERB wechaty-puppet-service auth/auth-impl-token.ts authWrapHandlerToken(insecure_105cbaf1-e2a5-49fe-82de-ce771f1a3543)(roomQuit)
17:04:09 VERB wechaty-puppet-service auth/auth-impl-token.ts authWrapHandlerToken(insecure_105cbaf1-e2a5-49fe-82de-ce771f1a3543)(roomTopic)
17:04:09 VERB wechaty-puppet-service auth/auth-impl-token.ts authWrapHandlerToken(insecure_105cbaf1-e2a5-49fe-82de-ce771f1a3543)(start)
17:04:09 VERB wechaty-puppet-service auth/auth-impl-token.ts authWrapHandlerToken(insecure_105cbaf1-e2a5-49fe-82de-ce771f1a3543)(stop)
17:04:09 VERB wechaty-puppet-service auth/auth-impl-token.ts authWrapHandlerToken(insecure_105cbaf1-e2a5-49fe-82de-ce771f1a3543)(tagContactAdd)
17:04:09 VERB wechaty-puppet-service auth/auth-impl-token.ts authWrapHandlerToken(insecure_105cbaf1-e2a5-49fe-82de-ce771f1a3543)(tagContactDelete)
17:04:09 VERB wechaty-puppet-service auth/auth-impl-token.ts authWrapHandlerToken(insecure_105cbaf1-e2a5-49fe-82de-ce771f1a3543)(tagContactList)
17:04:09 VERB wechaty-puppet-service auth/auth-impl-token.ts authWrapHandlerToken(insecure_105cbaf1-e2a5-49fe-82de-ce771f1a3543)(tagContactRemove)
17:04:09 VERB wechaty-puppet-service auth/auth-impl-token.ts authWrapHandlerToken(insecure_105cbaf1-e2a5-49fe-82de-ce771f1a3543)(version)
17:04:09 VERB wechaty-puppet-service auth/auth-impl-token.ts authWrapHandlerToken(insecure_105cbaf1-e2a5-49fe-82de-ce771f1a3543)(download)
17:04:09 VERB wechaty-puppet-service auth/auth-impl-token.ts authWrapHandlerToken(insecure_105cbaf1-e2a5-49fe-82de-ce771f1a3543)(upload)
17:04:09 VERB PuppetServer start() initializing authorization with token ... done
17:04:09 VERB PuppetServer start() initializing gRPC health service ...
17:04:09 VERB PuppetServer start() initializing gRPC health service ... done
17:04:09 VERB PuppetServer start() initializing TLS CA ...
17:04:09 VERB PuppetServer start() initializing TLS CA ... done
17:04:09 VERB PuppetServer start() initializing gRPC server credentials ...
17:04:09 VERB PuppetServer start() TLS enabled.
17:04:09 VERB PuppetServer start() initializing gRPC server credentials ... done
17:04:09 VERB PuppetServer start() gRPC server starting ...
17:04:09 VERB PuppetServer start() gRPC server starting ... done
17:04:09 VERB StateSwitch <IoClient> active(true) <- (pending)
17:05:40 VERB PuppetServiceImpl event()
17:05:40 VERB EventStreamManager start(stream)
17:05:40 VERB EventStreamManager connectPuppetEventToStreamingCall() for Puppet<PuppetXp>(Gateway)
17:05:40 VERB EventStreamManager connectPuppetEventToStreamingCall() this.puppet.on(friendship) (listenerCount:1) registering...
17:05:40 VERB EventStreamManager connectPuppetEventToStreamingCall() this.puppet.on(login) (listenerCount:2) registering...
17:05:40 VERB EventStreamManager connectPuppetEventToStreamingCall() this.puppet.on(logout) (listenerCount:2) registering...
17:05:40 VERB EventStreamManager connectPuppetEventToStreamingCall() this.puppet.on(message) (listenerCount:1) registering...
17:05:40 VERB EventStreamManager connectPuppetEventToStreamingCall() this.puppet.on(room-invite) (listenerCount:1) registering...
17:05:40 VERB EventStreamManager connectPuppetEventToStreamingCall() this.puppet.on(room-join) (listenerCount:1) registering...
17:05:40 VERB EventStreamManager connectPuppetEventToStreamingCall() this.puppet.on(room-leave) (listenerCount:1) registering...
17:05:40 VERB EventStreamManager connectPuppetEventToStreamingCall() this.puppet.on(room-topic) (listenerCount:1) registering...
17:05:40 VERB EventStreamManager connectPuppetEventToStreamingCall() this.puppet.on(scan) (listenerCount:2) registering...
17:05:40 VERB EventStreamManager connectPuppetEventToStreamingCall() this.puppet.on(dirty) (listenerCount:2) registering...
17:05:40 VERB EventStreamManager connectPuppetEventToStreamingCall() this.puppet.on(dong) (listenerCount:1) registering...
17:05:40 VERB EventStreamManager connectPuppetEventToStreamingCall() this.puppet.on(error) (listenerCount:1) registering...
17:05:40 VERB EventStreamManager connectPuppetEventToStreamingCall() this.puppet.on(heartbeat) (listenerCount:3) registering...
17:05:40 VERB EventStreamManager connectPuppetEventToStreamingCall() this.puppet.on(ready) (listenerCount:2) registering...
17:05:40 VERB EventStreamManager connectPuppetEventToStreamingCall() this.puppet.on(reset) (listenerCount:0) registering...
17:05:40 VERB EventStreamManager onStreamingCallEnd(callback)
17:05:40 VERB EventStreamManager grpcEmit(EVENT_TYPE_HEARTBEAT[1], {"data":"Wechaty Puppet gRPC stream connect successfully"})
17:05:40 VERB EventStreamManager start() puppet is logged in, emit a login event for downstream
17:05:40 VERB EventStreamManager grpcEmit(EVENT_TYPE_LOGIN[25], {"contactId":"lonely2012"})
17:05:40 VERB PuppetServiceImpl start()
17:05:40 VERB PuppetServiceMixin start()
17:05:40 VERB ServiceCtl<PuppetServiceMixin> start()
17:05:40 WARN ServiceCtl<PuppetServiceMixin> start() found that is starting/statred ...
17:05:40 VERB StateSwitch <PuppetServiceMixin> stable(active, noCross=false)
17:05:40 WARN ServiceCtl<PuppetServiceMixin> start() found that is starting/statred ... done
17:05:40 VERB PuppetWatchdogAgent start() "heartbeat" event listener added
17:05:40 VERB PuppetWatchdogAgent start() "reset" event listener added
17:05:40 VERB PuppetServiceImpl contactPayload()
----------------------------------------
1
ding
----------------------------------------
17:06:04 VERB Message find({"id":"ckyjw5yjv00007kt88j13aovs"})
17:06:04 VERB Message findAll({"id":"ckyjw5yjv00007kt88j13aovs"})
17:06:04 VERB PuppetMessageMixin messageSearch({"id":"ckyjw5yjv00007kt88j13aovs"})
17:06:04 VERB PuppetMessageMixin messagePayload(ckyjw5yjv00007kt88j13aovs)
17:06:04 VERB PuppetXp messageRawPayload(ckyjw5yjv00007kt88j13aovs)
17:06:04 VERB EventStreamManager grpcEmit(EVENT_TYPE_MESSAGE[2], {"messageId":"ckyjw5yjv00007kt88j13aovs"})
17:06:04 VERB Message static load(ckyjw5yjv00007kt88j13aovs)
17:06:04 VERB Message constructor(ckyjw5yjv00007kt88j13aovs) for class WechatifiedMessageImpl
17:06:04 VERB Message ready()
17:06:04 VERB PuppetMessageMixin messagePayload(ckyjw5yjv00007kt88j13aovs)
17:06:04 VERB PoolifyMixin get pool() init pool
17:06:04 VERB PuppetXp---------------------- contactRawPayload(wxid_tnv0hd5hj3rs11)
17:06:04 VERB IoClient onMessage(Message#Text[🗣Contact<无空>]   ding)
17:06:04 VERB PuppetServiceImpl messagePayload()
17:06:04 VERB PuppetMessageMixin messagePayload(ckyjw5yjv00007kt88j13aovs)
17:06:04 VERB PuppetServiceImpl contactPayload()
17:06:04 VERB PuppetServiceImpl messageSendText()
17:07:04 VERB EventStreamManager this.onStreamingCallEnd() this.eventStream.on(cancelled) fired with arguments: {}
17:07:04 VERB EventStreamManager connectPuppetEventToStreamingCall() offAll() 14 callbacks
----------------------------------------
1
ding
----------------------------------------
17:11:21 VERB Message find({"id":"ckyjwcr6e00017kt853racclw"})
17:11:21 VERB Message findAll({"id":"ckyjwcr6e00017kt853racclw"})
17:11:21 VERB PuppetMessageMixin messageSearch({"id":"ckyjwcr6e00017kt853racclw"})
17:11:21 VERB PuppetMessageMixin messagePayload(ckyjwcr6e00017kt853racclw)
17:11:21 VERB PuppetXp messageRawPayload(ckyjwcr6e00017kt853racclw)
17:11:21 VERB Message static load(ckyjwcr6e00017kt853racclw)
17:11:21 VERB Message constructor(ckyjwcr6e00017kt853racclw) for class WechatifiedMessageImpl
17:11:21 VERB Message ready()
17:11:21 VERB PuppetMessageMixin messagePayload(ckyjwcr6e00017kt853racclw)
17:11:21 VERB IoClient onMessage(Message#Text[🗣Contact<无空>]   ding)
17:12:12 VERB PuppetServiceImpl event()
17:12:12 VERB EventStreamManager start(stream)
17:12:12 VERB EventStreamManager connectPuppetEventToStreamingCall() for Puppet<PuppetXp>(Gateway)
17:12:12 VERB EventStreamManager connectPuppetEventToStreamingCall() this.puppet.on(friendship) (listenerCount:1) registering...
17:12:12 VERB EventStreamManager connectPuppetEventToStreamingCall() this.puppet.on(login) (listenerCount:2) registering...
17:12:12 VERB EventStreamManager connectPuppetEventToStreamingCall() this.puppet.on(logout) (listenerCount:2) registering...
17:12:12 VERB EventStreamManager connectPuppetEventToStreamingCall() this.puppet.on(message) (listenerCount:1) registering...
17:12:12 VERB EventStreamManager connectPuppetEventToStreamingCall() this.puppet.on(room-invite) (listenerCount:1) registering...
17:12:12 VERB EventStreamManager connectPuppetEventToStreamingCall() this.puppet.on(room-join) (listenerCount:1) registering...
17:12:12 VERB EventStreamManager connectPuppetEventToStreamingCall() this.puppet.on(room-leave) (listenerCount:1) registering...
17:12:12 VERB EventStreamManager connectPuppetEventToStreamingCall() this.puppet.on(room-topic) (listenerCount:1) registering...
17:12:12 VERB EventStreamManager connectPuppetEventToStreamingCall() this.puppet.on(scan) (listenerCount:2) registering...
17:12:12 VERB EventStreamManager connectPuppetEventToStreamingCall() this.puppet.on(dirty) (listenerCount:2) registering...
17:12:12 VERB EventStreamManager connectPuppetEventToStreamingCall() this.puppet.on(dong) (listenerCount:1) registering...
17:12:12 VERB EventStreamManager connectPuppetEventToStreamingCall() this.puppet.on(error) (listenerCount:1) registering...
17:12:12 VERB EventStreamManager connectPuppetEventToStreamingCall() this.puppet.on(heartbeat) (listenerCount:4) registering...
17:12:12 VERB EventStreamManager connectPuppetEventToStreamingCall() this.puppet.on(ready) (listenerCount:2) registering...
17:12:12 VERB EventStreamManager connectPuppetEventToStreamingCall() this.puppet.on(reset) (listenerCount:0) registering...
17:12:12 VERB EventStreamManager onStreamingCallEnd(callback)
17:12:12 VERB EventStreamManager grpcEmit(EVENT_TYPE_HEARTBEAT[1], {"data":"Wechaty Puppet gRPC stream connect successfully"})
17:12:12 VERB EventStreamManager start() puppet is logged in, emit a login event for downstream
17:12:12 VERB EventStreamManager grpcEmit(EVENT_TYPE_LOGIN[25], {"contactId":"lonely2012"})
17:12:12 VERB PuppetServiceImpl start()
17:12:12 VERB PuppetServiceMixin start()
17:12:12 VERB ServiceCtl<PuppetServiceMixin> start()
17:12:12 WARN ServiceCtl<PuppetServiceMixin> start() found that is starting/statred ...
17:12:12 VERB StateSwitch <PuppetServiceMixin> stable(active, noCross=false)
17:12:12 WARN ServiceCtl<PuppetServiceMixin> start() found that is starting/statred ... done
17:12:12 VERB PuppetWatchdogAgent start() "heartbeat" event listener added
17:12:12 VERB PuppetWatchdogAgent start() "reset" event listener added
----------------------------------------
1
ding
----------------------------------------
17:12:35 VERB Message find({"id":"ckyjwebxl00027kt876u364hb"})
17:12:35 VERB Message findAll({"id":"ckyjwebxl00027kt876u364hb"})
17:12:35 VERB PuppetMessageMixin messageSearch({"id":"ckyjwebxl00027kt876u364hb"})
17:12:35 VERB PuppetMessageMixin messagePayload(ckyjwebxl00027kt876u364hb)
17:12:35 VERB PuppetXp messageRawPayload(ckyjwebxl00027kt876u364hb)
17:12:35 VERB EventStreamManager grpcEmit(EVENT_TYPE_MESSAGE[2], {"messageId":"ckyjwebxl00027kt876u364hb"})
17:12:35 VERB Message static load(ckyjwebxl00027kt876u364hb)
17:12:35 VERB Message constructor(ckyjwebxl00027kt876u364hb) for class WechatifiedMessageImpl
17:12:35 VERB Message ready()
17:12:35 VERB PuppetMessageMixin messagePayload(ckyjwebxl00027kt876u364hb)
17:12:35 VERB IoClient onMessage(Message#Text[🗣Contact<无空>]   ding)
17:12:35 VERB PuppetServiceImpl messagePayload()
17:12:35 VERB PuppetMessageMixin messagePayload(ckyjwebxl00027kt876u364hb)
17:12:35 VERB PuppetServiceImpl messageSendText()
17:13:35 VERB EventStreamManager this.onStreamingCallEnd() this.eventStream.on(cancelled) fired with arguments: {}
17:13:35 VERB EventStreamManager connectPuppetEventToStreamingCall() offAll() 14 callbacks
`

wechaty那边:

`C:\Users\Zhao>set WECHATY_PUPPET=wechaty-puppet-service

C:\Users\Zhao>set WECHATY_PUPPET_SERVICE_ENDPOINT=127.0.0.1:8080

C:\Users\Zhao>set WECHATY_PUPPET_SERVICE_TOKEN=insecure_105cbaf1-e2a5-49fe-82de-ce771f1a3543

C:\Users\Zhao>set WECHATY_PUPPET_SERVICE_ENDPOINT=127.0.0.1:8788

C:\Users\Zhao>cd getting-started

C:\Users\Zhao\getting-started>npm start

> [email protected] start
> cross-env NODE_OPTIONS="--no-warnings --loader=ts-node/esm" node examples/ding-dong-bot.ts

17:05:40 INFO StarterBot Starter Bot Started.
17:05:40 INFO StarterBot Contact<晓燕> login
17:06:04 INFO StarterBot Message#Text[🗣Contact<无空>]   ding
17:07:04 WARN PuppetWatchdogAgent start() reset() reason: {"data":"onGrpcStreamEvent(EVENT_TYPE_MESSAGE)","timeoutMilliseconds":60000}
GError: WatchdogAgent reset: lastFood: "{"data":"onGrpcStreamEvent(EVENT_TYPE_MESSAGE)","timeoutMilliseconds":60000}"
    at Watchdog.reset (file:///C:/Users/Zhao/getting-started/node_modules/wechaty-puppet/src/agents/watchdog-agent.ts:65:33)
    at Watchdog.emit (node:events:390:28)
    at Watchdog.emit (node:domain:475:12)
    at Timeout._onTimeout (file:///C:/Users/Zhao/getting-started/node_modules/watchdog/src/watchdog.ts:115:12)
    at listOnTimeout (node:internal/timers:557:17)
    at processTimers (node:internal/timers:500:7) {
  code: 2,
  details: 'Error: WatchdogAgent reset: lastFood: "{"data":"onGrpcStreamEvent(EVENT_TYPE_MESSAGE)","timeoutMilliseconds":60000}"\n' +
    '    at Watchdog.reset (file:///C:/Users/Zhao/getting-started/node_modules/wechaty-puppet/src/agents/watchdog-agent.ts:65:33)\n' +
    '    at Watchdog.emit (node:events:390:28)\n' +
    '    at Watchdog.emit (node:domain:475:12)\n' +
    '    at Timeout._onTimeout (file:///C:/Users/Zhao/getting-started/node_modules/watchdog/src/watchdog.ts:115:12)\n' +
    '    at listOnTimeout (node:internal/timers:557:17)\n' +
    '    at processTimers (node:internal/timers:500:7)'
}

C:\Users\Zhao\getting-started>npm start

> [email protected] start
> cross-env NODE_OPTIONS="--no-warnings --loader=ts-node/esm" node examples/ding-dong-bot.ts

17:12:12 INFO StarterBot Starter Bot Started.
17:12:12 INFO StarterBot Contact<晓燕> login
17:12:35 INFO StarterBot Message#Text[🗣Contact<无空>]   ding
17:13:35 WARN PuppetWatchdogAgent start() reset() reason: {"data":"onGrpcStreamEvent(EVENT_TYPE_MESSAGE)","timeoutMilliseconds":60000}
GError: WatchdogAgent reset: lastFood: "{"data":"onGrpcStreamEvent(EVENT_TYPE_MESSAGE)","timeoutMilliseconds":60000}"
    at Watchdog.reset (file:///C:/Users/Zhao/getting-started/node_modules/wechaty-puppet/src/agents/watchdog-agent.ts:65:33)
    at Watchdog.emit (node:events:390:28)
    at Watchdog.emit (node:domain:475:12)
    at Timeout._onTimeout (file:///C:/Users/Zhao/getting-started/node_modules/watchdog/src/watchdog.ts:115:12)
    at listOnTimeout (node:internal/timers:557:17)
    at processTimers (node:internal/timers:500:7) {
  code: 2,
  details: 'Error: WatchdogAgent reset: lastFood: "{"data":"onGrpcStreamEvent(EVENT_TYPE_MESSAGE)","timeoutMilliseconds":60000}"\n' +
    '    at Watchdog.reset (file:///C:/Users/Zhao/getting-started/node_modules/wechaty-puppet/src/agents/watchdog-agent.ts:65:33)\n' +
    '    at Watchdog.emit (node:events:390:28)\n' +
    '    at Watchdog.emit (node:domain:475:12)\n' +
    '    at Timeout._onTimeout (file:///C:/Users/Zhao/getting-started/node_modules/watchdog/src/watchdog.ts:115:12)\n' +
    '    at listOnTimeout (node:internal/timers:557:17)\n' +
    '    at processTimers (node:internal/timers:500:7)'
}

C:\Users\Zhao\getting-started>`

@bigbrother666sh bigbrother666sh changed the title 作为gateway服务,无法发送filebox,并且发文本消息也会报错(然而可正常发送) msg.say()返回no id报错(然而可正常发送文本消息,但不能连续发送) Jan 23, 2022
@yexk
Copy link

yexk commented Feb 9, 2022

{"boxType":2,"headers":null,"metadata":null,"name":"/newchart/hk_stock/min/xk.png","remoteUrl":"https://image.sinajs.cn/newchart/hk_stock/min/xk.png?1644394309"}

say err: rpc error: code = Unknown desc = Error: no url
    at new FileBox (file:///C:/Users/Administrator/AppData/Roaming/npm/node_modules/wechaty/node_modules/[email protected]@file-box/dist/esm/src/file-box.js:355:27)
    at Function.fromUrl (file:///C:/Users/Administrator/AppData/Roaming/npm/node_modules/wechaty/node_modules/[email protected]@file-box/dist/esm/src/file-box.js:81:16)
    at Function.fromJSON (file:///C:/Users/Administrator/AppData/Roaming/npm/node_modules/wechaty/node_modules/[email protected]@file-box/dist/esm/src/file-box.js:223:35)
    at messageSendFile (file:///C:/Users/Administrator/AppData/Roaming/npm/node_modules/wechaty/node_modules/[email protected]@wechaty-puppet-service/dist/esm/src/server/puppet-implementation.js:627:45)
    at Object.messageSendFile (file:///C:/Users/Administrator/AppData/Roaming/npm/node_modules/wechaty/node_modules/[email protected]@wechaty-puppet-service/dist/esm/src/auth/auth-impl-token.js:26:28)
    at handleUnary (C:\Users\Administrator\AppData\Roaming\npm\node_modules\wechaty\node_modules\_@[email protected]@@grpc\grpc-js\build\src\server.js:674:13)

我也遇到没有办法发图片~ not url。请问你的解决了吗?

@xinxinyihao
Copy link

请问一下,这个问题解决了没,现在对接pythonwechaty可以发送图片了没?

@bigbrother666sh
Copy link
Author

请问一下,这个问题解决了没,现在对接pythonwechaty可以发送图片了没?

你可以用最新版的puppet-xp试试看,python-wechaty搭配padlocal是可以正常使用filebox的

@xinxinyihao
Copy link

请问一下,这个问题解决了没,现在对接pythonwechaty可以发送图片了没?

你可以用最新版的puppet-xp试试看,python-wechaty搭配padlocal是可以正常使用filebox的

试过了,xp还是发不了图片

@yexk
Copy link

yexk commented Apr 29, 2022

请问一下,这个问题解决了没,现在对接pythonwechaty可以发送图片了没?

你可以用最新版的puppet-xp试试看,python-wechaty搭配padlocal是可以正常使用filebox的

试过了,xp还是发不了图片

不用试了。应该是py库没有更新。传参的地方remoteUrl应该是url . 基础库更新了。具体参考golang版本的: wechaty/go-wechaty#106

@SOl0QQ
Copy link

SOl0QQ commented May 19, 2023

@bigbrother666sh 您好,
想请问使用的puppet-xp、wechaty、python-wechaty版本是什么样?


另外,也许值得一提的是,作为本地gateway服务,还是需要在启动wechaty gateway前设定WECHATY_PUPPET_SERVICE_NO_TLS_INSECURE_SERVER=true
不然windows系统下,服务端口是连不上的……

另外在NPM启动xp gateway服务前,设置的环境变量WECHATY_PUPPET_SERVICE_NO_TLS_INSECURE_SERVER看起来没有工作,python-wechaty连接时失败,请麻烦指教下

@bigbrother666sh
Copy link
Author

bigbrother666sh commented May 22, 2023 via email

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

No branches or pull requests

5 participants