wechaty / puppet-padlocal

Puppet PadLocal is a Pad Protocol for WeChat
https://wechaty.js.org/docs/puppet-providers/padlocal
Apache License 2.0
642 stars 88 forks source link

Cannot read property 'getContactIds' of undefined with matrix-appservice-wechaty #49

Closed yswtrue closed 3 years ago

yswtrue commented 3 years ago

When I scan the QR code and login successfully. matrix-appservice-wechaty can receive messages, but It cannot send messages to WeChat user and get these errors.

wechaty_1  | 14:54:51 ERR PuppetServiceImpl grpcError() contactList() rejection: Cannot read property 'getContactIds' of undefined
wechaty_1  | {
wechaty_1  |   code: 13,
wechaty_1  |   details: "Cannot read property 'getContactIds' of undefined"
wechaty_1  | }

This is the docker-compose.yml

version: '2'
services:
  wechaty:
      image: wechaty/wechaty:next
      volumes:
        - ./config:/data
      networks:
        - default
      environment:
        - WECHATY_PUPPET_SERVER_PORT=7777
        - WECHATY_TOKEN={{random_token}}
        - WECHATY_PUPPET=wechaty-puppet-padlocal
        - WECHATY_PUPPET_PADLOCAL_TOKEN={{token}}
      ports:
        - 7777:7777
  matrix-appservice-wechaty:
      container_name: matrix-appservice-wechaty
      image: wechaty/matrix-appservice
      volumes:
        - ./config:/data
      networks:
        - default
      environment:
        - WECHATY_PUPPET_SERVICE_TOKEN=puppet_{{random_token}}
        - WECHATY_PUPPET_SERVICE_ENDPOINT={{hostip}}:7777
        - WECHATY_PUPPET=wechaty-puppet-service
#        - WECHATY_PUPPET=wechaty-puppet-puppeteer
        - WECHATY_LOG=silly
      command: ["--config", "/data/wechaty-config.yaml", "--file", "/data/wechaty-registration.yaml"]
      ports:
        - 8788:8788
yswtrue commented 3 years ago

I remove all matrix users and rooms, and then remove room-store.db,user-store.db file, and then restart gateway and bridge, and it works fine now.