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

wechaty-getting-started not working properly over wechaty 1.xx #255

Open
atorber opened this issue Apr 4, 2022 · 1 comment
Open

wechaty-getting-started not working properly over wechaty 1.xx #255

atorber opened this issue Apr 4, 2022 · 1 comment
Labels

Comments

@atorber
Copy link

atorber commented Apr 4, 2022

I used puppet-wxwork and puppet-padlocal to run wechaty-getting-started with npm start.

There seems to be some problems. Neither puppet works normally.

Test puppet-wxwork

Env:

wechaty-getting-started: 1.18.4
wechaty-puppet-service:1.18.2
wechaty: 1.18.1
node: v16.13.1
npm: 8.1.2
OS: macOS Monterey 12.0.1

Err

23:48:02 VERB GrpcManager initClient() TLS: enabled
23:48:02 VERB GrpcManager initClient() ... done
23:48:02 VERB GrpcManager start() initializing client ... done
23:48:02 VERB GrpcManager start() starting stream ...
23:48:02 VERB GrpcManager startStream()
23:48:02 VERB GrpcManager startStream() grpc -> event() ...
23:48:02 VERB GrpcManager startStream() grpc -> event() ... done
23:48:02 VERB GrpcManager startStream() grpc -> event peeking data or timeout ...
23:48:05 VERB GrpcManager startStream() grpc -> event peeking data or timeout ... timeout
23:48:05 VERB GrpcManager startStream() grpc -> event peeking data or timeout ... data peeked
23:48:05 VERB GrpcManager startStream() initializing event stream ...
23:48:05 VERB GrpcManager startStream() initializing event stream ... done
23:48:05 VERB GrpcManager startStream() ... done
23:48:05 VERB GrpcManager start() starting stream ... done
23:48:05 VERB GrpcManager start() calling grpc server: start() ...
23:48:05 ERR StarterBot Error: 14 UNAVAILABLE: No connection established

Test puppet-padlocal

Env:

wechaty-getting-started: 1.18.4
wechaty-puppet-padlocal:0.4.2
wechaty: 1.18.1
node: v16.13.1
npm: 8.1.2
OS: macOS Monterey 12.0.1

Err

23:59:27 VERB WechatyPuppetMixin init() emitting "puppet" event ...
23:59:27 VERB WechatyPuppetMixin init() emitting "puppet" event ... done
23:59:27 VERB ServiceCtl<Wechaty> start()
23:59:27 VERB StateSwitch <Wechaty> active(pending) <- (false)
23:59:27 VERB ServiceCtl<Wechaty> start() super.start() ...
23:59:27 VERB WechatyPuppetMixin start()
23:59:27 VERB WechatyPuppetMixin start() super.start() ...
23:59:27 VERB WechatyIoMixin start()
23:59:27 VERB WechatySkeleton start()
23:59:27 VERB WechatyLoginMixin init()
23:59:27 VERB WechatyPuppetMixin init()
23:59:27 VERB WechatifyUserModuleMixin init()
23:59:27 VERB WechatySkeleton init()
23:59:27 VERB WechatifyUserModuleMixin init() Wechaty User Module (WUM)s have already wechatified: skip
23:59:27 VERB WechatyPuppetMixin init() skipped because this puppet has already been inited before.
23:59:27 VERB WechatyPuppetMixin start() super.start() ... done
23:59:27 VERB WechatyPuppetMixin start() starting puppet ...
23:59:27 ERR StarterBot TypeError: The "listener" argument must be of type function. Received undefined
choogoo@Tommys-MacBook-Pro getting-started % 
@huan
Copy link
Member

huan commented Apr 4, 2022

PadLocal requires Wechaty Gateway (for now)

PadLocal has to use a token gateway for v1.x because it's not finished upgrading yet.

Here's the ongoing PR to fix it:

PadLocal Workaround

Using a Wechaty Token Gateway.

Here's how Friday makes it: https://github.com/wechaty/friday/blob/main/scripts/token-gateway.sh

Explanation: use [email protected] to convert Puppet PadLocal to a standard Puppet Service, then use [email protected] with this new service via gRPC and a new token.

WXWork requires disable TLS (for now)

WXWork has to disable TLS when you are using Wechaty v1.x because it does not support TLS yet.

Here's the related issue for the details:

WXWork Workaround

WECHATY_PUPPET_SERVICE_NO_TLS_INSECURE_CLIENT=true npm start

@huan huan added the question label Apr 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants