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.

Alexa integration: INVALID_ACCESS_TOKEN_EXCEPTION: Access token is not valid

See original GitHub issue

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

Issue Analytics

  • State:open
  • Created 3 years ago
  • Reactions:5
  • Comments:66 (9 by maintainers)

github_iconTop GitHub Comments

11reactions
KennethLavrsencommented, Oct 15, 2021

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?

10reactions
merloosecommented, Nov 3, 2020

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

Read more comments on GitHub >

github_iconTop Results From Across the Web

[homeassistant.components.alexa.state_report] Error when ...
Alexa integration : INVALID_ACCESS_TOKEN_EXCEPTION: Access token is not valid ... The problem I get frequent log entries with the following message ...
Read more >
INVALID_ACCESS_TOKEN_EX...
... "description": "Access token is not valid." } } Heres a picture of my Authorization for the access token: Heres how I get...
Read more >
Validate and Use Access Tokens in Custom Skill Code
In this scenario, the Alexa service deletes the existing invalid or expired tokens and sends a push notification to the user to re-link...
Read more >
How to send to Amazon's Alexa Event Gateway?
... event to the Amazon's Event Gateway for my Alexa Smart Home skill using Postman but I keep receiving an 'invalid access token...
Read more >
Issues Communicating with Alexa - Access token is not valid
While I wait impatiently for my shipment to arrive, I have been working on the HE/Alexa integration of the existing WiFi stuff.
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