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-puppet-padlocal" not working #225

Open
eslizn opened this issue Oct 31, 2021 · 1 comment
Open

"wechaty-puppet-padlocal" not working #225

eslizn opened this issue Oct 31, 2021 · 1 comment

Comments

@eslizn
Copy link

eslizn commented Oct 31, 2021

$ npm run start                      

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

01:09:55 ERR StateSwitch on() is deprecated: use active() instead.
Error
    at StateSwitch.on (/Users/src/github.com/wechaty/getting-started/node_modules/state-switch/src/state-switch.ts:222:85)
    at PuppetPadlocal._startClient (/Users/src/github.com/wechaty/getting-started/node_modules/wechaty-puppet-padlocal/src/puppet-padlocal.ts:145:20)
    at PuppetPadlocal.start (/Users/src/github.com/wechaty/getting-started/node_modules/wechaty-puppet-padlocal/src/puppet-padlocal.ts:141:16)
    at WechatyImpl.onStart (file:///Users/src/github.com/wechaty/getting-started/node_modules/wechaty/src/wechaty.ts:790:23)
    at async WechatyImpl.start (file:///Users/src/github.com/wechaty/getting-started/node_modules/state-switch/src/service-ctl/service-ctl.ts:91:9)
01:09:55 ERR StateSwitch on() is deprecated: use active() instead.
Error
    at StateSwitch.on (/Users/src/github.com/wechaty/getting-started/node_modules/state-switch/src/state-switch.ts:222:85)
    at PuppetPadlocal._startClient (/Users/src/github.com/wechaty/getting-started/node_modules/wechaty-puppet-padlocal/src/puppet-padlocal.ts:153:16)
    at PuppetPadlocal.start (/Users/src/github.com/wechaty/getting-started/node_modules/wechaty-puppet-padlocal/src/puppet-padlocal.ts:141:16)
    at WechatyImpl.onStart (file:///Users/src/github.com/wechaty/getting-started/node_modules/wechaty/src/wechaty.ts:790:23)
    at async WechatyImpl.start (file:///Users/src/github.com/wechaty/getting-started/node_modules/state-switch/src/service-ctl/service-ctl.ts:91:9)
01:09:57 INFO 
      ============================================================
       Welcome to Wechaty PadLocal puppet!

       - wechaty-puppet-padlocal version: 1.2.8
       - padlocal-ts-client version: 0.4.1
      ============================================================
     
01:09:57 ERR StarterBot TypeError: Cannot read properties of undefined (reading 'Unknown')
@huan
Copy link
Member

huan commented Oct 31, 2021

Yes, the Wechaty 1.0 has an upgraded Puppet API v1.0 with breaking changes (mostly the export/import path) which is not compatible with the old version of PadLocal puppet.

The solution would be:

  1. Using an older version of Wechaty to use PadLocal, such as [email protected]
  2. Using an old version of Wechaty (such as [email protected]) to provide a DIY wechaty token gateway, then you can use [email protected] with the wechaty-puppet-service puppet and the token
  3. Sending a PR to upgrade PadLocal, or waiting for others to upgrade the code to be compatible with Puppet API v1.0

Link to

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

2 participants