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.44k stars 278 forks source link

Stuck at "Loading next step for Alexa Media Player" #2128

Closed GooseTroopza closed 9 months ago

GooseTroopza commented 9 months ago

Describe the bug I can't install. Installation gets stuck at "Loading next step for Alexa Media Player". Sits there for a few min then eventually spits out "Error"

To Reproduce Install Alexa Media Player.
using 2 step with 2 apps loaded in amazon using internal IP Usinig chrome browser in incognito mode

Expected behavior Install it

Screenshots

System details

Logs

2023-12-02 08:39:23.388 DEBUG (MainThread) [alexapy.alexalogin] Header: {"User-Agent": "AmazonWebView/Amazon Alexa/2.2.556530.0/iOS/16.6/iPhone", "Accept": "*/*", "Accept-Language": "*", "DNT": "1", "Upgrade-Insecure-Requests": "1"}
2023-12-02 08:39:23.390 DEBUG (MainThread) [alexapy.alexalogin] Attempting to register with amazon.co.uk
2023-12-02 08:39:24.064 DEBUG (MainThread) [alexapy.alexalogin] auth response <ClientResponse(https://api.amazon.co.uk/auth/register) [200 OK]>
<CIMultiDictProxy('Server': 'Server', 'Date': 'Sat, 02 Dec 2023 08:39:24 GMT', 'Content-Type': 'application/json;charset=UTF-8', 'Content-Length': '5808', 'Connection': 'keep-alive', 'x-amz-rid': 'xx', 'x-amzn-RequestId': '859xx0-594f69e2a93f', 'X-Amz-Date': 'Sat, 02 Dec 2023 08:39:24 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.co.uk"}, "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": "XXX", "device_model": "iPhone", "app_name": "Alexa Media Player", "software_version": "1"}, "auth_data": {"client_id": "xx", "authorization_code": "xxx", "code_verifier": "xxx", "code_algorithm": "SHA-256", "client_domain": "DeviceLegacy"}, "user_context_map": {"frc": "xx/xx+x//VUc/xx/xx//x/x"}, "requested_token_type": ["bearer", "mac_dms", "website_cookies"]}
2023-12-02 08:39:24.065 DEBUG (MainThread) [alexapy.alexalogin] Successfully registered xxx 3rd Alexa Media Player device with Amazon
2023-12-02 08:39:24.066 DEBUG (MainThread) [alexapy.alexalogin] Received registration data:
{"success": {"extensions": {"device_info": {"device_name": "xxx 3rd Alexa Media Player", "device_serial_number": "XXX", "device_type": "xx"}, "customer_info": {"account_pool": "Amazon", "user_id": "xxxx", "home_region": "EU", "name": "xxx xxx", "given_name": "xxx"}}, "tokens": {"website_cookies": [{"Path": "/", "Secure": "true", "Value": "260-xx-6623700", "Expires": "27 Nov 2043 08:39:24 GMT", "Domain": ".amazon.co.uk", "HttpOnly": "false", "Name": "session-id"}, {"Path": "/", "Secure": "true", "Value": "261-xx-5010739", "Expires": "27 Nov 2043 08:39:24 GMT", "Domain": ".amazon.co.uk", "HttpOnly": "false", "Name": "ubid-acbuk"}, {"Path": "/", "Secure": "true", "Value": "\"xx@15hOAQxEG89Fonbx2jDl\"", "Expires": "27 Nov 2043 08:39:24 GMT", "Domain": ".amazon.co.uk", "HttpOnly": "false", "Name": "x-acbuk"}, {"Path": "/", "Secure": "true", "Value": "\"Atza|xx-x-xx-xx-_1Knm-xRnqUt-x-JoEJzSVZcb8S-pBcuuvFUAtRpAT7ZK\"", "Expires": "3 Dec 2023 08:39:24 GMT", "Domain": ".amazon.co.uk", "HttpOnly": "true", "Name": "at-acbuk"}, {"Path": "/", "Secure": "true", "Value": "\"tE+x=\"", "Expires": "3 Dec 2023 08:39:24 GMT", "Domain": ".amazon.co.uk", "HttpOnly": "true", "Name": "sess-at-acbuk"}], "mac_dms": {"device_private_key": "XXXXX", "adp_token": "{enc:oJmv3/x+x+x}{serial:Mg==}"}, "bearer": {"access_token": "Atna|XXX-yrY_t_r-xx-x-xx-LUAIiqLgRNHgqks", "refresh_token": "Atnr|xx-oajfi-x-x", "expires_in": "3600"}}, "customer_id": "amzn1.account.xxxx"}}
2023-12-02 08:39:24.067 DEBUG (MainThread) [alexapy.alexalogin] New access token(396) received which expires at 2023-12-02 09:39:24.066920 in 0:59:59.999942
2023-12-02 08:39:24.558 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': 'Sat, 02 Dec 2023 08:39:24 GMT', 'x-amz-rid': 'x', 'Vary': 'Content-Type,Accept-Encoding,User-Agent', 'Strict-Transport-Security': 'max-age=47474747; includeSubDomains; preload', 'X-Cache': 'Miss from cloudfront', 'Via': '1.1 355045998245eefce4f26bab1b0dbd48.cloudfront.net (CloudFront)', 'X-Amz-Cf-Pop': 'LHR61-P6', 'X-Amz-Cf-Id': 'c-x==')>
 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": "xxx"}

Additional context

It seems to get past the login phase and "Successfully registered my 3rd Alexa Media Player device with Amazon"

I hope I've scrubbed the logs enough

alandtse commented 9 months ago

Try disabling IPv6 in HA and see if that helps.

GooseTroopza commented 9 months ago

Sorted thank you!