core icon indicating copy to clipboard operation
core copied to clipboard

Cannot set up Google Generative AI due to Failed to connect

Open danieldotnl opened this issue 1 year ago • 5 comments

The problem

I'm trying to set up Google Generative API. I created an API key and linked it to a biling account. I get a valid response with my api key if I call the api via curl with the example given by Google.

When i try to setup the integration in home assistant and enter my api key, I get 'Failed to connect' each time. No more details and nothing in the logs.

What version of Home Assistant Core has the issue?

2024.8.0

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

Google Generative AI

Link to integration documentation on our website

https://www.home-assistant.io/integrations/google_generative_ai_conversation

Diagnostics information

I cannot set up the device so no diagnostics data

Example YAML snippet

No response

Anything in the logs that might be useful for us?

Nothing in the logs

Additional information

No response

danieldotnl avatar Aug 08 '24 07:08 danieldotnl

Hey there @tronikos, mind taking a look at this issue as it has been labeled with an integration (google_generative_ai_conversation) you are listed as a code owner for? Thanks!

Code owner commands

Code owners of google_generative_ai_conversation can trigger bot actions by commenting:

  • @home-assistant close Closes the issue.
  • @home-assistant rename Awesome new title Renames the issue.
  • @home-assistant reopen Reopen the issue.
  • @home-assistant unassign google_generative_ai_conversation Removes the current integration label and assignees on the issue, add the integration domain after the command.
  • @home-assistant add-label needs-more-information Add a label (needs-more-information, problem in dependency, problem in custom component) to the issue.
  • @home-assistant remove-label needs-more-information Remove a label (needs-more-information, problem in dependency, problem in custom component) on the issue.

(message by CodeOwnersMention)


google_generative_ai_conversation documentation google_generative_ai_conversation source (message by IssueLinks)

home-assistant[bot] avatar Aug 08 '24 07:08 home-assistant[bot]

Additional info: I'm a custom integration developer so I have a development environment and on this environment I can set it up without problems. Only on my "production" system I'm unable to set it up. I tried remote debugging but it fails to stop at my breakpoints...

danieldotnl avatar Aug 08 '24 08:08 danieldotnl

I have this same issue for weeks and can't sort it out.

KommanderKeen1 avatar Aug 22 '24 20:08 KommanderKeen1

Just configure your IPv6 in home assistant or delete IPv6 : https://www.reddit.com/r/homeassistant/comments/1emc4hv/adding_google_generative_ai_failed_to_connect/

ronanm35 avatar Sep 13 '24 14:09 ronanm35

@danieldotnl and @KommanderKeen1 does disabling IPv6, as @ronanm35 suggested, work for you? If yes, we can mention it in the docs and close this.

tronikos avatar Oct 08 '24 06:10 tronikos

IVP6 was already disabled. I changed my credentials and logged in with a new account and it works again.

KommanderKeen1 avatar Oct 18 '24 05:10 KommanderKeen1

There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates. Please make sure to update to the latest Home Assistant version and check if that solves the issue. Let us know if that works for you by adding a comment 👍 This issue has now been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.