Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mobile App is reporting failure to setup mobile phone previously used #119456

Open
robertboccia opened this issue Jun 12, 2024 · 6 comments
Open

Comments

@robertboccia
Copy link

The problem

Logger: homeassistant.config_entries
Source: config_entries.py:594
First occurred: 09:00:21 (4 occurrences)
Last logged: 09:03:07

Error setting up entry SM-S918B for mobile_app
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/config_entries.py", line 594, in async_setup
result = await component.async_setup_entry(hass, self)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/components/mobile_app/init.py", line 116, in async_setup_entry
webhook_register(hass, DOMAIN, registration_name, webhook_id, handle_webhook)
File "/usr/src/homeassistant/homeassistant/components/webhook/init.py", line 54, in async_register
raise ValueError("Handler is already defined!")
ValueError: Handler is already defined!

What version of Home Assistant Core has the issue?

2024.6.2

What was the last working version of Home Assistant Core?

2024.6.1

What type of installation are you running?

Home Assistant OS

Integration causing the issue

mobile app

Link to integration documentation on our website

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

Diagnostics information

Logger: homeassistant.config_entries
Source: config_entries.py:594
First occurred: 09:00:21 (4 occurrences)
Last logged: 09:03:07

Error setting up entry SM-S918B for mobile_app
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/config_entries.py", line 594, in async_setup
result = await component.async_setup_entry(hass, self)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/components/mobile_app/init.py", line 116, in async_setup_entry
webhook_register(hass, DOMAIN, registration_name, webhook_id, handle_webhook)
File "/usr/src/homeassistant/homeassistant/components/webhook/init.py", line 54, in async_register
raise ValueError("Handler is already defined!")
ValueError: Handler is already defined!

Example YAML snippet

No response

Anything in the logs that might be useful for us?

Logger: homeassistant.config_entries
Source: config_entries.py:594
First occurred: 09:00:21 (4 occurrences)
Last logged: 09:03:07

Error setting up entry SM-S918B for mobile_app
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 594, in async_setup
    result = await component.async_setup_entry(hass, self)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^Logger: homeassistant.config_entries
Source: config_entries.py:594
First occurred: 09:00:21 (4 occurrences)
Last logged: 09:03:07

Error setting up entry SM-S918B for mobile_app
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 594, in async_setup
    result = await component.async_setup_entry(hass, self)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/mobile_app/__init__.py", line 116, in async_setup_entry
    webhook_register(hass, DOMAIN, registration_name, webhook_id, handle_webhook)
  File "/usr/src/homeassistant/homeassistant/components/webhook/__init__.py", line 54, in async_register
    raise ValueError("Handler is already defined!")
ValueError: Handler is already defined!
  File "/usr/src/homeassistant/homeassistant/components/mobile_app/__init__.py", line 116, in async_setup_entry
    webhook_register(hass, DOMAIN, registration_name, webhook_id, handle_webhook)
  File "/usr/src/homeassistant/homeassistant/components/webhook/__init__.py", line 54, in async_register
    raise ValueError("Handler is already defined!")
ValueError: Handler is already defined!

Additional information

No response

@home-assistant
Copy link

Hey there @home-assistant/core, mind taking a look at this issue as it has been labeled with an integration (mobile_app) you are listed as a code owner for? Thanks!

Code owner commands

Code owners of mobile_app 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 mobile_app 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)


mobile_app documentation
mobile_app source
(message by IssueLinks)

@WoodenDuke
Copy link

Same here with 2024.6.3

Error setting up entry XXX for mobile_app
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/config_entries.py", line 594, in async_setup
result = await component.async_setup_entry(hass, self)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[...and...]
ValueError: Handler is already defined!

Also deletion of the device or entities is not possible/successful, the error occurs again and again.

@jgloor
Copy link

jgloor commented Jun 21, 2024

I am having the same issue, but on an iPhone… HA core: 2024.6.4, supervisor: 2024.0.6.0, OS 12.4, front end: 202406.10.1 - Running on a VM (Proxmox)

Log:
---- cut —

File “/usr/src/homeassistant/homeassistant/components/mobile_app/init.py”, line 116, in async_setup_entry

webhook_register(hass, DOMAIN, registration_name, webhook_id, handle_webhook)

File “/usr/src/homeassistant/homeassistant/components/webhook/init.py”, line 54, in async_register

raise ValueError(“Handler is already defined!”)

ValueError: Handler is already defined!

2024-06-21 17:30:26.833 ERROR (MainThread) [homeassistant.config_entries] Error setting up entry John’s iPhone for mobile_app

Traceback (most recent call last):

File “/usr/src/homeassistant/homeassistant/config_entries.py”, line 594, in async_setup

result = await component.async_setup_entry(hass, self)

@WoodenDuke
Copy link

I finally managed to solve the problem for myself: I uninstalled the mobile app on my smartphone, restarted HA and then deleted everything related to the "Mobile App" integration (entities, integration entries, etc.).
Then restarted HA again and started from the beginning. Now I only have one device and all entities are correct again. And no more errors in the logs :-)

@jgloor
Copy link

jgloor commented Jun 27, 2024

I tried to delete everything.. it changes the integration entries to "Not Loaded." I have 1 Entity left - it's marked as disabled and will not let me delete it or enable it.

Note: I was able to re-add my phone, and it works now... but still unable to delete the 70 entities from before.

@silver0030
Copy link

silver0030 commented Jul 1, 2024

I have a same problem

Error setting up entry SM-S918B for mobile_app Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/config_entries.py", line 594, in async_setup result = await component.async_setup_entry(hass, self) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/components/mobile_app/__init__.py", line 116, in async_setup_entry webhook_register(hass, DOMAIN, registration_name, webhook_id, handle_webhook) File "/usr/src/homeassistant/homeassistant/components/webhook/__init__.py", line 54, in async_register raise ValueError("Handler is already defined!") ValueError: Handler is already defined!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants