core: Alexa integration: INVALID_ACCESS_TOKEN_EXCEPTION: Access token is not valid
The problem
I get frequent log entries with the following message:
Error when sending ChangeReport to Alexa: INVALID_ACCESS_TOKEN_EXCEPTION: Access token is not valid.
The integration seems to continue to work but this gets logged about every 1-2 hours. Presume when this happens it is requesting a new access token, so should this be in the error log? Is it part of normal operation?
Environment
- Home Assistant Core release with the issue: v0.110.0
- Last working Home Assistant Core release (if known): don’t know. At least before v0.106.0
- Operating environment (Home Assistant/Supervised/Docker/venv): Docker with HassIO
- Integration causing this issue: Alexa
- Link to integration documentation on our website: https://www.home-assistant.io/integrations/alexa/
Problem-relevant configuration.yaml
This is setup with UI config
Traceback/Error logs
The first occurred is about 2 hours after last rebooting.
Log Details (ERROR)
Logger: homeassistant.components.alexa.state_report
Source: components/alexa/state_report.py:49
Integration: Amazon Alexa (documentation, issues)
First occurred: 0:12:50 (7 occurrences)
Last logged: 11:35:52
Error when sending ChangeReport to Alexa: INVALID_ACCESS_TOKEN_EXCEPTION: Access token is not valid.
Additional information
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Reactions: 6
- Comments: 68 (9 by maintainers)
I have the feeling we have several independent issues being discussed here. The one I do not understand being addressed is that us Nabu Casa subscribers who pay monthly for a service still have to see this error in the logs multiple times every day. And most likely this is connected to the many times I experience an voice error saying something went wrong
I raised a ticket to Nabu Casa in march and never got a reply. This has been open since 2020. Why is it ignored? Do we have to unsubscribe Nabu Casa to get attention?
I had the same. it appeared for instance every time I had an action perform on a switch I got it solved as follow (using custom lambda skill, Login with amazon, and know very very little about coding so excuse me in advance). It seems I had the wrong client_ID and client_secret configuration in HASS 1 - On LWA security profile added your HASS url:port as allowed origin 2 - On alexa skill / permission tab: enable “send Alexa event” and copy Alexa Client Id and Alexa Client Secret which appears underneath 3 - on configuration.yaml in Hass: set client_id as the “alexa client id” previously copied and set client_secret as the “alexa client secret” previously copied. (I was using there previously the client ID and secret provided in the security profile and not the on apearing under skill permission) 4-relink/restart as necessary
And no more error… hope this help
I am having the same issue. I haven’t done anything about it because it does not appear to have any significant effect on alexa cloud performance.
So i disabled the Alexa integration in HA Cloud, disabled the skill in Alexa, rebooted and added it all back/relinked etc and the same messages started appearing a few hours after, so sorry, this did not seem to fix it.
`Log Details (ERROR) Logger: homeassistant.components.alexa.state_report Source: components/alexa/state_report.py:49 Integration: Amazon Alexa (documentation, issues) First occurred: 1:07:45 (3 occurrences) Last logged: 9:19:46
Error when sending ChangeReport to Alexa: INVALID_ACCESS_TOKEN_EXCEPTION: Access token is not valid.`
Still a problem…
I can confirm that is error is there logging this many times per day
I use Nabu Casa too and no custom skills.
Error when sending ChangeReport to Alexa: INVALID_ACCESS_TOKEN_EXCEPTION: Access token is not valid. 5:33:30 – Amazon Alexa (ERROR) - message first occurred at 22 March 2021, 15:18:29 and shows up 75 times
Things seem to generally work except I often get a “sorry something went wrong” response from Alexa though the command was executed and I suspect this could be related.
I just raised a ticket on Nabu Casa site. It was raised May 2020 so I think it may have been forgotten
Not working for me. Not others idea ?
I was also having this error more than once per minute. I followed @merloose 's instructions (from step 2 on as my login with amazon was set up correctly) and that solved my issue. Make sure you restart home assistant then unlink/relink the alexa skill when you’re done.
Just to provide some helpful info on how to find the permissions: Alexa Console: https://developer.amazon.com/alexa/console/ask Then click your skill, then click Permissions in the sidebar.