wechaty / python-wechaty

Python Wechaty is a Conversational RPA SDK for Chatbot Makers written in Python
https://wechaty.readthedocs.io/zh_CN/latest/
Apache License 2.0
1.62k stars 234 forks source link

这个能不能对接puppet-xp协议啊 #295

Open xinxinyihao opened 2 years ago

xinxinyihao commented 2 years ago

这个能不能对接puppet-xp协议啊

bigbrother666sh commented 2 years ago

可以,但只能作为gateway服务对接 参考这里

$ npm install -g wechaty@next wechaty-puppet-xp
$ wechaty gateway --puppet wechaty-puppet-xp

另外,需要在启动wechaty gateway前设定WECHATY_PUPPET_SERVICE_NO_TLS_INSECURE_SERVER=true

然后目前我测试下来,貌似还只能发文本,然后自动添加好友请求貌似也实现不了,更多群聊功能有待测试

wj-Mcat commented 2 years ago

@WukongZeming you can write a blog to doc it.

bigbrother666sh commented 2 years ago

@WukongZeming you can write a blog to doc it.

I'd like to do it, but where?

wj-Mcat commented 2 years ago

You can post a PR to: https://github.com/wechaty/wechaty.js.org

xinxinyihao commented 2 years ago

可以,但只能作为gateway服务对接 参考这里

$ npm install -g wechaty@next wechaty-puppet-xp
$ wechaty gateway --puppet wechaty-puppet-xp

另外,需要在启动wechaty gateway前设定WECHATY_PUPPET_SERVICE_NO_TLS_INSECURE_SERVER=true

然后目前我测试下来,貌似还只能发文本,然后自动添加好友请求貌似也实现不了,更多群聊功能有待测试

嗯,今天下午试了一下,只能发文本,然后就放弃了。

bigbrother666sh commented 2 years ago

@wj-Mcat When I tried to repeat the full process on a totally new windows PC for making sure the doc would be perfect, somethin w wired just happened. the puppet-xp gateway service can be luanched, however it raise an 'eventName post unsupported' Error and get crushed as soon as the python-wechaty program connect.

the Error log as follows:

Error: eventName post unsupported!
    at EventStreamManager.connectPuppetEventToStreamingCall (file:///C:/Users/bigbr/AppData/Roaming/npm/node_modules/wechaty/node_modules/wechaty-puppet-service/dist/esm/src/server/event-stream-manager.js:216:27)
    at EventStreamManager.start (file:///C:/Users/bigbr/AppData/Roaming/npm/node_modules/wechaty/node_modules/wechaty-puppet-service/dist/esm/src/server/event-stream-manager.js:41:41)
    at event (file:///C:/Users/bigbr/AppData/Roaming/npm/node_modules/wechaty/node_modules/wechaty-puppet-service/dist/esm/src/server/puppet-implementation.js:287:32)
    at Object.event (file:///C:/Users/bigbr/AppData/Roaming/npm/node_modules/wechaty/node_modules/wechaty-puppet-service/dist/esm/src/auth/auth-impl-token.js:26:28)
    at handleServerStreaming (C:\Users\bigbr\AppData\Roaming\npm\node_modules\wechaty\node_modules\@grpc\grpc-js\build\src\server.js:696:13)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)

some ideas? many thanks

huan commented 2 years ago

the next version of wechaty is in heavy developing if a new feature:

Please downgrade the version to latest for preventing this error.

bigbrother666sh commented 2 years ago

does the latest vesion support CLI creating gateway service?

huan commented 2 years ago

@WukongZeming No, it does not support. The CLI is developed recently and only exists in the @next version for now...

For this problem, it seems that it would be very easy to fix in the wechaty-puppet-service module to add code for dealing the post type of the event in it, if you can send a PR to fix it, I'd like to accept it and make it a quick fix.

Or you can help us to file an issue to recorded this problem at https://github.com/wechaty/puppet-service/issues

bigbrother666sh commented 2 years ago

I wish I could, but I really have no knowledge about jave programming.... I'll rise the issue rightnow Sorry again

bigbrother666sh commented 2 years ago

and I still wonder that why it works well just last week but cannot this week? do you have updated the next-version-programe at the weekend(around 1.22~1.23)?

huan commented 2 years ago

I'll raise the issue right now

That would be a great help, thank you very much!

do you have updated the next-version-program at the weekend(around 1.22~1.23)?

Yes, we are always developing on the @next to help us move forward.

We have merged the Post support on both Wechaty & Puppet systems last weekend.

See: