Skip to content
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
maheshgosemath opened this issue Oct 12, 2017 · 29 comments
Closed

New account login issue #872

maheshgosemath opened this issue Oct 12, 2017 · 29 comments
Labels

Comments

@maheshgosemath
Copy link

maheshgosemath 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
@huan huan added the question label Oct 12, 2017
@huan
Copy link
Member

huan 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

@huan
Copy link
Member

huan 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.

@maheshgosemath
Copy link
Author

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

@huan
Copy link
Member

huan 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
Copy link

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
Copy link

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>

@huan
Copy link
Member

huan commented Oct 12, 2017

@seifhatem thank you!

@xwxtwd
Copy link

xwxtwd commented Oct 13, 2017

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

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

@maheshgosemath
Copy link
Author

No I couldn’t find an account before Jun 2017

@Jfeng3
Copy link

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
Copy link

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
Copy link

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

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

@huan
Copy link
Member

huan commented Oct 17, 2017

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

@spacealiens
Copy link

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
Copy link

Any solution yet?

@spacealiens
Copy link

@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
Copy link

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

@nsorros
Copy link

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?

@huan
Copy link
Member

huan commented Jun 15, 2018

@nsorrors yes, it's now available.

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

@huan
Copy link
Member

huan 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:

@wechaty wechaty locked as resolved and limited conversation to collaborators Jun 16, 2018
@huan huan closed this as completed Jun 16, 2018
@wechaty wechaty unlocked this conversation Jan 30, 2020
@huan
Copy link
Member

huan commented Jan 30, 2020

Juzi.bot is providing free tokens for the developers who have a strong will and ability to build a valuable chatbot for users.

Learn more about wechaty-puppet-padplus, which is a iPad protocol puppet provider.

@UserFengFeng
Copy link

Cool

@latel
Copy link

latel commented Feb 15, 2021

My account is created before 2017, still, I cannot login from the webui

@huan
Copy link
Member

huan commented Feb 15, 2021

The accounts that created before 2017 will have high probabilities to be able to login via web, but not guaranteed.

@provenceo
Copy link

Why do you need to open wechat payment to continue the operation.

@huan
Copy link
Member

huan commented Jan 4, 2022

Update Jan 2022

In 2021, UOS can help developers to log in their bot account via the Web Protocol. (related blog post: 重磅:使用UOS微信桌面版协议登录,wechaty免费版web协议重放荣光, Leo chen, Apr 13, 2021

However, it seems that the UOS has been disabled after Jan 1, 2022. See

@nosun
Copy link

nosun commented Jan 13, 2022

郁闷

1 similar comment
@wuyou201400
Copy link

郁闷

@huan
Copy link
Member

huan commented Feb 11, 2022

Update Feb 2022: recommend using Wechaty Puppet XP

It seems that the UOS patch has no solution to be enabled again. (If anyone has a solution, please submit a PR)

So for users who need a free Wechaty Puppet Provider (WPP), we are suggesting that you can try the Wechaty Puppet XP which is a free WPP based on the Windows WeChat Client.

I will lock this thread for now. Please file a new issue if there's any need.

Merge to:

@wechaty wechaty locked as off-topic and limited conversation to collaborators Feb 11, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests