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

Qr Auth fails after a day #57

Closed
naishstar opened this issue Oct 21, 2016 · 3 comments
Closed

Qr Auth fails after a day #57

naishstar opened this issue Oct 21, 2016 · 3 comments
Labels

Comments

@naishstar
Copy link

Hi after 1-2 days our docker instance loses authorisation and we have to rescan a QR code. Is this normal? How long has anyone else kept an account authorised after first scanning a QR code. We were hoping to keep it long running as otherwise we miss messages? Any tips appreciated.

(PS. thanks for a great SDK)

@naishstar
Copy link
Author

To clarify we successfully scan QR, send and receive messages for around a day and then it stops working , no new messages come in and we can't reply. So have to rescan QR code. It is this we want to minimise so we don't miss messages in the time between losing auth and rescan. Thanks

@huan huan added the question label Oct 21, 2016
@huan
Copy link
Member

huan commented Oct 21, 2016

Hi @naishstar ,

Thanks for submitting this issue, because how long will wechaty session keep valid inside browser is also the same question I want to know.

My suggestion for getting the answer, is to:

  1. open browser and login wechat by scan QRcode. then monitor it to see how long will wechat keep session for you.
  2. find someone work inside Tencent, ask them to know the session timeout/management strategy.
  3. find others who use wechaty(or other web wechat framework), we can summary the session time information to clarify it.

last but not least, there is no guarantee that the web wechat will keep your login at wechat side. you must be prepared for the session lost.

wechaty will emit logout & scan event to you, so you can monitor those events, either send an email to you to notice or use other tools like send QR code to you via wechat message(i.e. via ServerChan)

fighting!

@naishstar
Copy link
Author

Thanks @zixia

So far we think it is an inactivity timeout killing the sessions by wechat. So providing you have enough activity on a regular basis they should stay open. Our test one was too quiet so we think that caused the issue!

We will keep testing!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants