Open johnkiniston opened 2 months ago
Hey there @joostlek, mind taking a look at this issue as it has been labeled with an integration (withings
) you are listed as a code owner for? Thanks!
(message by CodeOwnersMention)
withings documentation withings source (message by IssueLinks)
The issue you're encountering with the Withings integration in Home Assistant appears to be related to OAuth token resolution, which is a known problem. This can happen due to various reasons, including incorrect redirect URIs, issues with cached credentials, or potential bugs in the integration itself.
Here are some steps you can try to resolve the issue:
Update the Redirect URI:
https://my.home-assistant.io/auth/external/callback
. Double-check for typos or mismatches as these are common causes of the OAuth token timeout error【11†source】.Use a Stable URL:
https://my.home-assistant.io
. Avoid using local URLs (e.g., http://homeassistant.local:8123
) as these can sometimes cause issues with OAuth callbacks【12†source】.Clear OAuth Credentials:
Reinstall or Roll Back:
Please don't use chat gpt for this.
Try creating a new application at withings and try again.
The issue is mostly that your HA can't reach writings
Hello, I am not using chat gpt anywhere in my homeassistant, I'm not sure where that was picked up?
As requested I created a new application and updated my credentials to use it, the old applications are pending deletion.
I still get the error Timeout resolving OAuth token.
I changed my https://my.home-assistant.io instance to point to my nabu casa cloud instead of homeassistant.local as listed above and even tried adding the cloud url as a secondary url at the withings developer portal.
I do see something that differs in the URL section above, the URL there is listed as
https://my.home-assistant.io/auth/external/callback
where the integration lists https://my.home-assistant.io/redirect/oauth
I do get an error from withings for both oath url's, I didn't include the cloud url in this screenshot for security but can if needed.
Oh the user above me did, you didn't ^^
If you have the my
integration enabled, you need to use the my link (if you don't know what I'm talking about you didn't disable it)
Pressing the test button won't work, but it can succeed setup if you don't press it
I have not disabled the my integration.
What can I do to further troubleshoot this?
How does your network set up look like? Anything special?
No, nothing abnormal about my networking, Just a IPv4 with a single nat going on.
Do I need a port forward for this integration to work? I thought with the nabu cloud I wouldn't need one?
You don't need to portforward indeed. Please check the documentation page, it got updated last weekend, maybe that helps
No luck re-reading the documentation.
I verified I'm using the public cloud. I created a new application exactly as described with the my-homeassistant.io url I go to add it to home assistant and I still get the Timeout resolving OAuth token.
Some stuff I've tried. Using Chrome instead of Safari Using my nabu-casa cloud url instead of http://homeassistant.local:8123 in the my-homeassistant.io configuration. Setting up a port forward and using my public IP instead of http://homeassistant.local:8123 in the my-homeassistant.io configuration
In all cases I access Home Assistant via the url I'm configuring in my-homeassistant.io, IE via the nabu cloud or ip or just http://homeassistant.local:8123
Is there more debugging I can do?
The problem
I am unable to setup a new withings integration.
I get the following error when I try and add the integration:
Logger: homeassistant.helpers.config_entry_oauth2_flow Source: helpers/config_entry_oauth2_flow.py:336 First occurred: 4:28:28 PM (1 occurrences) Last logged: 4:28:28 PM
Timeout resolving OAuth token:
The integration does successfully redirect me to the account.withings.com site and I am able to Allow the App I have created there.
I next get taken to the my.homeassistant.io redirect where my instance URL is configured as http://homeassistant.local:8123 and when I click Link account the page refreshes and eventually shows the Oath error.
What version of Home Assistant Core has the issue?
2024.8.3
What was the last working version of Home Assistant Core?
No response
What type of installation are you running?
Home Assistant OS
Integration causing the issue
Withings
Link to integration documentation on our website
https://www.home-assistant.io/integrations/withings/
Diagnostics information
Logger: homeassistant.helpers.config_entry_oauth2_flow Source: helpers/config_entry_oauth2_flow.py:336 First occurred: 4:28:28 PM (1 occurrences) Last logged: 4:28:28 PM
Timeout resolving OAuth token:
Example YAML snippet
No response
Anything in the logs that might be useful for us?
No response
Additional information
No response