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.5k stars 286 forks source link

Unable to login - There was a problem Enter a valid email or mobile number. #892

Closed alandtse closed 4 years ago

alandtse commented 4 years ago

Describe the bug Attempting to log in results in Amazon rejecting the login with "There was a problem\n Enter a valid email or mobile number\n"

To Reproduce Steps to reproduce the behavior:

  1. Go to Integrations
  2. Add component
  3. Clicking on submit results in an error in the logs and the UI stays on the account input screen.

Expected behavior A clear and concise description of what you expected to happen. Continuation of login.

Screenshots If applicable, add screenshots to help explain your problem.

System details

Logs Please provide logs. We'll be most likely asking for them anyway.

 2020-08-28 11:31:04 DEBUG (MainThread) [custom_components.alexa_media.config_flow] Creating new login
 2020-08-28 11:31:04 DEBUG (MainThread) [alexapy.alexalogin] No valid cookies for log in; using credentials
 2020-08-28 11:31:20 DEBUG (MainThread) [alexapy.alexalogin] GET: redirected from
 https://alexa.amazon.com
 2020-08-28 11:31:20 DEBUG (MainThread) [alexapy.alexalogin] GET:
 https://www.amazon.com/ap/signin?showRmrMe=1&openid.return_to=https://alexa.amazon.com/&openid.identity=http://specs.openid.net/auth/2.0/identifier_select&openid.assoc_handle=amzn_dp_project_dee&ope id.mode=checkid_setup&openid.claimed_id=http://specs.openid.net/auth/2.0/identifier_select&openid.ns=http://specs.openid.net/auth/2.0& with
 <CIMultiDictProxy('Host': 'www.amazon.com', 'User-Agent': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/84.0.4147.135 Safari/537.36', 'Accept': 'text html,application/xhtml+xml, application/xml;q=0.9,*/*;q=0.8', 'Accept-Language': '*', 'Accept-Encoding': 'gzip, deflate')>
  returned 200:OK with response <CIMultiDictProxy('Content-Type': 'text/html;charset=UTF-8', 'Transfer-Encoding': 'chunked', 'Connection': 'keep-alive', 'Server': 'Server', 'Date': 'Fri, 28 Aug 2020 18:31:21 GMT', 'x-amz-rid': '1Y15FJG7XAE1Y0QBG24W', 'Set-Cookie': 'ap-fid=""; Domain=.amazon.com; Expires=Thu, 01-Jan-1970 00:00:10 GMT; Path=/ap/; Secure', 'Set-Cookie': 'session-id=136-4909744-0586147; Domain=.amazon.com; Expires=Sat, 28-Aug-2021 18:31:21 GMT; Path=/; Secure', 'Set-Cookie': 'session-id-time=2229359481l; Domain=.amazon.com; Expires=Sat, 28-Aug-2021 18:31:21 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,X-Amzn-CDN-Cache,X-Amzn-AX-Treatment,User-Agent', '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 8e223aee1ca3f4c950e8d2a26c8a546b.cloudfront.net (CloudFront)', 'X-Amz-Cf-Pop': 'LAX3-C3', 'X-Amz-Cf-Id': 'gQM4D9j88I80BBAVZzHDfzq5o3FLV 47bDvyhbmKDPWZk7dtDkIoww==')>
 2020-08-28 11:31:20 DEBUG (MainThread) [alexapy.alexalogin] Processing https://www.amazon.com/ap/signin?showRmrMe=1&openid.return_to=https://alexa.amazon.com/&openid.identity=http://specs.openid.net/auth/2.0/identifier_select&openid.assoc_handle=amzn_dp_project_dee&openid.mode=checkid_setup&openid.claimed_id=http://specs.openid.net/auth/2.0/identifier_select&openid.ns=http://specs.openid.net/au h/2.0&
 2020-08-28 11:31:20 DEBUG (MainThread) [alexapy.alexalogin] Links: {'0': ('Forgot password?', 'https://www.amazon.com/ap/forgotpassword?showRememberMe=true&showRmrMe=1&openid.identity=http%3A%2F%2Fspecs.openid.net%2Fauth%2F2.0%2Fidentifier_select&pageId=amzn_dp_project_dee&openid.return_to=https%3A%2F%2Falexa.amazon.com%2F&prevRID=1Y15FJG7XAE1Y0QBG24W&openid.assoc_handle=amzn_dp_project_dee&openid.mode=checkid_setup&prepopulatedLoginId=&failedSignInCount=0&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'), '1': ('Conditions of Use', 'https://alexa.amazon.com/conditions_of_use_mobile?pop-up=1'), '2': ('Privacy Notice', 'https://alexa.amazon.com/privacy_policy_mobile'), '3': ('Create a new Amazon account', 'https://www.amazon.com/ap/register?showRememberMe=true&showRmrMe=1&openid.return_to=https%3A%2F%2Falexa.amazon.com%2F&prevRID=1Y15FJG7XAE1Y0QBG24W&openid.identity=http%3A%2F%2Fspecs.openid.net%2Fauth%2F2.0%2Fidentifier_select&openid.assoc_handle=amzn_dp_project_dee&openid.mode=checkid_setup&prepopulatedLoginId=&failedSignInCount=0&openid.claimed_id=http%3A%2F%2Fspecs.openid.net%2Fauth%2F2. %2Fidentifier_select&pageId=amzn_dp_project_dee&openid.ns=http%3A%2F%2Fspecs.openid.net%2Fauth%2F2.0')}
 2020-08-28 11:31:20 DEBUG (MainThread) [alexapy.alexalogin] Found standard login page
 2020-08-28 11:31:20 DEBUG (MainThread) [alexapy.alexalogin] Found form to process: <form action="https://www.amazon.com/ap/signin/136-4909744-0586147" class="auth-validate-form auth-clearable-form"  ethod="post" name="signIn" novalidate="">
 <input name="appActionToken" type="hidden" value="3g3dhq7xoDBOsbo360ppDUvzyGAj3D"/><input name="appAction" type="hidden" value="SIGNIN"/>
 <input name="openid.return_to" type="hidden" value="ape:aHR0cHM6Ly9hbGV4YS5hbWF6b24uY29tLw=="/>
 <input name="prevRID" type="hidden" value="ape:MVkxNUZKRzdYQUUxWTBRQkcyNFc="/>
 <input name="workflowState" type="hidden" value="eyJ6aXAiOiJERUYiLCJlbmMiOiJBMjU2R0NNIiwiYWxnIjoiQTI1NktXIn0.EhRm958TJ32NLGf-KX3KZRjtKIAGkOfDu6WZ-HULu7AbqRcjVcKrPw.e6c9lRH32I8Xhq9b.ElxyR6qrpdR25JkZaDPdizzWg4W9fAmeGlWFyJQl0SWlZQ-p5BFbTdcdj-ngboNspJWHVgBILSQygtgSv-hqo_QF1TR856saTVtuxdHOMt6cRRRwGbys0bz2Ne22aHZ4IlcWuR5XfMamURpXpx2R5o4R8QClC-2R8Q81U1e72A3fXjAtcwDfXGn1yRL_Yld0_31w6rN2FfLUaSrolSym-esF XXisEwPNGaAo5xrlZBOeVrpR2SknPjYFi5RFaQ3FzKTMkcJ5XlMp41kTDrzaj_BR_Ts3syRYqaJPDgRiw.b0P45VS9n361GR659cRjRg"/>
 <h1 class="a-spacing-micro a-spacing-top-small a-text-left">
   Sign-In
 </h1>
 <div class="a-section a-spacing-base a-text-right">
 <a class="a-link-normal" href="https://www.amazon.com/ap/forgotpassword?showRememberMe=true&amp;showRmrMe=1&amp;openid.identity=http%3A%2F%2Fspecs.openid.net%2Fauth%2F2.0%2Fidentifier_select&amp;pageId=amzn_dp_project_dee&amp;openid.return_to=https%3A%2F%2Falexa.amazon.com%2F&amp;prevRID=1Y15FJG7XAE1Y0QBG24W&amp;openid.assoc_handle=amzn_dp_project_dee&amp;openid.mode=checkid_setup&amp;prepopulatedLoginId=&amp;failedSignInCount=0&amp;openid.claimed_id=http%3A%2F%2Fspecs.openid.net%2Fauth%2F2.0%2Fidentifier_select&amp;openid.ns=http%3A%2F%2Fspecs.openid.net%2Fauth%2F2.0" id="auth-fpp-link-bo tom" rel="noopener" tabindex="9" target="_top">
   Forgot password?
 </a>
 </div>
 <div class="a-input-text-group a-spacing-medium a-spacing-top-micro">
 <label class="a-form-label auth-mobile-label" for="ap_email">
       Email (phone for mobile accounts)
     </label>
 <div class="a-input-text-wrapper auth-required-field auth-fill-claim"><input autocapitalize="off" autocorrect="off" id="ap_email" maxlength="128" name="email" placeholder="Email (phone for mobile ac ounts)" tabindex="1" type="email"/></div>
 <div class="auth-clear-icons" id="ap_email_icon">
 <i class="a-icon a-icon-close" role="img"></i>
 </div>
 <script data-a-state='{"key":"auth-show-password"}' type="a-state">{"isShowPasswordEnabled":true,"showPasswordChecked":false}</script>
 <label class="a-form-label auth-mobile-label" for="ap_password">
   Amazon password
 </label>
 <div class="a-input-text-wrapper auth-required-field auth-password-container auth-password auth-fill-password" id="auth-password-container"><input id="ap_password" maxlength="1024" name="password" p aceholder="Amazon password" tabindex="2" type="password"/></div>
 <div class="auth-clear-icons" id="ap_password_icon">
 <i class="a-icon a-icon-close" role="img"></i>
 </div>
 <div aria-live="assertive" class="a-box a-alert-inline a-alert-inline-error auth-inlined-error-message a-spacing-top-mini" id="auth-password-missing-alert" role="alert"><div class="a-box-inner a-ale t-container"><i class="a-icon a-icon-alert"></i><div class="a-alert-content">
   Enter your password
 </div></div></div>
 <div class="a-row auth-visible-password-container auth-show-password-empty">
 <span class="a-size-small a-color-secondary auth-visible-password"></span>
 </div>
 <input id="ap_show_password_checked" name="showPasswordChecked" type="hidden" value="false"/>
 <input name="encryptedPasswordExpected" type="hidden"/>
 <script data-a-state='{"key":"sif-encryption-profile"}' type="a-state">{"sifProfile":"AuthenticationPortalSigninNA"}</script>
 <script async="" src="https://static.siege-amazon.com/prod/profiles/AuthenticationPortalSigninNA.js" type="text/javascript">
 </script>
 </div>
 <div class="a-row">
 <div class="a-column a-span12 a-spacing-medium">
 <div class="a-checkbox a-checkbox-fancy a-control-row a-touch-checkbox auth-show-password-checkbox" id="auth-show-password-checkbox-container"><label for="auth-show-password-checkbox"><input id="aut -show-password-checkbox" name="" tabindex="3" type="checkbox" value=""/><i class="a-icon a-icon-checkbox"></i><span class="a-label a-checkbox-label">
           Show password
         </span></label></div>
 </div>
 </div>
 <div class="a-row a-spacing-base">
 <div class="a-checkbox a-checkbox-fancy a-control-row a-touch-checkbox" data-a-input-name="rememberMe"><label><input name="rememberMe" tabindex="4" type="checkbox" value="true"/><i class="a-icon a-i on-checkbox"></i><span class="a-label a-checkbox-label">
     Keep me signed in.
     <span class="a-declarative" data-a-modal='{"max-width":"500px","width":"95%","name":"remember-me-detail-link-modal","header":"\"Keep Me Signed In\" Checkbox"}' data-action="a-modal">
 <a class="a-link-normal" href="#" id="remember_me_learn_more_link">
         Details
       </a>
 </span>
 <div class="a-popover-preload" id="a-popover-remember-me-detail-link-modal">
 <div class="a-section a-spacing-large a-spacing-top-mini">
 <p>
 <p>Choosing "Keep me signed in" reduces the number of times you're asked to Sign-In on this device.</p>
 <p>To keep your account secure, use this option only on your personal devices.</p>
 </p>
 </div>
 </div>
 </span></label></div>
 </div>
 <div class="a-row">
 </div>
 <div class="a-section">
 <div class="a-button-stack">
 <span class="a-button a-button-span12 a-button-primary auth-share-credential-off" id="auth-signin-button"><span class="a-button-inner"><input aria-labelledby="auth-signin-button-announce" class="a-b tton-input" id="signInSubmit" tabindex="6" type="submit"/><span aria-hidden="true" class="a-button-text" id="auth-signin-button-announce">
             Sign-In
           </span></span></span>
 <div class="a-section a-spacing-medium">
 <div class="a-row a-spacing-top-medium a-size-small" id="legalTextRow">
   By continuing, you agree to Amazon's <a href="/conditions_of_use_mobile?pop-up=1">Conditions of Use</a> and <a href="/privacy_policy_mobile">Privacy Notice</a>.
 </div>
 </div>
 <script>
   function cf() {
     if (typeof window.uet === 'function') {
       uet('cf');
     }
     if (window.embedNotification &&
       typeof window.embedNotification.onCF === 'function') {
       embedNotification.onCF();
     }
   }
 </script>
 <script type="text/javascript">cf()</script>
 <div class="a-section a-spacing-medium a-text-center">
 <div class="a-divider a-divider-break"><h5>New to Amazon?</h5></div>
 <span class="a-button a-button-span12 a-button-base" id="auth-create-account-link"><span class="a-button-inner"><a class="a-button-text" href="https://www.amazon.com/ap/register?showRememberMe=true&amp;showRmrMe=1&amp;openid.return_to=https%3A%2F%2Falexa.amazon.com%2F&amp;prevRID=1Y15FJG7XAE1Y0QBG24W&amp;openid.identity=http%3A%2F%2Fspecs.openid.net%2Fauth%2F2.0%2Fidentifier_select&amp;openid.assoc_handle=amzn_dp_project_dee&amp;openid.mode=checkid_setup&amp;prepopulatedLoginId=&amp;failedSignInCount=0&amp;openid.claimed_id=http%3A%2F%2Fspecs.openid.net%2Fauth%2F2.0%2Fidentifier_select&amp pageId=amzn_dp_project_dee&amp;openid.ns=http%3A%2F%2Fspecs.openid.net%2Fauth%2F2.0" id="createAccountSubmit" role="button" tabindex="7">
           Create a new Amazon account
         </a></span></span>
 </div>
 </div>
 </div>
 </form>
 2020-08-28 11:31:20 DEBUG (MainThread) [alexapy.alexalogin] Found post url to https://www.amazon.com/ap/signin/136-4909744-0586147
 2020-08-28 11:31:20 DEBUG (MainThread) [alexapy.alexalogin] Preparing form submission to https://www.amazon.com/ap/signin/136-4909744-0586147 with input data: {}
 2020-08-28 11:31:20 DEBUG (MainThread) [alexapy.alexalogin] WARNING: Detected missing params: ['encryptedPasswordExpected']
 2020-08-28 11:31:20 DEBUG (MainThread) [alexapy.alexalogin] Session Cookies:
 amazon.com: expires:Sat, 28-Aug-2021 18:31:21 GMT max-age: session-id=136-4909744-0586147
 amazon.com: expires:Sat, 28-Aug-2021 18:31:21 GMT max-age: session-id-time=2229359481l
 2020-08-28 11:31:20 DEBUG (MainThread) [alexapy.alexalogin] Submit Form Data: {"appActionToken": "3g3dhq7xoDBOsbo360ppDUvzyGAj3D", "appAction": "SIGNIN", "openid.return_to": "ape:aHR0cHM6Ly9hbGV4YS5hbWF6b24uY29tLw==", "prevRID": "ape:MVkxNUZKRzdYQUUxWTBRQkcyNFc=", "workflowState": "eyJ6aXAiOiJERUYiLCJlbmMiOiJBMjU2R0NNIiwiYWxnIjoiQTI1NktXIn0.EhRm958TJ32NLGf-KX3KZRjtKIAGkOfDu6WZ-HULu7AbqRcjVcKrPw.e6c9lRH32I8Xhq9b.ElxyR6qrpdR25JkZaDPdizzWg4W9fAmeGlWFyJQl0SWlZQ-p5BFbTdcdj-ngboNspJWHVgBILSQygtgSv-hqo_QF1TR856saTVtuxdHOMt6cRRRwGbys0bz2Ne22aHZ4IlcWuR5XfMamURpXpx2R5o4R8QClC-2R8Q81U1e72A3fXjAtcwDfXGn1yRL_Yld0_31w6rN2FfLUaSrolSym-esFeXXisEwPNGaAo5xrlZBOeVrpR2SknPjYFi5RFaQ3FzKTMkcJ5XlMp41kTDrzaj_BR_Ts3syRYqaJPDgRiw.b0P45VS9n361GR659cRjRg", "email": "redacted email", "password": "redacted", "showPasswordChecked": "false", "encryptedPasswordExpected": "", "rememberMe": "true", "metadata1": "true"}
 2020-08-28 11:31:20 DEBUG (MainThread) [alexapy.alexalogin] Header: {"User-Agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/84.0.4147.135 Safari/537.36", "Accept": "text/html,application/xhtml+xml, application/xml;q=0.9,*/*;q=0.8", "Accept-Language": "*", "Referer": "https://www.amazon.com/ap/signin?showRmrMe=1&openid.return_to=https://alexa.amazon.com/&openid.identity=http://specs.openid.net/auth/2.0/identifier_select&openid.assoc_handle=amzn_dp_project_dee&openid.mode=checkid_setup&openid.claimed_id=http://specs.openid.net/auth/2.0/id ntifier_select&openid.ns=http://specs.openid.net/auth/2.0&"}
 2020-08-28 11:31:21 DEBUG (MainThread) [alexapy.alexalogin] POST:
 https://www.amazon.com/ap/signin/136-4909744-0586147 with
 <CIMultiDictProxy('Host': 'www.amazon.com', 'User-Agent': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/84.0.4147.135 Safari/537.36', 'Accept': 'text/html,application/xhtml+xml, application/xml;q=0.9,*/*;q=0.8', 'Accept-Language': '*', 'Referer': 'https://www.amazon.com/ap/signin?showRmrMe=1&openid.return_to=https://alexa.amazon.com/&openid.identity=http://specs.openid.net/auth/2.0/identifier_select&openid.assoc_handle=amzn_dp_project_dee&openid.mode=checkid_setup&openid.claimed_id=http://specs.openid.net/auth/2.0/identifier_select&openid.ns=http://specs.openid.net/auth/2.0&', 'Accept-Encoding': 'gzip, deflate', 'Cookie': 'session-id=136-4909744-0586147; session-id-time=2229359481l', 'Content-Length': '774', 'Content-Type': 'application x-www-form-urlencoded')>
  returned 200:OK with response <CIMultiDictProxy('Content-Type': 'text/html;charset=UTF-8', 'Transfer-Encoding': 'chunked', 'Connection': 'keep-alive', 'Server': 'Server', 'Date': 'Fri, 28 Aug 2020 18:31:21 GMT', 'x-amz-rid': 'XTQ0EWPPKHDK1K8FZC21', 'Set-Cookie': 'ap-fid=""; Domain=.amazon.com; Expires=Thu, 01-Jan-1970 00:00:10 GMT; Path=/ap/; Secure', 'Set-Cookie': 'session-id=136-4909744-0586147; Domain=.amazon.com; Expires=Sat, 28-Aug-2021 18:31:21 GMT; Path=/; Secure', 'Set-Cookie': 'session-id-time=2229359481l; Domain=.amazon.com; Expires=Sat, 28-Aug-2021 18:31:21 GMT; Path=/; Secure', 'Set-Cookie': 'ubid-main=130-3865067-3544510; Domain=.amazon.com; Expires=Sat, 28-Aug-2021 18:31:21 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,X-Amzn-CDN-Cache,X-Amzn-AX-Treatment,User-Agent', '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 8e223aee1ca3f c950e8d2a26c8a546b.cloudfront.net (CloudFront)', 'X-Amz-Cf-Pop': 'LAX3-C3', 'X-Amz-Cf-Id': 'g7TfQNftwR27sPFak4cmLNrWyP4PFROLxerJFJuCEG2NxY4BoSyAKw==')>
 2020-08-28 11:31:21 DEBUG (MainThread) [alexapy.alexalogin] Processing https://www.amazon.com/ap/signin/136-4909744-0586147
 2020-08-28 11:31:21 DEBUG (MainThread) [alexapy.alexalogin] Links: {'0': ('Forgot password?', 'https://www.amazon.com/ap/forgotpassword?showRememberMe=true&showRmrMe=1&openid.identity=http%3A%2F%2Fspecs.openid.net%2Fauth%2F2.0%2Fidentifier_select&pageId=amzn_dp_project_dee&openid.return_to=https%3A%2F%2Falexa.amazon.com%2F&prevRID=XTQ0EWPPKHDK1K8FZC21&openid.assoc_handle=amzn_dp_project_dee&openid.mode=checkid_setup&prepopulatedLoginId=eyJjaXBoZXIiOiJFUkRVQmJDU1RNcmd3ZlBzOFpjbEtwRTlYdk04MmY0a3E0MzBsN3lYaFU4PSIsIklWIjoiQjhxRFF6TWl0TXhKQ3lsVEx0SkllZz09IiwidmVyc2lvbiI6MX0%3D&failedSignInCount=1&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&timestamp=1598639481000'), '1': ('Conditions of Use', 'https://alexa.amazon.com/conditions_of_use_mobile?pop-up=1'), '2': ('Privacy Notice', 'https://alexa.amazon.com/privacy_policy_mobile'), '3': ('Create a new Amazon account', 'https://www.amazon.com/ap/register?showRememberMe=true&showRmrMe=1&openid.identity=http%3A%2F%2Fspecs.openid.net%2Fauth%2F2.0%2Fidentifier_select&pageId=amzn_dp_project_dee&openid.return_to=https%3A%2F%2Falexa.amazon.com%2F&prevRID=XTQ0EWPPKHDK1K8FZC21&openid.assoc_handle=amzn_dp_project_dee&openid.mode=checkid_setup&prepopulatedLoginId=eyJjaXBoZXIiOiJZRUlXY2drd282RDVJUUlLdC83b0lQNXg3bS83Q3BZRkV1enl1Sm1taHlnPSIsIklWIjoiMUkyKzgrd2NFbFBqRnJJZVp2amwxZz09IiwidmVyc2lvbiI6MX0%3D&failedSignInCount=1&openid.claimed_id=http%3A%2F%2Fspecs.openid.net%2Fauth%2F2.0%2Fidentifier_select&openid.ns=http%3A%2F%2Fspecs.openid.net%2Fauth%2F .0&timestamp=1598639481000')}
 2020-08-28 11:31:21 DEBUG (MainThread) [alexapy.alexalogin] Error message: There was a problem
             Enter a valid email or mobile number

 2020-08-28 11:31:21 DEBUG (MainThread) [alexapy.alexalogin] Found standard login page
 2020-08-28 11:31:21 DEBUG (MainThread) [alexapy.alexalogin] Found form to process: <form action="https://www.amazon.com/ap/signin" class="auth-validate-form auth-clearable-form" method="post" name=" ignIn" novalidate="">
 <input name="appActionToken" type="hidden" value="3g3dhq7xoDBOsbo360ppDUvzyGAj3D"/><input name="appAction" type="hidden" value="SIGNIN"/>
 <input name="metadata1" type="hidden" value="ape:dHJ1ZQ=="/>
 <input name="openid.return_to" type="hidden" value="ape:aHR0cHM6Ly9hbGV4YS5hbWF6b24uY29tLw=="/>
 <input name="prevRID" type="hidden" value="ape:WFRRMEVXUFBLSERLMUs4RlpDMjE="/>
 <input name="workflowState" type="hidden" value="eyJ6aXAiOiJERUYiLCJlbmMiOiJBMjU2R0NNIiwiYWxnIjoiQTI1NktXIn0.HJc2usfsRy582tHVExyHsrkeWq4e8UAlJUm8vvixeRwmodW-iZrO5Q.h_yptYEIiMhVikak.v6RMiY00TIbaRHqS6lhusvuPn8tnCX-2KcRCCaVAaxPiWQnQblRUXePRHQyQfrt_EoPeaY2jnz8Qpr083TS_hJ52_W9j_TkTQp33wNLRDbLvI3MYpc8O1lr9KuZHLQD6I5135wJZVbOXJaodklP2ACOeYXDnT2ABnr0lnbMIBa6kGF6aDTRAMcphFkeuy4I2EIVMH1hHqk48A9eOufXK221U4wnOW0P4hPUBtxJe63aJ7IvDJ-_nVuOgwEHe54jGbCrQ81tzCVKEEr6UUjnN8BbP6gRhQMqg34rNmEDp8lRlgxMXaHiid5YhYEy9s5RAH_9lQ2j4N3TTz9xJw8IBRicV6CQa9HnFEfCryWH5txUEIvkr2R3uDxEdZHetwAQ6RU0HPZsUELcKTnH-7fr4dpiwL8qFXJi U3VADaU-yXreSwfC-SlF71uxHMNh14ykM9OU.jPZTSAXaH6DMWXIzEbKggA"/>
 <h1 class="a-spacing-micro a-spacing-top-small a-text-left">
   Sign-In
 </h1>
 <div class="a-section a-spacing-base a-text-right">
 <a class="a-link-normal" href="https://www.amazon.com/ap/forgotpassword?showRememberMe=true&amp;showRmrMe=1&amp;openid.identity=http%3A%2F%2Fspecs.openid.net%2Fauth%2F2.0%2Fidentifier_select&amp;pageId=amzn_dp_project_dee&amp;openid.return_to=https%3A%2F%2Falexa.amazon.com%2F&amp;prevRID=XTQ0EWPPKHDK1K8FZC21&amp;openid.assoc_handle=amzn_dp_project_dee&amp;openid.mode=checkid_setup&amp;prepopulatedLoginId=eyJjaXBoZXIiOiJFUkRVQmJDU1RNcmd3ZlBzOFpjbEtwRTlYdk04MmY0a3E0MzBsN3lYaFU4PSIsIklWIjoiQjhxRFF6TWl0TXhKQ3lsVEx0SkllZz09IiwidmVyc2lvbiI6MX0%3D&amp;failedSignInCount=1&amp;openid.claimed_id=http%3A%2F%2Fspecs.openid.net%2Fauth%2F2.0%2Fidentifier_select&amp;openid.ns=http%3A%2F%2Fspecs.openid.net%2Fauth%2F2.0&amp;timestamp=1598639481000" id="auth-fpp-link-bottom" rel="noopener" tabindex="9" target="_top">
   Forgot password?
 </a>
 </div>
 <div class="a-input-text-group a-spacing-medium a-spacing-top-micro">
 <label class="a-form-label auth-mobile-label" for="ap_email">
       Email (phone for mobile accounts)
     </label>
 <div class="a-input-text-wrapper auth-required-field auth-fill-claim"><input autocapitalize="off" autocorrect="off" id="ap_email" maxlength="128" name="email" placeholder="Email (phone for mobile ac ounts)" tabindex="1" type="email" value="redacted email"/></div>
 <div class="auth-clear-icons" id="ap_email_icon">
 <i class="a-icon a-icon-close" role="img"></i>
 </div>
 <script data-a-state='{"key":"auth-show-password"}' type="a-state">{"isShowPasswordEnabled":true,"showPasswordChecked":false}</script>
 <label class="a-form-label auth-mobile-label" for="ap_password">
   Amazon password
 </label>
 <div class="a-input-text-wrapper auth-required-field auth-password-container auth-password auth-fill-password" id="auth-password-container"><input id="ap_password" maxlength="1024" name="password" p aceholder="Amazon password" tabindex="2" type="password"/></div>
 <div class="auth-clear-icons" id="ap_password_icon">
 <i class="a-icon a-icon-close" role="img"></i>
 </div>
 <div aria-live="assertive" class="a-box a-alert-inline a-alert-inline-error auth-inlined-error-message a-spacing-top-mini" id="auth-password-missing-alert" role="alert"><div class="a-box-inner a-ale t-container"><i class="a-icon a-icon-alert"></i><div class="a-alert-content">
   Enter your password
 </div></div></div>
 <div class="a-row auth-visible-password-container auth-show-password-empty">
 <span class="a-size-small a-color-secondary auth-visible-password"></span>
 </div>
 <input id="ap_show_password_checked" name="showPasswordChecked" type="hidden" value="false"/>
 <input name="encryptedPasswordExpected" type="hidden"/>
 <script data-a-state='{"key":"sif-encryption-profile"}' type="a-state">{"sifProfile":"AuthenticationPortalSigninNA"}</script>
 <script async="" src="https://static.siege-amazon.com/prod/profiles/AuthenticationPortalSigninNA.js" type="text/javascript">
 </script>
 </div>
 <div class="a-row">
 <div class="a-column a-span12 a-spacing-medium">
 <div class="a-checkbox a-checkbox-fancy a-control-row a-touch-checkbox auth-show-password-checkbox" id="auth-show-password-checkbox-container"><label for="auth-show-password-checkbox"><input id="aut -show-password-checkbox" name="" tabindex="3" type="checkbox" value=""/><i class="a-icon a-icon-checkbox"></i><span class="a-label a-checkbox-label">
           Show password
         </span></label></div>
 </div>
 </div>
 <div class="a-row a-spacing-base">
 <div class="a-checkbox a-checkbox-fancy a-control-row a-touch-checkbox" data-a-input-name="rememberMe"><label><input checked="" name="rememberMe" tabindex="4" type="checkbox" value="true"/><i class= a-icon a-icon-checkbox"></i><span class="a-label a-checkbox-label">
     Keep me signed in.
     <span class="a-declarative" data-a-modal='{"max-width":"500px","width":"95%","name":"remember-me-detail-link-modal","header":"\"Keep Me Signed In\" Checkbox"}' data-action="a-modal">
 <a class="a-link-normal" href="#" id="remember_me_learn_more_link">
         Details
       </a>
 </span>
 <div class="a-popover-preload" id="a-popover-remember-me-detail-link-modal">
 <div class="a-section a-spacing-large a-spacing-top-mini">
 <p>
 <p>Choosing "Keep me signed in" reduces the number of times you're asked to Sign-In on this device.</p>
 <p>To keep your account secure, use this option only on your personal devices.</p>
 </p>
 </div>
 </div>
 </span></label></div>
 </div>
 <div class="a-row">
 </div>
 <div class="a-section">
 <div class="a-button-stack">
 <span class="a-button a-button-span12 a-button-primary auth-share-credential-off" id="auth-signin-button"><span class="a-button-inner"><input aria-labelledby="auth-signin-button-announce" class="a-b tton-input" id="signInSubmit" tabindex="6" type="submit"/><span aria-hidden="true" class="a-button-text" id="auth-signin-button-announce">
             Sign-In
           </span></span></span>
 <div class="a-section a-spacing-medium">
 <div class="a-row a-spacing-top-medium a-size-small" id="legalTextRow">
   By continuing, you agree to Amazon's <a href="/conditions_of_use_mobile?pop-up=1">Conditions of Use</a> and <a href="/privacy_policy_mobile">Privacy Notice</a>.
 </div>
 </div>
 <script>
   function cf() {
     if (typeof window.uet === 'function') {
       uet('cf');
     }
     if (window.embedNotification &&
       typeof window.embedNotification.onCF === 'function') {
       embedNotification.onCF();
     }
   }
 </script>
 <script type="text/javascript">cf()</script>
 <div class="a-section a-spacing-medium a-text-center">
 <div class="a-divider a-divider-break"><h5>New to Amazon?</h5></div>
 <span class="a-button a-button-span12 a-button-base" id="auth-create-account-link"><span class="a-button-inner"><a class="a-button-text" href="https://www.amazon.com/ap/register?showRememberMe=true&amp;showRmrMe=1&amp;openid.identity=http%3A%2F%2Fspecs.openid.net%2Fauth%2F2.0%2Fidentifier_select&amp;pageId=amzn_dp_project_dee&amp;openid.return_to=https%3A%2F%2Falexa.amazon.com%2F&amp;prevRID=XTQ0EWPPKHDK1K8FZC21&amp;openid.assoc_handle=amzn_dp_project_dee&amp;openid.mode=checkid_setup&amp;prepopulatedLoginId=eyJjaXBoZXIiOiJZRUlXY2drd282RDVJUUlLdC83b0lQNXg3bS83Q3BZRkV1enl1Sm1taHlnPSIsIklWIjoiMUkyKzgrd2NFbFBqRnJJZVp2amwxZz09IiwidmVyc2lvbiI6MX0%3D&amp;failedSignInCount=1&amp;openid.claimed_id=http%3A%2F%2Fspecs.openid.net%2Fauth%2F2.0%2Fidentifier_select&amp;openid.ns=http%3A%2F%2Fspecs. penid.net%2Fauth%2F2.0&amp;timestamp=1598639481000" id="createAccountSubmit" role="button" tabindex="7">
           Create a new Amazon account
         </a></span></span>
 </div>
 </div>
 </div>
 </form>
 2020-08-28 11:31:21 DEBUG (MainThread) [alexapy.alexalogin] Found post url to https://www.amazon.com/ap/signin
 2020-08-28 11:31:21 DEBUG (MainThread) [custom_components.alexa_media.config_flow] Testing login status: {'error_message': 'There was a problem\n            Enter a valid email or mobile number\n          '}

Additional context It appears Amazon may have changed their login system as there is now an encrypted password field generated via JavaScript.

alandtse commented 4 years ago

This may be related to the number of devices that have the OTP suppressed reaching a limit of 50 and no devices being allowed to be added. I was able to get past this after reseting the list of devices in the Amazon security page. image

Edit: I ran into it again while retesting so it may not be related to the number of devices. However, reseting the devices suppressed bypassed the error.

jerryzou commented 4 years ago

I've got the same error here.

It started appearing last night. It might have been a change from Amazon's end...

alandtse commented 4 years ago

I've also been able to get past this by entering the OTP code immediately after the password.

E.g., if my password is password and the otp is 123456. Enter password123456 in the password field.

BuxtonCalvin commented 4 years ago

Alan, thanks for fixing this. I enabled 2fa on amazon's user account page, selected suppress OTP for my browser and used google authenticator for creating the 2fa codes. I then entered the google OTP code immediately after the password and the connection took. I can only imagine the complexity under the hood to get the handshakes working correctly......

alandtse commented 4 years ago

@BuxtonCalvin Thanks for the kind words. It's a moving target and at some point I think Amazon will be able to lock us out. When this hit yesterday I thought we might be at that point but at least some people had said they had solved some of these issues by adding the OTP manually so that gave us a path forward.