web login fail: Account is unable to use Wechat for Web. Use WeChat for Windows or Mac instead.
MengxingLiu opened this issue · 0 comments
My wechat account can successfully login in UOS wechat desktop.
1. Versions
What is your wechaty version?
Answer: Container for Wechaty v1.10.4
Which puppet are you using for wechaty? (puppeteer/padlocal/service...)
Answer: WECHATY_PUPPET=wechaty-puppet-wechat
What is your wechaty-puppet-XXX(padchat/puppeteer/) version?
Answer: wechaty-puppet-wechat@1.10.2
What is your node version? (run
node --version
)
Answer:v16.13.0
What os are you using
Answer:Ubuntu 21.04
2. Describe the bug
Scan QR code faild:
Account is unable to use Wechat for Web. Use WeChat for Windows or Mac instead.
3. To Reproduce
export WECHATY_LOG="verbose"
export WECHATY_PUPPET="wechaty-puppet-wechat"
export WECHATY_PUPPET_SERVER_PORT="8080"
export WECHATY_TOKEN="python-wechaty-3c44a3db-7d68-46d1-b766-f4783a4c48a8"
#export WECHATY_PUPPET_SERVICE_NO_TLS_INSECURE_SERVER="true"
#save login session
if [ ! -f "${WECHATY_TOKEN}.memory-card.json" ]; then
touch "${WECHATY_TOKEN}.memory-card.json"
fi
docker run -ti
--name wechaty_puppet_service_token_gateway
--rm
-v "pwd
/${WECHATY_TOKEN}.memory-card.json":"/wechaty/${WECHATY_TOKEN}.memory-card.json"
-v "pwd
":"/bot"
-e WECHATY_LOG
-e WECHATY_PUPPET
-e WECHATY_PUPPET_SERVER_PORT
-e WECHATY_PUPPET_SERVICE_NO_TLS_INSECURE_SERVER
-e WECHATY_TOKEN
-p "$WECHATY_PUPPET_SERVER_PORT:$WECHATY_PUPPET_SERVER_PORT"
wechaty/wechaty bot.mjs
content of bot.mjs:
import { WechatyBuilder } from 'wechaty'
WechatyBuilder.build() // get a Wechaty instance
.on('scan', (qrcode, status) => console.log(Scan QR Code to login: ${status}\nhttps://wechaty.js.org/qrcode/${encodeURIComponent(qrcode)}
))
.on('login', user => console.log(User ${user} logged in
))
.on('message', message => console.log(Message: ${message}
))
.start()