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

can not log in #161

Open
seahearman opened this issue Sep 14, 2024 · 21 comments
Open

can not log in #161

seahearman opened this issue Sep 14, 2024 · 21 comments

Comments

@seahearman
Copy link

Hi, I am new to this, I have a floodlight camera and an essential spotlight camera. I don't have a base. so does pyaarlo support this?
when I simply try:

import pyaarlo
arlo = pyaarlo.PyArlo(username=username,password=password,
                       tfa_type='SMS',tfa_source='console',
                       synchronous_mode=True)

It throws me an error:

body-error=KeyError
body-error=KeyError
error in new response={'meta': {'code': 400, 'error': 9204, 'message': 'Browser is not trusted'}}
login failed: 2fa: no secondary choices available
@twrecked
Copy link
Owner

twrecked commented Oct 2, 2024

Sorry; I missed this. Did you get it working? I think you need to setup 2fa authentication for the account.

@twrecked
Copy link
Owner

The browser not trusted can be ignored, I've quietened it down in the new release.

I don't think you have 2FA set up. Or not configured correctly. Can you paste the command you are running - less the sensitive bits of course.

@seahearman
Copy link
Author

Thank you very much for your reply.
I am confused about setting up the 2FA.
Now I have:
[email protected] and password1 to login to my.arlo.com
to log in hotmail.com using [email protected], I have password1_5
then I have 2FA with [email protected] and also [email protected]
to log in Gmail using [email protected], I have password2
In the gmail app setting, I have set up an App called Arlo with password password3.
Would you please show me how to modify it accordingly?
ar = pyaarlo.PyArlo(username=USERNAME, password=PASSWORD, tfa_source='imap',tfa_type='email', tfa_host='imap.host.com:1234', tfa_username='your-user-name', tfa_password='your-imap-password' )

@twrecked
Copy link
Owner

What you had should work. But based on the examples you gave this should log in:

USERNAME="[email protected]"
PASSWORD="password1"
IHOST="imap-mail.outlook.com"
IUSERNAME="[email protected]"
IPASSWORD="password1_5"

arlo = pyaarlo.PyArlo(username=USERNAME, password=PASSWORD,
                      tfa_host=IHOST, tfa_username=IUSERNAME, tfa_password=IPASSWORD,
                      tfa_type='email', tfa_source='imap',
                      tfa_nickname=IUSERNAME,
                      dump=True, verbose_debug=True)

Worse case it should output some useful information.

@YpNo
Copy link
Contributor

YpNo commented Oct 13, 2024

Hi @twrecked,
Since your last updates I can't 2FA IMAP login as well :
Here my output :

2024-10-13 16:36:44,743 [DEBUG] pyaarlo: 2fa-imap: starting
2024-10-13 16:36:46,237 [DEBUG] pyaarlo: 2fa-imap: old-ids=[b'1 5 8 11 12 13 14']
2024-10-13 16:36:46,238 [DEBUG] pyaarlo: backend: starting auth with email
2024-10-13 16:36:46,289 [DEBUG] urllib3.connectionpool: https://ocapi-app.arlo.com:443 "OPTIONS /api/startAuth HTTP/11" 204 0
2024-10-13 16:36:46,290 [WARNING] pyaarlo: body-error=KeyError
2024-10-13 16:36:46,290 [DEBUG] pyaarlo: request-text=
2024-10-13 16:37:17,127 [DEBUG] urllib3.connectionpool: https://ocapi-app.arlo.com:443 "POST /api/startAuth HTTP/11" 200 None
2024-10-13 16:37:17,128 [WARNING] pyaarlo: error in new response={'meta': {'code': 400, 'error': 1990, 'message': 'Unknown error'}}
2024-10-13 16:37:17,128 [ERROR] pyaarlo: login failed: start failed: 400 - Unknown error
2024-10-13 16:37:17,129 [DEBUG] pyaarlo: backend: failed to log in
2024-10-13 16:37:17,130 [DEBUG] pyaarlo: media-downloader: not starting downloader
2024-10-13 16:37:17,152 [INFO] root: MQTT client connected to host.docker.internal
<it stucks here>

My current branch on my fork still works but it is behind your master branch : https://github.com/YpNo/pyaarlo/tree/fix/active_user_stream

Let me know if you want to drill down.
I can work on the "Browser is not trusted" displayed message in parallel (to be treadted as real browser)

@twrecked
Copy link
Owner

My branch should fix the "browser not trusted" error. It actually isn't an error but a response from Arlo telling you you need to log in. You get it using the chrome.

It's working here (obviously) and I can take a look later but if you can see if there are any obvious differences that would be great.

@seahearman
Copy link
Author

seahearman commented Oct 14, 2024

What you had should work. But based on the examples you gave this should log in:

USERNAME="[email protected]"
PASSWORD="password1"
IHOST="imap-mail.outlook.com"
IUSERNAME="[email protected]"
IPASSWORD="password1_5"

arlo = pyaarlo.PyArlo(username=USERNAME, password=PASSWORD,
                      tfa_host=IHOST, tfa_username=IUSERNAME, tfa_password=IPASSWORD,
                      tfa_type='email', tfa_source='imap',
                      tfa_nickname=IUSERNAME,
                      dump=True, verbose_debug=True)

Worse case it should output some useful information.

Hi, I now got the login failed error:

body-error=KeyError
body-error=KeyError
error in new response={'meta': {'code': 400, 'error': 9204, 'message': 'Browser is not trusted'}}
  26:08.52 > b'OCEE1 LOGIN [email protected] "password1_5"'
  26:10.08 < b'OCEE1 NO LOGIN failed.'
  26:10.08 NO response: b'LOGIN failed.'
imap connection failedb'LOGIN failed.'
login failed: 2fa: startup failed

@twrecked
Copy link
Owner

It logged into Arlo but the IMAP is failing. It looks like it connects to something but gets rejected;

Anything here help?

Do this need an app password? i.e, one you can use not from a browser?

@seahearman
Copy link
Author

I tried zoho mail, it seems to be able to login, but it also seems to be stuck, it just keeps searching. here is the log

38:43.64 < b'* CAPABILITY IMAP4rev1 UNSELECT CHILDREN XLIST NAMESPACE IDLE MOVE ID AUTH=PLAIN SASL-IR UIDPLUS ESEARCH LIST-EXTENDED LIST-STATUS WITHIN LITERAL- ACL CONDSTORE'
  38:43.64 < b'PBEN1 OK Success'
  38:43.64 > b'PBEN2 EXAMINE INBOX'
  38:43.74 < b'* 7 EXISTS'
  38:43.74 < b'* 4 RECENT'
  38:43.74 < b'* OK [UNSEEN 4]'
  38:43.74 < b'* OK [UIDVALIDITY 1] UIDs valid '
  38:43.74 < b'* OK [UIDNEXT 8] Predicted next UID '
  38:43.74 < b'* OK [HIGHESTMODSEQ 1000000000000000004]'
  38:43.74 < b'* FLAGS (\\Answered \\Flagged \\Deleted \\Seen \\Draft)'
  38:43.74 < b'* OK [PERMANENTFLAGS ()] No permanent flags permitted'
  38:43.74 < b'PBEN2 OK [READ-ONLY] EXAMINE completed'
  38:43.74 > b'PBEN3 SEARCH FROM [email protected]'
  38:43.84 < b'* SEARCH 3'
  38:43.84 < b'PBEN3 OK Success'
body-error=KeyError
  38:47.41 > b'PBEN4 CHECK'
  38:47.51 < b'* 8 EXISTS'
  38:47.51 < b'PBEN4 OK Success'
  38:47.51 > b'PBEN5 SEARCH FROM [email protected]'
  38:47.61 < b'* SEARCH 3'
  38:47.61 < b'PBEN5 OK Success'
  38:50.61 > b'PBEN6 CHECK'
  38:50.70 < b'PBEN6 OK Success'
  38:50.70 > b'PBEN7 SEARCH FROM [email protected]'
  38:50.79 < b'* SEARCH 3'
  38:50.79 < b'PBEN7 OK Success'

@YpNo
Copy link
Contributor

YpNo commented Oct 14, 2024

Everything works today on my side (with your master branch) ... It seems that Arlo's API sucked yesterday...

On my side I got Warning "errors" but it succeeded in login/auth.
I didn't get "Browser no trusted" as well :D (At the begining, I thought that it was introduced by "OPTIONS" calls but I tried to comment these calls without success).

2024-10-14 21:43:23,587 [DEBUG] pyaarlo: backend: looking for user_agent arlo
2024-10-14 21:43:23,587 [DEBUG] pyaarlo: backend: oldish session, getting a new one
2024-10-14 21:43:23,587 [DEBUG] pyaarlo: backend: CloudFlare curve set to: secp384r1
2024-10-14 21:43:23,592 [DEBUG] pyaarlo: backend: login attempt #1
2024-10-14 21:43:23,593 [DEBUG] urllib3.connectionpool: Starting new HTTPS connection (1): ocapi-app.arlo.com:443
2024-10-14 21:43:23,706 [DEBUG] urllib3.connectionpool: https://ocapi-app.arlo.com:443 "OPTIONS /api/auth HTTP/11" 204 0
2024-10-14 21:43:23,708 [WARNING] pyaarlo: body-error=KeyError
2024-10-14 21:43:23,708 [DEBUG] pyaarlo: request-text=
2024-10-14 21:43:23,869 [DEBUG] urllib3.connectionpool: https://ocapi-app.arlo.com:443 "POST /api/auth HTTP/11" 200 None
2024-10-14 21:43:23,871 [DEBUG] pyaarlo: backend: need 2FA...
2024-10-14 21:43:23,872 [DEBUG] pyaarlo: backend: getting tfa choices
2024-10-14 21:43:23,919 [DEBUG] urllib3.connectionpool: https://ocapi-app.arlo.com:443 "OPTIONS /api/getFactorId HTTP/11" 204 0
2024-10-14 21:43:23,920 [WARNING] pyaarlo: body-error=KeyError
2024-10-14 21:43:23,920 [DEBUG] pyaarlo: request-text=
2024-10-14 21:43:23,921 [DEBUG] pyaarlo: backend: looking for email/[email protected]
2024-10-14 21:43:24,057 [DEBUG] urllib3.connectionpool: https://ocapi-app.arlo.com:443 "POST /api/getFactorId HTTP/11" 200 None
2024-10-14 21:43:24,289 [DEBUG] urllib3.connectionpool: https://ocapi-app.arlo.com:443 "GET /api/getFactors?data%20=%201728935004 HTTP/11" 200 None
2024-10-14 21:43:24,291 [DEBUG] pyaarlo: 2fa-imap: starting
2024-10-14 21:43:26,060 [DEBUG] pyaarlo: 2fa-imap: old-ids=[b'1 5 8 11 12 13 14 15 16 17 18 19 20 21 23']
2024-10-14 21:43:26,060 [DEBUG] pyaarlo: backend: starting auth with email
2024-10-14 21:43:26,114 [DEBUG] urllib3.connectionpool: https://ocapi-app.arlo.com:443 "OPTIONS /api/startAuth HTTP/11" 204 0
2024-10-14 21:43:26,114 [WARNING] pyaarlo: body-error=KeyError
2024-10-14 21:43:26,114 [DEBUG] pyaarlo: request-text=
2024-10-14 21:43:26,374 [DEBUG] urllib3.connectionpool: https://ocapi-app.arlo.com:443 "POST /api/startAuth HTTP/11" 200 None
2024-10-14 21:43:26,376 [DEBUG] pyaarlo: 2fa-imap: checking
2024-10-14 21:43:29,707 [DEBUG] pyaarlo: 2fa-imap: new-ids=[b'1 5 8 11 12 13 14 15 16 17 18 19 20 21 23']
2024-10-14 21:43:29,707 [DEBUG] pyaarlo: 2fa-imap: no change in emails
2024-10-14 21:43:33,044 [DEBUG] pyaarlo: 2fa-imap: new-ids=[b'1 5 8 11 12 13 14 15 16 17 18 19 20 21 23 24']
2024-10-14 21:43:33,044 [DEBUG] pyaarlo: 2fa-imap: new-msg=b'24'
2024-10-14 21:43:33,520 [DEBUG] pyaarlo: 2fa-imap: code=707014
2024-10-14 21:43:33,520 [DEBUG] pyaarlo: 2fa-imap: stopping
2024-10-14 21:43:33,837 [DEBUG] pyaarlo: backend: finishing auth
2024-10-14 21:43:34,481 [DEBUG] urllib3.connectionpool: https://ocapi-app.arlo.com:443 "POST /api/finishAuth HTTP/11" 200 None
2024-10-14 21:43:34,636 [DEBUG] urllib3.connectionpool: https://ocapi-app.arlo.com:443 "GET /api/validateAccessToken?data%20=%201728935014 HTTP/11" 200 None

@seahearman, some email providers, like gmail, require to use "application auth" mecanism : A specific token/password used for application authentifcation (not by human). Could be your case ?

Regards.

@seahearman
Copy link
Author

Everything works today on my side (with your master branch) ... It seems that Arlo's API sucked yesterday...

On my side I got Warning "errors" but it succeeded in login/auth. I didn't get "Browser no trusted" as well :D (At the begining, I thought that it was introduced by "OPTIONS" calls but I tried to comment these calls without success).

2024-10-14 21:43:23,587 [DEBUG] pyaarlo: backend: looking for user_agent arlo
2024-10-14 21:43:23,587 [DEBUG] pyaarlo: backend: oldish session, getting a new one
2024-10-14 21:43:23,587 [DEBUG] pyaarlo: backend: CloudFlare curve set to: secp384r1
2024-10-14 21:43:23,592 [DEBUG] pyaarlo: backend: login attempt #1
2024-10-14 21:43:23,593 [DEBUG] urllib3.connectionpool: Starting new HTTPS connection (1): ocapi-app.arlo.com:443
2024-10-14 21:43:23,706 [DEBUG] urllib3.connectionpool: https://ocapi-app.arlo.com:443 "OPTIONS /api/auth HTTP/11" 204 0
2024-10-14 21:43:23,708 [WARNING] pyaarlo: body-error=KeyError
2024-10-14 21:43:23,708 [DEBUG] pyaarlo: request-text=
2024-10-14 21:43:23,869 [DEBUG] urllib3.connectionpool: https://ocapi-app.arlo.com:443 "POST /api/auth HTTP/11" 200 None
2024-10-14 21:43:23,871 [DEBUG] pyaarlo: backend: need 2FA...
2024-10-14 21:43:23,872 [DEBUG] pyaarlo: backend: getting tfa choices
2024-10-14 21:43:23,919 [DEBUG] urllib3.connectionpool: https://ocapi-app.arlo.com:443 "OPTIONS /api/getFactorId HTTP/11" 204 0
2024-10-14 21:43:23,920 [WARNING] pyaarlo: body-error=KeyError
2024-10-14 21:43:23,920 [DEBUG] pyaarlo: request-text=
2024-10-14 21:43:23,921 [DEBUG] pyaarlo: backend: looking for email/[email protected]
2024-10-14 21:43:24,057 [DEBUG] urllib3.connectionpool: https://ocapi-app.arlo.com:443 "POST /api/getFactorId HTTP/11" 200 None
2024-10-14 21:43:24,289 [DEBUG] urllib3.connectionpool: https://ocapi-app.arlo.com:443 "GET /api/getFactors?data%20=%201728935004 HTTP/11" 200 None
2024-10-14 21:43:24,291 [DEBUG] pyaarlo: 2fa-imap: starting
2024-10-14 21:43:26,060 [DEBUG] pyaarlo: 2fa-imap: old-ids=[b'1 5 8 11 12 13 14 15 16 17 18 19 20 21 23']
2024-10-14 21:43:26,060 [DEBUG] pyaarlo: backend: starting auth with email
2024-10-14 21:43:26,114 [DEBUG] urllib3.connectionpool: https://ocapi-app.arlo.com:443 "OPTIONS /api/startAuth HTTP/11" 204 0
2024-10-14 21:43:26,114 [WARNING] pyaarlo: body-error=KeyError
2024-10-14 21:43:26,114 [DEBUG] pyaarlo: request-text=
2024-10-14 21:43:26,374 [DEBUG] urllib3.connectionpool: https://ocapi-app.arlo.com:443 "POST /api/startAuth HTTP/11" 200 None
2024-10-14 21:43:26,376 [DEBUG] pyaarlo: 2fa-imap: checking
2024-10-14 21:43:29,707 [DEBUG] pyaarlo: 2fa-imap: new-ids=[b'1 5 8 11 12 13 14 15 16 17 18 19 20 21 23']
2024-10-14 21:43:29,707 [DEBUG] pyaarlo: 2fa-imap: no change in emails
2024-10-14 21:43:33,044 [DEBUG] pyaarlo: 2fa-imap: new-ids=[b'1 5 8 11 12 13 14 15 16 17 18 19 20 21 23 24']
2024-10-14 21:43:33,044 [DEBUG] pyaarlo: 2fa-imap: new-msg=b'24'
2024-10-14 21:43:33,520 [DEBUG] pyaarlo: 2fa-imap: code=707014
2024-10-14 21:43:33,520 [DEBUG] pyaarlo: 2fa-imap: stopping
2024-10-14 21:43:33,837 [DEBUG] pyaarlo: backend: finishing auth
2024-10-14 21:43:34,481 [DEBUG] urllib3.connectionpool: https://ocapi-app.arlo.com:443 "POST /api/finishAuth HTTP/11" 200 None
2024-10-14 21:43:34,636 [DEBUG] urllib3.connectionpool: https://ocapi-app.arlo.com:443 "GET /api/validateAccessToken?data%20=%201728935014 HTTP/11" 200 None

@seahearman, some email providers, like gmail, require to use "application auth" mecanism : A specific token/password used for application authentifcation (not by human). Could be your case ?

Regards.

Thank you for your reply.

I am now using zohomail as the email provider which support App password, with App password, I got this error:

body-error=KeyError
body-error=KeyError
error in new response={'meta': {'code': 400, 'error': 9204, 'message': 'Browser is not trusted'}}
  52:49.36 > b'INDD1 LOGIN [email protected] "App_password1"'
  52:49.51 < b'* CAPABILITY IMAP4rev1 UNSELECT CHILDREN XLIST NAMESPACE IDLE MOVE ID AUTH=PLAIN SASL-IR UIDPLUS ESEARCH LIST-EXTENDED LIST-STATUS WITHIN LITERAL- ACL CONDSTORE'
  52:49.51 < b'INDD1 OK Success'
  52:49.51 > b'INDD2 EXAMINE INBOX'
  52:49.63 < b'* 0 EXISTS'
  52:49.63 < b'* 0 RECENT'
  52:49.63 < b'* OK [UIDVALIDITY 1] UIDs valid '
  52:49.63 < b'* OK [UIDNEXT 10] Predicted next UID '
  52:49.63 < b'* OK [HIGHESTMODSEQ 1000000000000000006]'
  52:49.63 < b'* FLAGS (\\Answered \\Flagged \\Deleted \\Seen \\Draft)'
  52:49.63 < b'* OK [PERMANENTFLAGS ()] No permanent flags permitted'
  52:49.63 < b'INDD2 OK [READ-ONLY] EXAMINE completed'
  52:49.63 > b'INDD3 SEARCH FROM [email protected]'
  52:49.75 < b'* SEARCH '
  52:49.75 < b'INDD3 OK Success'
body-error=KeyError
  52:53.25 > b'INDD4 CHECK'
  52:53.53 < b'INDD4 OK Success'
  52:53.53 > b'INDD5 SEARCH FROM [email protected]'
  52:53.73 < b'* SEARCH '
  52:53.73 < b'INDD5 OK Success'
  52:56.74 > b'INDD6 CHECK'
  52:56.83 < b'INDD6 OK Success'
  52:56.83 > b'INDD7 SEARCH FROM [email protected]'
  52:56.95 < b'* SEARCH '
  52:56.95 < b'INDD7 OK Success'
  52:59.96 > b'INDD8 CHECK'
  53:00.19 < b'* 1 EXISTS'
  53:00.19 < b'INDD8 OK Success'
  53:00.19 > b'INDD9 SEARCH FROM [email protected]'
  53:00.30 < b'* SEARCH '
  53:00.30 < b'INDD9 OK Success'
  53:03.30 > b'INDD10 CHECK'
  53:03.59 < b'INDD10 OK Success'
  53:03.59 > b'INDD11 SEARCH FROM [email protected]'
  53:03.90 < b'* SEARCH '
  53:03.90 < b'INDD11 OK Success'
  53:06.91 > b'INDD12 CHECK'
  53:07.20 < b'INDD12 OK Success'
  53:07.20 > b'INDD13 SEARCH FROM [email protected]'
  53:07.49 < b'* SEARCH '
  53:07.49 < b'INDD13 OK Success'
  53:10.49 > b'INDD14 CHECK'
  53:10.76 < b'INDD14 OK Success'
  53:10.76 > b'INDD15 SEARCH FROM [email protected]'
  53:10.86 < b'* SEARCH '
  53:10.86 < b'INDD15 OK Success'
  53:13.87 > b'INDD16 CHECK'
  53:13.96 < b'INDD16 OK Success'
  53:13.96 > b'INDD17 SEARCH FROM [email protected]'
  53:14.06 < b'* SEARCH '
  53:14.06 < b'INDD17 OK Success'
  53:17.08 > b'INDD18 CHECK'
  53:17.31 < b'INDD18 OK Success'
  53:17.31 > b'INDD19 SEARCH FROM [email protected]'
  53:17.58 < b'* SEARCH '
  53:17.58 < b'INDD19 OK Success'
  53:20.58 > b'INDD20 CHECK'
  53:20.77 < b'INDD20 OK Success'
  53:20.77 > b'INDD21 SEARCH FROM [email protected]'
  53:20.97 < b'* SEARCH '
  53:20.97 < b'INDD21 OK Success'
  53:23.98 > b'INDD22 CHECK'
  53:24.23 < b'INDD22 OK Success'
  53:24.23 > b'INDD23 SEARCH FROM [email protected]'
  53:24.50 < b'* SEARCH '
  53:24.50 < b'INDD23 OK Success'
  53:27.52 > b'INDD24 CHECK'
  53:27.78 < b'INDD24 OK Success'
  53:27.78 > b'INDD25 SEARCH FROM [email protected]'
  53:28.07 < b'* SEARCH '
  53:28.07 < b'INDD25 OK Success'
  53:31.07 > b'INDD26 CHECK'
  53:31.16 < b'INDD26 OK Success'
  53:31.16 > b'INDD27 SEARCH FROM [email protected]'
  53:31.27 < b'* SEARCH '
  53:31.27 < b'INDD27 OK Success'
  53:34.28 > b'INDD28 CHECK'
  53:39.05 < b'INDD28 OK Success'
  53:39.05 > b'INDD29 SEARCH FROM [email protected]'
  53:39.36 < b'* SEARCH '
  53:39.36 < b'INDD29 OK Success'
  53:42.36 > b'INDD30 CHECK'
  53:42.66 < b'INDD30 OK Success'
  53:42.66 > b'INDD31 SEARCH FROM [email protected]'
  53:42.94 < b'* SEARCH '
  53:42.94 < b'INDD31 OK Success'
  53:45.94 > b'INDD32 CHECK'
  53:46.22 < b'INDD32 OK Success'
  53:46.22 > b'INDD33 SEARCH FROM [email protected]'
  53:46.52 < b'* SEARCH '
  53:46.52 < b'INDD33 OK Success'
  53:49.53 > b'INDD34 CHECK'
  53:49.83 < b'INDD34 OK Success'
  53:49.83 > b'INDD35 SEARCH FROM [email protected]'
  53:49.98 < b'* SEARCH '
  53:49.98 < b'INDD35 OK Success'
login failed: 2fa: code retrieval failed
login failed: 403 - possible cloudflare issue

If I use the zoho password, it directly throws me an error:

body-error=KeyError
body-error=KeyError
error in new response={'meta': {'code': 400, 'error': 9204, 'message': 'Browser is not trusted'}}
  04:52.87 > b'NFEF1 LOGIN [email protected] "zoho_login_password"'
  04:53.21 < b'NFEF1 NO [AUTHENTICATIONFAILED] Invalid credentials(Failure)'
imap connection failedb'[AUTHENTICATIONFAILED] Invalid credentials(Failure)'
login failed: 2fa: startup failed

@seahearman
Copy link
Author

the following naive code works, so I don't understand why it can not fetch the code.

import imaplib

IHOST="imap.zoho.com"
IUSERNAME="[email protected]"
IPASSWORD='App_password'

test_imap = imaplib.IMAP4_SSL(IHOST)
test_imap.login(IUSERNAME, IPASSWORD)
test_imap.select("INBOX")
res, new_ids = test_imap.search(None, "FROM", "[email protected]")
res, parts = test_imap.fetch(new_ids[0], "(BODY.PEEK[])")
print(parts[0][1])

@twrecked
Copy link
Owner

twrecked commented Oct 15, 2024

@seahearman can you paste in the traces with the pyaarlo debug? I'm only seeing the imap which isn't giving me the whole picture. It should work something like this:

  • we get call getFactors on arlo
  • we start the IMAP session and grab the current Arlo email IDs
  • we call startAuth on arlo
  • we wait for a new ID from Arlo and we get its code
  • we call finishAuth with the code.

In the mean time I'll double check the code here based on your traces.

edit: I get output like this:

  07:28.61 < b'* SEARCH 2605 2606 4031 4032 4033 4034 6446 6448 6616 6617 6618 6619 6620 6621 6622'
  07:28.61 < b'HAOP3 OK SEARCH completed (Success)'
2024-10-09 21:07:28,617 - pyaarlo - DEBUG - 2fa-imap: old-ids=[b'2605 2606 4031 4032 4033 4034 6446 6448 6616 6617 6618 6619 6620 6621 6622']

@seahearman
Copy link
Author

@seahearman can you paste in the traces with the pyaarlo debug? I'm only seeing the imap which isn't giving me the whole picture. It should work something like this:

  • we get call getFactors on arlo
  • we start the IMAP session and grab the current Arlo email IDs
  • we call startAuth on arlo
  • we wait for a new ID from Arlo and we get its code
  • we call finishAuth with the code.

In the mean time I'll double check the code here based on your traces.

edit: I get output like this:

  07:28.61 < b'* SEARCH 2605 2606 4031 4032 4033 4034 6446 6448 6616 6617 6618 6619 6620 6621 6622'
  07:28.61 < b'HAOP3 OK SEARCH completed (Success)'
2024-10-09 21:07:28,617 - pyaarlo - DEBUG - 2fa-imap: old-ids=[b'2605 2606 4031 4032 4033 4034 6446 6448 6616 6617 6618 6619 6620 6621 6622']

Hi, thank you again for your prompt reply! I really appreciate it. It may be a naive question, but how to paste the traces with the pyaarlo debug?

@seahearman
Copy link
Author

seahearman commented Oct 15, 2024

@seahearman can you paste in the traces with the pyaarlo debug? I'm only seeing the imap which isn't giving me the whole picture. It should work something like this:

  • we get call getFactors on arlo
  • we start the IMAP session and grab the current Arlo email IDs
  • we call startAuth on arlo
  • we wait for a new ID from Arlo and we get its code
  • we call finishAuth with the code.

In the mean time I'll double check the code here based on your traces.

edit: I get output like this:

  07:28.61 < b'* SEARCH 2605 2606 4031 4032 4033 4034 6446 6448 6616 6617 6618 6619 6620 6621 6622'
  07:28.61 < b'HAOP3 OK SEARCH completed (Success)'
2024-10-09 21:07:28,617 - pyaarlo - DEBUG - 2fa-imap: old-ids=[b'2605 2606 4031 4032 4033 4034 6446 6448 6616 6617 6618 6619 6620 6621 6622']

@twrecked thank you very much for looking into this. this is the code using verbose_debug=True

arlo = pyaarlo.PyArlo(username=USERNAME, password=PASSWORD,
                      tfa_host=IHOST, tfa_username=IUSERNAME, tfa_password=IPASSWORD,
                      tfa_type='email', tfa_source='imap',
                      tfa_nickname=IUSERNAME,
                      dump=True, verbose_debug=True)

Log:

body-error=KeyError
body-error=KeyError
error in new response={'meta': {'code': 400, 'error': 9204, 'message': 'Browser is not trusted'}}
  22:48.27 > b'CJDM1 LOGIN [email protected] "App_password"'
  22:48.44 < b'* CAPABILITY IMAP4rev1 UNSELECT CHILDREN XLIST NAMESPACE IDLE MOVE ID AUTH=PLAIN SASL-IR UIDPLUS ESEARCH LIST-EXTENDED LIST-STATUS WITHIN LITERAL- ACL CONDSTORE'
  22:48.44 < b'CJDM1 OK Success'
  22:48.44 > b'CJDM2 EXAMINE INBOX'
  22:48.53 < b'* 1 EXISTS'
  22:48.53 < b'* 1 RECENT'
  22:48.53 < b'* OK [UIDVALIDITY 1] UIDs valid '
  22:48.53 < b'* OK [UIDNEXT 13] Predicted next UID '
  22:48.53 < b'* OK [HIGHESTMODSEQ 1000000000000000011]'
  22:48.53 < b'* FLAGS (\\Answered \\Flagged \\Deleted \\Seen \\Draft)'
  22:48.53 < b'* OK [PERMANENTFLAGS ()] No permanent flags permitted'
  22:48.53 < b'CJDM2 OK [READ-ONLY] EXAMINE completed'
  22:48.53 > b'CJDM3 SEARCH FROM [email protected]'
  22:48.66 < b'* SEARCH 1'
  22:48.66 < b'CJDM3 OK Success'
body-error=KeyError
  22:52.23 > b'CJDM4 CHECK'
  22:52.34 < b'CJDM4 OK Success'
  22:52.34 > b'CJDM5 SEARCH FROM [email protected]'
  22:52.46 < b'* SEARCH 1'
  22:52.46 < b'CJDM5 OK Success'
  22:55.47 > b'CJDM6 CHECK'
  22:55.54 < b'CJDM6 OK Success'
  22:55.54 > b'CJDM7 SEARCH FROM [email protected]'
  22:55.63 < b'* SEARCH 1'
  22:55.64 < b'CJDM7 OK Success'
  22:58.66 > b'CJDM8 CHECK'
  22:58.79 < b'* 2 EXISTS'
  22:58.79 < b'CJDM8 OK Success'
  22:58.79 > b'CJDM9 SEARCH FROM [email protected]'
  22:58.88 < b'* SEARCH 1'
  22:58.88 < b'CJDM9 OK Success'
  23:01.88 > b'CJDM10 CHECK'
  23:01.94 < b'CJDM10 OK Success'
  23:01.94 > b'CJDM11 SEARCH FROM [email protected]'
  23:02.03 < b'* SEARCH 1'
  23:02.03 < b'CJDM11 OK Success'
  23:05.03 > b'CJDM12 CHECK'
  23:05.11 < b'CJDM12 OK Success'
  23:05.11 > b'CJDM13 SEARCH FROM [email protected]'
  23:05.19 < b'* SEARCH 1'
  23:05.19 < b'CJDM13 OK Success'
  23:08.19 > b'CJDM14 CHECK'
  23:08.28 < b'CJDM14 OK Success'
  23:08.28 > b'CJDM15 SEARCH FROM [email protected]'
  23:08.37 < b'* SEARCH 1'
  23:08.37 < b'CJDM15 OK Success'
  23:11.37 > b'CJDM16 CHECK'
  23:11.48 < b'CJDM16 OK Success'
  23:11.48 > b'CJDM17 SEARCH FROM [email protected]'
  23:11.57 < b'* SEARCH 1'
  23:11.57 < b'CJDM17 OK Success'
  23:14.57 > b'CJDM18 CHECK'
  23:14.64 < b'CJDM18 OK Success'
  23:14.64 > b'CJDM19 SEARCH FROM [email protected]'
  23:14.74 < b'* SEARCH 1'
  23:14.74 < b'CJDM19 OK Success'
  23:17.74 > b'CJDM20 CHECK'
  23:17.81 < b'CJDM20 OK Success'
  23:17.81 > b'CJDM21 SEARCH FROM [email protected]'
  23:17.89 < b'* SEARCH 1'
  23:17.89 < b'CJDM21 OK Success'
  23:20.91 > b'CJDM22 CHECK'
  23:20.98 < b'CJDM22 OK Success'
  23:20.98 > b'CJDM23 SEARCH FROM [email protected]'
  23:21.07 < b'* SEARCH 1'
  23:21.07 < b'CJDM23 OK Success'
  23:24.07 > b'CJDM24 CHECK'
  23:24.14 < b'CJDM24 OK Success'
  23:24.14 > b'CJDM25 SEARCH FROM [email protected]'
  23:24.23 < b'* SEARCH 1'
  23:24.23 < b'CJDM25 OK Success'
  23:27.24 > b'CJDM26 CHECK'
  23:27.31 < b'CJDM26 OK Success'
  23:27.31 > b'CJDM27 SEARCH FROM [email protected]'
  23:27.40 < b'* SEARCH 1'
  23:27.40 < b'CJDM27 OK Success'
  23:30.41 > b'CJDM28 CHECK'
  23:30.48 < b'CJDM28 OK Success'
  23:30.48 > b'CJDM29 SEARCH FROM [email protected]'
  23:30.58 < b'* SEARCH 1'
  23:30.58 < b'CJDM29 OK Success'
  23:33.58 > b'CJDM30 CHECK'
  23:33.65 < b'CJDM30 OK Success'
  23:33.65 > b'CJDM31 SEARCH FROM [email protected]'
  23:33.73 < b'* SEARCH 1'
  23:33.73 < b'CJDM31 OK Success'
  23:36.74 > b'CJDM32 CHECK'
  23:36.81 < b'CJDM32 OK Success'
  23:36.81 > b'CJDM33 SEARCH FROM [email protected]'
  23:36.90 < b'* SEARCH 1'
  23:36.90 < b'CJDM33 OK Success'
  23:39.91 > b'CJDM34 CHECK'
  23:39.98 < b'CJDM34 OK Success'
  23:39.98 > b'CJDM35 SEARCH FROM [email protected]'
  23:40.06 < b'* SEARCH 1'
  23:40.06 < b'CJDM35 OK Success'
  23:43.07 > b'CJDM36 CHECK'
  23:43.14 < b'CJDM36 OK Success'
  23:43.14 > b'CJDM37 SEARCH FROM [email protected]'
  23:43.23 < b'* SEARCH 1'
  23:43.23 < b'CJDM37 OK Success'
  23:46.24 > b'CJDM38 CHECK'
  23:46.31 < b'CJDM38 OK Success'
  23:46.31 > b'CJDM39 SEARCH FROM [email protected]'
  23:46.41 < b'* SEARCH 1'
  23:46.41 < b'CJDM39 OK Success'
login failed: 2fa: code retrieval failed
login failed: 403 - possible cloudflare issue


@twrecked
Copy link
Owner

I'm still not seeing the python debug. This is a small test script I sometimes use. It will write what python is doing to standard out.

#!/usr/bin/env python
#

import logging
import os
import sys
import time
import pprint

# set these from the environment to log in
USERNAME = os.environ.get('ARLO_USERNAME', '[email protected]')
PASSWORD = os.environ.get('ARLO_PASSWORD', 'test-password')
IHOST = os.environ.get('IMAP_HOST', 'imap.gmail.com')
IUSERNAME = os.environ.get('IMAP_USERNAME', '[email protected]')
IPASSWORD = os.environ.get('IMAP_PASSWORD', 'test-password')

# set up logging, change INFO to DEBUG for a *lot* more information
logging.basicConfig(level=logging.DEBUG,
                    format='%(asctime)s - %(name)s - %(levelname)s - %(message)s')
_LOGGER = logging.getLogger('pyaarlo')

# log in
arlo = pyaarlo.PyArlo(username=USERNAME, password=PASSWORD,
                      tfa_type='email', tfa_source='imap',
                      tfa_host=IHOST, tfa_username=IUSERNAME, tfa_password=IPASSWORD,
                      tfa_nickname=IUSERNAME,
                      synchronous_mode=True, save_session=True,  user_agent='linux',
                      save_state=True, dump=True, storage_dir='aarlo', verbose_debug=True,
                      send_source=False)
if not arlo.is_connected:
    print("failed to login({})".format(arlo._last_error))
    sys.exit(-1)

time.sleep(60)
arlo.stop()
time.sleep(2)

@seahearman
Copy link
Author

Hi @twrecked thanks again for your help. Here is the log using the code you provided:

'Dnt': '1',
 'Origin': 'https://my.arlo.com',
 'Pragma': 'no-cache',
 'Referer': 'https://my.arlo.com/',
 'User-Agent': 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, '
               'like Gecko) Chrome/114.0.0.0 Safari/537.36',
 'X-User-Device-Automation-Name': 'QlJPV1NFUg==',
 'X-User-Device-Id': 'a29cf189-8ba6-43b0-a352-77399ec4c1fe',
 'X-User-Device-Type': 'BROWSER'}
2024-10-16 13:38:56,115 - urllib3.connectionpool - DEBUG - https://ocapi-app.arlo.com:443 "OPTIONS /api/getFactorId HTTP/1.1" 204 0
2024-10-16 13:38:56,117 - pyaarlo - WARNING - body-error=KeyError
2024-10-16 13:38:56,118 - pyaarlo - DEBUG - request-text=
2024-10-16 13:38:56,123 - pyaarlo - DEBUG - backend: looking for email/[email protected]
2024-10-16 13:38:56,123 - pyaarlo - DEBUG - backend: request-url=https://ocapi-app.arlo.com/api/getFactorId
2024-10-16 13:38:56,123 - pyaarlo - DEBUG - backend: request-params=
{'factorData': '', 'factorType': 'BROWSER', 'userId': '73TFBY-100-65073058'}
2024-10-16 13:38:56,123 - pyaarlo - DEBUG - backend: request-headers=
{'Accept': 'application/json, text/plain, */*',
 'Accept-Encoding': 'gzip, deflate, br',
 'Accept-Language': 'en-GB,en;q=0.9,en-US;q=0.8',
 'Authorization': 'Ml9vVlNielRvRDdON19idDJ2d1hVM3phZTJkZjUwZzZRbklRSVBfNjZfem1qdmp4NkZZY2p5aU04cnNnTFdzYjM4WkZ4STEtUUl4Qmg3bk03VXVZZEllMUF1UGxua01tQ1BuV2ZOR2lNeHg1WFVlUjlRRGZwSjhNZXBBZ0R5UURIbGlXUW9xWGpOV3cxeGVKeHA0MkNzNjJYTXdRUnZ6UmR6NDBScXlNYXE3ZG1rS0tjUTdTTGUwbG1YcXlHYWoyQzVYYlQ4bzdxU1BONFZuVEJ5azdIUmphYnJtbWttcjhpZ1BIYk43Vnl1NGNqeFNod0lNX0JfWmUwVEtnZ2doOXk4NGpOZlp2YThhcEF5cnNDRUs5dFZDbU1VMXBzNWNQWE01RzJZYUtNUjYyTzd4cHR2TE45eG9lX0JZc1hYM1FsRTJuVjhnZ2ZydzRraFNrbWJJYTZoSTJS',
 'Cache-Control': 'no-cache',
 'Content-Type': 'application/json',
 'Dnt': '1',
 'Origin': 'https://my.arlo.com',
 'Pragma': 'no-cache',
 'Referer': 'https://my.arlo.com/',
 'User-Agent': 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, '
               'like Gecko) Chrome/114.0.0.0 Safari/537.36',
 'X-User-Device-Automation-Name': 'QlJPV1NFUg==',
 'X-User-Device-Id': 'a29cf189-8ba6-43b0-a352-77399ec4c1fe',
 'X-User-Device-Type': 'BROWSER'}
2024-10-16 13:38:56,310 - urllib3.connectionpool - DEBUG - https://ocapi-app.arlo.com:443 "POST /api/getFactorId HTTP/1.1" 200 None
2024-10-16 13:38:56,313 - pyaarlo - DEBUG - backend: request-body=
{'meta': {'code': 400, 'error': 9204, 'message': 'Browser is not trusted'}}
2024-10-16 13:38:56,313 - pyaarlo - DEBUG - backend: request-end=200
2024-10-16 13:38:56,314 - pyaarlo - WARNING - error in new response={'meta': {'code': 400, 'error': 9204, 'message': 'Browser is not trusted'}}
2024-10-16 13:38:56,314 - pyaarlo - DEBUG - backend: request-url=https://ocapi-app.arlo.com/api/getFactors?data = 1729100336
2024-10-16 13:38:56,315 - pyaarlo - DEBUG - backend: request-params=
{}
2024-10-16 13:38:56,316 - pyaarlo - DEBUG - backend: request-headers=
{'Accept': 'application/json, text/plain, */*',
 'Accept-Encoding': 'gzip, deflate, br',
 'Accept-Language': 'en-GB,en;q=0.9,en-US;q=0.8',
 'Authorization': 'Ml9vVlNielRvRDdON19idDJ2d1hVM3phZTJkZjUwZzZRbklRSVBfNjZfem1qdmp4NkZZY2p5aU04cnNnTFdzYjM4WkZ4STEtUUl4Qmg3bk03VXVZZEllMUF1UGxua01tQ1BuV2ZOR2lNeHg1WFVlUjlRRGZwSjhNZXBBZ0R5UURIbGlXUW9xWGpOV3cxeGVKeHA0MkNzNjJYTXdRUnZ6UmR6NDBScXlNYXE3ZG1rS0tjUTdTTGUwbG1YcXlHYWoyQzVYYlQ4bzdxU1BONFZuVEJ5azdIUmphYnJtbWttcjhpZ1BIYk43Vnl1NGNqeFNod0lNX0JfWmUwVEtnZ2doOXk4NGpOZlp2YThhcEF5cnNDRUs5dFZDbU1VMXBzNWNQWE01RzJZYUtNUjYyTzd4cHR2TE45eG9lX0JZc1hYM1FsRTJuVjhnZ2ZydzRraFNrbWJJYTZoSTJS',
 'Cache-Control': 'no-cache',
 'Content-Type': 'application/json',
 'Dnt': '1',
 'Origin': 'https://my.arlo.com',
 'Pragma': 'no-cache',
 'Referer': 'https://my.arlo.com/',
 'User-Agent': 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, '
               'like Gecko) Chrome/114.0.0.0 Safari/537.36',
 'X-User-Device-Automation-Name': 'QlJPV1NFUg==',
 'X-User-Device-Id': 'a29cf189-8ba6-43b0-a352-77399ec4c1fe',
 'X-User-Device-Type': 'BROWSER'}
2024-10-16 13:38:56,601 - urllib3.connectionpool - DEBUG - https://ocapi-app.arlo.com:443 "GET /api/getFactors?data%20=%201729100336 HTTP/1.1" 200 None
2024-10-16 13:38:56,605 - pyaarlo - DEBUG - backend: request-body=
{'data': {'MFA_Config': {'timeout': {'EMAIL': 300, 'PUSH': 120, 'SMS': 300}},
          'MFA_State': 'ENABLED',
          '_type': '_Collection',
          'items': [{'_type': 'SecondFactor',
                     'applicationId': 'df206692-d224-46d1-b851-d6a6957ab270',
                     'displayName': '[email protected]',
                     'factorId': 'UGluZ09uZVNESzpFTUFJTDozMTdjMTUzNi0zMTQ1LTQ2MzAtYWM1YS0xYjFkZjQwMjI1MjQ6Yjc5NTBhMTYtYTRiOC00YjJhLTlhZWMtZTNlZjcwNzI3YWJh',        
                     'factorNickname': '[email protected]',
                     'factorRole': 'PRIMARY',
                     'factorType': 'EMAIL'},
                    {'_type': 'SecondFactor',
                     'applicationId': 'df206692-d224-46d1-b851-d6a6957ab270',
                     'displayName': '[email protected]',
                     'factorId': 'UGluZ09uZVNESzpFTUFJTDo5MGY5NDIwOS1iZjRlLTQ0MjgtOTM3My1kNWVjYTU2M2E2ZTk6Yjc5NTBhMTYtYTRiOC00YjJhLTlhZWMtZTNlZjcwNzI3YWJh',        
                     'factorNickname': '[email protected]',
                     'factorRole': 'SECONDARY',
                     'factorType': 'EMAIL'},
                    {'_type': 'SecondFactor',
                     'applicationId': 'df206692-d224-46d1-b851-d6a6957ab270',
                     'displayName': '[email protected]',
                     'factorId': 'UGluZ09uZVNESzpFTUFJTDo0NmIzNTEyOC02MWU5LTQ2Y2ItYTk0Ny1jMzA1YzQyODU3NGY6Yjc5NTBhMTYtYTRiOC00YjJhLTlhZWMtZTNlZjcwNzI3YWJh',        
                     'factorNickname': '[email protected]',
                     'factorRole': 'SECONDARY',
                     'factorType': 'EMAIL'}]},
 'meta': {'code': 200}}
2024-10-16 13:38:56,609 - pyaarlo - DEBUG - backend: request-end=200
2024-10-16 13:38:56,610 - pyaarlo - DEBUG - 2fa-imap: starting
  38:56.95 > b'JACA1 LOGIN [email protected] "App_password"'
  38:57.05 < b'* CAPABILITY IMAP4rev1 UNSELECT CHILDREN XLIST NAMESPACE IDLE MOVE ID AUTH=PLAIN SASL-IR UIDPLUS ESEARCH LIST-EXTENDED LIST-STATUS WITHIN LITERAL- ACL CONDSTORE'
  38:57.05 < b'JACA1 OK Success'
  38:57.05 > b'JACA2 EXAMINE INBOX'
  38:57.17 < b'* 7 EXISTS'
  38:57.17 < b'* 7 RECENT'
  38:57.17 < b'* OK [UNSEEN 1]'
  38:57.17 < b'* OK [UIDVALIDITY 1] UIDs valid '
  38:57.17 < b'* OK [UIDNEXT 19] Predicted next UID '
  38:57.17 < b'* OK [HIGHESTMODSEQ 1000000000000000017]'
  38:57.18 < b'* FLAGS (\\Answered \\Flagged \\Deleted \\Seen \\Draft)'
  38:57.18 < b'* OK [PERMANENTFLAGS ()] No permanent flags permitted'
  38:57.18 < b'JACA2 OK [READ-ONLY] EXAMINE completed'
  38:57.18 > b'JACA3 SEARCH FROM [email protected]'
  38:57.28 < b'* SEARCH 6 7'
  38:57.28 < b'JACA3 OK Success'
2024-10-16 13:38:57,288 - pyaarlo - DEBUG - 2fa-imap: old-ids=[b'6 7']
2024-10-16 13:38:57,289 - pyaarlo - DEBUG - backend: starting auth with email
2024-10-16 13:38:57,289 - pyaarlo - DEBUG - backend: request-url=https://ocapi-app.arlo.com/api/startAuth
2024-10-16 13:38:57,290 - pyaarlo - DEBUG - backend: request-params=
{}
2024-10-16 13:38:57,291 - pyaarlo - DEBUG - backend: request-headers=
{'Accept': 'application/json, text/plain, */*',
 'Accept-Encoding': 'gzip, deflate, br',
 'Accept-Language': 'en-GB,en;q=0.9,en-US;q=0.8',
 'Authorization': 'Ml9vVlNielRvRDdON19idDJ2d1hVM3phZTJkZjUwZzZRbklRSVBfNjZfem1qdmp4NkZZY2p5aU04cnNnTFdzYjM4WkZ4STEtUUl4Qmg3bk03VXVZZEllMUF1UGxua01tQ1BuV2ZOR2lNeHg1WFVlUjlRRGZwSjhNZXBBZ0R5UURIbGlXUW9xWGpOV3cxeGVKeHA0MkNzNjJYTXdRUnZ6UmR6NDBScXlNYXE3ZG1rS0tjUTdTTGUwbG1YcXlHYWoyQzVYYlQ4bzdxU1BONFZuVEJ5azdIUmphYnJtbWttcjhpZ1BIYk43Vnl1NGNqeFNod0lNX0JfWmUwVEtnZ2doOXk4NGpOZlp2YThhcEF5cnNDRUs5dFZDbU1VMXBzNWNQWE01RzJZYUtNUjYyTzd4cHR2TE45eG9lX0JZc1hYM1FsRTJuVjhnZ2ZydzRraFNrbWJJYTZoSTJS',
 'Cache-Control': 'no-cache',
 'Content-Type': 'application/json',
 'Dnt': '1',
 'Origin': 'https://my.arlo.com',
 'Pragma': 'no-cache',
 'Referer': 'https://my.arlo.com/',
 'User-Agent': 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, '
               'like Gecko) Chrome/114.0.0.0 Safari/537.36',
 'X-User-Device-Automation-Name': 'QlJPV1NFUg==',
 'X-User-Device-Id': 'a29cf189-8ba6-43b0-a352-77399ec4c1fe',
 'X-User-Device-Type': 'BROWSER'}
2024-10-16 13:38:57,435 - urllib3.connectionpool - DEBUG - https://ocapi-app.arlo.com:443 "OPTIONS /api/startAuth HTTP/1.1" 204 0
2024-10-16 13:38:57,438 - pyaarlo - WARNING - body-error=KeyError
2024-10-16 13:38:57,439 - pyaarlo - DEBUG - request-text=
2024-10-16 13:38:57,439 - pyaarlo - DEBUG - backend: request-url=https://ocapi-app.arlo.com/api/startAuth
2024-10-16 13:38:57,440 - pyaarlo - DEBUG - backend: request-params=
{'factorId': 'UGluZ09uZVNESzpFTUFJTDozMTdjMTUzNi0zMTQ1LTQ2MzAtYWM1YS0xYjFkZjQwMjI1MjQ6Yjc5NTBhMTYtYTRiOC00YjJhLTlhZWMtZTNlZjcwNzI3YWJh',
 'factorType': 'BROWSER',
 'userId': '73TFBY-100-65073058'}
2024-10-16 13:38:57,441 - pyaarlo - DEBUG - backend: request-headers=
{'Accept': 'application/json, text/plain, */*',
 'Accept-Encoding': 'gzip, deflate, br',
 'Accept-Language': 'en-GB,en;q=0.9,en-US;q=0.8',
 'Authorization': 'Ml9vVlNielRvRDdON19idDJ2d1hVM3phZTJkZjUwZzZRbklRSVBfNjZfem1qdmp4NkZZY2p5aU04cnNnTFdzYjM4WkZ4STEtUUl4Qmg3bk03VXVZZEllMUF1UGxua01tQ1BuV2ZOR2lNeHg1WFVlUjlRRGZwSjhNZXBBZ0R5UURIbGlXUW9xWGpOV3cxeGVKeHA0MkNzNjJYTXdRUnZ6UmR6NDBScXlNYXE3ZG1rS0tjUTdTTGUwbG1YcXlHYWoyQzVYYlQ4bzdxU1BONFZuVEJ5azdIUmphYnJtbWttcjhpZ1BIYk43Vnl1NGNqeFNod0lNX0JfWmUwVEtnZ2doOXk4NGpOZlp2YThhcEF5cnNDRUs5dFZDbU1VMXBzNWNQWE01RzJZYUtNUjYyTzd4cHR2TE45eG9lX0JZc1hYM1FsRTJuVjhnZ2ZydzRraFNrbWJJYTZoSTJS',
 'Cache-Control': 'no-cache',
 'Content-Type': 'application/json',
 'Dnt': '1',
 'Origin': 'https://my.arlo.com',
 'Pragma': 'no-cache',
 'Referer': 'https://my.arlo.com/',
 'User-Agent': 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, '
               'like Gecko) Chrome/114.0.0.0 Safari/537.36',
 'X-User-Device-Automation-Name': 'QlJPV1NFUg==',
 'X-User-Device-Id': 'a29cf189-8ba6-43b0-a352-77399ec4c1fe',
 'X-User-Device-Type': 'BROWSER'}
2024-10-16 13:38:57,754 - urllib3.connectionpool - DEBUG - https://ocapi-app.arlo.com:443 "POST /api/startAuth HTTP/1.1" 200 None
2024-10-16 13:38:57,757 - pyaarlo - DEBUG - backend: request-body=
{'data': {'MFA_Config': {'timeout': {'EMAIL': 300, 'PUSH': 120, 'SMS': 300}},
          'MFA_State': 'ENABLED',
          '_type': 'MultiFactorAuthCode',
          'factorAuthCode': 'UGluZ09uZVNESzpFTUFJTDowZjY3NmMwMy0yNjE4LTQwNzMtOGM2MC0yNjQ1OTQxNjcyMDA6Yjc5NTBhMTYtYTRiOC00YjJhLTlhZWMtZTNlZjcwNzI3YWJh'},
 'meta': {'code': 200}}
2024-10-16 13:38:57,758 - pyaarlo - DEBUG - backend: request-end=200
2024-10-16 13:38:57,759 - pyaarlo - DEBUG - 2fa-imap: checking
2024-10-16 13:39:57,760 - pyaarlo - ERROR - login failed: 2fa: code retrieval failed
2024-10-16 13:39:57,762 - pyaarlo - DEBUG - backend: login failed, trying another ecdh_curve
2024-10-16 13:39:57,763 - pyaarlo - DEBUG - backend: CloudFlare curve set to: prime256v1
2024-10-16 13:39:57,797 - pyaarlo - DEBUG - backend: login attempt #1
2024-10-16 13:39:57,798 - pyaarlo - DEBUG - backend: request-url=https://ocapi-app.arlo.com/api/auth
2024-10-16 13:39:57,798 - pyaarlo - DEBUG - backend: request-params=
{}
2024-10-16 13:39:57,799 - pyaarlo - DEBUG - backend: request-headers=
{'Accept': 'application/json, text/plain, */*',
 'Accept-Encoding': 'gzip, deflate, br',
 'Accept-Language': 'en-GB,en;q=0.9,en-US;q=0.8',
 'Cache-Control': 'no-cache',
 'Content-Type': 'application/json',
 'Dnt': '1',
 'Origin': 'https://my.arlo.com',
 'Pragma': 'no-cache',
 'Referer': 'https://my.arlo.com/',
 'User-Agent': 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, '
               'like Gecko) Chrome/114.0.0.0 Safari/537.36',
 'X-User-Device-Automation-Name': 'QlJPV1NFUg==',
 'X-User-Device-Id': 'a29cf189-8ba6-43b0-a352-77399ec4c1fe',
 'X-User-Device-Type': 'BROWSER'}
2024-10-16 13:39:57,802 - urllib3.connectionpool - DEBUG - Starting new HTTPS connection (1): ocapi-app.arlo.com:443
2024-10-16 13:39:57,889 - urllib3.connectionpool - DEBUG - https://ocapi-app.arlo.com:443 "OPTIONS /api/auth HTTP/1.1" 403 None
2024-10-16 13:39:57,893 - pyaarlo - DEBUG - backend: request-body=
('<!DOCTYPE html>\n'
 '<!--[if lt IE 7]> <html class="no-js ie6 oldie" lang="en-US"> <![endif]-->\n'
 '<!--[if IE 7]>    <html class="no-js ie7 oldie" lang="en-US"> <![endif]-->\n'
 '<!--[if IE 8]>    <html class="no-js ie8 oldie" lang="en-US"> <![endif]-->\n'
 '<!--[if gt IE 8]><!--> <html class="no-js" lang="en-US"> <!--<![endif]-->\n'
 '<head>\n'
 '<title>Attention Required! | Cloudflare</title>\n'
 '<meta charset="UTF-8" />\n'
 '<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />\n'
 '<meta http-equiv="X-UA-Compatible" content="IE=Edge" />\n'
 '<meta name="robots" content="noindex, nofollow" />\n'
 '<meta name="viewport" content="width=device-width,initial-scale=1" />\n'
 '<link rel="stylesheet" id="cf_styles-css" '
 'href="/cdn-cgi/styles/cf.errors.css" />\n'
 '<!--[if lt IE 9]><link rel="stylesheet" id=\'cf_styles-ie-css\' '
 'href="/cdn-cgi/styles/cf.errors.ie.css" /><![endif]-->\n'
 '<style>body{margin:0;padding:0}</style>\n'
 '\n'
 '\n'
 '<!--[if gte IE 10]><!-->\n'
 '<script>\n'
 '  if (!navigator.cookieEnabled) {\n'
 "    window.addEventListener('DOMContentLoaded', function () {\n"
 "      var cookieEl = document.getElementById('cookie-alert');\n"
 "      cookieEl.style.display = 'block';\n"
 '    })\n'
 '  }\n'
 '</script>\n'
 '<!--<![endif]-->\n'
 '\n'
 '\n'
 '</head>\n'
 '<body>\n'
 '  <div id="cf-wrapper">\n'
 '    <div class="cf-alert cf-alert-error cf-cookie-error" id="cookie-alert" '
 'data-translate="enable_cookies">Please enable cookies.</div>\n'
 '    <div id="cf-error-details" class="cf-error-details-wrapper">\n'
 '      <div class="cf-wrapper cf-header cf-error-overview">\n'
 '        <h1 data-translate="block_headline">Sorry, you have been '
 'blocked</h1>\n'
 '        <h2 class="cf-subheadline"><span '
 'data-translate="unable_to_access">You are unable to access</span> '
 'ocapi-app.arlo.com</h2>\n'
 '      </div><!-- /.header -->\n'
 '\n'
 '      <div class="cf-section cf-highlight">\n'
 '        <div class="cf-wrapper">\n'
 '          <div class="cf-screenshot-container cf-screenshot-full">\n'
 '            \n'
 '              <span class="cf-no-screenshot error"></span>\n'
 '            \n'
 '          </div>\n'
 '        </div>\n'
 '      </div><!-- /.captcha-container -->\n'
 '\n'
 '      <div class="cf-section cf-wrapper">\n'
 '        <div class="cf-columns two">\n'
 '          <div class="cf-column">\n'
 '            <h2 data-translate="blocked_why_headline">Why have I been '
 'blocked?</h2>\n'
 '\n'
 '            <p data-translate="blocked_why_detail">This website is using a '
 'security service to protect itself from online attacks. The action you just '
 'performed triggered the security solution. There are several actions that '
 'could trigger this block including submitting a certain word or phrase, a '
 'SQL command or malformed data.</p>\n'
 '          </div>\n'
 '\n'
 '          <div class="cf-column">\n'
 '            <h2 data-translate="blocked_resolve_headline">What can I do to '
 'resolve this?</h2>\n'
 '\n'
 '            <p data-translate="blocked_resolve_detail">You can email the '
 'site owner to let them know you were blocked. Please include what you were '
 'doing when this page came up and the Cloudflare Ray ID found at the bottom '
 'of this page.</p>\n'
 '          </div>\n'
 '        </div>\n'
 '      </div><!-- /.section -->\n'
 '\n'
 '      <div class="cf-error-footer cf-wrapper w-240 lg:w-full py-10 sm:py-4 '
 'sm:px-8 mx-auto text-center sm:text-left border-solid border-0 border-t '
 'border-gray-300">\n'
 '  <p class="text-13">\n'
 '    <span class="cf-footer-item sm:block sm:mb-1">Cloudflare Ray ID: <strong '
 'class="font-semibold">8d39d4cc2c27595c</strong></span>\n'
 '    <span class="cf-footer-separator sm:hidden">&bull;</span>\n'
 '    <span id="cf-footer-item-ip" class="cf-footer-item hidden sm:block '
 'sm:mb-1">\n'
 '      Your IP:\n'
 '      <button type="button" id="cf-footer-ip-reveal" '
 'class="cf-footer-ip-reveal-btn">Click to reveal</button>\n'
 '      <span class="hidden" id="cf-footer-ip">136.54.186.240</span>\n'
 '      <span class="cf-footer-separator sm:hidden">&bull;</span>\n'
 '    </span>\n'
 '    <span class="cf-footer-item sm:block sm:mb-1"><span>Performance &amp; '
 'security by</span> <a rel="noopener noreferrer" '
 'href="https://www.cloudflare.com/5xx-error-landing" id="brand_link" '
 'target="_blank">Cloudflare</a></span>\n'
 '    \n'
 '  </p>\n'
 '  <script>(function(){function d(){var '
 'b=a.getElementById("cf-footer-item-ip"),c=a.getElementById("cf-footer-ip-reveal");b&&"classList"in '
 'b&&(b.classList.remove("hidden"),c.addEventListener("click",function(){c.classList.add("hidden");a.getElementById("cf-footer-ip").classList.remove("hidden")}))}var '
 'a=document;document.addEventListener&&a.addEventListener("DOMContentLoaded",d)})();</script>\n'
 '</div><!-- /.error-footer -->\n'
 '\n'
 '\n'
 '    </div><!-- /#cf-error-details -->\n'
 '  </div><!-- /#cf-wrapper -->\n'
 '\n'
 '  <script>\n'
 '  window._cf_translation = {};\n'
 '  \n'
 '  \n'
 '</script>\n'
 '\n'
 '</body>\n'
 '</html>\n')
2024-10-16 13:39:57,907 - pyaarlo - DEBUG - backend: request-end=403
2024-10-16 13:39:57,914 - pyaarlo - DEBUG - backend: request-url=https://ocapi-app.arlo.com/api/auth
2024-10-16 13:39:57,915 - pyaarlo - DEBUG - backend: request-params=
{'EnvSource': 'prod',
 'email': '[email protected]',
 'language': 'en',
 'password': 'd29zaGlXeDU0Njg3ODc5'}
2024-10-16 13:39:57,915 - pyaarlo - DEBUG - backend: request-headers=
{'Accept': 'application/json, text/plain, */*',
 'Accept-Encoding': 'gzip, deflate, br',
 'Accept-Language': 'en-GB,en;q=0.9,en-US;q=0.8',
 'Cache-Control': 'no-cache',
 'Content-Type': 'application/json',
 'Dnt': '1',
 'Origin': 'https://my.arlo.com',
 'Pragma': 'no-cache',
 'Referer': 'https://my.arlo.com/',
 'User-Agent': 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, '
               'like Gecko) Chrome/114.0.0.0 Safari/537.36',
 'X-User-Device-Automation-Name': 'QlJPV1NFUg==',
 'X-User-Device-Id': 'a29cf189-8ba6-43b0-a352-77399ec4c1fe',
 'X-User-Device-Type': 'BROWSER'}
2024-10-16 13:39:57,940 - urllib3.connectionpool - DEBUG - https://ocapi-app.arlo.com:443 "POST /api/auth HTTP/1.1" 403 None
2024-10-16 13:39:57,942 - pyaarlo - DEBUG - backend: request-body=
('<!DOCTYPE html>\n'
 '<!--[if lt IE 7]> <html class="no-js ie6 oldie" lang="en-US"> <![endif]-->\n'
 '<!--[if IE 7]>    <html class="no-js ie7 oldie" lang="en-US"> <![endif]-->\n'
 '<!--[if IE 8]>    <html class="no-js ie8 oldie" lang="en-US"> <![endif]-->\n'
 '<!--[if gt IE 8]><!--> <html class="no-js" lang="en-US"> <!--<![endif]-->\n'
 '<head>\n'
 '<title>Attention Required! | Cloudflare</title>\n'
 '<meta charset="UTF-8" />\n'
 '<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />\n'
 '<meta http-equiv="X-UA-Compatible" content="IE=Edge" />\n'
 '<meta name="robots" content="noindex, nofollow" />\n'
 '<meta name="viewport" content="width=device-width,initial-scale=1" />\n'
 '<link rel="stylesheet" id="cf_styles-css" '
 'href="/cdn-cgi/styles/cf.errors.css" />\n'
 '<!--[if lt IE 9]><link rel="stylesheet" id=\'cf_styles-ie-css\' '
 'href="/cdn-cgi/styles/cf.errors.ie.css" /><![endif]-->\n'
 '<style>body{margin:0;padding:0}</style>\n'
 '\n'
 '\n'
 '<!--[if gte IE 10]><!-->\n'
 '<script>\n'
 '  if (!navigator.cookieEnabled) {\n'
 "    window.addEventListener('DOMContentLoaded', function () {\n"
 "      var cookieEl = document.getElementById('cookie-alert');\n"
 "      cookieEl.style.display = 'block';\n"
 '    })\n'
 '  }\n'
 '</script>\n'
 '<!--<![endif]-->\n'
 '\n'
 '\n'
 '</head>\n'
 '<body>\n'
 '  <div id="cf-wrapper">\n'
 '    <div class="cf-alert cf-alert-error cf-cookie-error" id="cookie-alert" '
 'data-translate="enable_cookies">Please enable cookies.</div>\n'
 '    <div id="cf-error-details" class="cf-error-details-wrapper">\n'
 '      <div class="cf-wrapper cf-header cf-error-overview">\n'
 '        <h1 data-translate="block_headline">Sorry, you have been '
 'blocked</h1>\n'
 '        <h2 class="cf-subheadline"><span '
 'data-translate="unable_to_access">You are unable to access</span> '
 'ocapi-app.arlo.com</h2>\n'
 '      </div><!-- /.header -->\n'
 '\n'
 '      <div class="cf-section cf-highlight">\n'
 '        <div class="cf-wrapper">\n'
 '          <div class="cf-screenshot-container cf-screenshot-full">\n'
 '            \n'
 '              <span class="cf-no-screenshot error"></span>\n'
 '            \n'
 '          </div>\n'
 '        </div>\n'
 '      </div><!-- /.captcha-container -->\n'
 '\n'
 '      <div class="cf-section cf-wrapper">\n'
 '        <div class="cf-columns two">\n'
 '          <div class="cf-column">\n'
 '            <h2 data-translate="blocked_why_headline">Why have I been '
 'blocked?</h2>\n'
 '\n'
 '            <p data-translate="blocked_why_detail">This website is using a '
 'security service to protect itself from online attacks. The action you just '
 'performed triggered the security solution. There are several actions that '
 'could trigger this block including submitting a certain word or phrase, a '
 'SQL command or malformed data.</p>\n'
 '          </div>\n'
 '\n'
 '          <div class="cf-column">\n'
 '            <h2 data-translate="blocked_resolve_headline">What can I do to '
 'resolve this?</h2>\n'
 '\n'
 '            <p data-translate="blocked_resolve_detail">You can email the '
 'site owner to let them know you were blocked. Please include what you were '
 'doing when this page came up and the Cloudflare Ray ID found at the bottom '
 'of this page.</p>\n'
 '          </div>\n'
 '        </div>\n'
 '      </div><!-- /.section -->\n'
 '\n'
 '      <div class="cf-error-footer cf-wrapper w-240 lg:w-full py-10 sm:py-4 '
 'sm:px-8 mx-auto text-center sm:text-left border-solid border-0 border-t '
 'border-gray-300">\n'
 '  <p class="text-13">\n'
 '    <span class="cf-footer-item sm:block sm:mb-1">Cloudflare Ray ID: <strong '
 'class="font-semibold">8d39d4cc9c9d595c</strong></span>\n'
 '    <span class="cf-footer-separator sm:hidden">&bull;</span>\n'
 '    <span id="cf-footer-item-ip" class="cf-footer-item hidden sm:block '
 'sm:mb-1">\n'
 '      Your IP:\n'
 '      <button type="button" id="cf-footer-ip-reveal" '
 'class="cf-footer-ip-reveal-btn">Click to reveal</button>\n'
 '      <span class="hidden" id="cf-footer-ip">136.54.186.240</span>\n'
 '      <span class="cf-footer-separator sm:hidden">&bull;</span>\n'
 '    </span>\n'
 '    <span class="cf-footer-item sm:block sm:mb-1"><span>Performance &amp; '
 'security by</span> <a rel="noopener noreferrer" '
 'href="https://www.cloudflare.com/5xx-error-landing" id="brand_link" '
 'target="_blank">Cloudflare</a></span>\n'
 '    \n'
 '  </p>\n'
 '  <script>(function(){function d(){var '
 'b=a.getElementById("cf-footer-item-ip"),c=a.getElementById("cf-footer-ip-reveal");b&&"classList"in '
 'b&&(b.classList.remove("hidden"),c.addEventListener("click",function(){c.classList.add("hidden");a.getElementById("cf-footer-ip").classList.remove("hidden")}))}var '
 'a=document;document.addEventListener&&a.addEventListener("DOMContentLoaded",d)})();</script>\n'
 '</div><!-- /.error-footer -->\n'
 '\n'
 '\n'
 '    </div><!-- /#cf-error-details -->\n'
 '  </div><!-- /#cf-wrapper -->\n'
 '\n'
 '  <script>\n'
 '  window._cf_translation = {};\n'
 '  \n'
 '  \n'
 '</script>\n'
 '\n'
 '</body>\n'
 '</html>\n')
2024-10-16 13:39:57,949 - pyaarlo - DEBUG - backend: request-end=403
2024-10-16 13:40:00,956 - pyaarlo - DEBUG - backend: login attempt #2
2024-10-16 13:40:00,957 - pyaarlo - DEBUG - backend: request-url=https://ocapi-app.arlo.com/api/auth
2024-10-16 13:40:00,957 - pyaarlo - DEBUG - backend: request-params=
{}
2024-10-16 13:40:00,958 - pyaarlo - DEBUG - backend: request-headers=
{'Accept': 'application/json, text/plain, */*',
 'Accept-Encoding': 'gzip, deflate, br',
 'Accept-Language': 'en-GB,en;q=0.9,en-US;q=0.8',
 'Cache-Control': 'no-cache',
 'Content-Type': 'application/json',
 'Dnt': '1',
 'Origin': 'https://my.arlo.com',
 'Pragma': 'no-cache',
 'Referer': 'https://my.arlo.com/',
 'User-Agent': 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, '
               'like Gecko) Chrome/114.0.0.0 Safari/537.36',
 'X-User-Device-Automation-Name': 'QlJPV1NFUg==',
 'X-User-Device-Id': 'a29cf189-8ba6-43b0-a352-77399ec4c1fe',
 'X-User-Device-Type': 'BROWSER'}
2024-10-16 13:40:00,983 - urllib3.connectionpool - DEBUG - https://ocapi-app.arlo.com:443 "OPTIONS /api/auth HTTP/1.1" 403 None
2024-10-16 13:40:00,985 - pyaarlo - DEBUG - backend: request-body=
('<!DOCTYPE html>\n'
 '<!--[if lt IE 7]> <html class="no-js ie6 oldie" lang="en-US"> <![endif]-->\n'
 '<!--[if IE 7]>    <html class="no-js ie7 oldie" lang="en-US"> <![endif]-->\n'
 '<!--[if IE 8]>    <html class="no-js ie8 oldie" lang="en-US"> <![endif]-->\n'
 '<!--[if gt IE 8]><!--> <html class="no-js" lang="en-US"> <!--<![endif]-->\n'
 '<head>\n'
 '<title>Attention Required! | Cloudflare</title>\n'
 '<meta charset="UTF-8" />\n'
 '<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />\n'
 '<meta http-equiv="X-UA-Compatible" content="IE=Edge" />\n'
 '<meta name="robots" content="noindex, nofollow" />\n'
 '<meta name="viewport" content="width=device-width,initial-scale=1" />\n'
 '<link rel="stylesheet" id="cf_styles-css" '
 'href="/cdn-cgi/styles/cf.errors.css" />\n'
 '<!--[if lt IE 9]><link rel="stylesheet" id=\'cf_styles-ie-css\' '
 'href="/cdn-cgi/styles/cf.errors.ie.css" /><![endif]-->\n'
 '<style>body{margin:0;padding:0}</style>\n'
 '\n'
 '\n'
 '<!--[if gte IE 10]><!-->\n'
 '<script>\n'
 '  if (!navigator.cookieEnabled) {\n'
 "    window.addEventListener('DOMContentLoaded', function () {\n"
 "      var cookieEl = document.getElementById('cookie-alert');\n"
 "      cookieEl.style.display = 'block';\n"
 '    })\n'
 '  }\n'
 '</script>\n'
 '<!--<![endif]-->\n'
 '\n'
 '\n'
 '</head>\n'
 '<body>\n'
 '  <div id="cf-wrapper">\n'
 '    <div class="cf-alert cf-alert-error cf-cookie-error" id="cookie-alert" '
 'data-translate="enable_cookies">Please enable cookies.</div>\n'
 '    <div id="cf-error-details" class="cf-error-details-wrapper">\n'
 '      <div class="cf-wrapper cf-header cf-error-overview">\n'
 '        <h1 data-translate="block_headline">Sorry, you have been '
 'blocked</h1>\n'
 '        <h2 class="cf-subheadline"><span '
 'data-translate="unable_to_access">You are unable to access</span> '
 'ocapi-app.arlo.com</h2>\n'
 '      </div><!-- /.header -->\n'
 '\n'
 '      <div class="cf-section cf-highlight">\n'
 '        <div class="cf-wrapper">\n'
 '          <div class="cf-screenshot-container cf-screenshot-full">\n'
 '            \n'
 '              <span class="cf-no-screenshot error"></span>\n'
 '            \n'
 '          </div>\n'
 '        </div>\n'
 '      </div><!-- /.captcha-container -->\n'
 '\n'
 '      <div class="cf-section cf-wrapper">\n'
 '        <div class="cf-columns two">\n'
 '          <div class="cf-column">\n'
 '            <h2 data-translate="blocked_why_headline">Why have I been '
 'blocked?</h2>\n'
 '\n'
 '            <p data-translate="blocked_why_detail">This website is using a '
 'security service to protect itself from online attacks. The action you just '
 'performed triggered the security solution. There are several actions that '
 'could trigger this block including submitting a certain word or phrase, a '
 'SQL command or malformed data.</p>\n'
 '          </div>\n'
 '\n'
 '          <div class="cf-column">\n'
 '            <h2 data-translate="blocked_resolve_headline">What can I do to '
 'resolve this?</h2>\n'
 '\n'
 '            <p data-translate="blocked_resolve_detail">You can email the '
 'site owner to let them know you were blocked. Please include what you were '
 'doing when this page came up and the Cloudflare Ray ID found at the bottom '
 'of this page.</p>\n'
 '          </div>\n'
 '        </div>\n'
 '      </div><!-- /.section -->\n'
 '\n'
 '      <div class="cf-error-footer cf-wrapper w-240 lg:w-full py-10 sm:py-4 '
 'sm:px-8 mx-auto text-center sm:text-left border-solid border-0 border-t '
 'border-gray-300">\n'
 '  <p class="text-13">\n'
 '    <span class="cf-footer-item sm:block sm:mb-1">Cloudflare Ray ID: <strong '
 'class="font-semibold">8d39d4df9d76595c</strong></span>\n'
 '    <span class="cf-footer-separator sm:hidden">&bull;</span>\n'
 '    <span id="cf-footer-item-ip" class="cf-footer-item hidden sm:block '
 'sm:mb-1">\n'
 '      Your IP:\n'
 '      <button type="button" id="cf-footer-ip-reveal" '
 'class="cf-footer-ip-reveal-btn">Click to reveal</button>\n'
 '      <span class="hidden" id="cf-footer-ip">136.54.186.240</span>\n'
 '      <span class="cf-footer-separator sm:hidden">&bull;</span>\n'
 '    </span>\n'
 '    <span class="cf-footer-item sm:block sm:mb-1"><span>Performance &amp; '
 'security by</span> <a rel="noopener noreferrer" '
 'href="https://www.cloudflare.com/5xx-error-landing" id="brand_link" '
 'target="_blank">Cloudflare</a></span>\n'
 '    \n'
 '  </p>\n'
 '  <script>(function(){function d(){var '
 'b=a.getElementById("cf-footer-item-ip"),c=a.getElementById("cf-footer-ip-reveal");b&&"classList"in '
 'b&&(b.classList.remove("hidden"),c.addEventListener("click",function(){c.classList.add("hidden");a.getElementById("cf-footer-ip").classList.remove("hidden")}))}var '
 'a=document;document.addEventListener&&a.addEventListener("DOMContentLoaded",d)})();</script>\n'
 '</div><!-- /.error-footer -->\n'
 '\n'
 '\n'
 '    </div><!-- /#cf-error-details -->\n'
 '  </div><!-- /#cf-wrapper -->\n'
 '\n'
 '  <script>\n'
 '  window._cf_translation = {};\n'
 '  \n'
 '  \n'
 '</script>\n'
 '\n'
 '</body>\n'
 '</html>\n')
2024-10-16 13:40:00,995 - pyaarlo - DEBUG - backend: request-end=403
2024-10-16 13:40:01,001 - pyaarlo - DEBUG - backend: request-url=https://ocapi-app.arlo.com/api/auth
2024-10-16 13:40:01,001 - pyaarlo - DEBUG - backend: request-params=
{'EnvSource': 'prod',
 'email': '[email protected]',
 'language': 'en',
 'password': 'd29zaGlXeDU0Njg3ODc5'}
2024-10-16 13:40:01,002 - pyaarlo - DEBUG - backend: request-headers=
{'Accept': 'application/json, text/plain, */*',
 'Accept-Encoding': 'gzip, deflate, br',
 'Accept-Language': 'en-GB,en;q=0.9,en-US;q=0.8',
 'Cache-Control': 'no-cache',
 'Content-Type': 'application/json',
 'Dnt': '1',
 'Origin': 'https://my.arlo.com',
 'Pragma': 'no-cache',
 'Referer': 'https://my.arlo.com/',
 'User-Agent': 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, '
               'like Gecko) Chrome/114.0.0.0 Safari/537.36',
 'X-User-Device-Automation-Name': 'QlJPV1NFUg==',
 'X-User-Device-Id': 'a29cf189-8ba6-43b0-a352-77399ec4c1fe',
 'X-User-Device-Type': 'BROWSER'}
2024-10-16 13:40:01,036 - urllib3.connectionpool - DEBUG - https://ocapi-app.arlo.com:443 "POST /api/auth HTTP/1.1" 403 None
2024-10-16 13:40:01,038 - pyaarlo - DEBUG - backend: request-body=
('<!DOCTYPE html>\n'
 '<!--[if lt IE 7]> <html class="no-js ie6 oldie" lang="en-US"> <![endif]-->\n'
 '<!--[if IE 7]>    <html class="no-js ie7 oldie" lang="en-US"> <![endif]-->\n'
 '<!--[if IE 8]>    <html class="no-js ie8 oldie" lang="en-US"> <![endif]-->\n'
 '<!--[if gt IE 8]><!--> <html class="no-js" lang="en-US"> <!--<![endif]-->\n'
 '<head>\n'
 '<title>Attention Required! | Cloudflare</title>\n'
 '<meta charset="UTF-8" />\n'
 '<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />\n'
 '<meta http-equiv="X-UA-Compatible" content="IE=Edge" />\n'
 '<meta name="robots" content="noindex, nofollow" />\n'
 '<meta name="viewport" content="width=device-width,initial-scale=1" />\n'
 '<link rel="stylesheet" id="cf_styles-css" '
 'href="/cdn-cgi/styles/cf.errors.css" />\n'
 '<!--[if lt IE 9]><link rel="stylesheet" id=\'cf_styles-ie-css\' '
 'href="/cdn-cgi/styles/cf.errors.ie.css" /><![endif]-->\n'
 '<style>body{margin:0;padding:0}</style>\n'
 '\n'
 '\n'
 '<!--[if gte IE 10]><!-->\n'
 '<script>\n'
 '  if (!navigator.cookieEnabled) {\n'
 "    window.addEventListener('DOMContentLoaded', function () {\n"
 "      var cookieEl = document.getElementById('cookie-alert');\n"
 "      cookieEl.style.display = 'block';\n"
 '    })\n'
 '  }\n'
 '</script>\n'
 '<!--<![endif]-->\n'
 '\n'
 '\n'
 '</head>\n'
 '<body>\n'
 '  <div id="cf-wrapper">\n'
 '    <div class="cf-alert cf-alert-error cf-cookie-error" id="cookie-alert" '
 'data-translate="enable_cookies">Please enable cookies.</div>\n'
 '    <div id="cf-error-details" class="cf-error-details-wrapper">\n'
 '      <div class="cf-wrapper cf-header cf-error-overview">\n'
 '        <h1 data-translate="block_headline">Sorry, you have been '
 'blocked</h1>\n'
 '        <h2 class="cf-subheadline"><span '
 'data-translate="unable_to_access">You are unable to access</span> '
 'ocapi-app.arlo.com</h2>\n'
 '      </div><!-- /.header -->\n'
 '\n'
 '      <div class="cf-section cf-highlight">\n'
 '        <div class="cf-wrapper">\n'
 '          <div class="cf-screenshot-container cf-screenshot-full">\n'
 '            \n'
 '              <span class="cf-no-screenshot error"></span>\n'
 '            \n'
 '          </div>\n'
 '        </div>\n'
 '      </div><!-- /.captcha-container -->\n'
 '\n'
 '      <div class="cf-section cf-wrapper">\n'
 '        <div class="cf-columns two">\n'
 '          <div class="cf-column">\n'
 '            <h2 data-translate="blocked_why_headline">Why have I been '
 'blocked?</h2>\n'
 '\n'
 '            <p data-translate="blocked_why_detail">This website is using a '
 'security service to protect itself from online attacks. The action you just '
 'performed triggered the security solution. There are several actions that '
 'could trigger this block including submitting a certain word or phrase, a '
 'SQL command or malformed data.</p>\n'
 '          </div>\n'
 '\n'
 '          <div class="cf-column">\n'
 '            <h2 data-translate="blocked_resolve_headline">What can I do to '
 'resolve this?</h2>\n'
 '\n'
 '            <p data-translate="blocked_resolve_detail">You can email the '
 'site owner to let them know you were blocked. Please include what you were '
 'doing when this page came up and the Cloudflare Ray ID found at the bottom '
 'of this page.</p>\n'
 '          </div>\n'
 '        </div>\n'
 '      </div><!-- /.section -->\n'
 '\n'
 '      <div class="cf-error-footer cf-wrapper w-240 lg:w-full py-10 sm:py-4 '
 'sm:px-8 mx-auto text-center sm:text-left border-solid border-0 border-t '
 'border-gray-300">\n'
 '  <p class="text-13">\n'
 '    <span class="cf-footer-item sm:block sm:mb-1">Cloudflare Ray ID: <strong '
 'class="font-semibold">8d39d4dfdda5595c</strong></span>\n'
 '    <span class="cf-footer-separator sm:hidden">&bull;</span>\n'
 '    <span id="cf-footer-item-ip" class="cf-footer-item hidden sm:block '
 'sm:mb-1">\n'
 '      Your IP:\n'
 '      <button type="button" id="cf-footer-ip-reveal" '
 'class="cf-footer-ip-reveal-btn">Click to reveal</button>\n'
 '      <span class="hidden" id="cf-footer-ip">136.54.186.240</span>\n'
 '      <span class="cf-footer-separator sm:hidden">&bull;</span>\n'
 '    </span>\n'
 '    <span class="cf-footer-item sm:block sm:mb-1"><span>Performance &amp; '
 'security by</span> <a rel="noopener noreferrer" '
 'href="https://www.cloudflare.com/5xx-error-landing" id="brand_link" '
 'target="_blank">Cloudflare</a></span>\n'
 '    \n'
 '  </p>\n'
 '  <script>(function(){function d(){var '
 'b=a.getElementById("cf-footer-item-ip"),c=a.getElementById("cf-footer-ip-reveal");b&&"classList"in '
 'b&&(b.classList.remove("hidden"),c.addEventListener("click",function(){c.classList.add("hidden");a.getElementById("cf-footer-ip").classList.remove("hidden")}))}var '
 'a=document;document.addEventListener&&a.addEventListener("DOMContentLoaded",d)})();</script>\n'
 '</div><!-- /.error-footer -->\n'
 '\n'
 '\n'
 '    </div><!-- /#cf-error-details -->\n'
 '  </div><!-- /#cf-wrapper -->\n'
 '\n'
 '  <script>\n'
 '  window._cf_translation = {};\n'
 '  \n'
 '  \n'
 '</script>\n'
 '\n'
 '</body>\n'
 '</html>\n')
2024-10-16 13:40:01,042 - pyaarlo - DEBUG - backend: request-end=403
2024-10-16 13:40:04,050 - pyaarlo - DEBUG - backend: login attempt #3
2024-10-16 13:40:04,050 - pyaarlo - DEBUG - backend: request-url=https://ocapi-app.arlo.com/api/auth
2024-10-16 13:40:04,051 - pyaarlo - DEBUG - backend: request-params=
{}
2024-10-16 13:40:04,052 - pyaarlo - DEBUG - backend: request-headers=
{'Accept': 'application/json, text/plain, */*',
 'Accept-Encoding': 'gzip, deflate, br',
 'Accept-Language': 'en-GB,en;q=0.9,en-US;q=0.8',
 'Cache-Control': 'no-cache',
 'Content-Type': 'application/json',
 'Dnt': '1',
 'Origin': 'https://my.arlo.com',
 'Pragma': 'no-cache',
 'Referer': 'https://my.arlo.com/',
 'User-Agent': 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, '
               'like Gecko) Chrome/114.0.0.0 Safari/537.36',
 'X-User-Device-Automation-Name': 'QlJPV1NFUg==',
 'X-User-Device-Id': 'a29cf189-8ba6-43b0-a352-77399ec4c1fe',
 'X-User-Device-Type': 'BROWSER'}
2024-10-16 13:40:04,112 - urllib3.connectionpool - DEBUG - https://ocapi-app.arlo.com:443 "OPTIONS /api/auth HTTP/1.1" 403 None
2024-10-16 13:40:04,115 - pyaarlo - DEBUG - backend: request-body=
('<!DOCTYPE html>\n'
 '<!--[if lt IE 7]> <html class="no-js ie6 oldie" lang="en-US"> <![endif]-->\n'
 '<!--[if IE 7]>    <html class="no-js ie7 oldie" lang="en-US"> <![endif]-->\n'
 '<!--[if IE 8]>    <html class="no-js ie8 oldie" lang="en-US"> <![endif]-->\n'
 '<!--[if gt IE 8]><!--> <html class="no-js" lang="en-US"> <!--<![endif]-->\n'
 '<head>\n'
 '<title>Attention Required! | Cloudflare</title>\n'
 '<meta charset="UTF-8" />\n'
 '<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />\n'
 '<meta http-equiv="X-UA-Compatible" content="IE=Edge" />\n'
 '<meta name="robots" content="noindex, nofollow" />\n'
 '<meta name="viewport" content="width=device-width,initial-scale=1" />\n'
 '<link rel="stylesheet" id="cf_styles-css" '
 'href="/cdn-cgi/styles/cf.errors.css" />\n'
 '<!--[if lt IE 9]><link rel="stylesheet" id=\'cf_styles-ie-css\' '
 'href="/cdn-cgi/styles/cf.errors.ie.css" /><![endif]-->\n'
 '<style>body{margin:0;padding:0}</style>\n'
 '\n'
 '\n'
 '<!--[if gte IE 10]><!-->\n'
 '<script>\n'
 '  if (!navigator.cookieEnabled) {\n'
 "    window.addEventListener('DOMContentLoaded', function () {\n"
 "      var cookieEl = document.getElementById('cookie-alert');\n"
 "      cookieEl.style.display = 'block';\n"
 '    })\n'
 '  }\n'
 '</script>\n'
 '<!--<![endif]-->\n'
 '\n'
 '\n'
 '</head>\n'
 '<body>\n'
 '  <div id="cf-wrapper">\n'
 '    <div class="cf-alert cf-alert-error cf-cookie-error" id="cookie-alert" '
 'data-translate="enable_cookies">Please enable cookies.</div>\n'
 '    <div id="cf-error-details" class="cf-error-details-wrapper">\n'
 '      <div class="cf-wrapper cf-header cf-error-overview">\n'
 '        <h1 data-translate="block_headline">Sorry, you have been '
 'blocked</h1>\n'
 '        <h2 class="cf-subheadline"><span '
 'data-translate="unable_to_access">You are unable to access</span> '
 'ocapi-app.arlo.com</h2>\n'
 '      </div><!-- /.header -->\n'
 '\n'
 '      <div class="cf-section cf-highlight">\n'
 '        <div class="cf-wrapper">\n'
 '          <div class="cf-screenshot-container cf-screenshot-full">\n'
 '            \n'
 '              <span class="cf-no-screenshot error"></span>\n'
 '            \n'
 '          </div>\n'
 '        </div>\n'
 '      </div><!-- /.captcha-container -->\n'
 '\n'
 '      <div class="cf-section cf-wrapper">\n'
 '        <div class="cf-columns two">\n'
 '          <div class="cf-column">\n'
 '            <h2 data-translate="blocked_why_headline">Why have I been '
 'blocked?</h2>\n'
 '\n'
 '            <p data-translate="blocked_why_detail">This website is using a '
 'security service to protect itself from online attacks. The action you just '
 'performed triggered the security solution. There are several actions that '
 'could trigger this block including submitting a certain word or phrase, a '
 'SQL command or malformed data.</p>\n'
 '          </div>\n'
 '\n'
 '          <div class="cf-column">\n'
 '            <h2 data-translate="blocked_resolve_headline">What can I do to '
 'resolve this?</h2>\n'
 '\n'
 '            <p data-translate="blocked_resolve_detail">You can email the '
 'site owner to let them know you were blocked. Please include what you were '
 'doing when this page came up and the Cloudflare Ray ID found at the bottom '
 'of this page.</p>\n'
 '          </div>\n'
 '        </div>\n'
 '      </div><!-- /.section -->\n'
 '\n'
 '      <div class="cf-error-footer cf-wrapper w-240 lg:w-full py-10 sm:py-4 '
 'sm:px-8 mx-auto text-center sm:text-left border-solid border-0 border-t '
 'border-gray-300">\n'
 '  <p class="text-13">\n'
 '    <span class="cf-footer-item sm:block sm:mb-1">Cloudflare Ray ID: <strong '
 'class="font-semibold">8d39d4f32f23595c</strong></span>\n'
 '    <span class="cf-footer-separator sm:hidden">&bull;</span>\n'
 '    <span id="cf-footer-item-ip" class="cf-footer-item hidden sm:block '
 'sm:mb-1">\n'
 '      Your IP:\n'
 '      <button type="button" id="cf-footer-ip-reveal" '
 'class="cf-footer-ip-reveal-btn">Click to reveal</button>\n'
 '      <span class="hidden" id="cf-footer-ip">136.54.186.240</span>\n'
 '      <span class="cf-footer-separator sm:hidden">&bull;</span>\n'
 '    </span>\n'
 '    <span class="cf-footer-item sm:block sm:mb-1"><span>Performance &amp; '
 'security by</span> <a rel="noopener noreferrer" '
 'href="https://www.cloudflare.com/5xx-error-landing" id="brand_link" '
 'target="_blank">Cloudflare</a></span>\n'
 '    \n'
 '  </p>\n'
 '  <script>(function(){function d(){var '
 'b=a.getElementById("cf-footer-item-ip"),c=a.getElementById("cf-footer-ip-reveal");b&&"classList"in '
 'b&&(b.classList.remove("hidden"),c.addEventListener("click",function(){c.classList.add("hidden");a.getElementById("cf-footer-ip").classList.remove("hidden")}))}var '
 'a=document;document.addEventListener&&a.addEventListener("DOMContentLoaded",d)})();</script>\n'
 '</div><!-- /.error-footer -->\n'
 '\n'
 '\n'
 '    </div><!-- /#cf-error-details -->\n'
 '  </div><!-- /#cf-wrapper -->\n'
 '\n'
 '  <script>\n'
 '  window._cf_translation = {};\n'
 '  \n'
 '  \n'
 '</script>\n'
 '\n'
 '</body>\n'
 '</html>\n')
2024-10-16 13:40:04,128 - pyaarlo - DEBUG - backend: request-end=403
2024-10-16 13:40:04,135 - pyaarlo - DEBUG - backend: request-url=https://ocapi-app.arlo.com/api/auth
2024-10-16 13:40:04,136 - pyaarlo - DEBUG - backend: request-params=
{'EnvSource': 'prod',
 'email': '[email protected]',
 'language': 'en',
 'password': 'd29zaGlXeDU0Njg3ODc5'}
2024-10-16 13:40:04,137 - pyaarlo - DEBUG - backend: request-headers=
{'Accept': 'application/json, text/plain, */*',
 'Accept-Encoding': 'gzip, deflate, br',
 'Accept-Language': 'en-GB,en;q=0.9,en-US;q=0.8',
 'Cache-Control': 'no-cache',
 'Content-Type': 'application/json',
 'Dnt': '1',
 'Origin': 'https://my.arlo.com',
 'Pragma': 'no-cache',
 'Referer': 'https://my.arlo.com/',
 'User-Agent': 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, '
               'like Gecko) Chrome/114.0.0.0 Safari/537.36',
 'X-User-Device-Automation-Name': 'QlJPV1NFUg==',
 'X-User-Device-Id': 'a29cf189-8ba6-43b0-a352-77399ec4c1fe',
 'X-User-Device-Type': 'BROWSER'}
2024-10-16 13:40:04,164 - urllib3.connectionpool - DEBUG - https://ocapi-app.arlo.com:443 "POST /api/auth HTTP/1.1" 403 None
2024-10-16 13:40:04,167 - pyaarlo - DEBUG - backend: request-body=
('<!DOCTYPE html>\n'
 '<!--[if lt IE 7]> <html class="no-js ie6 oldie" lang="en-US"> <![endif]-->\n'
 '<!--[if IE 7]>    <html class="no-js ie7 oldie" lang="en-US"> <![endif]-->\n'
 '<!--[if IE 8]>    <html class="no-js ie8 oldie" lang="en-US"> <![endif]-->\n'
 '<!--[if gt IE 8]><!--> <html class="no-js" lang="en-US"> <!--<![endif]-->\n'
 '<head>\n'
 '<title>Attention Required! | Cloudflare</title>\n'
 '<meta charset="UTF-8" />\n'
 '<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />\n'
 '<meta http-equiv="X-UA-Compatible" content="IE=Edge" />\n'
 '<meta name="robots" content="noindex, nofollow" />\n'
 '<meta name="viewport" content="width=device-width,initial-scale=1" />\n'
 '<link rel="stylesheet" id="cf_styles-css" '
 'href="/cdn-cgi/styles/cf.errors.css" />\n'
 '<!--[if lt IE 9]><link rel="stylesheet" id=\'cf_styles-ie-css\' '
 'href="/cdn-cgi/styles/cf.errors.ie.css" /><![endif]-->\n'
 '<style>body{margin:0;padding:0}</style>\n'
 '\n'
 '\n'
 '<!--[if gte IE 10]><!-->\n'
 '<script>\n'
 '  if (!navigator.cookieEnabled) {\n'
 "    window.addEventListener('DOMContentLoaded', function () {\n"
 "      var cookieEl = document.getElementById('cookie-alert');\n"
 "      cookieEl.style.display = 'block';\n"
 '    })\n'
 '  }\n'
 '</script>\n'
 '<!--<![endif]-->\n'
 '\n'
 '\n'
 '</head>\n'
 '<body>\n'
 '  <div id="cf-wrapper">\n'
 '    <div class="cf-alert cf-alert-error cf-cookie-error" id="cookie-alert" '
 'data-translate="enable_cookies">Please enable cookies.</div>\n'
 '    <div id="cf-error-details" class="cf-error-details-wrapper">\n'
 '      <div class="cf-wrapper cf-header cf-error-overview">\n'
 '        <h1 data-translate="block_headline">Sorry, you have been '
 'blocked</h1>\n'
 '        <h2 class="cf-subheadline"><span '
 'data-translate="unable_to_access">You are unable to access</span> '
 'ocapi-app.arlo.com</h2>\n'
 '      </div><!-- /.header -->\n'
 '\n'
 '      <div class="cf-section cf-highlight">\n'
 '        <div class="cf-wrapper">\n'
 '          <div class="cf-screenshot-container cf-screenshot-full">\n'
 '            \n'
 '              <span class="cf-no-screenshot error"></span>\n'
 '            \n'
 '          </div>\n'
 '        </div>\n'
 '      </div><!-- /.captcha-container -->\n'
 '\n'
 '      <div class="cf-section cf-wrapper">\n'
 '        <div class="cf-columns two">\n'
 '          <div class="cf-column">\n'
 '            <h2 data-translate="blocked_why_headline">Why have I been '
 'blocked?</h2>\n'
 '\n'
 '            <p data-translate="blocked_why_detail">This website is using a '
 'security service to protect itself from online attacks. The action you just '
 'performed triggered the security solution. There are several actions that '
 'could trigger this block including submitting a certain word or phrase, a '
 'SQL command or malformed data.</p>\n'
 '          </div>\n'
 '\n'
 '          <div class="cf-column">\n'
 '            <h2 data-translate="blocked_resolve_headline">What can I do to '
 'resolve this?</h2>\n'
 '\n'
 '            <p data-translate="blocked_resolve_detail">You can email the '
 'site owner to let them know you were blocked. Please include what you were '
 'doing when this page came up and the Cloudflare Ray ID found at the bottom '
 'of this page.</p>\n'
 '          </div>\n'
 '        </div>\n'
 '      </div><!-- /.section -->\n'
 '\n'
 '      <div class="cf-error-footer cf-wrapper w-240 lg:w-full py-10 sm:py-4 '
 'sm:px-8 mx-auto text-center sm:text-left border-solid border-0 border-t '
 'border-gray-300">\n'
 '  <p class="text-13">\n'
 '    <span class="cf-footer-item sm:block sm:mb-1">Cloudflare Ray ID: <strong '
 'class="font-semibold">8d39d4f37f68595c</strong></span>\n'
 '    <span class="cf-footer-separator sm:hidden">&bull;</span>\n'
 '    <span id="cf-footer-item-ip" class="cf-footer-item hidden sm:block '
 'sm:mb-1">\n'
 '      Your IP:\n'
 '      <button type="button" id="cf-footer-ip-reveal" '
 'class="cf-footer-ip-reveal-btn">Click to reveal</button>\n'
 '      <span class="hidden" id="cf-footer-ip">136.54.186.240</span>\n'
 '      <span class="cf-footer-separator sm:hidden">&bull;</span>\n'
 '    </span>\n'
 '    <span class="cf-footer-item sm:block sm:mb-1"><span>Performance &amp; '
 'security by</span> <a rel="noopener noreferrer" '
 'href="https://www.cloudflare.com/5xx-error-landing" id="brand_link" '
 'target="_blank">Cloudflare</a></span>\n'
 '    \n'
 '  </p>\n'
 '  <script>(function(){function d(){var '
 'b=a.getElementById("cf-footer-item-ip"),c=a.getElementById("cf-footer-ip-reveal");b&&"classList"in '
 'b&&(b.classList.remove("hidden"),c.addEventListener("click",function(){c.classList.add("hidden");a.getElementById("cf-footer-ip").classList.remove("hidden")}))}var '
 'a=document;document.addEventListener&&a.addEventListener("DOMContentLoaded",d)})();</script>\n'
 '</div><!-- /.error-footer -->\n'
 '\n'
 '\n'
 '    </div><!-- /#cf-error-details -->\n'
 '  </div><!-- /#cf-wrapper -->\n'
 '\n'
 '  <script>\n'
 '  window._cf_translation = {};\n'
 '  \n'
 '  \n'
 '</script>\n'
 '\n'
 '</body>\n'
 '</html>\n')
2024-10-16 13:40:04,181 - pyaarlo - DEBUG - backend: request-end=403
2024-10-16 13:40:07,196 - pyaarlo - ERROR - login failed: 403 - possible cloudflare issue
2024-10-16 13:40:07,196 - pyaarlo - DEBUG - backend: login failed, trying another ecdh_curve
2024-10-16 13:40:07,197 - pyaarlo - DEBUG - backend: failed to log in
2024-10-16 13:40:07,198 - pyaarlo - DEBUG - media-downloader: not starting downloader
failed to login(login failed: 403 - possible cloudflare issue)

I'm still not seeing the python debug. This is a small test script I sometimes use. It will write what python is doing to standard out.

#!/usr/bin/env python
#

import logging
import os
import sys
import time
import pprint

# set these from the environment to log in
USERNAME = os.environ.get('ARLO_USERNAME', '[email protected]')
PASSWORD = os.environ.get('ARLO_PASSWORD', 'test-password')
IHOST = os.environ.get('IMAP_HOST', 'imap.gmail.com')
IUSERNAME = os.environ.get('IMAP_USERNAME', '[email protected]')
IPASSWORD = os.environ.get('IMAP_PASSWORD', 'test-password')

# set up logging, change INFO to DEBUG for a *lot* more information
logging.basicConfig(level=logging.DEBUG,
                    format='%(asctime)s - %(name)s - %(levelname)s - %(message)s')
_LOGGER = logging.getLogger('pyaarlo')

# log in
arlo = pyaarlo.PyArlo(username=USERNAME, password=PASSWORD,
                      tfa_type='email', tfa_source='imap',
                      tfa_host=IHOST, tfa_username=IUSERNAME, tfa_password=IPASSWORD,
                      tfa_nickname=IUSERNAME,
                      synchronous_mode=True, save_session=True,  user_agent='linux',
                      save_state=True, dump=True, storage_dir='aarlo', verbose_debug=True,
                      send_source=False)
if not arlo.is_connected:
    print("failed to login({})".format(arlo._last_error))
    sys.exit(-1)

time.sleep(60)
arlo.stop()
time.sleep(2)

@twrecked
Copy link
Owner

2024-10-16 13:38:57,759 - pyaarlo - DEBUG - 2fa-imap: checking
   ---> MORE SHOULD BE HAPPENING HERE
2024-10-16 13:39:57,760 - pyaarlo - ERROR - login failed: 2fa: code retrieval failed
2024-10-16 13:39:57,762 - pyaarlo - DEBUG - backend: login failed, trying another ecdh_curve

It starts up, logs in to Arlo and IMAP, asks for a code and then it stops immediately. Can you try setting the tfa timeout values. Something like this:

arlo = pyaarlo.PyArlo(username=USERNAME, password=PASSWORD,
                      tfa_type='email', tfa_source='imap',
                      tfa_host=IHOST, tfa_username=IUSERNAME, tfa_password=IPASSWORD,
                      tfa_timeout=5, tfa_total_timeout=30,
                      ...

@seahearman
Copy link
Author

thank you so much. it's working now.

@twrecked
Copy link
Owner

Had you set those values? They should be 3 and 30 by default if not.

@seahearman
Copy link
Author

yes, I set it to 10 and 60 and it's working now. I kind of see the code that it can not detect the new email from imap but in the browser I can see the new email.

I want to run the python code that once there is a motion captured by the camera (when the Arlo app sends me a notification), the python code can connect to the camera can save 30 sec median to my local machine. Do you happen to have an example to do so? Thank you so much!

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