alandtse / alexa_media_player

This is a custom component to allow control of Amazon Alexa devices in Home Assistant using the unofficial Alexa API.
Apache License 2.0
1.51k stars 289 forks source link

Alexa Media Player broken with HA 2024.8.0 #2422

Closed poudenes closed 2 months ago

poudenes commented 2 months ago

Alexa Integration broken with latest HA 2024.8.0

Debug log:

2024-08-08 07:58:32.806 DEBUG (MainThread) [custom_components.alexa_media] Nothing to import from configuration.yaml, loading from Integrations
2024-08-08 07:58:32.806 DEBUG (MainThread) [custom_components.alexa_media] 
-------------------------------------------------------------------
alexa_media
Version: 4.12.4
This is a custom component
If you have any issues with this you need to open an issue here:
https://github.com/alandtse/alexa_media_player/issues
-------------------------------------------------------------------

2024-08-08 07:58:32.806 DEBUG (MainThread) [custom_components.alexa_media] Loaded alexapy==1.27.10
2024-08-08 07:58:32.806 DEBUG (MainThread) [custom_components.alexa_media.helpers] a*******s@h*******l: Returning uuid {'uuid': 'SECRET', 'index': 0}
2024-08-08 07:58:32.827 DEBUG (MainThread) [alexapy.alexalogin] Login created for amazon_us@hassio.nl - amazon.com
2024-08-08 07:58:32.828 DEBUG (MainThread) [alexapy.alexalogin] Searching for cookies from /config/.storage/alexa_media.amazon_us@hassio.nl.pickle
2024-08-08 07:58:32.828 DEBUG (MainThread) [alexapy.alexalogin] Trying to load cookie from file /config/.storage/alexa_media.amazon_us@hassio.nl.pickle
2024-08-08 07:58:32.831 DEBUG (MainThread) [alexapy.alexalogin] Trying to load aiohttpCookieJar to session
2024-08-08 07:58:32.832 DEBUG (MainThread) [alexapy.alexalogin] Loaded 5 cookies
2024-08-08 07:58:32.832 DEBUG (MainThread) [alexapy.alexalogin] Searching for cookies from /config/alexa_media.amazon_us@hassio.nl.pickle
2024-08-08 07:58:32.832 DEBUG (MainThread) [alexapy.alexalogin] Using cookies to log in
2024-08-08 07:58:32.833 DEBUG (MainThread) [alexapy.alexalogin] Attempting to register with amazon.com
2024-08-08 07:58:33.628 DEBUG (MainThread) [alexapy.alexalogin] auth response <ClientResponse(https://api.amazon.com/auth/register) [200 OK]>
<CIMultiDictProxy('Server': 'Server', 'Date': 'Thu, 08 Aug 2024 05:58:33 GMT', 'Content-Type': 'application/json;charset=UTF-8', 'Content-Length': '5749', 'Connection': 'keep-alive', 'x-amz-rid': 'RTN9HG1A03161YJDHR9C', 'x-amzn-RequestId': '3255c26e-957d-SECRET-b023-9b8c1e54bb88', 'X-Amz-Date': 'Thu, 08 Aug 2024 05:58:33 GMT', 'Cache-Control': 'no-cache, no-store, must-revalidate', 'Pragma': 'no-cache', 'Vary': 'Content-Type,Accept-Encoding,User-Agent', 'Strict-Transport-Security': 'max-age=47474747; includeSubDomains; preload')>
 with 
{"requested_extensions": ["device_info", "customer_info"], "cookies": {"website_cookies": [], "domain": ".amazon.com"}, "registration_data": {"domain": "Device", "app_version": "2.2.556530.0", "device_type": "A2IVLV5VM2W81", "device_name": "%FIRST_NAME%'s%DUPE_STRATEGY_1ST%Alexa Media Player", "os_version": "16.6", "device_serial": "SECRET", "device_model": "iPhone", "app_name": "Alexa Media Player", "software_version": "1"}, "auth_data": {"access_token": "SECRET"}, "requested_token_type": ["bearer", "mac_dms", "website_cookies"]}
2024-08-08 07:58:33.629 DEBUG (MainThread) [alexapy.alexalogin] Successfully registered Peter's Alexa Media Player device with Amazon
2024-08-08 07:58:33.629 DEBUG (MainThread) [alexapy.alexalogin] New access token(353) received which expires at 2024-08-08 08:58:33.629401 in 0:59:59.999989
2024-08-08 07:58:33.909 DEBUG (MainThread) [alexapy.alexalogin] capabilities response <ClientResponse(https://api.amazonalexa.com/v1/devices/@self/capabilities) [204 No Content]>
<CIMultiDictProxy('Connection': 'keep-alive', 'Server': 'Server', 'Date': 'Thu, 08 Aug 2024 05:58:33 GMT', 'x-amz-rid': 'SECRET', 'Vary': 'Content-Type,Accept-Encoding,User-Agent', 'Strict-Transport-Security': 'max-age=47474747; includeSubDomains; preload', 'X-Cache': 'Miss from cloudfront', 'Via': '1.1 ee47c4d401aca1a1f5c2ee96ce3267e4.cloudfront.net (CloudFront)', 'X-Amz-Cf-Pop': 'AMS1-P2', 'X-Amz-Cf-Id': 'mD1O-SECRET')>
 with 
{"legacyFlags": {"SUPPORTS_COMMS": true, "SUPPORTS_ARBITRATION": true, "SCREEN_WIDTH": 1170, "SUPPORTS_SCRUBBING": true, "SPEECH_SYNTH_SUPPORTS_TTS_URLS": false, "SUPPORTS_HOME_AUTOMATION": true, "SUPPORTS_DROPIN_OUTBOUND": true, "FRIENDLY_NAME_TEMPLATE": "VOX", "SUPPORTS_SIP_OUTBOUND_CALLING": true, "VOICE_PROFILE_SWITCHING_DISABLED": true, "SUPPORTS_LYRICS_IN_CARD": false, "SUPPORTS_DATAMART_NAMESPACE": "Vox", "SUPPORTS_VIDEO_CALLING": true, "SUPPORTS_PFM_CHANGED": true, "SUPPORTS_TARGET_PLATFORM": "TABLET", "SUPPORTS_SECURE_LOCKSCREEN": false, "AUDIO_PLAYER_SUPPORTS_TTS_URLS": false, "SUPPORTS_KEYS_IN_HEADER": false, "SUPPORTS_MIXING_BEHAVIOR_FOR_AUDIO_PLAYER": false, "AXON_SUPPORT": true, "SUPPORTS_TTS_SPEECHMARKS": true}, "envelopeVersion": "20160207", "capabilities": [{"version": "0.1", "interface": "CardRenderer", "type": "AlexaInterface"}, {"interface": "Navigation", "type": "AlexaInterface", "version": "1.1"}, {"type": "AlexaInterface", "version": "2.0", "interface": "Alexa.Comms.PhoneCallController"}, {"type": "AlexaInterface", "version": "1.1", "interface": "ExternalMediaPlayer"}, {"type": "AlexaInterface", "interface": "Alerts", "configurations": {"maximumAlerts": {"timers": 2, "overall": 99, "alarms": 2}}, "version": "1.3"}, {"version": "1.0", "interface": "Alexa.Display.Window", "type": "AlexaInterface", "configurations": {"templates": [{"type": "STANDARD", "id": "app_window_template", "configuration": {"sizes": [{"id": "fullscreen", "type": "DISCRETE", "value": {"value": {"height": 1440, "width": 3200}, "unit": "PIXEL"}}], "interactionModes": ["mobile_mode", "auto_mode"]}}]}}, {"type": "AlexaInterface", "interface": "AccessoryKit", "version": "0.1"}, {"type": "AlexaInterface", "interface": "Alexa.AudioSignal.ActiveNoiseControl", "version": "1.0", "configurations": {"ambientSoundProcessingModes": [{"name": "ACTIVE_NOISE_CONTROL"}, {"name": "PASSTHROUGH"}]}}, {"interface": "PlaybackController", "type": "AlexaInterface", "version": "1.0"}, {"version": "1.0", "interface": "Speaker", "type": "AlexaInterface"}, {"version": "1.0", "interface": "SpeechSynthesizer", "type": "AlexaInterface"}, {"version": "1.0", "interface": "AudioActivityTracker", "type": "AlexaInterface"}, {"type": "AlexaInterface", "interface": "Alexa.Camera.LiveViewController", "version": "1.0"}, {"type": "AlexaInterface", "version": "1.0", "interface": "Alexa.Input.Text"}, {"type": "AlexaInterface", "interface": "Alexa.PlaybackStateReporter", "version": "1.0"}, {"version": "1.1", "interface": "Geolocation", "type": "AlexaInterface"}, {"interface": "Alexa.Health.Fitness", "version": "1.0", "type": "AlexaInterface"}, {"interface": "Settings", "type": "AlexaInterface", "version": "1.0"}, {"configurations": {"interactionModes": [{"dialog": "SUPPORTED", "interactionDistance": {"value": 18, "unit": "INCHES"}, "video": "SUPPORTED", "keyboard": "SUPPORTED", "id": "mobile_mode", "uiMode": "MOBILE", "touch": "SUPPORTED"}, {"video": "UNSUPPORTED", "dialog": "SUPPORTED", "interactionDistance": {"value": 36, "unit": "INCHES"}, "uiMode": "AUTO", "touch": "SUPPORTED", "id": "auto_mode", "keyboard": "UNSUPPORTED"}]}, "type": "AlexaInterface", "interface": "Alexa.InteractionMode", "version": "1.0"}, {"type": "AlexaInterface", "configurations": {"catalogs": [{"type": "IOS_APP_STORE", "identifierTypes": ["URI_HTTP_SCHEME", "URI_CUSTOM_SCHEME"]}]}, "version": "0.2", "interface": "Alexa.Launcher"}, {"interface": "System", "version": "1.0", "type": "AlexaInterface"}, {"interface": "Alexa.IOComponents", "type": "AlexaInterface", "version": "1.4"}, {"type": "AlexaInterface", "interface": "Alexa.FavoritesController", "version": "1.0"}, {"version": "1.0", "type": "AlexaInterface", "interface": "Alexa.Mobile.Push"}, {"type": "AlexaInterface", "interface": "InteractionModel", "version": "1.1"}, {"interface": "Alexa.PlaylistController", "type": "AlexaInterface", "version": "1.0"}, {"interface": "SpeechRecognizer", "type": "AlexaInterface", "version": "2.1"}, {"interface": "AudioPlayer", "type": "AlexaInterface", "version": "1.3"}, {"type": "AlexaInterface", "version": "3.1", "interface": "Alexa.RTCSessionController"}, {"interface": "VisualActivityTracker", "version": "1.1", "type": "AlexaInterface"}, {"interface": "Alexa.PlaybackController", "version": "1.0", "type": "AlexaInterface"}, {"type": "AlexaInterface", "interface": "Alexa.SeekController", "version": "1.0"}, {"interface": "Alexa.Comms.MessagingController", "type": "AlexaInterface", "version": "1.0"}]}
{"User-Agent": "AmazonWebView/Amazon Alexa/2.2.556530.0/iOS/16.6/iPhone", "Accept-Language": "en-US", "Accept-Charset": "utf-8", "Connection": "keep-alive", "Content-type": "application/json; charset=UTF-8", "authorization": "Bearer AtnaSECRET"}
2024-08-08 07:58:34.212 DEBUG (MainThread) [alexapy.alexalogin] 5 cookies successfully exchanged for refresh token for domain .amazon.com
2024-08-08 07:58:34.213 DEBUG (MainThread) [alexapy.alexalogin] Attempting to discover CSRF token
2024-08-08 07:58:34.422 DEBUG (MainThread) [alexapy.alexalogin] CSRF token not found from /spa/index.html
2024-08-08 07:58:35.053 DEBUG (MainThread) [alexapy.alexalogin] CSRF token not found from /api/devices-v2/device?cached=false
2024-08-08 07:58:35.836 DEBUG (MainThread) [alexapy.alexalogin] CSRF token not found from /templates/oobe/d-device-pick.handlebars
2024-08-08 07:58:36.048 DEBUG (MainThread) [alexapy.alexalogin] No csrf token found
2024-08-08 07:58:36.388 DEBUG (MainThread) [alexapy.alexalogin] GET: 
https://alexa.amazon.com/api/bootstrap returned 401:Unauthorized with response <CIMultiDictProxy('Content-Length': '0', 'Connection': 'keep-alive', 'Server': 'Server', 'Date': 'Thu, 08 Aug 2024 05:58:36 GMT', 'Vary': 'Content-Type,Accept-Encoding,User-Agent', 'x-amz-rid': 'SECRET', 'loginUrl': 'https://www.amazon.com/ap/signin?showRmrMe=1&openid.return_to=https%3A%2F%2Falexa.amazon.com%2Flogin&openid.identity=http%3A%2F%2Fspecs.openid.net%2Fauth%2F2.0%2Fidentifier_select&openid.assoc_handle=amzn_dp_project_dee&openid.mode=checkid_setup&openid.claimed_id=http%3A%2F%2Fspecs.openid.net%2Fauth%2F2.0%2Fidentifier_select&openid.ns=http%3A%2F%2Fspecs.openid.net%2Fauth%2F2.0&', 'x-amzn-RequestId': 'SECRET', 'X-Cache': 'Error from cloudfront', 'Via': '1.1 b0723c68cc136f4e89ad2f6a85c82e12.cloudfront.net (CloudFront)', 'X-Amz-Cf-Pop': 'FRA56-P8', 'X-Amz-Cf-Id': 'SECRET')>
2024-08-08 07:58:36.388 DEBUG (MainThread) [alexapy.alexalogin] Not logged in: An exception of type ContentTypeError occurred. Arguments:
(RequestInfo(url=URL('https://alexa.amazon.com/api/bootstrap'), method='GET', headers=<CIMultiDictProxy('Host': 'alexa.amazon.com', 'User-Agent': 'AmazonWebView/Amazon Alexa/2.2.556530.0/iOS/16.6/iPhone', 'Accept': '*/*', 'Accept-Language': '*', 'DNT': '1', 'Upgrade-Insecure-Requests': '1', 'Accept-Encoding': 'gzip, deflate, br', 'Cookie': 'lc-main=en_US; session-id=134-4847411-4697361; session-id-time=2082787201l; session-token="SECRET"; ubid-main=135-5133979-3095018')>, real_url=URL('https://alexa.amazon.com/api/bootstrap')), ())
2024-08-08 07:58:36.388 DEBUG (MainThread) [alexapy.alexalogin] Resetting Login for amazon_us@hassio.nl - amazon.com
2024-08-08 07:58:36.402 DEBUG (MainThread) [alexapy.helpers] Deleting cookiefile /config/.storage/alexa_media.amazon_us@hassio.nl.pickle 
2024-08-08 07:58:36.449 DEBUG (MainThread) [alexapy.alexalogin] Using credentials to log in
2024-08-08 07:58:36.449 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: SECRET&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=nHDG4vRfWM0oVpDwqI4A88nfzWHi43qL0p5Vv_Sen1U&language=en_US
2024-08-08 07:58:37.402 ERROR (ImportExecutor_0) [homeassistant] Error doing job: Unclosed connection (None)
2024-08-08 07:58:37.728 DEBUG (MainThread) [alexapy.alexalogin] GET: 
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: SECRET&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= SECRET&language=en_US returned 200:OK with response <CIMultiDictProxy('Content-Type': 'text/html', 'Transfer-Encoding': 'chunked', 'Connection': 'keep-alive', 'Server': 'Server', 'Date': 'Thu, 08 Aug 2024 05:58:37 GMT', 'x-amz-rid': 'Q3S1H5V9V1YW005G22CY', 'Strict-Transport-Security': 'max-age=47474747; includeSubDomains; preload', 'Vary': 'Content-Type,Accept-Encoding,User-Agent', 'Content-Encoding': 'gzip', 'p3p': 'policyref="http://www.amazon.com/w3c/p3p.xml",CP="CAO DSP LAW CUR ADM IVAo IVDo CONo OTPo OUR DELi PUBi OTRi BUS PHY ONL UNI PUR FIN COM NAV INT DEM CNT STA HEA PRE LOC GOV OTC "', 'X-Frame-Options': 'SAMEORIGIN', 'X-Cache': 'Miss from cloudfront', 'Via': '1.1 35c75b7f0ca8c787d67c8ebd22bc7fc2.cloudfront.net (CloudFront)', 'X-Amz-Cf-Pop': 'FRA6-C1', 'Alt-Svc': 'h3=":443"; ma=86400', 'X-Amz-Cf-Id': 'VdqlK5nppeGg5iMD-SECRET')>
2024-08-08 07:58:37.728 DEBUG (MainThread) [alexapy.alexalogin] Processing 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: SECRET&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= SECRET&language=en_US
2024-08-08 07:58:37.740 DEBUG (MainThread) [alexapy.alexalogin] Captcha/2FA not requested; confirming login.
2024-08-08 07:58:37.740 DEBUG (MainThread) [alexapy.alexalogin] Attempting to register with amazon.com
2024-08-08 07:58:38.658 DEBUG (MainThread) [alexapy.alexalogin] auth response <ClientResponse(https://api.amazon.com/auth/register) [400 Bad Request]>
<CIMultiDictProxy('Server': 'Server', 'Date': 'Thu, 08 Aug 2024 05:58:38 GMT', 'Content-Type': 'application/json;charset=UTF-8', 'Content-Length': '426', 'Connection': 'keep-alive', 'x-amz-rid': 'P7AA3QZ8TA2AKES2N2TP', 'x-amzn-RequestId': 'd763e60f-998b-41e4-9174-582460c38f52', 'X-Amz-Date': 'Thu, 08 Aug 2024 05:58:38 GMT', 'Cache-Control': 'no-cache, no-store, must-revalidate', 'Pragma': 'no-cache', 'Vary': 'Content-Type,Accept-Encoding,User-Agent', 'Strict-Transport-Security': 'max-age=47474747; includeSubDomains; preload')>
 with 
{"requested_extensions": ["device_info", "customer_info"], "cookies": {"website_cookies": [], "domain": ".amazon.com"}, "registration_data": {"domain": "Device", "app_version": "2.2.556530.0", "device_type": "A2IVLV5VM2W81", "device_name": "%FIRST_NAME%'s%DUPE_STRATEGY_1ST%Alexa Media Player", "os_version": "16.6", "device_serial": "2e2775383798ea8248f572658467adb0", "device_model": "iPhone", "app_name": "Alexa Media Player", "software_version": "1"}, "auth_data": {"client_id": "SECRET", "authorization_code": "SECRET", "code_verifier": "SECRET", "code_algorithm": "SHA-256", "client_domain": "DeviceLegacy"}, "user_context_map": {"frc": "SECRET"}, "requested_token_type": ["bearer", "mac_dms", "website_cookies"]}
2024-08-08 07:58:38.658 DEBUG (MainThread) [alexapy.alexalogin] Unable to register with ['amazon.com']
2024-08-08 07:58:39.526 DEBUG (MainThread) [alexapy.alexalogin] capabilities response <ClientResponse(https://api.amazonalexa.com/v1/devices/@self/capabilities) [403 Forbidden]>
<CIMultiDictProxy('Content-Length': '0', 'Connection': 'keep-alive', 'Server': 'Server', 'Date': 'Thu, 08 Aug 2024 05:58:39 GMT', 'x-amz-rid': 'GCWKTN22ZM8Z4DHPBH8F', 'Vary': 'Content-Type,Accept-Encoding,User-Agent', 'Strict-Transport-Security': 'max-age=47474747; includeSubDomains; preload', 'X-Cache': 'Error from cloudfront', 'Via': '1.1 SECRET (CloudFront)', 'X-Amz-Cf-Pop': 'AMS1-P2', 'X-Amz-Cf-Id': 'SECRET ==')>
 with 
{"legacyFlags": {"SUPPORTS_COMMS": true, "SUPPORTS_ARBITRATION": true, "SCREEN_WIDTH": 1170, "SUPPORTS_SCRUBBING": true, "SPEECH_SYNTH_SUPPORTS_TTS_URLS": false, "SUPPORTS_HOME_AUTOMATION": true, "SUPPORTS_DROPIN_OUTBOUND": true, "FRIENDLY_NAME_TEMPLATE": "VOX", "SUPPORTS_SIP_OUTBOUND_CALLING": true, "VOICE_PROFILE_SWITCHING_DISABLED": true, "SUPPORTS_LYRICS_IN_CARD": false, "SUPPORTS_DATAMART_NAMESPACE": "Vox", "SUPPORTS_VIDEO_CALLING": true, "SUPPORTS_PFM_CHANGED": true, "SUPPORTS_TARGET_PLATFORM": "TABLET", "SUPPORTS_SECURE_LOCKSCREEN": false, "AUDIO_PLAYER_SUPPORTS_TTS_URLS": false, "SUPPORTS_KEYS_IN_HEADER": false, "SUPPORTS_MIXING_BEHAVIOR_FOR_AUDIO_PLAYER": false, "AXON_SUPPORT": true, "SUPPORTS_TTS_SPEECHMARKS": true}, "envelopeVersion": "20160207", "capabilities": [{"version": "0.1", "interface": "CardRenderer", "type": "AlexaInterface"}, {"interface": "Navigation", "type": "AlexaInterface", "version": "1.1"}, {"type": "AlexaInterface", "version": "2.0", "interface": "Alexa.Comms.PhoneCallController"}, {"type": "AlexaInterface", "version": "1.1", "interface": "ExternalMediaPlayer"}, {"type": "AlexaInterface", "interface": "Alerts", "configurations": {"maximumAlerts": {"timers": 2, "overall": 99, "alarms": 2}}, "version": "1.3"}, {"version": "1.0", "interface": "Alexa.Display.Window", "type": "AlexaInterface", "configurations": {"templates": [{"type": "STANDARD", "id": "app_window_template", "configuration": {"sizes": [{"id": "fullscreen", "type": "DISCRETE", "value": {"value": {"height": 1440, "width": 3200}, "unit": "PIXEL"}}], "interactionModes": ["mobile_mode", "auto_mode"]}}]}}, {"type": "AlexaInterface", "interface": "AccessoryKit", "version": "0.1"}, {"type": "AlexaInterface", "interface": "Alexa.AudioSignal.ActiveNoiseControl", "version": "1.0", "configurations": {"ambientSoundProcessingModes": [{"name": "ACTIVE_NOISE_CONTROL"}, {"name": "PASSTHROUGH"}]}}, {"interface": "PlaybackController", "type": "AlexaInterface", "version": "1.0"}, {"version": "1.0", "interface": "Speaker", "type": "AlexaInterface"}, {"version": "1.0", "interface": "SpeechSynthesizer", "type": "AlexaInterface"}, {"version": "1.0", "interface": "AudioActivityTracker", "type": "AlexaInterface"}, {"type": "AlexaInterface", "interface": "Alexa.Camera.LiveViewController", "version": "1.0"}, {"type": "AlexaInterface", "version": "1.0", "interface": "Alexa.Input.Text"}, {"type": "AlexaInterface", "interface": "Alexa.PlaybackStateReporter", "version": "1.0"}, {"version": "1.1", "interface": "Geolocation", "type": "AlexaInterface"}, {"interface": "Alexa.Health.Fitness", "version": "1.0", "type": "AlexaInterface"}, {"interface": "Settings", "type": "AlexaInterface", "version": "1.0"}, {"configurations": {"interactionModes": [{"dialog": "SUPPORTED", "interactionDistance": {"value": 18, "unit": "INCHES"}, "video": "SUPPORTED", "keyboard": "SUPPORTED", "id": "mobile_mode", "uiMode": "MOBILE", "touch": "SUPPORTED"}, {"video": "UNSUPPORTED", "dialog": "SUPPORTED", "interactionDistance": {"value": 36, "unit": "INCHES"}, "uiMode": "AUTO", "touch": "SUPPORTED", "id": "auto_mode", "keyboard": "UNSUPPORTED"}]}, "type": "AlexaInterface", "interface": "Alexa.InteractionMode", "version": "1.0"}, {"type": "AlexaInterface", "configurations": {"catalogs": [{"type": "IOS_APP_STORE", "identifierTypes": ["URI_HTTP_SCHEME", "URI_CUSTOM_SCHEME"]}]}, "version": "0.2", "interface": "Alexa.Launcher"}, {"interface": "System", "version": "1.0", "type": "AlexaInterface"}, {"interface": "Alexa.IOComponents", "type": "AlexaInterface", "version": "1.4"}, {"type": "AlexaInterface", "interface": "Alexa.FavoritesController", "version": "1.0"}, {"version": "1.0", "type": "AlexaInterface", "interface": "Alexa.Mobile.Push"}, {"type": "AlexaInterface", "interface": "InteractionModel", "version": "1.1"}, {"interface": "Alexa.PlaylistController", "type": "AlexaInterface", "version": "1.0"}, {"interface": "SpeechRecognizer", "type": "AlexaInterface", "version": "2.1"}, {"interface": "AudioPlayer", "type": "AlexaInterface", "version": "1.3"}, {"type": "AlexaInterface", "version": "3.1", "interface": "Alexa.RTCSessionController"}, {"interface": "VisualActivityTracker", "version": "1.1", "type": "AlexaInterface"}, {"interface": "Alexa.PlaybackController", "version": "1.0", "type": "AlexaInterface"}, {"type": "AlexaInterface", "interface": "Alexa.SeekController", "version": "1.0"}, {"interface": "Alexa.Comms.MessagingController", "type": "AlexaInterface", "version": "1.0"}]}
{"User-Agent": "AmazonWebView/Amazon Alexa/2.2.556530.0/iOS/16.6/iPhone", "Accept-Language": "en-US", "Accept-Charset": "utf-8", "Connection": "keep-alive", "Content-type": "application/json; charset=UTF-8", "authorization": "Bearer None"}
2024-08-08 07:58:39.526 DEBUG (MainThread) [alexapy.alexalogin] Failed to register capabilities
2024-08-08 07:58:39.582 ERROR (SyncWorker_0) [root] Ical data was modified to avoid compatibility issues
(Your calendar server breaks the icalendar standard)
This is probably harmless, particularly if not editing events or tasks
(error count: 1 - this error is ratelimited)
NoneType: None
2024-08-08 07:58:39.585 ERROR (SyncWorker_0) [root] --- 
+++ 
@@ -5,7 +5,6 @@
 BEGIN:VEVENT
 DTSTAMP:20240808T055839Z
 CREATED:20230705T135419Z
-DTSTAMP:20240501T075450Z
 LAST-MODIFIED:20240501T075450Z
 RELATED-TO;RELTYPE=X-CALENDARSERVER-RECURRENCE-SET:D26365B9-99A1-46FC-8C7
  D-D3FCF9E58F25
2024-08-08 07:58:39.890 DEBUG (MainThread) [alexapy.alexalogin] 5 cookies successfully exchanged for refresh token for domain .amazon.com
2024-08-08 07:58:39.890 DEBUG (MainThread) [alexapy.alexalogin] Attempting to discover CSRF token
2024-08-08 07:58:40.079 DEBUG (MainThread) [alexapy.alexalogin] CSRF token not found from /spa/index.html
2024-08-08 07:58:40.767 DEBUG (MainThread) [alexapy.alexalogin] CSRF token not found from /api/devices-v2/device?cached=false
2024-08-08 07:58:41.074 DEBUG (MainThread) [alexapy.alexalogin] CSRF token not found from /templates/oobe/d-device-pick.handlebars
2024-08-08 07:58:41.199 DEBUG (MainThread) [alexapy.alexalogin] No csrf token found
2024-08-08 07:58:41.347 DEBUG (MainThread) [alexapy.alexalogin] GET: 
https://alexa.amazon.com/api/bootstrap returned 401:Unauthorized with response <CIMultiDictProxy('Content-Length': '0', 'Connection': 'keep-alive', 'Server': 'Server', 'Date': 'Thu, 08 Aug 2024 05:58:41 GMT', 'Vary': 'Content-Type,Accept-Encoding,User-Agent', 'x-amz-rid': 'Y3RW7R76JHSWDBG4VWNT', 'loginUrl': 'https://www.amazon.com/ap/signin?showRmrMe=1&openid.return_to=https%3A%2F%2Falexa.amazon.com%2Flogin&openid.identity=http%3A%2F%2Fspecs.openid.net%2Fauth%2F2.0%2Fidentifier_select&openid.assoc_handle=amzn_dp_project_dee&openid.mode=checkid_setup&openid.claimed_id=http%3A%2F%2Fspecs.openid.net%2Fauth%2F2.0%2Fidentifier_select&openid.ns=http%3A%2F%2Fspecs.openid.net%2Fauth%2F2.0&', 'x-amzn-RequestId': 'Y3RW7R76JHSWDBG4VWNT', 'X-Cache': 'Error from cloudfront', 'Via': '1.1 b8455bc5c5405f573b6e4da5524ee9e2.cloudfront.net (CloudFront)', 'X-Amz-Cf-Pop': 'FRA56-P8', 'X-Amz-Cf-Id': 'SECRET')>
2024-08-08 07:58:41.347 DEBUG (MainThread) [alexapy.alexalogin] Not logged in: An exception of type ContentTypeError occurred. Arguments:
(RequestInfo(url=URL('https://alexa.amazon.com/api/bootstrap'), method='GET', headers=<CIMultiDictProxy('Host': 'alexa.amazon.com', 'User-Agent': 'AmazonWebView/Amazon Alexa/2.2.556530.0/iOS/16.6/iPhone', 'Accept': '*/*', 'Accept-Language': '*', 'DNT': '1', 'Upgrade-Insecure-Requests': '1', 'Accept-Encoding': 'gzip, deflate, br', 'Cookie': 'session-id=131-5643121-6348236; session-id-time=2353816720l; session-token=SECRET; ubid-main=135-7833769-4270503')>, real_url=URL('https://alexa.amazon.com/api/bootstrap')), ())
2024-08-08 07:58:41.347 DEBUG (MainThread) [alexapy.alexalogin] Login failed; check credentials
2024-08-08 07:58:41.347 DEBUG (MainThread) [alexapy.alexalogin] Found post url to /errors/validateCaptcha
2024-08-08 07:58:41.347 DEBUG (MainThread) [alexapy.alexalogin] Preparing form submission to /errors/validateCaptcha with input data: {}
2024-08-08 07:58:41.348 WARNING (MainThread) [alexapy.helpers] alexalogin.login((<alexapy.alexalogin.AlexaLogin object at 0x7fc895f3f080>,), {'cookies': {'session-id': <Morsel: session-id=134-4847411-4697361; Path=/>, 'session-id-time': <Morsel: session-id-time=2082787201l; Path=/>, 'lc-main': <Morsel: lc-main=en_US; Path=/>, 'ubid-main': <Morsel: ubid-main=135-5133979-3095018; Path=/>, 'session-token': <Morsel: session-token=SECRET; Path=/>}}): An error occurred accessing AlexaAPI: An exception of type InvalidUrlClientError occurred. Arguments:
(URL('/errors/validateCaptcha'),)
2024-08-08 07:58:41.348 ERROR (MainThread) [homeassistant.config_entries] Error setting up entry amazon_us@hassio.nl - amazon.com for alexa_media
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 604, in async_setup
    result = await component.async_setup_entry(hass, self)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/alexa_media/__init__.py", line 359, in async_setup_entry
    await login.login(cookies=await login.load_cookie())
  File "/usr/local/lib/python3.12/site-packages/alexapy/helpers.py", line 137, in wrapper
    return await func(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/alexapy/alexalogin.py", line 687, in login
    post_resp = await self._session.post(
                ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/aiohttp/client.py", line 576, in _request
    raise err_exc_cls(url)
aiohttp.client_exceptions.InvalidUrlClientError: /errors/validateCaptcha
2024-08-08 07:58:51.859 DEBUG (MainThread) [custom_components.alexa_media] Completing remaining startup tasks.
github-actions[bot] commented 2 months ago

@poudenes this issue was automatically closed because it did not follow the issue template and this warning: IMPORTANT: Please search the issues, including closed issues, and the FAQ before opening a new issue. The template is mandatory; failure to use it will result in issue closure.