New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New account login issue #872

Closed
mgosemath opened this Issue Oct 12, 2017 · 20 comments

Comments

Projects
None yet
10 participants
@mgosemath

mgosemath commented Oct 12, 2017

Hi,

I'm using npm to create a bot and followed an example code from the repo.
My bot code is as follows: (mybot.js)

const { Wechaty } = require('wechaty')
const QrcodeTerminal  = require('qrcode-terminal')
const bot = Wechaty.instance()

bot.on('scan', (url, code) => {
  if (!/201|200/.test(String(code))) {
    const loginUrl = url.replace(/\/qrcode\//, '/l/')
    QrcodeTerminal.generate(loginUrl)
  }
  console.log('${url}\n[${code}] Scan QR Code in above url to login: ')
});
bot.on('login', user => console.log('User ${user} logined'))
bot.on('message', message => console.log('Message: ${message}'))
bot.on("error", (e) => console.log('Error: ${e}'))
bot.init() 

On running the bot code I get the following logs:

mahesh@Mahesh-Gosemath:~/code/wechaty$ node mybot.js
09:11:14 INFO Wechaty v0.10.13 initializing...
09:11:14 INFO PuppetWebBridge init() initBrowser() down
09:11:15 INFO PuppetWebBridge initPage() before page.goto(domain)
09:11:22 INFO PuppetWebBridge initPage() after page.goto(domain)
09:11:22 INFO PuppetWebBridge init() initPage() down
https://login.weixin.qq.com/qrcode/4aT0xMjs_Q==
[0] Scan QR Code in above url to login:

On scanning the QR code I get the following message:

https://login.weixin.qq.com/qrcode/4aT0xMjs_Q==
[201] Scan QR Code in above url to login: 

As per documentation code 201 means the QR code is scanned and it is waiting for confirmation.
But the shell keeps waiting infinitely. It never enters the login event.

I tried logging on https://web.wechat.com/ by scanning code, though the code was scanned successfully it didn't log me in with the following message:

For account security, newly registered WeChat accounts are unable to log in to Web WeChat. To use WeChat on a computer, use Windows WeChat or Mac WeChat at http://wechat.com

Is there any relation between the wechat login message and wechaty waiting for confirmation?
Can't we use wechaty for wechat with new accounts?

NodeJs version I'm using is: 6.11.4

mahesh@Mahesh-Gosemath:~/code/wechaty$ node --version
v6.11.4

@zixia zixia added the question label Oct 12, 2017

@zixia

This comment has been minimized.

Member

zixia commented Oct 12, 2017

Hello, thanks for using Wechaty.

Your issue is related to the latest policy changing from Tencent: Newly created Wechat Account will not be able to login via Web Wechat anymore. Wechaty is using the Web API of Wechat, which means newly created account will not use Wechaty to log in.

The solution will be:

  1. use a Wechat Account that registered before Jun 2017.
  2. wait for Wechaty to support PuppetWine/PuppetAndroid(currently still in prototype stage)

Sorry to tell you that.

Also see: #603

@zixia

This comment has been minimized.

Member

zixia commented Oct 12, 2017

BTW: could you please to post the HTML Source Code of the page when you get the For account security, newly registered WeChat accounts are unable to log in to Web WeChat. To use WeChat on a computer, use Windows WeChat or Mac WeChat at http://wechat.com error message?

I need this source code because I think it's better to emit an error message for the user to show this message instead of just saw a useless login message.

@mgosemath

This comment has been minimized.

mgosemath commented Oct 12, 2017

The alert appears after the following API is called and it response it returns is blank.
Link

@zixia

This comment has been minimized.

Member

zixia commented Oct 12, 2017

Thanks. I understand that this is an alert window.

Could you find a Wechat Account that registered before Jun 2017?

@seifhatem

This comment has been minimized.

seifhatem commented Oct 12, 2017

It was working normally with me for 4 days with many logins (50+ maybe)
all of a sudden it refused to login with this error....

I haven't changed anything with the account and this happened :(

@xinbenlv have any ideas if we can use OS X app cookies with it?
Thanks

@seifhatem

This comment has been minimized.

seifhatem commented Oct 12, 2017

HTTP/1.1 200 OK
Content-Type: text/plain;charset=utf-8
Transfer-Encoding: chunked
Connection: Keep-alive

<error><ret>1203</ret><message>For account security, newly registered WeChat accounts are unable to log in to Web WeChat. To use WeChat on a computer, use Windows WeChat or Mac WeChat at http://wechat.com</message></error>

@zixia

This comment has been minimized.

Member

zixia commented Oct 12, 2017

@seifhatem thank you!

@xwxtwd

This comment has been minimized.

xwxtwd commented Oct 13, 2017

@zixia the same issue, bug my account registered in 2013

BTW: i can login https://web.wechat.com/

@mgosemath mgosemath closed this Oct 13, 2017

@mgosemath mgosemath reopened this Oct 13, 2017

@mgosemath

This comment has been minimized.

mgosemath commented Oct 13, 2017

No I couldn’t find an account before Jun 2017

@Jfeng3

This comment has been minimized.

Jfeng3 commented Oct 14, 2017

@zixia my account is definitely before 2017. Have same issue.
It works for me 3 days ago.
I am located at US

@binsee

This comment has been minimized.

Member

binsee commented Oct 14, 2017

I have an account is registered after June 2017, the previous test can not log on the web, but the first two days can suddenly log in, but less than 3 days to be banned landing web again.

@liangwenzhong

This comment has been minimized.

liangwenzhong commented Oct 17, 2017

@zixia the same issue, but my account registered before 2016

BTW: i can login https://web.wechat.com/

@zixia

This comment has been minimized.

Member

zixia commented Oct 17, 2017

What's your version? Please post the full log as required.

@spacealiens

This comment has been minimized.

spacealiens commented Jan 14, 2018

Any solution to this issue yet? I am seeing the same problem.
By the way, can you advise what would people do if their account is registered after June 2017? Are they not allowed to use Web WeChat at all?

@baselbers

This comment has been minimized.

baselbers commented Mar 29, 2018

Any solution yet?

@spacealiens

This comment has been minimized.

spacealiens commented Apr 2, 2018

@baselbers , I haven't found any, so i had to give up and install the wechat app on a phone man. I was trying to avoid that, hopefully one day these guys would provide us with a fix or solution.

@baselbers

This comment has been minimized.

baselbers commented Apr 4, 2018

Some devs just don't understand using a web app instead of a native app is less convenient as hell.

@nsorros

This comment has been minimized.

nsorros commented Jun 15, 2018

@zixia I am running into the same problem described here. How is that wait for Wechaty to support PuppetWine/PuppetAndroid(currently still in prototype stage) going to solve the problem? And is this now available?

@zixia

This comment has been minimized.

Member

zixia commented Jun 15, 2018

@nsorrors yes, it's now available.

Currently it's in alpha stage, learn more at #1296

@zixia

This comment has been minimized.

Member

zixia commented Jun 16, 2018

Wechaty v0.15(or above) Can Resolve This Login Issue

If you are experiencing this New Account Login Issue with Web API, and still want to use Wechaty as your ChatBot SDK, you are lucky from now because we have a branding new PuppetPadchat that can let you log in your new account without any problem.

Start from Wechaty v0.15, we enable new Puppet System with all protocols support, include but not limited to Android, iOS, Pad, Win32, Web.

Learn more at:

@Chatie Chatie locked as resolved and limited conversation to collaborators Jun 16, 2018

@zixia zixia closed this Jun 16, 2018

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.