ERROR: 为了你的帐号安全,此微信号不能登录网页微信。
Created by: foundworld
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
A: not fixed yet
-
Please search in FAQ List first, and make sure your problem has not been solved before. A: haven't solved
-
Please search in the issue first, and make sure your problem had not been reported before
1. Versions
-
What is your wechaty version? Answer: Docker - 0.30
-
Which puppet are you using for wechaty? (padchat/puppeteer/padpro/...) Answer: Docker image - 0.30
-
What is your wechaty-puppet-XXX(padchat/puppeteer/) version? Answer: Docker image - 0.30
-
What is your node version? (run
node --version
) Answer: Docker image - 0.30 -
What os are you using Answer: Docker image - 0.30
2. Describe the bug
Give a clear and concise description of what the bug is.
GOT ERROR AS BELOW:
14:13:46 WARN PuppetPuppeteerBridge onDialog() page.on(dialog) type:type() {
return this._type;
} message:为了你的帐号安全,此微信号不能登录网页微信。你可以使用Windows微信或Mac微信在电脑端登录。Windows微信下载地址:https://pc.weixin.qq.com Mac微信下载地址:https://mac.weixin.qq.com
(node:39) UnhandledPromiseRejectionWarning: Error: Error: type() {
return this._type;
}(为了你的帐号安全,此微信号不能登录网页微信。你可以使用Windows微信或Mac微信在电脑端登录。Windows微信下载地址:https://pc.weixin.qq.com Mac微信下载地址:https://mac.weixin.qq.com)
at PuppetPuppeteer.puppet.on.error (/wechaty/src/wechaty.ts:616:32)
at PuppetPuppeteer.emit (events.js:198:13)
at PuppetPuppeteer.EventEmitter.emit (domain.js:448:20)
at PuppetPuppeteer.emit (/wechaty/node_modules/wechaty-puppet/src/puppet.ts:284:18)
at Bridge.bridge.on.e (/wechaty/node_modules/wechaty-puppet-puppeteer/src/puppet-puppeteer.ts:307:43)
at Bridge.emit (events.js:198:13)
at Bridge.EventEmitter.emit (domain.js:448:20)
at Bridge.<anonymous> (/wechaty/node_modules/wechaty-puppet-puppeteer/src/bridge.ts:176:10)
at Generator.next (<anonymous>)
at fulfilled (/wechaty/node_modules/wechaty-puppet-puppeteer/dist/src/bridge.js:24:58)
at process._tickCallback (internal/process/next_tick.js:68:7)
(node:39) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:39) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
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:
- create file 'mybot.js' and copy paste code to it
const { Wechaty } = require('wechaty') // import { Wechaty } from 'wechaty'
Wechaty.instance() // Global Instance
.on('scan', (qrcode, status) => console.log(`Scan QR Code to login: ${status}\nhttps://api.qrserver.com/v1/create-qr-code/?data=${encodeURIComponent(qrcode)}`))
.on('login', user => console.log(`User ${user} logined`))
.on('message', message => console.log(`Message: ${message}`))
.start()
- run docker cmd
docker run -ti --rm --volume="$(pwd)":/bot zixia/wechaty:0.30 mybot.js
- when got below information, copy and paste it to web browser:
Scan QR Code to login: 1
https://api.qrserver.com/v1/create-qr-code/?data=https%3A%2F%2Flogin.weixin.qq.com%2Fl%2FIeZby-kkWw%3D%3D
- got exception message as mentioned above.
4. Expected behavior
Give a clear and concise description of what you expected to happen. Answer: I can login the wechat
5. Actual behavior
If applicable, add screenshots to help explain your problem. But do not paste log screenshots here. Answer: got exceptions, details as mentioned above
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
Question: Paste your FULL(DO NOT ONLY PROVIDE FRAGMENTS) log messages
Answer:
docker run -ti --rm --volume="$(pwd)":/bot zixia/wechaty:0.30 mybot.js
__ __ _ _
\ \ / /__ ___| |__ __ _| |_ _ _
\ \ /\ / / _ \/ __| '_ \ / _` | __| | | |
\ V V / __/ (__| | | | (_| | |_| |_| |
\_/\_/ \___|\___|_| |_|\__,_|\__|\__, |
|___/
____________________________________________________
https://www.chatie.io
____ _ _
/ ___|___ _ __ _ __ ___ ___| |_(_)_ __ __ _
| | / _ \| '_ \| '_ \ / _ \/ __| __| | '_ \ / _` |
| |__| (_) | | | | | | | __/ (__| |_| | | | | (_| |
\____\___/|_| |_|_| |_|\___|\___|\__|_|_| |_|\__, |
|___/
____ _ _ ____ _
/ ___| |__ __ _| |_| __ ) ___ | |_ ___
| | | '_ \ / _` | __| _ \ / _ \| __/ __|
| |___| | | | (_| | |_| |_) | (_) | |_\__ \
\____|_| |_|\__,_|\__|____/ \___/ \__|___/
WECHATY Environment Variables: 1
WECHATY_DOCKER=1
Starting Docker Container for Wechaty v0.30.23 with Node.js v10.20.1 ...
Working directory: /bot
Executing babel-node --presets @babel/env mybot.js
14:13:14 INFO Wechaty <wechaty-puppet-puppeteer>() start() v0.30.23 is starting...
Scan QR Code to login: 1
https://api.qrserver.com/v1/create-qr-code/?data=https%3A%2F%2Flogin.weixin.qq.com%2Fl%2FIeZby-kkWw%3D%3D
Scan QR Code to login: 2
https://api.qrserver.com/v1/create-qr-code/?data=https%3A%2F%2Flogin.weixin.qq.com%2Fl%2FIeZby-kkWw%3D%3D
Scan QR Code to login: 3
https://api.qrserver.com/v1/create-qr-code/?data=https%3A%2F%2Flogin.weixin.qq.com%2Fl%2FIeZby-kkWw%3D%3D
14:13:46 WARN PuppetPuppeteerBridge onDialog() page.on(dialog) type:type() {
return this._type;
} message:为了你的帐号安全,此微信号不能登录网页微信。你可以使用Windows微信或Mac微信在电脑端登录。Windows微信下载地址:https://pc.weixin.qq.com Mac微信下载地址:https://mac.weixin.qq.com
(node:39) UnhandledPromiseRejectionWarning: Error: Error: type() {
return this._type;
}(为了你的帐号安全,此微信号不能登录网页微信。你可以使用Windows微信或Mac微信在电脑端登录。Windows微信下载地址:https://pc.weixin.qq.com Mac微信下载地址:https://mac.weixin.qq.com)
at PuppetPuppeteer.puppet.on.error (/wechaty/src/wechaty.ts:616:32)
at PuppetPuppeteer.emit (events.js:198:13)
at PuppetPuppeteer.EventEmitter.emit (domain.js:448:20)
at PuppetPuppeteer.emit (/wechaty/node_modules/wechaty-puppet/src/puppet.ts:284:18)
at Bridge.bridge.on.e (/wechaty/node_modules/wechaty-puppet-puppeteer/src/puppet-puppeteer.ts:307:43)
at Bridge.emit (events.js:198:13)
at Bridge.EventEmitter.emit (domain.js:448:20)
at Bridge.<anonymous> (/wechaty/node_modules/wechaty-puppet-puppeteer/src/bridge.ts:176:10)
at Generator.next (<anonymous>)
at fulfilled (/wechaty/node_modules/wechaty-puppet-puppeteer/dist/src/bridge.js:24:58)
at process._tickCallback (internal/process/next_tick.js:68:7)
(node:39) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:39) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
7. Additional context
Add any other context about the problem here. IMPORTANT: I used the wechat account which has already been used more than 10 years. [bug]