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

'eventName post unsupported' when a CLI-creating gateway service be connented #195

Open
bigbrother666sh opened this issue Jan 25, 2022 · 12 comments
Labels
bug Something isn't working

Comments

@bigbrother666sh
Copy link

No description provided.

@bigbrother666sh
Copy link
Author

the puppet-xp gateway service can be luanched well by the CLI (wechaty gateway --puppet), however it raise an 'eventName post unsupported' Error and get crushed as soon as been connected.

puppet:puppet-xp
wechaty version:next

the detail Error log as follows:

16:25:14 INFO IoClient 晓燕 logged in
16:25:14 WARN PuppetServer start() TLS disabled: INSECURE!
16:29:42 ERR PuppetServiceImpl stop() eventStreamManager is not busy?
16:29:42 WARN PuppetLoginMixin logonoff() is deprecated, use `isLoggedIn` instead:
Error
    at PuppetXp.logonoff (file:///C:/Users/bigbr/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/bigbr/AppData/Roaming/npm/node_modules/wechaty-puppet-xp/dist/esm/src/puppet-xp.js:203:18)
    at PuppetXp.stop (file:///C:/Users/bigbr/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/bigbr/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/bigbr/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/bigbr/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\bigbr\AppData\Roaming\npm\node_modules\wechaty\node_modules\@grpc\grpc-js\build\src\server.js:674:13)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
16:29:42 INFO IoClient 晓燕 logged out
16:29:42 INFO IoClient 晓燕 logged in
file:///C:/Users/bigbr/AppData/Roaming/npm/node_modules/wechaty/node_modules/wechaty-puppet-service/dist/esm/src/server/event-stream-manager.js:216
                    throw new Error('eventName ' + eventName + ' unsupported!');
                          ^

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)

@huan
Copy link
Member

huan commented Jan 25, 2022

Thank you for reporting this problem!

To fix it, please use [email protected] instead of wechaty@next because the @next has been upgraded to the 1.13 which is not stable for use.

Link to

@huan huan added the bug Something isn't working label Jan 25, 2022
@bigbrother666sh
Copy link
Author

hi, I've tried to
npm install -g [email protected] wechaty-puppet-xp

but gateway servie still failed when get connected.
However it reports "TypeError' instead of 'eventName post unsupported"this time

details as followed:

23:42:38 ERR PuppetServiceImpl stop() eventStreamManager is not busy?
23:42:38 WARN PuppetLoginMixin logonoff() is deprecated, use `isLoggedIn` instead:
Error
    at PuppetXp.logonoff (file:///C:/Users/bigbr/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/bigbr/AppData/Roaming/npm/node_modules/wechaty-puppet-xp/dist/esm/src/puppet-xp.js:203:18)
    at PuppetXp.stop (file:///C:/Users/bigbr/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/bigbr/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/bigbr/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/bigbr/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\bigbr\AppData\Roaming\npm\node_modules\wechaty\node_modules\@grpc\grpc-js\build\src\server.js:674:13)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
23:42:38 INFO IoClient 晓燕 logged out
23:42:38 INFO IoClient 晓燕 logged in
file:///C:/Users/bigbr/AppData/Roaming/npm/node_modules/wechaty/node_modules/wechaty-puppet-service/dist/esm/src/server/event-stream-manager.js:69
        if (this.puppet.readyIndicator.value()) {
                                       ^

TypeError: Cannot read properties of undefined (reading 'value')
    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:69:40)
    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)

@huan
Copy link
Member

huan commented Jan 26, 2022

It seems that your npm dependencies are mixed with the next versions.

Could you please show the output of the following command:

npm ls wechaty wechaty-puppet wechaty-puppet-service wechaty-puppet-xp

@bigbrother666sh
Copy link
Author

C:\Users\bigbr\AppData\Roaming\npm>npm ls wechaty wechaty-puppet wechaty-puppet-service wechaty-puppet-xp
C:\Users\bigbr\AppData\Roaming\npm
+-- [email protected] extraneous
| `-- [email protected] extraneous
`-- [email protected] extraneous
  +-- [email protected] extraneous
  | `-- [email protected] deduped
  +-- [email protected] extraneous
  | `-- [email protected] deduped
  +-- [email protected] extraneous
  `-- [email protected] extraneous
    `-- [email protected] deduped

thx for your information

@huan
Copy link
Member

huan commented Jan 27, 2022

Thanks for the feedback.

From the log, your wechaty-puppet has two versions:

  1. [email protected] extraneous
  2. [email protected] deduped

Can you try to update them to all be 1.11.17? I believe this version will fix your issue.

@bigbrother666sh
Copy link
Author

Thanks for your help.
I've tried updated and find that: with the command npm install -g [email protected] wechaty-puppet-xp
you will get only this:

+-- [email protected] extraneous
| `-- [email protected] extraneous
`-- [email protected] extraneous
  +-- [email protected] extraneous
  | `-- [email protected] deduped
  +-- [email protected] extraneous
  | `-- [email protected] deduped
  +-- [email protected] extraneous
  `-- [email protected] extraneous
    `-- [email protected] deduped

you can never update the wechaty-puppet belong to wechaty-puppet-xp to the 1.11.17.....

however by other ways, I've finally got:

+-- [email protected] extraneous
| +-- [email protected] extraneous
| | `-- [email protected] deduped
| +-- [email protected] extraneous
| | `-- [email protected] deduped
| +-- [email protected] extraneous
| +-- [email protected] extraneous
| | `-- [email protected] deduped
| `-- [email protected] extraneous
|   +-- [email protected] deduped
|   `-- [email protected] deduped
`-- [email protected] extraneous
  +-- [email protected] extraneous
  | `-- [email protected] deduped
  +-- [email protected] extraneous
  | `-- [email protected] deduped
  +-- [email protected] extraneous
  `-- [email protected] extraneous
    `-- [email protected] deduped

but the issue remains 'eventName post unsupported'.

so wired...

@huan
Copy link
Member

huan commented Jan 28, 2022

Sorry for this version problem with our @next versions.

We will try to fix it in the following @latest version

For your current situation, I guess you can try this workaround:

rm -fr node_modules/wechaty-puppet-xp/node_modules/wechaty-puppet

Then try again, it might solve your problem temporary.

@bigbrother666sh
Copy link
Author

@huan thx for your patience. I can run the gateway by CLI again!
it seems puppet-xp has just released a new version and it contains the 1.11.17 wechaty-puppet.
Anyway that's not bad!

I'll try to write a detail manual to reference how to create a wechaty local gateway serive by the wechaty 1.11.42 CLI.

@huan
Copy link
Member

huan commented Jan 30, 2022

It's great to know that the wechaty CLI works for you now!

Looking forward for your manual, I believe it is very valuable because it can help more users, and happy Chinese new year!

@Dreamkeeper66666
Copy link

@huan thx for your patience. I can run the gateway by CLI again! it seems puppet-xp has just released a new version and it contains the 1.11.17 wechaty-puppet. Anyway that's not bad!

I'll try to write a detail manual to reference how to create a wechaty local gateway serive by the wechaty 1.11.42 CLI.

Hi! I got the same problem as yours. So how did you solve it? Where can I get the new version of puppet-xp which contains 1.11.17 wechaty-puppet? Thanks!

@bigbrother666sh
Copy link
Author

you can find the manuel here 【腾讯文档】如何在本地使用免费的wechaty-puppet-xy协议
https://docs.qq.com/doc/DQ0VJUWtSVE1Mb2JJ

Could help to post a PR to: https://github.com/wechaty/wechaty.js.org?
I'm not familar with github... after some searching, I still have no idea how to post a PR in a github website...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants