Giter Site home page Giter Site logo

Comments (7)

suntong avatar suntong commented on August 24, 2024

Further on to the error correction logic, I reverted to my old main.go, and scanned in right away, and make my plugin working for me:

2017/12/20 19:38:42 [I] QYDQdzCioA==
QRCode here
2017/12/20 19:38:49 [W] login response, window.code=201;
2017/12/20 19:38:57 [I] &{2...
login successful on first attempt
...
2017/12/20 19:39:01 [I] entering synccheck loop
2017/12/20 19:39:02 [I] webpush.web.wechat.com 0 2
2017/12/20 19:39:03 [W] no handlers for key [51]
2017/12/20 19:39:03 [W] no handlers for key [51]
2017/12/20 19:39:09 [I] webpush.web.wechat.com 0 2
2017/12/20 19:39:10 [I] command '3824' received
2017/12/20 19:39:10 [I] game generated: 
 3 5
 8 6
-!!
:8 / (5 - 3) * 6

...
2017/12/20 19:39:11 [I] wechat message sent
2017/12/20 19:39:11 [I] gamer24 exit gracefully
2017/12/20 19:39:11 [I] webpush.web.wechat.com 0 2
2017/12/20 19:39:36 [I] webpush.web.wechat.com 0 2
2017/12/20 19:39:37 [I] command '3824' received
2017/12/20 19:39:37 [I] game generated: 
 9 8
 9 1
-XX
...

...
2017/12/20 20:11:10 [I] webpush.web.wechat.com 0 0
2017/12/20 20:11:40 [I] webpush.web.wechat.com 0 0
2017/12/20 20:11:40 [E] Get https://webpush.web.wechat.com/cgi-bin/mmwebwx-bin/synccheck?_=1513818670000&deviceid=e046698787456799&r=1513818670000&sid=zQZ88lAbDwKjxapB&skey=%40crypt_73c0b781_a68543a0c0a6d2f8d44e21e05ea20a4d&synckey=1_667596270%7C2_667600722%7C3_667600570%7C11_667600646%7C13_667390534%7C201_1513818591%7C203_1513808070%7C1000_1513816620%7C1001_1513816754&uin=2849091348: net/http: request canceled (Client.Timeout exceeded while awaiting headers)
2017/12/20 20:12:10 [I] webpush.web.wechat.com 0 0
2017/12/20 20:12:10 [E] Get https://webpush.web.wechat.com/cgi-bin/mmwebwx-bin/synccheck?_=1513818700000&deviceid=e046698787456799&r=1513818700000&sid=zQZ88lAbDwKjxapB&skey=%40crypt_73c0b781_a68543a0c0a6d2f8d44e21e05ea20a4d&synckey=1_667596270%7C2_667600722%7C3_667600570%7C11_667600646%7C13_667390534%7C201_1513818591%7C203_1513808070%7C1000_1513816620%7C1001_1513816754&uin=2849091348: net/http: request canceled (Client.Timeout exceeded while awaiting headers)

I.e., after letting the session running for ~30 minutes, I suddenly receiving the Timeout exceeded errors messages now. After that, the error will show up non-stop, until I killed it ~20 minutes later:

2017/12/20 20:28:40 [I] webpush.web.wechat.com 0 0
2017/12/20 20:28:40 [E] Get https://webpush.web.wechat.com/cgi-bin/mmwebwx-bin/synccheck?_=1513819690000&deviceid=e046698787456799&r=1513819690000&sid=zQZ88lAbDwKjxapB&skey=%40crypt_73c0b781_a68543a0c0a6d2f8d44e21e05ea20a4d&synckey=1_667596270%7C2_667600722%7C3_667600570%7C11_667600646%7C13_667390534%7C201_1513818591%7C203_1513808070%7C1000_1513816620%7C1001_1513816754&uin=2849091348: net/http: request canceled (Client.Timeout exceeded while awaiting headers)
2017/12/20 20:29:10 [I] webpush.web.wechat.com 0 0
2017/12/20 20:29:10 [E] Get https://webpush.web.wechat.com/cgi-bin/mmwebwx-bin/synccheck?_=1513819720000&deviceid=e046698787456799&r=1513819720000&sid=zQZ88lAbDwKjxapB&skey=%40crypt_73c0b781_a68543a0c0a6d2f8d44e21e05ea20a4d&synckey=1_667596270%7C2_667600722%7C3_667600570%7C11_667600646%7C13_667390534%7C201_1513818591%7C203_1513808070%7C1000_1513816620%7C1001_1513816754&uin=2849091348: net/http: request canceled (Client.Timeout exceeded while awaiting headers)
^C

After I received the error for the fist time, sending "3824" never works again, despite it has been working before in the same session.

This is another proof from a different angle showing that there is something wrong with the error recovery logic.

Please help, and, can you make sure the session can go on for hours and even days please? Thx.

from wechat-go.

suntong avatar suntong commented on August 24, 2024

Better yet,

please wrap up the first loop as internal loop so that session.LoginAndServe(false) will block and not return until logged in.

from wechat-go.

songtianyi avatar songtianyi commented on August 24, 2024

the session can go hours not days

from wechat-go.

songtianyi avatar songtianyi commented on August 24, 2024

And the network may not stable.
You can add my wechat for quick response :)
id wxsongtianyi
Or join the wechat-go group, you can check the qrcode in wechat-go README

from wechat-go.

suntong avatar suntong commented on August 24, 2024

If by "network not stable" you meant the wechat server then I totally agree -- I had a unreliable network in China so I cannot tell, but here at home, I have fiber Internet, and the only thing I found unreliable is wechat server, not anything else. Moreover, trying from the hosting farms that have 99.9999% reliable rating gives me the exact same conclusion as well.

BTW, please elaborate what you mean by "the session can go hours not days". Thx.

from wechat-go.

songtianyi avatar songtianyi commented on August 24, 2024

I didn't test the stability of wechat-go, as i know few hours later, the session will broken.

Get https://webpush.web.wechat.com/cgi-bin/mmwebwx-bi..

I have meet this error before, but rarely.

from wechat-go.

suntong avatar suntong commented on August 24, 2024

OK, when you have some time, please try out the two versions I gave/listed in my OP, and tell me how they work for you, how long can you have the session last, whether scanning-in on the first/second attempt make any differences to you, etc. Thx.

from wechat-go.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.