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

body-error=JSONDecodeError #120

Open
akjaouen opened this issue May 10, 2023 · 8 comments
Open

body-error=JSONDecodeError #120

akjaouen opened this issue May 10, 2023 · 8 comments

Comments

@akjaouen
Copy link

akjaouen commented May 10, 2023

Hi,
I am receiving this new error :
body-error=JSONDecodeError
on the account connection of my Arlo Go. This has been working for months without any issue, and I haven't changed anything recently. Do you know where this might come from ?

It seems related to a <Response [403]> on the
r = self._session.post(
url, json=params, headers=headers, timeout=timeout
)

Here is the params :
{'email': 'a........', 'password': 'Q..........', 'language': 'en', 'EnvSource': 'prod'}

And headers I am using :
{'Accept': 'application/json, text/plain, /', 'Accept-Language': 'en-US,en;q=0.9', 'Origin': 'https://my.arlo.com', 'Referer': 'https://my.arlo.com/', 'Source': 'arloCamWeb', 'User-Agent': 'Mozilla/5.0 (iPhone; CPU iPhone OS 11_1_2 like Mac OS X) AppleWebKit/604.3.5 (KHTML, like Gecko) Mobile/15B202 NETGEAR/v1 (iOS Vuezone)'}

Thanks in advance.

@akjaouen
Copy link
Author

I am still working on it.

I have noticed twrecked changes on the mqtt calls notably in the headers keys. But even adapting text on this side, made no difference on the 403 error.

@twrecked
Copy link
Owner

If you can capture some logs I can take a look.

But if this is really early on try upgrading cloudscraper. he requirement are showing 1.2.58 but they are up to release 1.2.71.

@akjaouen
Copy link
Author

akjaouen commented May 13, 2023

Thank you for getting back to me.
I have just upgraded cloudscraper to 1.2.71 as mentioned, but it doesn't seem to make a difference.

Here are some logs :
log.txt

The 403 message appears with the following input :

URL:
https://ocapi-app.arlo.com/api/auth?eventId=FE!b741eca4-b333-4c75-9144-7316e0898871&time=1684005230685

HEADERS:
{'Accept': 'application/json, text/plain, */*', 'Accept-Encoding': 'gzip, deflate, br', 'Accept-Language': 'en-GB,en;q=0.9,en-US;q=0.8', 'Origin': 'https://my.arlo.com', 'Referer': 'https://my.arlo.com/', 'Source': 'arloCamWeb', 'User-Agent': 'Mozilla/5.0 (iPhone; CPU iPhone OS 11_1_2 like Mac OS X) AppleWebKit/604.3.5 (KHTML, like Gecko) Mobile/15B202 NETGEAR/v1 (iOS Vuezone)', 'x-user-device-id': '6HN72F8R-176-59088669', 'x-user-device-automation-name': 'QlJPV1NFUg==', 'x-user-device-type': 'BROWSER', 'x-transaction-id': 'FE!b741eca4-b333-4c75-9144-7316e0898871'}

@twrecked
Copy link
Owner

And you're on the latest version of pyaarlo? Because those were the errors I was seeing before I updated the headers.

@akjaouen
Copy link
Author

Yes lastest version :

(base) jaouen@jaouens-MBP pyaarlo % git log                                                         
commit 3eead47bc4d2d6ddb5e8e1386b0a05b9ffae938d (HEAD -> master, origin/master, origin/HEAD)
Author: Steve Herrell <[email protected]>
Date:   Wed May 10 07:30:17 2023 -0400

    Mqtt config (#119)
    
    * MQTT Config.
    
    Allow these items to be configured:
    - mqtt hostname
    - check hostname in SSL certificate
    - mqtt transport type.
    
    Fix changed header.

@akjaouen
Copy link
Author

akjaouen commented May 13, 2023

If that helps, when I connect with the my.arlo.com web interface, I get the following.
I guessed that it is on the "auth" call that it seems to block when I use Pyaarlo. But even trying to add other missing headers fields did not make a change.

Screenshot 2023-05-14 at 00 09 46

@twrecked
Copy link
Owner

They changed the name of one of the headers to ...automation-name, you can see it in the trace you sent, and you have that fix in the code.

2 things to try

Delete the season pickle files, one of them is named 'aarlo.pickle' and I can't remember the other but they are next to each other and try starting it again

Can you change your external IP address? It maybe thinks you made too many bad attempts and it has blocked you.

@njaouen
Copy link

njaouen commented May 18, 2023

Hi Steve,
I have tried all proposed solutions :

  • deleting both the session.pickle and aarlo.pickle files in .aarlo,
  • switching to a different IP address (even on a different computer and network),
  • mqtt_hostname_check=False (as you proposed in authentication error #121, since it seems to be exactly the same issue).

But I am still getting the same error, as mentionned in #121.

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

3 participants