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

ERROR root: CLIENT: unrecoverable low-level error data_dict['ds:7'][0][2] #413

Open
drewlander opened this issue May 18, 2018 · 3 comments

Comments

@drewlander
Copy link

client.py line 227 was where the error was coming from
I got this yesterday after I rebooted one of my boxes and reconnected.
It seems that google changed how they return the initialization request?
I really have no idea as to exactly what is going on but I know what I did to make it work
it seems they added <script nonce="bunchfstuff"> to the format in which things are returned. I do not know what it looked like before, and maybe I am completely wrong in what is going on, but I know that after a fresh install, with different users, I always got the same error above. When I made the following changes it works now:

line 30
r"(?:>AF_initDataCallback((.*?));</script>)", re.DOTALL

hacky way to 'fix' it but it now works for me!

@luchofariello
Copy link

Hi,

thank you very much for the solution but when using that regex it fails me in javascript.load (data) it might be that I have to get some spaces that regex?

@luchofariello
Copy link

the error is:

10:12:55 ERROR root: CLIENT: unrecoverable low-level error
Traceback (most recent call last):
File "hangupsbot.py", line 164, in run
loop.run_until_complete(self._client.connect())
File "/usr/local/Cellar/python/3.6.5/Frameworks/Python.framework/Versions/3.6/lib/python3.6/asyncio/base_events.py", line 468, in run_until_complete
return future.result()
File "/Users/lfariello/Documents/test-bot/hangoutsbot/hangupsbot/hangups/client.py", line 109, in connect
initial_data = yield from self._initialize_chat()
File "/Users/lfariello/Documents/test-bot/hangoutsbot/hangupsbot/hangups/client.py", line 210, in _initialize_chat
data = javascript.loads(data)
File "/Users/lfariello/Documents/test-bot/hangoutsbot/hangupsbot/hangups/javascript.py", line 20, in loads
return _PARSER.parse(string)
File "/usr/local/lib/python3.6/site-packages/purplex/parse.py", line 214, in parse
token = next(tokens)
File "/usr/local/lib/python3.6/site-packages/purplex/lex.py", line 40, in iter
ret = self.next_token()
File "/usr/local/lib/python3.6/site-packages/purplex/lex.py", line 58, in next_token
match = token_defn.regexp.match(self.input_text, self.input_pos)
TypeError: expected string or bytes-like object

and the data is :

('({key: 'ds:1', isError: false , hash: '1', data:function(){return [["ca:apcf"]\n]\n}})', '({key: 'ds:1', isError: false , hash: '1', data:function(){return [["ca:apcf"]\n]\n}})')

@drewlander
Copy link
Author

I dunno, this is what I have right now (I restarted the process to ensure nothing changed).
line 31, client.py

    r"(?:>AF_initDataCallback\((.*?)\);</script>)", re.DOTALL

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

No branches or pull requests

2 participants