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

2FA via IMAP mail not working if more than one mail address configured #33

Closed
m0urs opened this issue Nov 30, 2021 · 2 comments
Closed
Assignees
Labels
bug Something isn't working upstream Issue with upstream code

Comments

@m0urs
Copy link
Owner

m0urs commented Nov 30, 2021

The account I am using with pyarlo does have two mail addresses configured, the one of the account itself and another one which is set as primary 2FA mail.

In the log you see that both addresses are read from Arlo but the 2FA token is never received. I guess that is because he wrong address is used?

If I am using an account where the mail address of the account is the same as the 2FA mail address, everything seems to work fine.

Here is the log fragment of the failing account (the factor "PRIMARY" should be the correct mail address):

2021-11-29 17:12:58,700 - pyaarlo - DEBUG - need 2FA...
2021-11-29 17:12:58,701 - pyaarlo - DEBUG - getting tfa choices
2021-11-29 17:12:58,702 - pyaarlo - DEBUG - request-url=https://ocapi-app.arlo.com/api/getFactors?data = 1638202378
2021-11-29 17:12:58,703 - pyaarlo - DEBUG - request-params=
{}
2021-11-29 17:12:58,704 - pyaarlo - DEBUG - request-headers=
{'Accept': 'application/json, text/plain, */*',
 'Accept-Language': 'en-US,en;q=0.9',
 'Authorization': 'Ml9vUEhnbEF2WldRd3dpZnZfYWJBb3JCZ1lkZWtSUjIyWlU0dEg1X3NJTUhvREFLcG9MWnFaUWEwOWg5UVEzWWZEQ1B1Q3F5VEIybGtSNTM5bXc3SEZtX2dZVEpvVmVBZmZCb0s5WFRvMmdyaGhCWWlmYUVPRnhpQTRrbDNfd3o5akF3czBrRkd5bVlIWE9XaVN0cC1LOTZZcHhaVUp0bEtVU2RYQWFBZF8wcXR3enZlcEd6eVFYZEphSjBYdlp1R2xnUjZ3TFBDN0p3UEY4dl9WcDBoaDBOeTVlcHZoQUxva3luMzFVcG9lLTFVZ3AxQng4NXpnZ1dFQ2l2bGRzRElKNWdjQmxyamtJZDRmdFV5RkJKdzVjYVc5ZmI1QTB5cTZnNkt3TTlReVZxRHFscHJEcDA4eDJkOWtnRll2RVpDbEdmbFJsRXdwR2J3S0ExRzIxU2NFT1pF',
 '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)'}
2021-11-29 17:12:59,058 - urllib3.connectionpool - DEBUG - https://ocapi-app.arlo.com:443 "GET /api/getFactors?data%20=%201638202378 HTTP/1.1" 200 None
2021-11-29 17:12:59,060 - pyaarlo - DEBUG - request-end=200
2021-11-29 17:12:59,060 - pyaarlo - DEBUG - request-body=
{'data': {'MFA_State': 'ENABLED',
          '_type': '_Collection',
          'items': [{'_type': 'SecondFactor',
                     'applicationId': '54aa099e-366f-47b5-939a-bff713e1bd96',
                     'applicationName': 'Generic',
                     'displayName': '[email protected]',
                     'factorId': 'UGluZ0lkU0RLOkVNQUlMOjFkYTkyZjQ1LTEyNjAtYjFlYy0xZGE5LTJmNDUxMjYwYjFlYzo1NGFhMDk5ZS0zNjZmLTQ3YjUtOTM5YS1iZmY3MTNlMWJkOTY=',
                     'factorNickname': '[email protected]',
                     'factorRole': 'PRIMARY',
                     'factorType': 'EMAIL'},
                    {'_type': 'SecondFactor',
                     'applicationId': '54aa099e-366f-47b5-939a-bff713e1bd96',
                     'applicationName': 'Generic',
                     'displayName': '[email protected]',
                     'factorId': 'UGluZ0lkU0RLOkVNQUlMOjc3Y2FhMDI3LWU1Y2EtNGM0NC03N2NhLWEwMjdlNWNhNGM0NDo1NGFhMDk5ZS0zNjZmLTQ3YjUtOTM5YS1iZmY3MTNlMWJkOTY=',
                     'factorNickname': '[email protected]',
                     'factorRole': 'SECONDARY',
                     'factorType': 'EMAIL'}]},
 'meta': {'code': 200}}
2021-11-29 17:12:59,061 - pyaarlo - DEBUG - looking for email
2021-11-29 17:12:59,061 - pyaarlo - DEBUG - 2fa-imap: starting
2021-11-29 17:12:59,613 - pyaarlo - DEBUG - old-ids=[b'']
2021-11-29 17:12:59,613 - pyaarlo - DEBUG - starting auth with email
2021-11-29 17:12:59,614 - pyaarlo - DEBUG - request-url=https://ocapi-app.arlo.com/api/startAuth
2021-11-29 17:12:59,614 - pyaarlo - DEBUG - request-params=
{'factorId': 'UGluZ0lkU0RLOkVNQUlMOjc3Y2FhMDI3LWU1Y2EtNGM0NC03N2NhLWEwMjdlNWNhNGM0NDo1NGFhMDk5ZS0zNjZmLTQ3YjUtOTM5YS1iZmY3MTNlMWJkOTY='}
2021-11-29 17:12:59,615 - pyaarlo - DEBUG - request-headers=
{'Accept': 'application/json, text/plain, */*',
 'Accept-Language': 'en-US,en;q=0.9',
 'Authorization': 'Ml9vUEhnbEF2WldRd3dpZnZfYWJBb3JCZ1lkZWtSUjIyWlU0dEg1X3NJTUhvREFLcG9MWnFaUWEwOWg5UVEzWWZEQ1B1Q3F5VEIybGtSNTM5bXc3SEZtX2dZVEpvVmVBZmZCb0s5WFRvMmdyaGhCWWlmYUVPRnhpQTRrbDNfd3o5akF3czBrRkd5bVlIWE9XaVN0cC1LOTZZcHhaVUp0bEtVU2RYQWFBZF8wcXR3enZlcEd6eVFYZEphSjBYdlp1R2xnUjZ3TFBDN0p3UEY4dl9WcDBoaDBOeTVlcHZoQUxva3luMzFVcG9lLTFVZ3AxQng4NXpnZ1dFQ2l2bGRzRElKNWdjQmxyamtJZDRmdFV5RkJKdzVjYVc5ZmI1QTB5cTZnNkt3TTlReVZxRHFscHJEcDA4eDJkOWtnRll2RVpDbEdmbFJsRXdwR2J3S0ExRzIxU2NFT1pF',
 '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)'}
2021-11-29 17:13:00,201 - urllib3.connectionpool - DEBUG - https://ocapi-app.arlo.com:443 "POST /api/startAuth HTTP/1.1" 200 None
2021-11-29 17:13:00,203 - pyaarlo - DEBUG - request-end=200
2021-11-29 17:13:00,204 - pyaarlo - DEBUG - request-body=
{'data': {'MFA_State': 'ENABLED',
          '_type': 'FactorAuthCode',
          'factorAuthCode': 'UGluZ0lkU0RLOkVNQUlMOndlYnNfMGM1ZWQ4MWUtZjZkMC00ZTExLThjNTUtYWE4NmY1NjlhMjRjOjU0YWEwOTllLTM2NmYtNDdiNS05MzlhLWJmZjcxM2UxYmQ5Ng=='},
 'meta': {'code': 200}}
2021-11-29 17:13:00,205 - pyaarlo - DEBUG - 2fa-imap: checking
2021-11-29 17:13:03,240 - pyaarlo - DEBUG - 2fa-imap: new-ids=[b'']
2021-11-29 17:13:03,241 - pyaarlo - DEBUG - 2fa-imap: no change in emails
2021-11-29 17:13:06,272 - pyaarlo - DEBUG - 2fa-imap: new-ids=[b'']
2021-11-29 17:13:06,273 - pyaarlo - DEBUG - 2fa-imap: no change in emails
2021-11-29 17:13:09,313 - pyaarlo - DEBUG - 2fa-imap: new-ids=[b'']
2021-11-29 17:13:09,313 - pyaarlo - DEBUG - 2fa-imap: no change in emails
2021-11-29 17:13:12,344 - pyaarlo - DEBUG - 2fa-imap: new-ids=[b'']
2021-11-29 17:13:12,344 - pyaarlo - DEBUG - 2fa-imap: no change in emails
2021-11-29 17:13:15,369 - pyaarlo - DEBUG - 2fa-imap: new-ids=[b'']
2021-11-29 17:13:15,369 - pyaarlo - DEBUG - 2fa-imap: no change in emails
2021-11-29 17:13:18,404 - pyaarlo - DEBUG - 2fa-imap: new-ids=[b'']
2021-11-29 17:13:18,405 - pyaarlo - DEBUG - 2fa-imap: no change in emails
2021-11-29 17:13:21,437 - pyaarlo - DEBUG - 2fa-imap: new-ids=[b'']
2021-11-29 17:13:21,438 - pyaarlo - DEBUG - 2fa-imap: no change in emails
2021-11-29 17:13:24,471 - pyaarlo - DEBUG - 2fa-imap: new-ids=[b'']
2021-11-29 17:13:24,473 - pyaarlo - DEBUG - 2fa-imap: no change in emails
2021-11-29 17:13:27,514 - pyaarlo - DEBUG - 2fa-imap: new-ids=[b'']
2021-11-29 17:13:27,515 - pyaarlo - DEBUG - 2fa-imap: no change in emails
2021-11-29 17:13:30,555 - pyaarlo - DEBUG - 2fa-imap: new-ids=[b'']
2021-11-29 17:13:30,556 - pyaarlo - DEBUG - 2fa-imap: no change in emails
2021-11-29 17:13:33,589 - pyaarlo - DEBUG - 2fa-imap: new-ids=[b'']
2021-11-29 17:13:33,591 - pyaarlo - DEBUG - 2fa-imap: no change in emails
2021-11-29 17:13:36,630 - pyaarlo - DEBUG - 2fa-imap: new-ids=[b'']
2021-11-29 17:13:36,630 - pyaarlo - DEBUG - 2fa-imap: no change in emails
2021-11-29 17:13:39,670 - pyaarlo - DEBUG - 2fa-imap: new-ids=[b'']
2021-11-29 17:13:39,671 - pyaarlo - DEBUG - 2fa-imap: no change in emails
2021-11-29 17:13:42,702 - pyaarlo - DEBUG - 2fa-imap: new-ids=[b'']
2021-11-29 17:13:42,702 - pyaarlo - DEBUG - 2fa-imap: no change in emails
2021-11-29 17:13:45,741 - pyaarlo - DEBUG - 2fa-imap: new-ids=[b'']
2021-11-29 17:13:45,745 - pyaarlo - DEBUG - 2fa-imap: no change in emails
2021-11-29 17:13:48,782 - pyaarlo - DEBUG - 2fa-imap: new-ids=[b'']
2021-11-29 17:13:48,783 - pyaarlo - DEBUG - 2fa-imap: no change in emails
2021-11-29 17:13:51,811 - pyaarlo - DEBUG - 2fa-imap: new-ids=[b'']
2021-11-29 17:13:51,811 - pyaarlo - DEBUG - 2fa-imap: no change in emails
2021-11-29 17:13:54,848 - pyaarlo - DEBUG - 2fa-imap: new-ids=[b'']
2021-11-29 17:13:54,849 - pyaarlo - DEBUG - 2fa-imap: no change in emails
2021-11-29 17:13:57,889 - pyaarlo - DEBUG - 2fa-imap: new-ids=[b'']
2021-11-29 17:13:57,890 - pyaarlo - DEBUG - 2fa-imap: no change in emails
2021-11-29 17:14:00,900 - pyaarlo - ERROR - 2fa core retrieval failed
2021-11-29 17:14:00,901 - pyaarlo - DEBUG - failed to log in
2021-11-29 17:14:00,902 - pyaarlo - DEBUG - not starting downloader

@m0urs m0urs self-assigned this Nov 30, 2021
@m0urs m0urs added bug Something isn't working upstream Issue with upstream code labels Nov 30, 2021
@m0urs
Copy link
Owner Author

m0urs commented Nov 30, 2021

Opened issue with upstream code twrecked#81

@m0urs
Copy link
Owner Author

m0urs commented Jul 2, 2022

Should be fixed by this upstream fix twrecked#89

@m0urs m0urs closed this as completed Jul 2, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working upstream Issue with upstream code
Projects
None yet
Development

No branches or pull requests

1 participant