question-mark
Stuck on an issue?

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

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

ValueError: External step can only transition to external step or external step done.

See original GitHub issue

Describe the bug When attempting to login using the login proxy method you receive a “500 Internal Server Error” message when you are redirected to 0.0.0.0:8123/auth/alexamedia/callback?flow_id=REDACTED 32 CHARS after signing in on the Amazon page. When you go back to the configuration screen open in the other tab, it still shows that you are not logged in.

To Reproduce Steps to reproduce the behavior:

  1. Go to add the integration.
  2. Enter your username and password. Leave everything else what it is.
  3. Click sign-in on the Amazon Alexa page that has been opened.
  4. Complete the captcha.
  5. See the error.

Expected behavior After completing the captcha, you are signed in.

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

System details

  • Home-assistant (version): 2021.1.4
  • Hassio (Yes/No): Yes
  • alexa_media (version from const.py or HA startup): 3.5.0
  • alexapy (version from pip show alexapy or HA startup): 1.22.0
  • Amazon 2FA is enabled (y/n). We will not debug login issues if unanswered: No

Logs

Logger: aiohttp.server
Source: data_entry_flow.py:162
First occurred: 6:13:45 PM (1 occurrences)
Last logged: 6:13:45 PM

Error handling request
Traceback (most recent call last):
  File "/usr/local/lib/python3.8/site-packages/aiohttp/web_protocol.py", line 422, in _handle_request
    resp = await self._request_handler(request)
  File "/usr/local/lib/python3.8/site-packages/aiohttp/web_app.py", line 499, in _handle
    resp = await handler(request)
  File "/usr/local/lib/python3.8/site-packages/aiohttp/web_middlewares.py", line 118, in impl
    return await handler(request)
  File "/usr/src/homeassistant/homeassistant/components/http/security_filter.py", line 56, in security_filter_middleware
    return await handler(request)
  File "/usr/src/homeassistant/homeassistant/components/http/request_context.py", line 18, in request_context_middleware
    return await handler(request)
  File "/usr/src/homeassistant/homeassistant/components/http/ban.py", line 72, in ban_middleware
    return await handler(request)
  File "/usr/src/homeassistant/homeassistant/components/http/auth.py", line 127, in auth_middleware
    return await handler(request)
  File "/usr/src/homeassistant/homeassistant/components/http/view.py", line 129, in handle
    result = await result
  File "/config/custom_components/alexa_media/config_flow.py", line 954, in get
    await hass.config_entries.flow.async_configure(
  File "/usr/src/homeassistant/homeassistant/data_entry_flow.py", line 162, in async_configure
    raise ValueError(
ValueError: External step can only transition to external step or external step done.

Additional context I was thinking that this might have something to do with the 2021.1.3 update.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:9

github_iconTop GitHub Comments

1reaction
alandtsecommented, Jan 23, 2021

Ahhh I didn’t account for that use case where - both were available. I can put in a check so it doesn’t try to match the email if it knows you’re using a phone number.

1reaction
pizzakid25commented, Jan 23, 2021

I think I figured it out. Typically, if a user has both their email and mobile number linked to their Amazon account, they could use either to login to the regular Amazon website. But, for the integration, if you have an email linked to your account you must use your email to sign into the integration because the customerEmail field always returns the email if it is available. I think I worded my comment earlier a little funny. I added an email to my account shortly before I got the original error since I was configuring IFTTT to work with Alexa and it asked me to add an email. Thus, adding an email to my account changed the customerEmail field to show my email making it non blank. Due to how alexapy is configured, it tried to match my mobile number to my email which caused an email mismatch.

Only Email Linked: Use Email to Sign In Only Mobile Number Linked: Use Mobile Number to Sign In Mobile Number and Email Linked: Use Email to Sign In

Read more comments on GitHub >

github_iconTop Results From Across the Web

Exterior Stair Code Requirements {Residential & Commercial}
Exterior stair tread code​​ Exterior stair treads must comply with all the general stair tread requirements found in IBC section 1011.5 Stair ......
Read more >
Height of Landing or Stairway at Exterior Door - YouTube
http://stairs4u.com/stairbuildingcodes.htm Click on this link for more information about stair building codes. Remember to always check with ...
Read more >
HOW TO BUILD STAIRS // EXTERIOR STEPS - YouTube
This DIY exterior steps project is all about how to build stairs from start to finish. This DIY staircase video shows the step...
Read more >
How to Build Deck Stairs | Trex Academy - YouTube
Your browser can 't play this video. ... Newel Post Layout 18:52 Install Temporary Layout / Support Block 22:34 Install Outside Stringers ...
Read more >
110 Best Outside stairs ideas - Pinterest
Oct 23, 2019 - Explore Bronco's board "Outside stairs" on Pinterest. See more ideas about outside stairs, stairs, stairs design.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

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

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found