-
-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Description
Important:Please file the issue follow the template, or we won't be able to help you to solve the problem.
I am following the document to [setup Hostie gateway with my padplus token] (#1985). After scanned the QR code, the wechat account was locked. Attached steps and logs as below.
ps: The same token can be used in with ding-dong-bot in nodejs project with no issue.
0. Report Issue Guide
-
Please run the following command and check whether the problem has been fixed:
rm -rf package-lock.json rm -rf node_modules npm install
Using lastest wechaty docker version.
docker images | grep wechaty
wechaty/wechaty latest 293d5affb07a 10 days ago 1.74GB
- Please search in FAQ List first, and make sure your problem has not been solved before.
Done
- Please search in the issue first, and make sure your problem had not been reported before
Done
1. Versions
What is your wechaty version?
Answer:
Use latest Docker version
docker images | grep wechaty
wechaty/wechaty latest 293d5affb07a 10 days ago 1.74GB
Which puppet are you using for wechaty? (hostie/puppeteer/padchat/...)
Answer:
export WECHATY_PUPPET_PADPLUS_TOKEN=xxxx
export WECHATY_HOSTIE_PORT=8788
export WECHATY_PUPPET=wechaty-puppet-padplus
export WECHATY_LOG=verbose
docker run \
--rm \
-ti \
-e WECHATY_LOG="$WECHATY_LOG" \
-e WECHATY_PUPPET="$WECHATY_PUPPET" \
-e WECHATY_PUPPET_PADPLUS_TOKEN="$WECHATY_PUPPET_PADPLUS_TOKEN" \
-e WECHATY_HOSTIE_PORT="$WECHATY_HOSTIE_PORT" \
-e WECHATY_TOKEN="$WECHATY_PUPPET_PADPLUS_TOKEN" \
-p "$WECHATY_HOSTIE_PORT:$WECHATY_HOSTIE_PORT" \
wechaty/wechaty
What is your wechaty-puppet-XXX(padchat/puppeteer/) version?
Answer:
v10.17.0
What is your node version? (run
node --version
)
Answer:
What os are you using
Answer:
Mac OSX
2. Describe the bug
Give a clear and concise description of what the bug is.
I am following the document to [setup Hostie gateway with my padplus token] (#1985). After scaned the QR code, the wechat account was locked. Attached steps and logs as below.
3. To Reproduce
This part is very important: if you can not provide any reproduce steps, then the problem will be very hard to be recognized.
How to create a Minimal, Reproducible Example
Steps to reproduce the behavior:
- set up env variables and run docker image. It is successful. and prompt the QR code
- Open the QR code image and scan by wechat
- Account login and a few seconds, the account is banned.
4. Expected behavior
Shall be able to login and not get account banned.
5. Actual behavior
If applicable, add screenshots to help explain your problem. But do not paste log screenshots here.
6. Full Output Logs
Set env
WECHATY_LOG=silly
in order to set log level to silly, then we can get the full log (If you dosen't set log env, log level is info as default, we cannot get the full log)
We need full log instead of log screenshot or log fragments!
Show Logs
$ WECHATY_LOG=silly node yourbot.js
-> PASTE YOUR FULL(DO NOT ONLY PROVIDE FRAGMENTS) LOG MESSAGES HERE
➜ hostie_docker ./docker_start.sh
__ __ _ _
\ \ / /__ ___| |__ __ _| |_ _ _
\ \ /\ / / _ \/ __| '_ \ / _` | __| | | |
\ V V / __/ (__| | | | (_| | |_| |_| |
\_/\_/ \___|\___|_| |_|\__,_|\__|\__, |
|___/
____________________________________________________
https://www.chatie.io
____ _ _
/ ___|___ _ __ _ __ ___ ___| |_(_)_ __ __ _
| | / _ \| '_ \| '_ \ / _ \/ __| __| | '_ \ / _` |
| |__| (_) | | | | | | | __/ (__| |_| | | | | (_| |
\____\___/|_| |_|_| |_|\___|\___|\__|_|_| |_|\__, |
|___/
____ _ _ ____ _
/ ___| |__ __ _| |_| __ ) ___ | |_ ___
| | | '_ \ / _` | __| _ \ / _ \| __/ __|
| |___| | | | (_| | |_| |_) | (_) | |_\__ \
\____|_| |_|\__,_|\__|____/ \___/ \__|___/
WECHATY Environment Variables: 6
WECHATY_TOKEN=xxxx
WECHATY_DOCKER=1
WECHATY_PUPPET_PADPLUS_TOKEN=xxxx
WECHATY_LOG=verbose
WECHATY_PUPPET=wechaty-puppet-padplus
WECHATY_HOSTIE_PORT=8788
Starting Docker Container for Wechaty v0.46.4 with Node.js v12.18.3 ...
____ _ _ _ _
/ ___| |__ __ _| |_(_) ___ (_) ___
| | | '_ \ / _` | __| |/ _ \ | |/ _ \
| |___| | | | (_| | |_| | __/_| | (_) |
\____|_| |_|\__,_|\__|_|\___(_)_|\___/
_ _ _ _ ____
/ \ _ _| |_| |__ (_)_ __ __ _ | __ ) _ _ _
/ _ \| | | | __| '_ \| | '_ \ / _` | | _ \| | | (_)
/ ___ \ |_| | |_| | | | | | | | (_| | | |_) | |_| |_
/_/ \_\__,_|\__|_| |_|_|_| |_|\__, | |____/ \__, (_)
|___/ |___/
WECHATY_TOKEN=xxxx
/wechaty ~
> wechaty@0.46.4 io-client /wechaty
> ts-node bin/io-client
10:51:15 INFO Config registering process.on("unhandledRejection") for development/debug
10:51:15 VERB Config constructor()
| __ __ _ _
| \ \ / /__ ___| |__ __ _| |_ _ _
| \ \ /\ / / _ \/ __| '_ \ / _` | __| | | |
| \ V V / __/ (__| | | | (_| | |_| |_| |
| \_/\_/ \___|\___|_| |_|\__,_|\__|\__, |
| |___/
=============== Powered by Wechaty ===============
-------- https://www.chatie.io --------
My super power: download cloud bot from www.chatie.io
__________________________________________________
10:51:17 INFO Client Starting for WECHATY_TOKEN: xxxx
10:51:17 VERB Wechaty constructor()
10:51:17 VERB StateSwitch constructor(Wechaty, "{"log":{"enableTimestamp":true,"logLevel":4,"prefixFilter":{}}}")
10:51:17 VERB StateSwitch constructor(WechatyReady, "{"log":{"enableTimestamp":true,"logLevel":4,"prefixFilter":{}}}")
10:51:17 VERB IoClient constructor({xxxx, wechaty:Wechaty#ckdwyyayo000015o895xjc14p<>(), port:8788})
10:51:17 VERB StateSwitch constructor(IoClient, "{"log":{"enableTimestamp":true,"logLevel":4,"prefixFilter":{}}}")
10:51:17 VERB IoClient start()
10:51:17 VERB StateSwitch <IoClient> on(pending) <- (false)
10:51:17 VERB IoClient initWechaty()
10:51:17 VERB Wechaty on(login, listener) registering... listenerCount: 0
10:51:17 VERB Wechaty on(logout, listener) registering... listenerCount: 0
10:51:17 VERB Wechaty on(message, listener) registering... listenerCount: 0
10:51:17 VERB Wechaty on(scan, listener) registering... listenerCount: 0
10:51:17 VERB IoClient startIo() with token xxxx
10:51:17 VERB StateSwitch constructor(Io, "{"log":{"enableTimestamp":true,"logLevel":4,"prefixFilter":{}}}")
10:51:17 VERB Io instantiated with apihost[api.chatie.io], token[xxxx], protocol[io|0.0.1], cuid[ckdwyyayo000015o895xjc14p]
10:51:17 VERB Io start()
10:51:17 VERB StateSwitch <Io> on(pending) <- (false)
10:51:17 VERB Io initEventHook()
10:51:17 VERB Wechaty on(error, listener) registering... listenerCount: 0
10:51:17 VERB Wechaty on(heartbeat, listener) registering... listenerCount: 0
10:51:17 VERB Wechaty on(login, listener) registering... listenerCount: 1
10:51:17 VERB Wechaty on(logout, listener) registering... listenerCount: 1
10:51:17 VERB Wechaty on(message, listener) registering... listenerCount: 1
10:51:17 VERB Wechaty on(scan, listener) registering... listenerCount: 1
10:51:17 VERB Io initWebSocket()
10:51:18 VERB Io initWebSocket() connected with protocol [io|0.0.1|ckdwyyayo000015o895xjc14p]
10:51:18 VERB Wechaty on(scan, listener) registering... listenerCount: 2
10:51:18 VERB StateSwitch <Io> on(true) <- (pending)
10:51:18 VERB Wechaty <wechaty-puppet-padplus>(xxxx) start() v0.46.4 is starting...
10:51:18 VERB Wechaty id: ckdwyyayo000015o895xjc14p
10:51:18 VERB StateSwitch <WechatyReady> off(true) <- (true)
10:51:18 VERB StateSwitch <Wechaty> on(pending) <- (false)
10:51:18 VERB MemoryCard constructor("xxxx")
10:51:18 VERB MemoryCard getStorage() for storage type: N/A
10:51:18 VERB getStorage name: xxxx, options: {"type":"file"}
10:51:18 VERB StorageFile constructor(xxxx, ...)
10:51:18 VERB StorageBackend constructor(xxxx, { type: file })
10:51:18 VERB MemoryCard load() from storage: StorageFile</wechaty/xxxx.memory-card.json>
10:51:18 VERB StorageFile load() from /wechaty/xxxx.memory-card.json
10:51:18 VERB MemoryCard load() file not exist, NOOP
10:51:18 VERB Wechaty initPuppet()
10:51:18 VERB MemoryCard multiplex(puppet)
10:51:18 VERB MemoryCard static multiplex(MemoryCard<xxxx>, puppet)
10:51:18 VERB MemoryCard constructor({"name":"xxxx","multiplex":{"name":"puppet","parent":{"options":{"name":"xxxx"},"name":"xxxx","payload":{},"multiplexNameList":[],"storage":{"name":"xxxx","options":{"type":"file"},"absFileName":"/wechaty/xxxx.memory-card.json"}}}})
10:51:18 VERB PuppetManager resolve({puppet: wechaty-puppet-padplus, puppetOptions: undefined})
10:51:18 VERB PuppetManager resolveName(wechaty-puppet-padplus)
10:51:18 VERB PuppetManager checkModule(wechaty-puppet-padplus)
10:51:19 VERB Puppet constructor({}) #0
10:51:19 VERB StateSwitch constructor(PuppetPadplus, "{"log":{"enableTimestamp":true,"logLevel":4,"prefixFilter":{}}}")
10:51:19 VERB MemoryCard constructor(undefined)
10:51:19 VERB MemoryCard getStorage() for storage type: N/A
10:51:19 VERB MemoryCard load() from storage: N/A
10:51:19 VERB MemoryCard load() no storage
10:51:19 VERB Puppet constructor() watchdog timeout set to 60 seconds
10:51:19 VERB HotImport callerResolve(., /wechaty/node_modules/wechaty-puppet/dist/src/puppet.js)
10:51:19 VERB Puppet constructor() childClassPath=/wechaty/node_modules/wechaty-puppet-padplus/dist/src
10:51:19 VERB PadplusManager constructor()
10:51:19 VERB Puppet constructor() memory.load() done
10:51:19 VERB Puppet setMemory()
10:51:19 VERB Wechaty initPuppetEventBridge(Puppet#0<PuppetPadplus>(xxxx))
10:51:19 VERB Wechaty initPuppetEventBridge() puppet.on(friendship) (listenerCount:0) registering...
10:51:19 VERB Wechaty initPuppetEventBridge() puppet.on(login) (listenerCount:0) registering...
10:51:19 VERB Wechaty initPuppetEventBridge() puppet.on(logout) (listenerCount:0) registering...
10:51:19 VERB Wechaty initPuppetEventBridge() puppet.on(message) (listenerCount:0) registering...
10:51:19 VERB Wechaty initPuppetEventBridge() puppet.on(room-invite) (listenerCount:0) registering...
10:51:19 VERB Wechaty initPuppetEventBridge() puppet.on(room-join) (listenerCount:0) registering...
10:51:19 VERB Wechaty initPuppetEventBridge() puppet.on(room-leave) (listenerCount:0) registering...
10:51:19 VERB Wechaty initPuppetEventBridge() puppet.on(room-topic) (listenerCount:0) registering...
10:51:19 VERB Wechaty initPuppetEventBridge() puppet.on(scan) (listenerCount:0) registering...
10:51:19 VERB Wechaty initPuppetEventBridge() puppet.on(dong) (listenerCount:0) registering...
10:51:19 VERB Wechaty initPuppetEventBridge() puppet.on(error) (listenerCount:0) registering...
10:51:19 VERB Wechaty initPuppetEventBridge() puppet.on(heartbeat) (listenerCount:1) registering...
10:51:19 VERB Wechaty initPuppetEventBridge() puppet.on(ready) (listenerCount:0) registering...
10:51:19 VERB Wechaty initPuppetEventBridge() puppet.on(reset) (listenerCount:1) registering...
10:51:19 VERB Wechaty wechatifyUserModules(Puppet#0<PuppetPadplus>(xxxx))
10:51:19 INFO PuppetPadplus start()
10:51:19 VERB StateSwitch <PuppetPadplus> on(pending) <- (false)
10:51:19 VERB PadplusManager on(scan, function) registered
10:51:19 VERB PadplusManager on(login, function) registered
10:51:19 VERB PadplusManager on(message, function) registered
10:51:19 VERB PadplusManager on(ready, function) registered
10:51:19 VERB PadplusManager on(reset, function) registered
10:51:19 VERB PadplusManager on(heartbeat, function) registered
10:51:19 VERB PadplusManager on(logout, function) registered
10:51:19 VERB PadplusManager on(room-leave, function) registered
10:51:19 VERB PadplusManager on(error, function) registered
10:51:20 VERB MemoryCard <puppet> get(WECHATY_PUPPET_PADPLUS)
10:51:20 VERB MemoryCard <puppet> get(WECHATY_PUPPET_PADPLUS)
10:51:20 VERB StateSwitch <PuppetPadplus> on(true) <- (pending)
10:51:20 VERB Wechaty on(heartbeat, listener) registering... listenerCount: 1
10:51:20 VERB StateSwitch <Wechaty> on(true) <- (pending)
10:51:20 VERB IoClient startHostie()
10:51:20 VERB PuppetServer constructor({endpoint: "0.0.0.0:8788", puppet: "Puppet#0<PuppetPadplus>(xxxx)", token: "xxxx"})
10:51:20 VERB PuppetServer start()
10:51:20 VERB EventStreamManager constructor(Puppet#0<PuppetPadplus>(xxxx))
10:51:20 VERB StateSwitch <IoClient> on(true) <- (pending)
10:51:23 VERB PadplusManager setContactAndRoomData() can not proceed due to no cache.
10:51:23 INFO IoClient [2] http://weixin.qq.com/x/YdclPiJVXLwHjP5Ixv-I]
Online QR Code Image: https://wechaty.github.io/qrcode/http://weixin.qq.com/x/YdclPiJVXLwHjP5Ixv-I
10:51:48 VERB PadplusManager setContactAndRoomData() can not proceed due to no cache.
10:51:48 INFO PadplusManager
=================================================
QRCODE_SCAN MSG : 已扫码,请在手机端确认登陆...
=================================================
10:51:48 INFO IoClient [3] ]
Online QR Code Image: https://wechaty.github.io/qrcode/
10:51:50 INFO PadplusManager
=================================================
QRCODE_SCAN MSG : 已确认
=================================================
10:51:50 INFO IoClient [4] ]
Online QR Code Image: https://wechaty.github.io/qrcode/
10:51:52 VERB MemoryCard <puppet> set(WECHATY_PUPPET_PADPLUS, [object Object])
10:51:52 VERB MemoryCard <xxxx> save() to StorageFile</wechaty/xxxx.memory-card.json>
10:51:52 VERB StorageFile save() to /wechaty/xxxx.memory-card.json
10:51:52 VERB PadplusManager init cache manager
10:51:52 VERB CacheManager init()
10:51:52 VERB CacheManager initCache(wxid_37gn4v1xgwvf22,{"baseDir":"/wechaty","type":"flashStore"})
10:51:52 VERB CacheManager initCache() inited [object Promise] Contacts, cachedir="/bot/.wechaty/puppet-padplus-cache/flash-store-v0.14/"
10:51:52 VERB Puppet login(wxid_37gn4v1xgwvf22)
10:51:52 VERB Contact load(wxid_37gn4v1xgwvf22) init pool
10:51:52 VERB PadplusContact syncContacts()
10:51:52 VERB ContactSelf name()
10:51:52 INFO IoClient 無名 logged in
**10:51:53 VERB PadplusContact getContactInfo(weixin)
10:51:53 VERB PadplusContact getContactInfo(weixin)
10:51:53 VERB PadplusContact getContactInfo(weixin)
10:51:53 VERB PadplusContact getContactInfo(weixin)
10:51:53 VERB PadplusContact getContactInfo(weixin)
10:51:54 VERB PadplusContact getContactInfo(weixin)
10:51:54 INFO PuppetPadplus logout(true, 为了你的帐号安全,请重新登录。)**
10:51:54 VERB Puppet selfId()
10:51:54 VERB Puppet reset(padplus reset)
10:51:54 VERB ContactSelf name()
10:51:54 INFO IoClient 無名 logged out
10:51:54 INFO PuppetPadplus stop()
10:51:54 VERB StateSwitch <PuppetPadplus> off(pending) <- (false)
10:51:54 INFO PuppetPadplus logout(true, logout in wechaty)
10:51:54 VERB PadplusContact getContactInfo(weixin)
10:51:54 VERB PadplusContact getContactInfo(weixin)
10:51:54 VERB PadplusContact getContactInfo(weixin)
10:51:54 VERB PadplusContact getContactInfo(weixin)
10:51:55 VERB PadplusContact getContactInfo(weixin)
10:51:55 VERB PadplusContact getContactInfo(weixin)
10:51:55 VERB PadplusContact getContactInfo(weixin)
10:51:55 VERB PadplusContact getContactInfo(weixin)
10:51:58 ERR Config ###########################
10:51:58 ERR Config unhandledRejection: Error: get contact timeout
at Timeout._onTimeout (/wechaty/node_modules/wechaty-puppet-padplus/src/padplus-manager/padplus-manager.ts:1169:47)
at listOnTimeout (internal/timers.js:549:17)
at processTimers (internal/timers.js:492:7) [object Promise]
10:51:58 ERR Config ###########################
10:51:58 ERR Config process.on(unhandledRejection) promise.catch(get contact timeout)
Config Error: get contact timeout
at Timeout._onTimeout (/wechaty/node_modules/wechaty-puppet-padplus/src/padplus-manager/padplus-manager.ts:1169:47)
at listOnTimeout (internal/timers.js:549:17)
at processTimers (internal/timers.js:492:7)
7. Additional context
Add any other context about the problem here.
The same token can be used in with ding-dong-bot in nodejs project with no issue.
From the log, after the login, the bot issues 5 getContactInfo call within a second. And the account is locked after that. This may be suspicious to wechat, and might be the cause of the ban.
10:51:53 VERB PadplusContact getContactInfo(weixin)
10:51:53 VERB PadplusContact getContactInfo(weixin)
10:51:53 VERB PadplusContact getContactInfo(weixin)
10:51:53 VERB PadplusContact getContactInfo(weixin)
10:51:53 VERB PadplusContact getContactInfo(weixin)
10:51:54 VERB PadplusContact getContactInfo(weixin)
10:51:54 INFO PuppetPadplus logout(true, 为了你的帐号安全,请重新登录。)