-
Notifications
You must be signed in to change notification settings - Fork 46
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
Initialization fails #39
Comments
Yes getting the same issue here. It's 404'ing on https://talkgadget.google.com/u/0/talkgadget/_/chat Been trying to figure out how that should change, but no luck so far. |
I had same problem. |
Same here. It was working fine this morning. Stopped, restarted and the error showed up. |
I can confirm, I have issues with my bots since this morning. I'll try to take a look later. |
https://github.com/tdryer/hangups still works, so they have the correct endpoint :) |
The thing is that the init url that hangupsjs uses only appears as an origin for the channel url: https://github.com/tdryer/hangups/blob/08c6852ea65f1adca1841bb6d4e0adca288f2e52/hangups/channel.py#L30 |
That URL is not used to do a call, it is used to signal the Auth API what the origin of the request is. |
It seems that hangupsjs does the initialisation totally different,... it does a call and parses the |
It seems like one potential new endpoint could be |
So I've done a bit more digging into this. I've MITM the chrome extension using a test account, and the following is the two requests I think we need to alter: GET https://hangouts.google.com/webchat/extension-start This gives us the "pvt" value for the below: GET https://hangouts.google.com/webchat/u/0/load? ResponseBody:
This is I think what we called the INIT request. Just digging into this further and figuring out how many of the above params are really needed for the second request. (NB I broke up the GET params on the second request per line to make it a little more readable.) |
So using the URLs like I mentioned above, I am getting the same JS page loading in hangupsjs In this gist i've been hacking on it, https://gist.github.com/DanBUK/70f7c23d1a8867da73af But it seems to get to line 175 before failing. (I'm not really a coffeescript guy, hence hacking on the JS version) |
Ok so ref the above Gist, I did that, then commented out lines 176-199 so none of them entities were loaded, and things seem to be working. I don't have a clean PR to make; I'de have to get my head around CoffeeScript for that... (Sorry I really havn't got my head thinking in a coffee script way...) lib/channel:
lib/init:
...
Sorry this isn't a PR. |
The request is used on startup to preload contact and conversation data. In hangups 0.3.0 I simplified the initialization process by removing this request, which coincidentally prevented the change Google made yesterday from breaking it. An older fork of hangups was fixed by a small patch that could probably be easily adapted for hangupsjs. |
Applied changes proposed by DanBUK in one of my lab machines and it is working again. |
Cool! Is this the info that hangupsjs provides in the |
@timvdalen as far as i can see the https://github.com/algesten/hangupsjs/blob/v1.2.0/src/client.coffee#L98-L101 |
did i misunderstand. the entities are actually not available anymore :/ ... ok. perhaps it's major version after all... |
@algesten Yeah you're right, I see I'm actually querying when I get that event. |
@timvdalen that will not change ;) |
Every time I try to start, I get:
Looking at the other project I know using this lib (yakyak/yakyak#111) I don't seem to be the only one.
The text was updated successfully, but these errors were encountered: