alexa_media_player: Error adding integration: "Detected Connection error: All connection attempts failed"
Describe the bug Get “Detected Connection error: All connection attempts failed” error when registering the integrazion
To Reproduce
- On HA add new integration
- fill form with email, password, Amazon server (amazon.it) and hassio url (My server is running on HTTPS on a non standard port eg.8123), OTP code
- copy generated OTP code and insert it into Amazon MFA page, confirm it is valid and MFA is correctly setup on Amazon
- select checkbox and confirm on HA
- Open page, on HA, fill with user and password (remember me checkbox is ininfluent)
- Get a white page with the error
- Integration wizard stuck on “Open website”
Expected behavior
Integration is setup and running
Screenshots
N/A
System details
- Home-assistant (version): 2023.11.3
- alexa_media (version from
const.py
or HA startup): 4.8.0 - alexapy (version from
pip show alexapy
or HA startup): 1.27.10 - Amazon 2FA is enabled (y/n). y
Logs
2023-11-29 11:50:34.183 DEBUG (MainThread) [custom_components.alexa_media.config_flow] Creating new login
2023-11-29 11:50:34.183 DEBUG (MainThread) [custom_components.alexa_media.helpers] a*****************a@a*******m: Returning uuid {'uuid': '***', 'index': 0}
2023-11-29 11:50:34.280 DEBUG (MainThread) [alexapy.alexalogin] Creating TOTP for ************************************************
2023-11-29 11:50:34.281 DEBUG (MainThread) [alexapy.alexalogin] Generating OTP 123124
2023-11-29 11:50:34.281 DEBUG (MainThread) [alexapy.alexalogin] Login created for *** - amazon.it
2023-11-29 11:50:34.345 DEBUG (MainThread) [alexapy.alexalogin] Generating OTP 123124
2023-11-29 11:50:34.345 DEBUG (MainThread) [custom_components.alexa_media.config_flow] Generating OTP from 123124
2023-11-29 11:50:37.129 DEBUG (MainThread) [custom_components.alexa_media.config_flow] Starting proxy for *** - amazon.it
2023-11-29 11:50:37.130 DEBUG (MainThread) [alexapy.alexalogin] Attempting oauth login to https://www.amazon.com/ap/signin?openid.return_to=https://www.amazon.com/ap/maplanding ... &language=it_IT
2023-11-29 11:50:37.184 DEBUG (MainThread) [alexapy.alexalogin] Generating OTP 123124
2023-11-29 11:50:37.185 DEBUG (MainThread) [authcaptureproxy.auth_capture_proxy] Refreshed 2 modifiers: ['prepend_relative_urls', 'change_host_to_proxy']
2023-11-29 11:50:37.185 DEBUG (MainThread) [authcaptureproxy.auth_capture_proxy] Refreshed 1 tests: ['test_amazon_url']
2023-11-29 11:50:37.185 DEBUG (MainThread) [alexapy.alexalogin] Generating OTP 123124
2023-11-29 11:50:37.186 DEBUG (MainThread) [authcaptureproxy.auth_capture_proxy] Refreshed 3 modifiers: ['autofill', 'prepend_relative_urls', 'change_host_to_proxy']
2023-11-29 11:50:37.238 DEBUG (MainThread) [custom_components.alexa_media.config_flow] Found flow_id; adding 10.10.0.1 to known_ips for 300 seconds
2023-11-29 11:50:37.239 DEBUG (MainThread) [authcaptureproxy.auth_capture_proxy] Received get: https://<myhassioserver>/auth/alexamedia/proxy?config_flow_id=5510566e3f123763ca162f4a7eba48d8&callback_url=https://<myhassioserver>:8123/auth/alexamedia/callback? ... &language=it_IT
2023-11-29 11:50:37.240 DEBUG (MainThread) [authcaptureproxy.auth_capture_proxy] Starting auth capture proxy for 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= ... &language=it_IT
2023-11-29 11:50:37.241 DEBUG (MainThread) [authcaptureproxy.auth_capture_proxy] Replacing https://<myhassioserver>:8123/ with https://www.amazon.com/ in https://<myhassioserver>:8123/config/integrations/dashboard
2023-11-29 11:50:37.241 DEBUG (MainThread) [authcaptureproxy.auth_capture_proxy] Final headers {'Connection': 'close', 'X-Forwarded-Ssl': 'on', 'sec-ch-ua': '"Brave";v="119", "Chromium";v="119", "Not?A_Brand";v="24"', 'sec-ch-ua-mobile': '?0', 'sec-ch-ua-platform': '"macOS"', 'Upgrade-Insecure-Requests': '1', 'User-Agent': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/119.0.0.0 Safari/537.36', 'Accept': 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8', 'Sec-GPC': '1', 'Sec-Fetch-Site': 'same-origin', 'Sec-Fetch-Mode': 'navigate', 'Sec-Fetch-User': '?1', 'Sec-Fetch-Dest': 'document', 'Referer': 'https://www.amazon.com/config/integrations/dashboard', 'Accept-Encoding': 'gzip, deflate, br', 'Accept-Language': 'it,it-IT;q=0.9,en-US;q=0.8,en-GB;q=0.7,en;q=0.6'}
2023-11-29 11:50:37.241 DEBUG (MainThread) [authcaptureproxy.auth_capture_proxy] Attempting get 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 ... &language=it_IT
headers: {'Connection': 'close', 'X-Forwarded-Ssl': 'on', 'sec-ch-ua': '"Brave";v="119", "Chromium";v="119", "Not?A_Brand";v="24"', 'sec-ch-ua-mobile': '?0', 'sec-ch-ua-platform': '"macOS"', 'Upgrade-Insecure-Requests': '1', 'User-Agent': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/119.0.0.0 Safari/537.36', 'Accept': 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8','Sec-GPC': '1', 'Sec-Fetch-Site': 'same-origin', 'Sec-Fetch-Mode': 'navigate', 'Sec-Fetch-User': '?1', 'Sec-Fetch-Dest': 'document', 'Referer': 'https://www.amazon.com/config/integrations/dashboard', 'Accept-Encoding': 'gzip, deflate,br', 'Accept-Language': 'it,it-IT;q=0.9,en-US;q=0.8,en-GB;q=0.7,en;q=0.6'}
cookies: <CookieJar[]>
2023-11-29 11:50:37.772 DEBUG (MainThread) [authcaptureproxy.helper] GET:
https://www.amazon.com/ap/signin?openid.return_to=https:%2F%2Fwww.amazon.com%2Fap%2Fmaplanding&openid.assoc_handle=amzn_dp_project_dee_ios&openid.identity=http:%2F%2Fspecs.openid.net%2Fauth%2F2.0%2Fidentifier_select&pageId=amzn_dp_project_dee_ios&accountStatusPolicy=P1&openid.claimed_id=http:%2F%2Fspecs.openid.net%2Fauth%2F2.0%2Fidentifier_select&openid.mode=checkid_setup&openid.ns.oa2=http:%2F%2Fwww.amazon.com%2Fap%2Fext%2Foauth%2F2&openid.oa2.client_id ... &language=it_IT with
{"host": "www.amazon.com", "connection": "close", "x-forwarded-ssl": "on", "sec-ch-ua": "\"Brave\";v=\"119\", \"Chromium\";v=\"119\", \"Not?A_Brand\";v=\"24\"", "sec-ch-ua-mobile": "?0", "sec-ch-ua-platform": "\"macOS\"", "upgrade-insecure-requests": "1", "user-agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/119.0.0.0 Safari/537.36", "accept": "text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8", "sec-gpc": "1", "sec-fetch-site": "same-origin", "sec-fetch-mode": "navigate", "sec-fetch-user": "?1", "sec-fetch-dest": "document", "referer": "https://www.amazon.com/config/integrations/dashboard", "accept-encoding": "gzip, deflate, br", "accept-language": "it,it-IT;q=0.9,en-US;q=0.8,en-GB;q=0.7,en;q=0.6"}
returned 200:OK with response Headers([('content-type', 'text/html;charset=UTF-8'), ('transfer-encoding', 'chunked'), ('connection', 'close'), ('server', 'Server'), ('date', 'Wed, 29 Nov 2023 10:50:37 GMT'), ('x-amz-rid', '***'), ('set-cookie', 'ap-fid=""; Domain=.amazon.com; Expires=Thu, 01-Jan-1970 00:00:10 GMT; Path=/ap/; Secure'), ('set-cookie', 'session-id=***; Domain=.amazon.com; Expires=Thu, 28-Nov-2024 10:50:37 GMT; Path=/; Secure'), ('set-cookie', 'session-id-time=***; Domain=.amazon.com; Expires=Thu, 28-Nov-2024 10:50:37 GMT; Path=/; Secure'), ('set-cookie', 'lc-main=it_IT; Domain=.amazon.com; Expires=Thu, 28-Nov-2024 10:50:37 GMT; Path=/; Secure'), ('x-xss-protection', '1'), ('x-content-type-options', 'nosniff'), ('x-ua-compatible', 'IE=edge'), ('pragma', 'No-cache'), ('cache-control', 'max-age=0, no-cache, no-store, must-revalidate'), ('expires', 'Thu, 01 Jan 1970 00:00:00 GMT'), ('strict-transport-security', 'max-age=47474747; includeSubDomains; preload'), ('vary', 'Content-Type,Accept-Encoding,User-Agent'), ('p3p', 'policyref="http://www.amazon.com/w3c/p3p.xml",CP="..."'), ('x-frame-options', 'SAMEORIGIN'), ('x-cache', 'Miss from cloudfront'), ('via', '1.1 6f1a76f707ac2d8078b20.cloudfront.net (CloudFront)'), ('x-amz-cf-pop', 'MXP64-P1'), ('alt-svc', 'h3=":443"; ma=86400'), ('x-amz-cf-id', '***==')])
2023-11-29 11:50:37.773 DEBUG (MainThread) [authcaptureproxy.helper] Running coroutine test_amazon_url
2023-11-29 11:50:37.774 DEBUG (MainThread) [authcaptureproxy.auth_capture_proxy] Refreshed 4 modifiers: ['autofill', 'prepend_relative_urls', 'change_host_to_proxy', 'change_empty_to_proxy']
2023-11-29 11:50:37.776 DEBUG (MainThread) [authcaptureproxy.helper] Running function autofill
2023-11-29 11:50:37.804 DEBUG (MainThread) [alexapy.alexaproxy] Filled <input aria-invalid="false" autocapitalize="off" autocorrect="off" id="ap_email" maxlength="128" name="email" placeholder="Indirizzo e-mail o numero di telefono" tabindex="1" type="email" value="***"/>
2023-11-29 11:50:37.807 DEBUG (MainThread) [alexapy.alexaproxy] Filled <input aria-label="Password Amazon" id="ap_password" maxlength="1024" name="password" placeholder="Password Amazon" spellcheck="false" tabindex="2" type="password" value="REDACTED 13 CHARS"/>
2023-11-29 11:50:37.823 DEBUG (MainThread) [authcaptureproxy.helper] Running coroutine prepend_relative_urls
2023-11-29 11:50:37.847 DEBUG (MainThread) [authcaptureproxy.helper] Running function prepend_url
2023-11-29 11:50:37.847 DEBUG (MainThread) [authcaptureproxy.helper] Base URL is to file "proxy", treating as path
2023-11-29 11:50:37.848 DEBUG (MainThread) [authcaptureproxy.helper] Running function prepend_url
2023-11-29 11:50:37.848 DEBUG (MainThread) [authcaptureproxy.helper] Base URL is to file "proxy", treating as path
2023-11-29 11:50:37.848 DEBUG (MainThread) [authcaptureproxy.helper] Running function prepend_url
2023-11-29 11:50:37.849 DEBUG (MainThread) [authcaptureproxy.helper] Base URL is to file "proxy", treating as path
2023-11-29 11:50:37.849 DEBUG (MainThread) [authcaptureproxy.examples.modifiers] Modified url for link:href https://images-na.ssl-images-amazon.com/images/I/...
2023-11-29 11:50:37.849 DEBUG (MainThread) [authcaptureproxy.helper] Running function prepend_url
2023-11-29 11:50:37.849 DEBUG (MainThread) [authcaptureproxy.helper] Base URL is to file "proxy", treating as path
2023-11-29 11:50:37.850 DEBUG (MainThread) [authcaptureproxy.helper] Running function prepend_url
2023-11-29 11:50:37.850 DEBUG (MainThread) [authcaptureproxy.helper] Base URL is to file "proxy", treating as path
2023-11-29 11:50:37.851 DEBUG (MainThread) [authcaptureproxy.helper] Running function prepend_url
2023-11-29 11:50:37.851 DEBUG (MainThread) [authcaptureproxy.helper] Base URL is to file "proxy", treating as path
2023-11-29 11:50:37.851 DEBUG (MainThread) [authcaptureproxy.examples.modifiers] Modified url for a:href https://www.amazon.com/ap/forgotpassword?showRememberMe=true&openid.pape.max_auth_age=0&openid.identity=http://specs.openid.net/auth/2.0/identifier_select&accountStatusPolicy=P1&language=it_IT&pageId=amzn_dp_project_dee_ios&openid.return_to=https://www.amazon.com/ap/maplanding&prevRID=***&openid.assoc_handle=amzn_dp_project_dee_ios&openid.oa2.response_type=code&openid.mode=checkid_setup&openid.ns.pape=http://specs.openid.net/extensions/pape/1.0&openid.ns.oa2=http://www.amazon.com/ap/ext/oauth/2&openid.oa2.code_challenge_method=S256&prepopulatedLoginId=&failedSignInCount=0&openid.oa2.code_challenge=***&openid.oa2.scope=device_auth_access&openid.claimed_id=http://specs.openid.net/auth/2.0/identifier_select&openid.oa2.client_id=device:***&openid.ns=http://specs.openid.net/auth/2.0 -> https://www.amazon.com/ap/forgotpassword?showRememberMe=true&openid.pape.max_auth_age=0&openid.identity=http://specs.openid.net/auth/2.0/identifier_select&accountStatusPolicy=P1&language=it_IT&pageId=amzn_dp_project_dee_ios&openid.return_to=https://www.amazon.com/ap/maplanding&prevRID=***&openid.assoc_handle=amzn_dp_project_dee_ios&openid.oa2.response_type=code&openid.mode=checkid_setup&openid.ns.pape=http://specs.openid.net/extensions/pape/1.0&openid.ns.oa2=http://www.amazon.com/ap/ext/oauth/2&openid.oa2.code_challenge_method=S256&prepopulatedLoginId=&failedSignInCount=0&openid.oa2.code_challenge=***&openid.oa2.scope=device_auth_access&openid.claimed_id=http://specs.openid.net/auth/2.0/identifier_select&openid.oa2.client_id=device:***&openid.ns=http://specs.openid.net/auth/2.0
2023-11-29 11:50:37.851 DEBUG (MainThread) [authcaptureproxy.helper] Running function prepend_url
2023-11-29 11:50:37.851 DEBUG (MainThread) [authcaptureproxy.helper] Base URL is to file "proxy", treating as path
2023-11-29 11:50:37.851 DEBUG (MainThread) [authcaptureproxy.examples.modifiers] Modified url for a:href -> https://<myhassioserver>:8123/auth/alexamedia/proxy/
2023-11-29 11:50:37.852 DEBUG (MainThread) [authcaptureproxy.helper] Running function prepend_url
2023-11-29 11:50:37.852 DEBUG (MainThread) [authcaptureproxy.helper] Base URL is to file "proxy", treating as path
2023-11-29 11:50:37.853 DEBUG (MainThread) [authcaptureproxy.examples.modifiers] Modified url for a:href /conditions_of_use_mobile?pop-up=1 -> https://<myhassioserver>:8123/auth/alexamedia/proxy/conditions_of_use_mobile?pop-up=1
2023-11-29 11:50:37.853 DEBUG (MainThread) [authcaptureproxy.helper] Running function prepend_url
2023-11-29 11:50:37.853 DEBUG (MainThread) [authcaptureproxy.helper] Base URL is to file "proxy", treating as path
2023-11-29 11:50:37.854 DEBUG (MainThread) [authcaptureproxy.examples.modifiers] Modified url for a:href /privacy_policy_mobile -> https://<myhassioserver>:8123/auth/alexamedia/proxy/privacy_policy_mobile
2023-11-29 11:50:37.854 DEBUG (MainThread) [authcaptureproxy.helper] Running function prepend_url
2023-11-29 11:50:37.854 DEBUG (MainThread) [authcaptureproxy.helper] Base URL is to file "proxy", treating as path
2023-11-29 11:50:37.854 DEBUG (MainThread) [authcaptureproxy.examples.modifiers] Modified url for a:href /gp/help/customer/display.html/?nodeId=201890250 -> https://<myhassioserver>:8123/auth/alexamedia/proxy/gp/help/customer/display.html/?nodeId=201890250
2023-11-29 11:50:37.854 DEBUG (MainThread) [authcaptureproxy.helper] Running function prepend_url
2023-11-29 11:50:37.854 DEBUG (MainThread) [authcaptureproxy.helper] Base URL is to file "proxy", treating as path
2023-11-29 11:50:37.855 DEBUG (MainThread) [authcaptureproxy.examples.modifiers] Modified url for a:href /cookiesandinternetadvertising -> https://<myhassioserver>:8123/auth/alexamedia/proxy/cookiesandinternetadvertising
2023-11-29 11:50:37.855 DEBUG (MainThread) [authcaptureproxy.helper] Running function prepend_url
2023-11-29 11:50:37.855 DEBUG (MainThread) [authcaptureproxy.helper] Base URL is to file "proxy", treating as path
2023-11-29 11:50:37.855 DEBUG (MainThread) [authcaptureproxy.examples.modifiers] Modified url for a:href https://www.amazon.com/ap/register?showRememberMe=true& ... 1&openid.ns=http://specs.openid.net/auth/2.0
2023-11-29 11:50:37.856 DEBUG (MainThread) [authcaptureproxy.helper] Running function prepend_url
2023-11-29 11:50:37.857 DEBUG (MainThread) [authcaptureproxy.helper] Base URL is to file "proxy", treating as path
2023-11-29 11:50:37.857 DEBUG (MainThread) [authcaptureproxy.examples.modifiers] Modified url for img:src //fls-na.amazon.com/1/batch/1/OP/...
2023-11-29 11:50:37.857 DEBUG (MainThread) [authcaptureproxy.helper] Running function prepend_url
2023-11-29 11:50:37.857 DEBUG (MainThread) [authcaptureproxy.helper] Base URL is to file "proxy", treating as path
2023-11-29 11:50:37.858 DEBUG (MainThread) [authcaptureproxy.helper] Running function prepend_url
2023-11-29 11:50:37.858 DEBUG (MainThread) [authcaptureproxy.helper] Base URL is to file "proxy", treating as path
2023-11-29 11:50:37.858 DEBUG (MainThread) [authcaptureproxy.examples.modifiers] Modified url for img:src //fls-na.amazon.com/1/batch/1/OP/...
2023-11-29 11:50:37.871 DEBUG (MainThread) [authcaptureproxy.helper] Running coroutine change_host_to_proxy
2023-11-29 11:50:37.897 DEBUG (MainThread) [authcaptureproxy.helper] Running function swap_url
2023-11-29 11:50:37.898 DEBUG (MainThread) [authcaptureproxy.helper] Running function swap_url
2023-11-29 11:50:37.898 DEBUG (MainThread) [authcaptureproxy.examples.modifiers] Modified url for link:href https://images-na.ssl-images-amazon.com/images/I/...
2023-11-29 11:50:37.899 DEBUG (MainThread) [authcaptureproxy.helper] Running function swap_url
2023-11-29 11:50:37.900 DEBUG (MainThread) [authcaptureproxy.examples.modifiers] Modified url for link:href https://images-na.ssl-images-amazon.com/images/I/...
2023-11-29 11:50:37.900 DEBUG (MainThread) [authcaptureproxy.helper] Running function swap_url
2023-11-29 11:50:37.900 DEBUG (MainThread) [authcaptureproxy.examples.modifiers] Modified url for link:href https://images-na.ssl-images-amazon.com/images/I/...
2023-11-29 11:50:37.901 DEBUG (MainThread) [authcaptureproxy.helper] Running function swap_url
2023-11-29 11:50:37.902 DEBUG (MainThread) [authcaptureproxy.examples.modifiers] Modified url for form:action https://www.amazon.com/ap/signin/*** -> https://<myhassioserver>:8123/auth/alexamedia/proxy/ap/signin/***
2023-11-29 11:50:37.902 DEBUG (MainThread) [authcaptureproxy.helper] Running function swap_url
2023-11-29 11:50:37.903 DEBUG (MainThread) [authcaptureproxy.examples.modifiers] Modified url for a:href https://www.amazon.com/ap/forgotpassword?showRememberMe=true&openid.pape.max_auth_age=0&openid.identity=http://specs.openid.net/auth/2.0/identifier_select&accountStatusPolicy=P1&language=it_IT&pageId=amzn_dp_project_dee_ios&openid.return_to=https://www.amazon.com/ap/maplanding&prevRID=***&openid.assoc_handle=amzn_dp_project_dee_ios&openid.oa2.response_type=code&openid.mode=checkid_setup&openid.ns.pape=http://specs.openid.net/extensions/pape/1.0&openid.ns.oa2=http://www.amazon.com/ap/ext/oauth/2&openid.oa2.code_challenge_method=S256&prepopulatedLoginId=&failedSignInCount=0&openid.oa2.code_challenge=***&openid.oa2.scope=device_auth_access&openid.claimed_id=http://specs.openid.net/auth/2.0/identifier_select&openid.oa2.client_id=device:***&openid.ns=http://specs.openid.net/auth/2.0 -> https://<myhassioserver>:8123/auth/alexamedia/proxy/ap/forgotpassword?showRememberMe=true&openid.pape.max_auth_age=0&openid.identity=http://specs.openid.net/auth/2.0/identifier_select&accountStatusPolicy=P1&language=it_IT&pageId=amzn_dp_project_dee_ios&openid.return_to=https://www.amazon.com/ap/maplanding&prevRID=***&openid.assoc_handle=amzn_dp_project_dee_ios&openid.oa2.response_type=code&openid.mode=checkid_setup&openid.ns.pape=http://specs.openid.net/extensions/pape/1.0&openid.ns.oa2=http://www.amazon.com/ap/ext/oauth/2&openid.oa2.code_challenge_method=S256&prepopulatedLoginId=&failedSignInCount=0&openid.oa2.code_challenge=***&openid.oa2.scope=device_auth_access&openid.claimed_id=http://specs.openid.net/auth/2.0/identifier_select&openid.oa2.client_id=device:***&openid.ns=http://specs.openid.net/auth/2.0
2023-11-29 11:50:37.903 DEBUG (MainThread) [authcaptureproxy.helper] Running function swap_url
2023-11-29 11:50:37.904 DEBUG (MainThread) [authcaptureproxy.helper] Running function swap_url
2023-11-29 11:50:37.904 DEBUG (MainThread) [authcaptureproxy.helper] Running function swap_url
2023-11-29 11:50:37.905 DEBUG (MainThread) [authcaptureproxy.helper] Running function swap_url
2023-11-29 11:50:37.905 DEBUG (MainThread) [authcaptureproxy.helper] Running function swap_url
2023-11-29 11:50:37.906 DEBUG (MainThread) [authcaptureproxy.helper] Running function swap_url
2023-11-29 11:50:37.906 DEBUG (MainThread) [authcaptureproxy.examples.modifiers] Modified url for a:href https://www.amazon.com/ap/register?showRememberMe=true&openid.pape.max_auth_age=0&openid.identity=http://specs.openid.net/auth/2.0/identifier_select&accountStatusPolicy=P1&language=it_IT&pageId=amzn_dp_project_dee_ios&openid.return_to=https://www.amazon.com/ap/maplanding&prevRID=***&openid.assoc_handle=amzn_dp_project_dee_ios&openid.oa2.response_type=code&openid.mode=checkid_setup&openid.ns.pape=http://specs.openid.net/extensions/pape/1.0&openid.ns.oa2=http://www.amazon.com/ap/ext/oauth/2&openid.oa2.code_challenge_method=S256&prepopulatedLoginId=&failedSignInCount=0&openid.oa2.code_challenge=***&openid.oa2.scope=device_auth_access&openid.claimed_id=http://specs.openid.net/auth/2.0/identifier_select&openid.oa2.client_id=device:***&openid.ns=http://specs.openid.net/auth/2.0 -> https://<myhassioserver>:8123/auth/alexamedia/proxy/ap/register?showRememberMe=true&openid.pape.max_auth_age=0&openid.identity=http://specs.openid.net/auth/2.0/identifier_select&accountStatusPolicy=P1&language=it_IT&pageId=amzn_dp_project_dee_ios&openid.return_to=https://www.amazon.com/ap/maplanding&prevRID=***&openid.assoc_handle=amzn_dp_project_dee_ios&openid.oa2.response_type=code&openid.mode=checkid_setup&openid.ns.pape=http://specs.openid.net/extensions/pape/1.0&openid.ns.oa2=http://www.amazon.com/ap/ext/oauth/2&openid.oa2.code_challenge_method=S256&prepopulatedLoginId=&failedSignInCount=0&openid.oa2.code_challenge=***&openid.oa2.scope=device_auth_access&openid.claimed_id=http://specs.openid.net/auth/2.0/identifier_select&openid.oa2.client_id=device:***&openid.ns=http://specs.openid.net/auth/2.0
2023-11-29 11:50:37.908 DEBUG (MainThread) [authcaptureproxy.helper] Running function swap_url
2023-11-29 11:50:37.908 DEBUG (MainThread) [authcaptureproxy.examples.modifiers] Modified url for img:src //fls-na.amazon.com/1/batch/1/OP/***:***:***$uedata=s:%2Fap%2Fuedata%3Fstaticb&id=***:0 -> //fls-na.amazon.com/1/batch/1/OP/***:***:***$uedata=s:/ap/uedata%3Fstaticb&id=***:0
2023-11-29 11:50:37.908 DEBUG (MainThread) [authcaptureproxy.helper] Running function swap_url
2023-11-29 11:50:37.909 DEBUG (MainThread) [authcaptureproxy.helper] Running function swap_url
2023-11-29 11:50:37.909 DEBUG (MainThread) [authcaptureproxy.examples.modifiers] Modified url for img:src //fls-na.amazon.com/1/batch/1/OP/***:***:***$uedata=s:%2Fap%2Fuedata%3Fnoscript&id=***:0 -> //fls-na.amazon.com/1/batch/1/OP/***:***:***$uedata=s:/ap/uedata%3Fnoscript&id=***:0
2023-11-29 11:50:37.923 DEBUG (MainThread) [authcaptureproxy.helper] Running coroutine change_empty_to_proxy
2023-11-29 11:50:37.949 DEBUG (MainThread) [authcaptureproxy.helper] Running function replace_empty_url
2023-11-29 11:50:40.569 DEBUG (MainThread) [authcaptureproxy.auth_capture_proxy] Received post: https://<myhassioserver>/auth/alexamedia/proxy/ap/signin/*** for 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:***&openid.ns.pape=http://specs.openid.net/extensions/pape/1.0&openid.oa2.response_type=code&openid.ns=http://specs.openid.net/auth/2.0&openid.pape.max_auth_age=0&openid.oa2.scope=device_auth_access&openid.oa2.code_challenge_method=S256&openid.oa2.code_challenge=***&language=it_IT
2023-11-29 11:50:40.572 DEBUG (MainThread) [authcaptureproxy.auth_capture_proxy] Storing data {'appActionToken': 'xqJ1Z4Q6eH9A1U08jVHXYvej2FJYYj3D', 'appAction': 'SIGNIN', 'openid.return_to': 'ape:***', 'prevRID': 'ape:***=', 'workflowState': '***....', 'giveFocusOnMobileToFirstControlFailingValidation': 'false', 'email': '***', 'encryptedPwd': '***==', 'showPasswordChecked': 'false', 'encryptedPasswordExpected': '', 'rememberMe': 'true', 'metadata1': 'true', 'aaToken': 'staticSessionToken'}
2023-11-29 11:50:40.574 DEBUG (MainThread) [authcaptureproxy.auth_capture_proxy] Final headers {'Connection': 'close', 'X-Forwarded-Ssl': 'on', 'Cache-Control': 'max-age=0', 'sec-ch-ua': '"Brave";v="119", "Chromium";v="119", "Not?A_Brand";v="24"', 'sec-ch-ua-mobile': '?0', 'sec-ch-ua-platform': '"macOS"', 'Upgrade-Insecure-Requests': '1', 'Origin': 'https://<myhassioserver>', 'Content-Type': 'application/x-www-form-urlencoded', 'User-Agent': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/119.0.0.0 Safari/537.36', 'Accept': 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8', 'Sec-GPC': '1', 'Sec-Fetch-Site': 'same-origin', 'Sec-Fetch-Mode': 'navigate', 'Sec-Fetch-User': '?1', 'Sec-Fetch-Dest': 'document', 'Accept-Encoding': 'gzip, deflate, br', 'Accept-Language': 'it,it-IT;q=0.9,en-US;q=0.8,en-GB;q=0.7,en;q=0.6'}
2023-11-29 11:50:40.574 DEBUG (MainThread) [authcaptureproxy.auth_capture_proxy] Attempting post to https://<myhassioserver>/auth/alexamedia/proxy/ap/signin/***
headers: {'Connection': 'close', 'X-Forwarded-Ssl': 'on', 'Cache-Control': 'max-age=0', 'sec-ch-ua': '"Brave";v="119", "Chromium";v="119", "Not?A_Brand";v="24"', 'sec-ch-ua-mobile': '?0', 'sec-ch-ua-platform': '"macOS"', 'Upgrade-Insecure-Requests': '1', 'Origin': 'https://<myhassioserver>', 'Content-Type': 'application/x-www-form-urlencoded', 'User-Agent': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/119.0.0.0 Safari/537.36', 'Accept': 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8', 'Sec-GPC': '1', 'Sec-Fetch-Site': 'same-origin', 'Sec-Fetch-Mode': 'navigate', 'Sec-Fetch-User': '?1', 'Sec-Fetch-Dest': 'document', 'Accept-Encoding': 'gzip, deflate, br', 'Accept-Language': 'it,it-IT;q=0.9,en-US;q=0.8,en-GB;q=0.7,en;q=0.6'}
cookies: <CookieJar[<Cookie session-id=*** for .amazon.com/>, <Cookie session-id-time=2331975037l for .amazon.com/>, <Cookie lc-main=it_IT for .amazon.com/>]>
2023-11-29 11:50:40.595 WARNING (MainThread) [custom_components.alexa_media.config_flow] Detected Connection error: All connection attempts failed
Additional context
It seems that the non standard port (8123) is lost at the end of the flow, see port is still there at:
2023-11-29 11:50:37.906 DEBUG (MainThread) [authcaptureproxy.examples.modifiers] Modified url for … https://<myhassioserver>:8123 …
and port is missing right after and just before the error.
023-11-29 11:50:40.574 DEBUG (MainThread) [authcaptureproxy.auth_capture_proxy] Attempting post to https://<myhassioserver>/auth/alexamedia/proxy/ap/signin/
My 2c
About this issue
- Original URL
- State: closed
- Created 7 months ago
- Comments: 16 (6 by maintainers)
Nothing we can do here for you. The network attempt is failing. Check your network/firewalls/etc. You can try disabling IPv6 in HA as that has fixed random network issues for some people, but it hasn’t been this get request.