question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Reauthentication - "All connection attempts failed"

See original GitHub issue

After the update due to the dependency error (OS > 2022.6.0)the integration requires re-authentication. During the re-auth process, after the Amazon Login Page, the error appears (see screenshot).

I can add the app on Amazon, confirm the OTP code, but right after the login it fails.

alexa_error

HA info Version: core-2022.6.4 Installation type: Home Assistant OS Supervisor: Host OS: Home Assistant OS 8.1 Update channel: stable Supervisor Version: supervisor-2022.05.3 Agent version: 1.2.1 Docker version: 20.10.14

Alexa_Media_Player info v.4.0.2

logs coming from

logger:
  default: critical
  logs:
    custom_components.alexa_media: debug  
    alexapy: debug
2022-06-09 19:03:15 DEBUG (MainThread) [custom_components.alexa_media.config_flow] Creating new login
2022-06-09 19:03:15 DEBUG (MainThread) [custom_components.alexa_media.helpers] ****@**************: Returning uuid {'uuid': 'a793bceb737917c2b7a613ed73ed8765', 'index': 0}
2022-06-09 19:03:15 DEBUG (MainThread) [alexapy.alexalogin] Creating TOTP for H************************************************RWQ
2022-06-09 19:03:15 DEBUG (MainThread) [alexapy.alexalogin] Generating OTP ******
2022-06-09 19:03:15 DEBUG (MainThread) [alexapy.alexalogin] Login created for ****@*********** - amazon.com
2022-06-09 19:03:16 DEBUG (MainThread) [alexapy.alexalogin] Attempting oauth login to https://www.amazon.com/ap/signin?openid.return_to=https://www.amazon.com/ap/maplanding&openid.assoc_handle=amzn_dp_project_dee_ios&openid.identity=http://specs.openid.net/auth/2.0/identifier_select&pageId=amzn_dp_project_dee_ios&accountStatusPolicy=P1&openid.claimed_id=http://specs.openid.net/auth/2.0/identifier_select&openid.mode=checkid_setup&openid.ns.oa2=http://www.amazon.com/ap/ext/oauth/2&openid.oa2.client_id=device:323961616661313136376332313735373261633963373265306232383239656623413249564c5635564d32573831&openid.ns.pape=http://specs.openid.net/extensions/pape/1.0&openid.oa2.response_type=token&openid.ns=http://specs.openid.net/auth/2.0&openid.pape.max_auth_age=0&openid.oa2.scope=device_auth_access&language=en_US
2022-06-09 19:03:16 DEBUG (MainThread) [alexapy.alexalogin] Generating OTP 582272
2022-06-09 19:03:16 DEBUG (MainThread) [alexapy.alexalogin] Generating OTP 582272
2022-06-09 19:03:16 DEBUG (MainThread) [alexapy.alexalogin] Generating OTP 582272
2022-06-09 19:03:16 DEBUG (MainThread) [custom_components.alexa_media.config_flow] Generating OTP from *******
2022-06-09 19:03:30 DEBUG (MainThread) [custom_components.alexa_media.config_flow] Starting proxy for ****@************** - amazon.com
2022-06-09 19:03:35 DEBUG (MainThread) [custom_components.alexa_media.config_flow] Found flow_id; adding 192.168.188.254 to known_ips for 300 seconds
2022-06-09 19:03:35 DEBUG (MainThread) [alexapy.alexaproxy] Filled <input autocapitalize="off" autocorrect="off" id="ap_email" maxlength="128" name="email" placeholder="Email or phone number" tabindex="1" type="email" value="****@**************"/>
2022-06-09 19:03:35 DEBUG (MainThread) [alexapy.alexaproxy] Filled <input aria-label="Amazon password" id="ap_password" maxlength="1024" name="password" placeholder="Amazon password" tabindex="2" type="password" value="REDACTED 22 CHARS"/>
2022-06-09 19:03:43 WARNING (MainThread) [custom_components.alexa_media.config_flow] Detected Connection error: All connection attempts failed

Please let me know if I can provide you some other info.

Thank You

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:13

github_iconTop GitHub Comments

1reaction
alandtsecommented, Jun 10, 2022

Hmmm. Perhaps your router is blocking something resulting in a timeout. Odd. But regardless, I’m glad it worked for you.

I’ll go ahead and close this out since you’re good. If you ever feel like testing why the internal works and external doesn’t, take a look at the logs and see if you can see where the external breaks in comparison. That may be able to help me figure out what went wrong. But no biggie if you either don’t want to or the logs are too complicated for you.

1reaction
alandtsecommented, Jun 10, 2022

If you try an internal IP for the HA url, does it change anything? I don’ think it’s related since you can see the page, but who knows.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Configuring Automatic ZPA Reauthentication
You can enable the Zscaler Client Connector (formerly Zscaler App or ZApp) to automatically attempt reauthentication for users with ZPA.
Read more >
Connection Error! Please try refreshing. If this persists ...
I experienced this yesterday after an HA restart, where the integration needed reauthentication (2FA code already configured and all ...
Read more >
Computers having issue reauthenticating
I am having issues with NPS when computers are trying to re-authenticate. ... I have "If logging fails, discard connection requests.
Read more >
OAuth Security Improvements Requiring Reauthentication in ...
Unable to connect to data source with the supplied credentials, or no credentials provided. Tableau needs an unexpired OAuth refresh token to ...
Read more >
KIP-368: Allow SASL Connections to Periodically Re- ...
If the re-authentication attempt fails then the connection will be ... This KIP transparently adds re-authentication support for all uses, ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found