core icon indicating copy to clipboard operation
core copied to clipboard

Roborock: User agreement must be accepted again

Open eins2 opened this issue 1 year ago • 2 comments

The problem

System details:

  • Core 2024.9.2
  • Supervisor 2024.09.1
  • Operating System 13.1
  • Frontend 20240909.1

When trying to setup Roborock integration, entering the email and Verification code, the setup wizard throws an error: "There was an unknown roborock exception - please check your logs.".

The system is a fresh install with only a couple of integrations configured.

What version of Home Assistant Core has the issue?

2024.9.2

What was the last working version of Home Assistant Core?

No response

What type of installation are you running?

Home Assistant Core

Integration causing the issue

Roborock

Link to integration documentation on our website

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

Diagnostics information

No response

Example YAML snippet

No response

Anything in the logs that might be useful for us?

Logger: homeassistant.components.roborock.config_flow
Source: components/roborock/config_flow.py:109
integration: Roborock (documentation, issues)
First occurred: 20:15:56 (1 occurrences)
Last logged: 20:15:56

Unexpected exception
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/roborock/config_flow.py", line 109, in async_step_code
    login_data = await self._client.code_login(code)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/roborock/web_api.py", line 172, in code_login
    raise RoborockInvalidUserAgreement(
roborock.exceptions.RoborockInvalidUserAgreement: User agreement must be accepted again - or you are attempting to use the Mi Home app account.

Additional information

No response

eins2 avatar Sep 19 '24 20:09 eins2

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

Code owner commands

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


roborock documentation roborock source (message by IssueLinks)

home-assistant[bot] avatar Sep 19 '24 20:09 home-assistant[bot]

Hey @eins2,

i just had the same problem. I got the solution for you:

Login to your Roborock App - Either you get a prompt to accept the User Agreement or you have to manually go to this path in your roborock app: Profile -> About Us -> User Agreement and accept it there. Hope that helps.

Deadm4u5-Smart avatar Sep 20 '24 08:09 Deadm4u5-Smart

Next steps are probably (1) update the error handling to handle this case and render an error message (2) update the documentation with instructions to resolve.

allenporter avatar Sep 29 '24 16:09 allenporter

Hey @eins2,

i just had the same problem. I got the solution for you:

Login to your Roborock App - Either you get a prompt to accept the User Agreement or you have to manually go to this path in your roborock app: Profile -> About Us -> User Agreement and accept it there. Hope that helps.

This work around does not work for me. The user agreement was already accepted. I am getting the same error as the OP.

RogueOverride avatar Sep 30 '24 13:09 RogueOverride

I used the Mi Home app to control my vacuum cleaner and encountered the same error. After downloading the Roborock app and logging in, I was asked to accept the User Agreement. I accepted it, and everything started working. Therefore, use the Roborock app to fix this issue.

qWici avatar Nov 11 '24 18:11 qWici

I am not getting the verification code. I have already accepted the new terms. How can I get the verification code?

danielo515 avatar Dec 12 '24 12:12 danielo515

I am not getting the verification code. I have already accepted the new terms. How can I get the verification code?

Updating HA and then restarting fixed the problem for me

danielo515 avatar Dec 16 '24 18:12 danielo515

This is doing the same on mine. I've accepted the user agreement, revoked and then re-accepted, and updated and restarted HA. Still the same issue: Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/components/roborock/config_flow.py", line 109, in async_step_code login_data = await self._client.code_login(code) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.13/site-packages/roborock/web_api.py", line 172, in code_login raise RoborockInvalidUserAgreement( "User agreement must be accepted again - or you are attempting to use the Mi Home app account." ) roborock.exceptions.RoborockInvalidUserAgreement: User agreement must be accepted again - or you are attempting to use the Mi Home app account.

chilton715 avatar Dec 30 '24 19:12 chilton715

Quoting from one of the other duplicate issues:

For me, I had to revoke my current user agreement in the app (Profile -> About Us -> User Agreement), log in again, accept new agreement, and finally, restart HA.

allenporter avatar Jan 06 '25 06:01 allenporter

As a user I would expect that this error is caught and explained in the UI. Maybe even with a link to a resolution of something self-heal.

Currently I need to dive into the logs to find that cause.

chris400 avatar Jan 06 '25 10:01 chris400

@chris400 yes, that's what we said above https://github.com/home-assistant/core/issues/126288#issuecomment-2381413173 and has now been fixed.

allenporter avatar Jan 06 '25 16:01 allenporter