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

wechaty 1.13版后台本无法启动。 #303

Closed ashen001 closed 2 years ago

ashen001 commented 2 years ago

启动后一直卡在 03:43:11 VERB StateSwitch active(true) <- (pending)

日志:

Starting Docker Container for Wechaty v1.13.21 with Node.js v16.14.0 ...
   ____ _           _   _        _
  / ___| |__   __ _| |_(_) ___  (_) ___
 | |   | '_ \ / _` | __| |/ _ \ | |/ _ \
 | |___| | | | (_| | |_| |  __/_| | (_) |
  \____|_| |_|\__,_|\__|_|\___(_)_|\___/

     _         _   _     _               ____
    / \  _   _| |_| |__ (_)_ __   __ _  | __ ) _   _ _
   / _ \| | | | __| '_ \| | '_ \ / _` | |  _ \| | | (_)
  / ___ \ |_| | |_| | | | | | | | (_| | | |_) | |_| |_
 /_/   \_\__,_|\__|_| |_|_|_| |_|\__, | |____/ \__, (_)
                                 |___/         |___/

WECHATY_TOKEN=888

/wechaty ~

> wechaty@1.13.21 io-client
> node --no-warnings --loader=ts-node/esm bin/io-client.ts

03:42:47 INFO Config registering process.on("unhandledRejection") for development/debug
03:42:47 VERB Config constructor()
03:42:47 VERB wechaty-puppet-service monkeyPatchMetadataFromHttp2Headers()
03:42:47 VERB PoolifyMixin poolifyMixin(EventEmitter)
03:42:47 VERB WechatifyMixin wechatifyMixin(AbstractPoolifyMixin)
03:42:47 VERB ValidationMixin validationMixin(ContactMixin)
03:42:47 VERB ValidationMixin validationMixin(ContactImplBase)
03:42:47 VERB PoolifyMixin poolifyMixin(ContactImpl)
03:42:47 VERB ValidationMixin validationMixin(ContactSelfMixin)
03:42:47 VERB WechatifyMixin wechatifyMixin(EmptyBase)
03:42:47 VERB ValidationMixin validationMixin(FavoriteMixin)
03:42:47 VERB WechatifyMixin wechatifyMixin(EventEmitter)
03:42:47 VERB ValidationMixin validationMixin(FriendshipMixin)
03:42:47 VERB WechatifyMixin wechatifyMixin(EmptyBase)
03:42:47 VERB ValidationMixin validationMixin(ImageMixin)
03:42:47 VERB WechatifyMixin wechatifyMixin(EmptyBase)
03:42:47 VERB ValidationMixin validationMixin(LocationMixin)
03:42:47 VERB WechatifyMixin wechatifyMixin(EmptyBase)
03:42:47 VERB ValidationMixin validationMixin(PostMixin)
03:42:47 VERB WechatifyMixin wechatifyMixin(EventEmitter)
03:42:47 VERB ValidationMixin validationMixin(MessageMixin)
03:42:47 VERB ValidationMixin validationMixin(MessageImplBase)
03:42:47 VERB WechatifyMixin wechatifyMixin(EmptyBase)
03:42:47 VERB ValidationMixin validationMixin(MiniProgramMixin)
03:42:47 VERB WechatifyMixin wechatifyMixin(EmptyBase)
03:42:47 VERB ValidationMixin validationMixin(MomentMixin)
03:42:47 VERB WechatifyMixin wechatifyMixin(EmptyBase)
03:42:47 VERB ValidationMixin validationMixin(MoneyMixin)
03:42:47 VERB PoolifyMixin poolifyMixin(EventEmitter)
03:42:47 VERB WechatifyMixin wechatifyMixin(AbstractPoolifyMixin)
03:42:47 VERB ValidationMixin validationMixin(RoomMixin)
03:42:47 VERB WechatifyMixin wechatifyMixin(EmptyBase)
03:42:47 VERB ValidationMixin validationMixin(RoomInvitationMixin)
03:42:47 VERB WechatifyMixin wechatifyMixin(EmptyBase)
03:42:47 VERB PoolifyMixin poolifyMixin(AbstractWechatifyMixin)
03:42:47 VERB ValidationMixin validationMixin(TagMixin)
03:42:47 VERB WechatifyMixin wechatifyMixin(EmptyBase)
03:42:47 VERB ValidationMixin validationMixin(UrlLinkMixin)
03:42:47 VERB WechatifyMixin wechatifyMixin(EmptyBase)
03:42:47 VERB ValidationMixin validationMixin(DelayMixin)
03:42:47 VERB WechatyGErrorMixin gErrorMixin(WechatySkeleton)
03:42:47 VERB WechatifyUserModuleMixin wechatifyUserModuleMixin(GErrorMixin)
03:42:47 VERB WechatyIoMixin ioMixin(WechatifyUserModuleMixin)
03:42:47 VERB WechatyPuppetMixin puppetMixin(IoMixin)
03:42:47 VERB WechatyLoginMixin loginMixin(PuppetMixin)
03:42:47 VERB WechatyMiscMixin miscMixin(LoginMixin)
03:42:47 VERB WechatyPluginMixin pluginMixin(MiscMixin)
03:42:47 VERB ValidationMixin validationMixin(WechatyBase)
03:42:47 VERB ValidationMixin validationMixin(WechatyImplBase)

| __        __        _           _
| \ \      / /__  ___| |__   __ _| |_ _   _
|  \ \ /\ / / _ \/ __| '_ \ / _` | __| | | |
|   \ V  V /  __/ (__| | | | (_| | |_| |_| |
|    \_/\_/ \___|\___|_| |_|\__,_|\__|\__, |
|                                     |___/

=============== Powered by Wechaty ===============
       -------- https://www.chatie.io --------

My super power: download cloud bot from www.chatie.io

__________________________________________________

03:42:47 INFO Client Starting for WECHATY_TOKEN: 888
03:42:47 VERB WechatyBuilder singleton()
03:42:47 VERB WechatyBuilder newInstance()
03:42:47 VERB WechatyLoginMixin constructor()
03:42:47 VERB WechatyPuppetMixin construct()
03:42:47 VERB WechatyIoMixin constructor()
03:42:47 VERB WechatifyUserModuleMixin constructor()
03:42:47 VERB WechatySkeleton constructor()
03:42:47 VERB StateSwitch constructor(WechatyReady, "{"log":{"enableTimestamp":true,"logLevel":4,"prefixFilter":{}}}")
03:42:47 VERB ServiceCtl<Wechaty> constructor()
03:42:47 VERB StateSwitch constructor(Wechaty, "{"log":{"enableTimestamp":true,"logLevel":4,"prefixFilter":{}}}")
03:42:47 VERB StateSwitch constructor(WechatyReset, "{"log":{"enableTimestamp":true,"logLevel":4,"prefixFilter":{}}}")
03:42:47 VERB Wechaty constructor()
03:42:47 VERB IoClient constructor({token:888, wechaty:Wechaty#5d8a462e-cb38-4cd6-a3ad-224cfc1bac6e<>(), port:9099})
03:42:47 VERB StateSwitch constructor(IoClient, "{"log":{"enableTimestamp":true,"logLevel":4,"prefixFilter":{}}}")
03:42:47 VERB IoClient start()
03:42:47 VERB StateSwitch <IoClient> active(pending) <- (false)
03:42:47 VERB IoClient hookWechaty()
03:42:47 VERB WechatySkeleton on(login, listener) registering... listenerCount: 0
03:42:47 VERB WechatySkeleton on(logout, listener) registering... listenerCount: 0
03:42:47 VERB WechatySkeleton on(message, listener) registering... listenerCount: 0
03:42:47 VERB WechatySkeleton on(scan, listener) registering... listenerCount: 0
03:42:47 VERB IoClient startIo() with token 888
03:42:47 VERB StateSwitch constructor(Io, "{"log":{"enableTimestamp":true,"logLevel":4,"prefixFilter":{}}}")
03:42:47 VERB Io instantiated with apihost[api.chatie.io], token[888], protocol[io|0.0.1], cuid[5d8a462e-cb38-4cd6-a3ad-224cfc1bac6e]
03:42:47 VERB Io start()
03:42:47 VERB StateSwitch <Io> active(pending) <- (false)
03:42:47 VERB Io initEventHook()
03:42:47 VERB WechatySkeleton on(error, listener) registering... listenerCount: 0
03:42:47 VERB WechatySkeleton on(heartbeat, listener) registering... listenerCount: 0
03:42:47 VERB WechatySkeleton on(login, listener) registering... listenerCount: 1
03:42:47 VERB WechatySkeleton on(logout, listener) registering... listenerCount: 1
03:42:47 VERB WechatySkeleton on(message, listener) registering... listenerCount: 1
03:42:47 VERB WechatySkeleton on(scan, listener) registering... listenerCount: 1
03:42:47 VERB Io initWebSocket()
03:42:47 VERB Wechaty init() Raven enabled (import("raven") succeed)
03:42:47 VERB Wechaty init() getRavenDsn() return undefined, skipped.
^C[root@iZvbc3qt9fb94nZ wechaty]# sh wechaty_test.sh

 __        __        _           _
 \ \      / /__  ___| |__   __ _| |_ _   _
  \ \ /\ / / _ \/ __| '_ \ / _` | __| | | |
   \ V  V /  __/ (__| | | | (_| | |_| |_| |
    \_/\_/ \___|\___|_| |_|\__,_|\__|\__, |
                                     |___/
____________________________________________________
            https://www.chatie.io
  ____                            _   _
 / ___|___  _ __  _ __   ___  ___| |_(_)_ __   __ _
| |   / _ \| '_ \| '_ \ / _ \/ __| __| | '_ \ / _` |
| |__| (_) | | | | | | |  __/ (__| |_| | | | | (_| |
 \____\___/|_| |_|_| |_|\___|\___|\__|_|_| |_|\__, |
                                              |___/
  ____ _           _   ____        _
 / ___| |__   __ _| |_| __ )  ___ | |_ ___
| |   | '_ \ / _` | __|  _ \ / _ \| __/ __|
| |___| | | | (_| | |_| |_) | (_) | |_\__ \
 \____|_| |_|\__,_|\__|____/ \___/ \__|___/

WECHATY Environment Variables: 6
WECHATY_TOKEN=888
WECHATY_DOCKER=1
WECHATY_PUPPET_PADLOCAL_TOKEN=....
WECHATY_PUPPET_SERVER_PORT=9099
WECHATY_LOG=verbose
WECHATY_PUPPET=wechaty-puppet-padlocal

Starting Docker Container for Wechaty v1.13.21 with Node.js v16.14.0 ...
   ____ _           _   _        _
  / ___| |__   __ _| |_(_) ___  (_) ___
 | |   | '_ \ / _` | __| |/ _ \ | |/ _ \
 | |___| | | | (_| | |_| |  __/_| | (_) |
  \____|_| |_|\__,_|\__|_|\___(_)_|\___/

     _         _   _     _               ____
    / \  _   _| |_| |__ (_)_ __   __ _  | __ ) _   _ _
   / _ \| | | | __| '_ \| | '_ \ / _` | |  _ \| | | (_)
  / ___ \ |_| | |_| | | | | | | | (_| | | |_) | |_| |_
 /_/   \_\__,_|\__|_| |_|_|_| |_|\__, | |____/ \__, (_)
                                 |___/         |___/

WECHATY_TOKEN=888

/wechaty ~

> wechaty@1.13.21 io-client
> node --no-warnings --loader=ts-node/esm bin/io-client.ts

03:43:09 INFO Config registering process.on("unhandledRejection") for development/debug
03:43:09 VERB Config constructor()
03:43:09 VERB wechaty-puppet-service monkeyPatchMetadataFromHttp2Headers()
03:43:10 VERB PoolifyMixin poolifyMixin(EventEmitter)
03:43:10 VERB WechatifyMixin wechatifyMixin(AbstractPoolifyMixin)
03:43:10 VERB ValidationMixin validationMixin(ContactMixin)
03:43:10 VERB ValidationMixin validationMixin(ContactImplBase)
03:43:10 VERB PoolifyMixin poolifyMixin(ContactImpl)
03:43:10 VERB ValidationMixin validationMixin(ContactSelfMixin)
03:43:10 VERB WechatifyMixin wechatifyMixin(EmptyBase)
03:43:10 VERB ValidationMixin validationMixin(FavoriteMixin)
03:43:10 VERB WechatifyMixin wechatifyMixin(EventEmitter)
03:43:10 VERB ValidationMixin validationMixin(FriendshipMixin)
03:43:10 VERB WechatifyMixin wechatifyMixin(EmptyBase)
03:43:10 VERB ValidationMixin validationMixin(ImageMixin)
03:43:10 VERB WechatifyMixin wechatifyMixin(EmptyBase)
03:43:10 VERB ValidationMixin validationMixin(LocationMixin)
03:43:10 VERB WechatifyMixin wechatifyMixin(EmptyBase)
03:43:10 VERB ValidationMixin validationMixin(PostMixin)
03:43:10 VERB WechatifyMixin wechatifyMixin(EventEmitter)
03:43:10 VERB ValidationMixin validationMixin(MessageMixin)
03:43:10 VERB ValidationMixin validationMixin(MessageImplBase)
03:43:10 VERB WechatifyMixin wechatifyMixin(EmptyBase)
03:43:10 VERB ValidationMixin validationMixin(MiniProgramMixin)
03:43:10 VERB WechatifyMixin wechatifyMixin(EmptyBase)
03:43:10 VERB ValidationMixin validationMixin(MomentMixin)
03:43:10 VERB WechatifyMixin wechatifyMixin(EmptyBase)
03:43:10 VERB ValidationMixin validationMixin(MoneyMixin)
03:43:10 VERB PoolifyMixin poolifyMixin(EventEmitter)
03:43:10 VERB WechatifyMixin wechatifyMixin(AbstractPoolifyMixin)
03:43:10 VERB ValidationMixin validationMixin(RoomMixin)
03:43:10 VERB WechatifyMixin wechatifyMixin(EmptyBase)
03:43:10 VERB ValidationMixin validationMixin(RoomInvitationMixin)
03:43:10 VERB WechatifyMixin wechatifyMixin(EmptyBase)
03:43:10 VERB PoolifyMixin poolifyMixin(AbstractWechatifyMixin)
03:43:10 VERB ValidationMixin validationMixin(TagMixin)
03:43:10 VERB WechatifyMixin wechatifyMixin(EmptyBase)
03:43:10 VERB ValidationMixin validationMixin(UrlLinkMixin)
03:43:10 VERB WechatifyMixin wechatifyMixin(EmptyBase)
03:43:10 VERB ValidationMixin validationMixin(DelayMixin)
03:43:10 VERB WechatyGErrorMixin gErrorMixin(WechatySkeleton)
03:43:10 VERB WechatifyUserModuleMixin wechatifyUserModuleMixin(GErrorMixin)
03:43:10 VERB WechatyIoMixin ioMixin(WechatifyUserModuleMixin)
03:43:10 VERB WechatyPuppetMixin puppetMixin(IoMixin)
03:43:10 VERB WechatyLoginMixin loginMixin(PuppetMixin)
03:43:10 VERB WechatyMiscMixin miscMixin(LoginMixin)
03:43:10 VERB WechatyPluginMixin pluginMixin(MiscMixin)
03:43:10 VERB ValidationMixin validationMixin(WechatyBase)
03:43:10 VERB ValidationMixin validationMixin(WechatyImplBase)

| __        __        _           _
| \ \      / /__  ___| |__   __ _| |_ _   _
|  \ \ /\ / / _ \/ __| '_ \ / _` | __| | | |
|   \ V  V /  __/ (__| | | | (_| | |_| |_| |
|    \_/\_/ \___|\___|_| |_|\__,_|\__|\__, |
|                                     |___/

=============== Powered by Wechaty ===============
       -------- https://www.chatie.io --------

My super power: download cloud bot from www.chatie.io

__________________________________________________

03:43:10 INFO Client Starting for WECHATY_TOKEN: 888
03:43:10 VERB WechatyBuilder singleton()
03:43:10 VERB WechatyBuilder newInstance()
03:43:10 VERB WechatyLoginMixin constructor()
03:43:10 VERB WechatyPuppetMixin construct()
03:43:10 VERB WechatyIoMixin constructor()
03:43:10 VERB WechatifyUserModuleMixin constructor()
03:43:10 VERB WechatySkeleton constructor()
03:43:10 VERB StateSwitch constructor(WechatyReady, "{"log":{"enableTimestamp":true,"logLevel":4,"prefixFilter":{}}}")
03:43:10 VERB ServiceCtl<Wechaty> constructor()
03:43:10 VERB StateSwitch constructor(Wechaty, "{"log":{"enableTimestamp":true,"logLevel":4,"prefixFilter":{}}}")
03:43:10 VERB StateSwitch constructor(WechatyReset, "{"log":{"enableTimestamp":true,"logLevel":4,"prefixFilter":{}}}")
03:43:10 VERB Wechaty constructor()
03:43:10 VERB IoClient constructor({token:888, wechaty:Wechaty#90dc98cd-0ccc-4131-97c9-58aa6222500e<>(), port:9099})
03:43:10 VERB StateSwitch constructor(IoClient, "{"log":{"enableTimestamp":true,"logLevel":4,"prefixFilter":{}}}")
03:43:10 VERB IoClient start()
03:43:10 VERB StateSwitch <IoClient> active(pending) <- (false)
03:43:10 VERB IoClient hookWechaty()
03:43:10 VERB WechatySkeleton on(login, listener) registering... listenerCount: 0
03:43:10 VERB WechatySkeleton on(logout, listener) registering... listenerCount: 0
03:43:10 VERB WechatySkeleton on(message, listener) registering... listenerCount: 0
03:43:10 VERB WechatySkeleton on(scan, listener) registering... listenerCount: 0
03:43:10 VERB IoClient startIo() with token 888
03:43:10 VERB StateSwitch constructor(Io, "{"log":{"enableTimestamp":true,"logLevel":4,"prefixFilter":{}}}")
03:43:10 VERB Io instantiated with apihost[api.chatie.io], token[888], protocol[io|0.0.1], cuid[90dc98cd-0ccc-4131-97c9-58aa6222500e]
03:43:10 VERB Io start()
03:43:10 VERB StateSwitch <Io> active(pending) <- (false)
03:43:10 VERB Io initEventHook()
03:43:10 VERB WechatySkeleton on(error, listener) registering... listenerCount: 0
03:43:10 VERB WechatySkeleton on(heartbeat, listener) registering... listenerCount: 0
03:43:10 VERB WechatySkeleton on(login, listener) registering... listenerCount: 1
03:43:10 VERB WechatySkeleton on(logout, listener) registering... listenerCount: 1
03:43:10 VERB WechatySkeleton on(message, listener) registering... listenerCount: 1
03:43:10 VERB WechatySkeleton on(scan, listener) registering... listenerCount: 1
03:43:10 VERB Io initWebSocket()
03:43:10 VERB Wechaty init() Raven enabled (import("raven") succeed)
03:43:10 VERB Wechaty init() getRavenDsn() return undefined, skipped.
03:43:11 VERB Io wsOnOpen() connected with protocol [io|0.0.1|90dc98cd-0ccc-4131-97c9-58aa6222500e||9099]
03:43:11 VERB WechatySkeleton on(login, listener) registering... listenerCount: 2
03:43:11 VERB WechatySkeleton on(scan, listener) registering... listenerCount: 2
03:43:11 VERB StateSwitch <Io> active(true) <- (pending)
03:43:11 VERB ServiceCtl<Wechaty> start()
03:43:11 VERB StateSwitch <Wechaty> active(pending) <- (false)
03:43:11 VERB ServiceCtl<Wechaty> start() super.start() ...
03:43:11 VERB WechatyPluginMixin start()
03:43:11 VERB WechatyLoginMixin start()
03:43:11 VERB WechatyPuppetMixin start()
03:43:11 VERB WechatyPuppetMixin start() super.start() ...
03:43:11 VERB WechatyIoMixin start()
03:43:11 VERB WechatifyUserModuleMixin start()
03:43:11 VERB WechatySkeleton start()
03:43:11 VERB WechatifyUserModuleMixin _wechatifyUserModules()
03:43:11 VERB WechatifyUserModuleMixin _wechatifyUserModules() initializing Wechaty User Module (WUM) ...
03:43:11 VERB WechatifyMixin wechatifyUserModule(ContactImpl)
03:43:11 VERB WechatifyMixin wechatifyUserModule(ContactImpl)(Wechaty#90dc98cd-0ccc-4131-97c9-58aa6222500e<>(888))
03:43:11 VERB WechatifyMixin wechatifyUserModule(ContactSelfImpl)
03:43:11 VERB WechatifyMixin wechatifyUserModule(ContactSelfImpl)(Wechaty#90dc98cd-0ccc-4131-97c9-58aa6222500e<>(888))
03:43:11 VERB WechatifyMixin wechatifyUserModule(DelayImpl)
03:43:11 VERB WechatifyMixin wechatifyUserModule(DelayImpl)(Wechaty#90dc98cd-0ccc-4131-97c9-58aa6222500e<>(888))
03:43:11 VERB WechatifyMixin wechatifyUserModule(FriendshipImpl)
03:43:11 VERB WechatifyMixin wechatifyUserModule(FriendshipImpl)(Wechaty#90dc98cd-0ccc-4131-97c9-58aa6222500e<>(888))
03:43:11 VERB WechatifyMixin wechatifyUserModule(ImageImpl)
03:43:11 VERB WechatifyMixin wechatifyUserModule(ImageImpl)(Wechaty#90dc98cd-0ccc-4131-97c9-58aa6222500e<>(888))
03:43:11 VERB WechatifyMixin wechatifyUserModule(LocationImpl)
03:43:11 VERB WechatifyMixin wechatifyUserModule(LocationImpl)(Wechaty#90dc98cd-0ccc-4131-97c9-58aa6222500e<>(888))
03:43:11 VERB WechatifyMixin wechatifyUserModule(MessageImpl)
03:43:11 VERB WechatifyMixin wechatifyUserModule(MessageImpl)(Wechaty#90dc98cd-0ccc-4131-97c9-58aa6222500e<>(888))
03:43:11 VERB WechatifyMixin wechatifyUserModule(MiniProgramImpl)
03:43:11 VERB WechatifyMixin wechatifyUserModule(MiniProgramImpl)(Wechaty#90dc98cd-0ccc-4131-97c9-58aa6222500e<>(888))
03:43:11 VERB WechatifyMixin wechatifyUserModule(PostImpl)
03:43:11 VERB WechatifyMixin wechatifyUserModule(PostImpl)(Wechaty#90dc98cd-0ccc-4131-97c9-58aa6222500e<>(888))
03:43:11 VERB WechatifyMixin wechatifyUserModule(RoomImpl)
03:43:11 VERB WechatifyMixin wechatifyUserModule(RoomImpl)(Wechaty#90dc98cd-0ccc-4131-97c9-58aa6222500e<>(888))
03:43:11 VERB WechatifyMixin wechatifyUserModule(RoomInvitationImpl)
03:43:11 VERB WechatifyMixin wechatifyUserModule(RoomInvitationImpl)(Wechaty#90dc98cd-0ccc-4131-97c9-58aa6222500e<>(888))
03:43:11 VERB WechatifyMixin wechatifyUserModule(TagImpl)
03:43:11 VERB WechatifyMixin wechatifyUserModule(TagImpl)(Wechaty#90dc98cd-0ccc-4131-97c9-58aa6222500e<>(888))
03:43:11 VERB WechatifyMixin wechatifyUserModule(UrlLinkImpl)
03:43:11 VERB WechatifyMixin wechatifyUserModule(UrlLinkImpl)(Wechaty#90dc98cd-0ccc-4131-97c9-58aa6222500e<>(888))
03:43:11 VERB WechatifyUserModuleMixin _wechatifyUserModules() initializing Wechaty User Module (WUM) ... done
03:43:11 VERB WechatyPuppetMixin start() super.start() ... done
03:43:11 VERB WechatyPuppetMixin start() initializing puppet instance ...
03:43:11 VERB WechatyPuppetMixin __initPuppetInstance()
03:43:11 VERB WechatyPuppetMixin __initPuppetInstance() instanciating puppet instance ...
03:43:11 VERB Puppet resolvePuppet({puppet: wechaty-puppet-padlocal, puppetOptions: {}})
03:43:11 VERB Puppet resolvePuppet() resolving name "wechaty-puppet-padlocal" ...
03:43:11 VERB Puppet resolvePuppetName(wechaty-puppet-padlocal)
03:43:11 VERB Puppet resolvePuppetName(wechaty-puppet-padlocal): CJS resolved, retry times: 1
03:43:11 VERB Puppet resolvePuppet() resolving name "wechaty-puppet-padlocal" ... done
03:43:11 VERB Puppet resolvePuppet() instanciating puppet ...
03:43:11 VERB PuppetSkeleton constructor({})
03:43:11 VERB PuppetMemoryMixin constructor()
03:43:11 VERB PuppetLoginMixin constructor()
03:43:11 VERB PuppetCacheMixin constructor()
03:43:11 VERB PuppetCacheAgent constructor()
03:43:11 VERB PuppetContactMixin constructor()
03:43:11 VERB PuppetRoomMemberMixin constructor()
03:43:11 VERB PuppetRoomMixin constructor()
03:43:11 VERB PuppetFriendshipMixin constructor()
03:43:11 VERB PuppetTagMixin constructor()
03:43:11 VERB PuppetRoomInvitationMixin constructor()
03:43:11 VERB PuppetMessageMixin constructor()
03:43:11 VERB PuppetMiscMixin constructor()
03:43:11 VERB ServiceCtl<PuppetServiceMixin> constructor()
03:43:11 VERB StateSwitch constructor(PuppetServiceMixin, "{"log":{"enableTimestamp":true,"logLevel":4,"prefixFilter":{}}}")
03:43:11 VERB StateSwitch constructor(PuppetServiceMixinReset, "{"log":{"enableTimestamp":true,"logLevel":4,"prefixFilter":{}}}")
03:43:11 VERB PuppetServiceMixin constructor() #0
03:43:11 VERB PuppetWatchdogAgent constructor(07f45c0d-e7d3-4c8f-9409-640ff58baff9)
03:43:11 VERB PuppetWatchdogAgent constructor() timeout 60 seconds
03:43:11 VERB ReadyMixin constructor()
03:43:11 VERB PuppetPostMixin constructor()
03:43:11 VERB TapMixin constructor()
03:43:11 VERB Puppet constructor({})
03:43:11 VERB Puppet resolvePuppet() instanciating puppet ... done
03:43:11 VERB WechatyPuppetMixin __initPuppetInstance() instanciating puppet instance ... done
03:43:11 VERB WechatyPuppetMixin __initPuppetInstance() setting memory ...
03:43:11 VERB PuppetMemoryMixin setMemory(888)
03:43:11 VERB WechatyPuppetMixin __initPuppetInstance() setting memory ... done
03:43:11 VERB WechatyPuppetMixin __initPuppetInstance() setting up events ...
03:43:11 VERB WechatyPuppetMixin __setupPuppetEvents(Puppet<PuppetPadlocal>(888))
03:43:11 VERB PuppetMixin __setupPuppetEvents() puppet.on(friendship) (listenerCount:0) registering...
03:43:11 VERB PuppetMixin __setupPuppetEvents() puppet.on(login) (listenerCount:0) registering...
03:43:11 VERB PuppetMixin __setupPuppetEvents() puppet.on(logout) (listenerCount:0) registering...
03:43:11 VERB PuppetMixin __setupPuppetEvents() puppet.on(message) (listenerCount:0) registering...
03:43:11 VERB PuppetMixin __setupPuppetEvents() puppet.on(post) (listenerCount:0) registering...
03:43:11 VERB PuppetMixin __setupPuppetEvents() puppet.on(room-invite) (listenerCount:0) registering...
03:43:11 VERB PuppetMixin __setupPuppetEvents() puppet.on(room-join) (listenerCount:0) registering...
03:43:11 VERB PuppetMixin __setupPuppetEvents() puppet.on(room-leave) (listenerCount:0) registering...
03:43:11 VERB PuppetMixin __setupPuppetEvents() puppet.on(room-topic) (listenerCount:0) registering...
03:43:11 VERB PuppetMixin __setupPuppetEvents() puppet.on(scan) (listenerCount:0) registering...
03:43:11 VERB PuppetMixin __setupPuppetEvents() puppet.on(dirty) (listenerCount:0) registering...
03:43:11 VERB PuppetMixin __setupPuppetEvents() puppet.on(dong) (listenerCount:0) registering...
03:43:11 VERB PuppetMixin __setupPuppetEvents() puppet.on(error) (listenerCount:0) registering...
03:43:11 VERB PuppetMixin __setupPuppetEvents() puppet.on(heartbeat) (listenerCount:0) registering...
03:43:11 VERB PuppetMixin __setupPuppetEvents() puppet.on(ready) (listenerCount:0) registering...
03:43:11 VERB PuppetMixin __setupPuppetEvents() puppet.on(reset) (listenerCount:0) registering...
03:43:11 VERB WechatyPuppetMixin __setupPuppetEvents() ... done
03:43:11 VERB WechatyPuppetMixin __initPuppetInstance() setting up events ... done
03:43:11 VERB WechatyPuppetMixin __initPuppetInstance() emitting "puppet" event ...
03:43:11 VERB WechatyPuppetMixin __initPuppetInstance() emitting "puppet" event ... done
03:43:11 VERB WechatyPuppetMixin start() initializing puppet instance ... done
03:43:11 VERB WechatyPuppetMixin start() starting puppet ...
03:43:11 VERB WechatyPluginMixin start() installing plugins(global/0, instance/0) ...
03:43:11 VERB WechatyPluginMixin __activePlugin(0 plugins)
03:43:11 VERB WechatyPluginMixin start() installing plugins(global/0, instance/0) ... done
03:43:11 VERB ServiceCtl<Wechaty> start() super.start() ... done
03:43:11 VERB ServiceCtl<Wechaty> start() this.onStart() ...
03:43:11 VERB Wechaty onStart()
03:43:11 VERB Wechaty <wechaty-puppet-padlocal>(888) onStart() v1.13.21 is starting...
03:43:11 VERB Wechaty id: 90dc98cd-0ccc-4131-97c9-58aa6222500e
03:43:11 VERB Wechaty onStart() ... done
03:43:11 VERB ServiceCtl<Wechaty> start() this.onStart() ... done
03:43:11 VERB StateSwitch <Wechaty> active(true) <- (pending)
03:43:11 VERB ServiceCtl<Wechaty> start() ... done
03:43:11 VERB IoClient startPuppetServer()
03:43:11 VERB PuppetServer constructor({endpoint: "0.0.0.0:9099", puppet: "Puppet<PuppetPadlocal>(888)", token: "888"})
03:43:11 VERB PuppetServer start()
03:43:11 VERB PuppetServer start() initializing FileBox UUID URN Registry ...
03:43:11 VERB PuppetServer start() initializing FileBox UUID URN Registry ... done
03:43:11 VERB PuppetServer start() initializing gRPC Server with options "{}"
03:43:11 VERB PuppetServer start() initializing gRPC Server ... done
03:43:11 VERB PuppetServer start() initializing puppet implementation with FileBoxUuid...
03:43:11 VERB EventStreamManager constructor(Puppet<PuppetPadlocal>(888))
03:43:11 VERB PuppetServer start() initializing puppet implementation with FileBoxUuid... done
03:43:11 VERB PuppetServer start() initializing authorization with token ...
03:43:11 VERB wechaty-puppet-service authImplToken()
03:43:11 VERB wechaty-puppet-service auth/auth-impl-token.ts authWrapHandlerToken(888)(contactAlias)
03:43:11 VERB wechaty-puppet-service auth/auth-impl-token.ts authWrapHandlerToken(888)(contactAvatar)
03:43:11 VERB wechaty-puppet-service auth/auth-impl-token.ts authWrapHandlerToken(888)(contactCorporationRemark)
03:43:11 VERB wechaty-puppet-service auth/auth-impl-token.ts authWrapHandlerToken(888)(contactDescription)
03:43:11 VERB wechaty-puppet-service auth/auth-impl-token.ts authWrapHandlerToken(888)(contactList)
03:43:11 VERB wechaty-puppet-service auth/auth-impl-token.ts authWrapHandlerToken(888)(contactPayload)
03:43:11 VERB wechaty-puppet-service auth/auth-impl-token.ts authWrapHandlerToken(888)(contactPhone)
03:43:11 VERB wechaty-puppet-service auth/auth-impl-token.ts authWrapHandlerToken(888)(contactSelfName)
03:43:11 VERB wechaty-puppet-service auth/auth-impl-token.ts authWrapHandlerToken(888)(contactSelfQRCode)
03:43:11 VERB wechaty-puppet-service auth/auth-impl-token.ts authWrapHandlerToken(888)(contactSelfSignature)
03:43:11 VERB wechaty-puppet-service auth/auth-impl-token.ts authWrapHandlerToken(888)(ding)
03:43:11 VERB wechaty-puppet-service auth/auth-impl-token.ts authWrapHandlerToken(888)(dirtyPayload)
03:43:11 VERB wechaty-puppet-service auth/auth-impl-token.ts authWrapHandlerToken(888)(event)
03:43:11 VERB wechaty-puppet-service auth/auth-impl-token.ts authWrapHandlerToken(888)(friendshipAccept)
03:43:11 VERB wechaty-puppet-service auth/auth-impl-token.ts authWrapHandlerToken(888)(friendshipAdd)
03:43:11 VERB wechaty-puppet-service auth/auth-impl-token.ts authWrapHandlerToken(888)(friendshipPayload)
03:43:11 VERB wechaty-puppet-service auth/auth-impl-token.ts authWrapHandlerToken(888)(friendshipSearchPhone)
03:43:11 VERB wechaty-puppet-service auth/auth-impl-token.ts authWrapHandlerToken(888)(friendshipSearchWeixin)
03:43:11 VERB wechaty-puppet-service auth/auth-impl-token.ts authWrapHandlerToken(888)(logout)
03:43:11 VERB wechaty-puppet-service auth/auth-impl-token.ts authWrapHandlerToken(888)(messageContact)
03:43:11 VERB wechaty-puppet-service auth/auth-impl-token.ts authWrapHandlerToken(888)(messageFile)
03:43:11 VERB wechaty-puppet-service auth/auth-impl-token.ts authWrapHandlerToken(888)(messageFileStream)
03:43:11 VERB wechaty-puppet-service auth/auth-impl-token.ts authWrapHandlerToken(888)(messageForward)
03:43:11 VERB wechaty-puppet-service auth/auth-impl-token.ts authWrapHandlerToken(888)(messageImage)
03:43:11 VERB wechaty-puppet-service auth/auth-impl-token.ts authWrapHandlerToken(888)(messageImageStream)
03:43:11 VERB wechaty-puppet-service auth/auth-impl-token.ts authWrapHandlerToken(888)(messageLocation)
03:43:11 VERB wechaty-puppet-service auth/auth-impl-token.ts authWrapHandlerToken(888)(messageMiniProgram)
03:43:11 VERB wechaty-puppet-service auth/auth-impl-token.ts authWrapHandlerToken(888)(messagePayload)
03:43:11 VERB wechaty-puppet-service auth/auth-impl-token.ts authWrapHandlerToken(888)(messageRecall)
03:43:11 VERB wechaty-puppet-service auth/auth-impl-token.ts authWrapHandlerToken(888)(messageSendContact)
03:43:11 VERB wechaty-puppet-service auth/auth-impl-token.ts authWrapHandlerToken(888)(messageSendFile)
03:43:11 VERB wechaty-puppet-service auth/auth-impl-token.ts authWrapHandlerToken(888)(messageSendFileStream)
03:43:11 VERB wechaty-puppet-service auth/auth-impl-token.ts authWrapHandlerToken(888)(messageSendLocation)
03:43:11 VERB wechaty-puppet-service auth/auth-impl-token.ts authWrapHandlerToken(888)(messageSendMiniProgram)
03:43:11 VERB wechaty-puppet-service auth/auth-impl-token.ts authWrapHandlerToken(888)(messageSendText)
03:43:11 VERB wechaty-puppet-service auth/auth-impl-token.ts authWrapHandlerToken(888)(messageSendUrl)
03:43:11 VERB wechaty-puppet-service auth/auth-impl-token.ts authWrapHandlerToken(888)(messageUrl)
03:43:11 VERB wechaty-puppet-service auth/auth-impl-token.ts authWrapHandlerToken(888)(roomAdd)
03:43:11 VERB wechaty-puppet-service auth/auth-impl-token.ts authWrapHandlerToken(888)(roomAnnounce)
03:43:11 VERB wechaty-puppet-service auth/auth-impl-token.ts authWrapHandlerToken(888)(roomAvatar)
03:43:11 VERB wechaty-puppet-service auth/auth-impl-token.ts authWrapHandlerToken(888)(roomCreate)
03:43:11 VERB wechaty-puppet-service auth/auth-impl-token.ts authWrapHandlerToken(888)(roomDel)
03:43:11 VERB wechaty-puppet-service auth/auth-impl-token.ts authWrapHandlerToken(888)(roomInvitationAccept)
03:43:11 VERB wechaty-puppet-service auth/auth-impl-token.ts authWrapHandlerToken(888)(roomInvitationPayload)
03:43:11 VERB wechaty-puppet-service auth/auth-impl-token.ts authWrapHandlerToken(888)(roomList)
03:43:11 VERB wechaty-puppet-service auth/auth-impl-token.ts authWrapHandlerToken(888)(roomMemberList)
03:43:11 VERB wechaty-puppet-service auth/auth-impl-token.ts authWrapHandlerToken(888)(roomMemberPayload)
03:43:11 VERB wechaty-puppet-service auth/auth-impl-token.ts authWrapHandlerToken(888)(roomPayload)
03:43:11 VERB wechaty-puppet-service auth/auth-impl-token.ts authWrapHandlerToken(888)(roomQRCode)
03:43:11 VERB wechaty-puppet-service auth/auth-impl-token.ts authWrapHandlerToken(888)(roomQuit)
03:43:11 VERB wechaty-puppet-service auth/auth-impl-token.ts authWrapHandlerToken(888)(roomTopic)
03:43:11 VERB wechaty-puppet-service auth/auth-impl-token.ts authWrapHandlerToken(888)(start)
03:43:11 VERB wechaty-puppet-service auth/auth-impl-token.ts authWrapHandlerToken(888)(stop)
03:43:11 VERB wechaty-puppet-service auth/auth-impl-token.ts authWrapHandlerToken(888)(tagContactAdd)
03:43:11 VERB wechaty-puppet-service auth/auth-impl-token.ts authWrapHandlerToken(888)(tagContactDelete)
03:43:11 VERB wechaty-puppet-service auth/auth-impl-token.ts authWrapHandlerToken(888)(tagContactList)
03:43:11 VERB wechaty-puppet-service auth/auth-impl-token.ts authWrapHandlerToken(888)(tagContactRemove)
03:43:11 VERB wechaty-puppet-service auth/auth-impl-token.ts authWrapHandlerToken(888)(version)
03:43:11 VERB wechaty-puppet-service auth/auth-impl-token.ts authWrapHandlerToken(888)(download)
03:43:11 VERB wechaty-puppet-service auth/auth-impl-token.ts authWrapHandlerToken(888)(upload)
03:43:11 VERB PuppetServer start() initializing authorization with token ... done
03:43:11 VERB PuppetServer start() initializing gRPC health service ...
03:43:11 VERB PuppetServer start() initializing gRPC health service ... done
03:43:11 VERB PuppetServer start() initializing TLS CA ...
03:43:11 VERB PuppetServer start() initializing TLS CA ... done
03:43:11 VERB PuppetServer start() initializing gRPC server credentials ...
03:43:11 VERB PuppetServer start() TLS enabled.
03:43:11 VERB PuppetServer start() initializing gRPC server credentials ... done
03:43:11 VERB PuppetServer start() gRPC server starting ...
03:43:11 VERB PuppetServer start() gRPC server starting ... done
03:43:11 VERB StateSwitch <IoClient> active(true) <- (pending)

然后就一直卡在这里

huan commented 2 years ago

What's your start script and the environment variables?

Please provide in details for analysing.

And please notice that the wevhaty-puppet-padlpcal is not upgraded to the v1 yet, you need to use wechaty v0.68 for using PadLocal. See:

ashen001 commented 2 years ago

感谢你的回复。我用0.68版本尝试了一次。出现了 Wechaty - ERROR - The network is not good, the bot will try to restart after 60 seconds.

并且在重新回到0.56版本后。脚本运行一段时间同样出现了 Wechaty - ERROR - The network is not good, the bot will try to restart after 60 seconds. 然后导致 scheduler 运行出错 Job "tick (trigger: interval[0:10:00], next run at: 2022-03-02 17:45:46 CST)" raised an exception Traceback (most recent call last):

请问我该如何解决。谢谢

ashen001 commented 2 years ago

server的配置

!/bin/bash

export WECHATY_LOG="verbose" export WECHATY_PUPPET="wechaty-puppet-padlocal" export WECHATY_PUPPET_PADLOCAL_TOKEN="puppet_padlocal_xxxxxxxx"

export WECHATY_PUPPET_SERVER_PORT="9099" export WECHATY_TOKEN="888" export WECHATY_PUPPET_SERVICE_NO_TLS_INSECURE_SERVER="true"

docker run -ti \ --name wechaty_puppet_service_token_gateway \ --rm \ -e WECHATY_LOG \ -e WECHATY_PUPPET \ -e WECHATY_PUPPET_PADLOCAL_TOKEN \ -e WECHATY_PUPPET_SERVER_PORT \ -e WECHATY_TOKEN \ -p "$WECHATY_PUPPET_SERVER_PORT:$WECHATY_PUPPET_SERVER_PORT" \ wechaty/wechaty:0.68

client端:

import os import asyncio from typing import Optional, Union

from wechaty import Wechaty, Contact, Room from wechaty.user import Message

from apscheduler.schedulers.asyncio import AsyncIOScheduler

from wechaty_puppet import get_logger

from datetime import datetime

logger = get_logger(name)

os.environ['WECHATY_PUPPET'] = "wechaty-puppet-service" os.environ['WECHATY_PUPPET_SERVICE_TOKEN'] = "888" os.environ['WECHATY_PUPPET_SERVICE_ENDPOINT'] = "101.xxx.xxx.xxx:9099" os.environ['WECHATY_PUPPET_SERVICE_NO_TLS_INSECURE_CLIENT'] = "true"

class MyBot(Wechaty): def init(self): super().init() self.busy = False self.auto_reply_comment = "Automatic Reply: I cannot read your message because I'm busy now, will talk to you when I get back."

async def on_message(self, msg: Message):
    """back on message"""
    from_contact = msg.talker()

    text = msg.text()
    room = msg.room()

    if text == '#ding':
        conversation: Union[
            Room, Contact] = from_contact if room is None else room
        await conversation.ready()
        await conversation.say('dong')

async def on_login(self, contact: Contact):
    print(f'user: {contact} has login')

bot: Optional[MyBot] = None

async def tick(bot: Wechaty): """ find a specific room, and say something to it. """ room = bot.Room.load('195625838710@chatroom') await room.ready() await room.say('#ding')

async def main(): """Async Main Entry""" if 'WECHATY_PUPPET_SERVICE_TOKEN' not in os.environ: print(''' Error: WECHATY_PUPPET_SERVICE_TOKEN is not found in the environment variables You need a TOKEN to run the Python Wechaty. Please goto our README for details https://github.com/wechaty/python-wechaty-getting-started/#wechaty_puppet_service_token ''')

global bot
bot = MyBot()

scheduler = AsyncIOScheduler(timezone='Asia/Shanghai')
scheduler.add_job(tick, 'interval', minutes=10, args=[bot])

scheduler.start()
await bot.start()

asyncio.run(main())

非常感谢

huan commented 2 years ago

Move to Python