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

Problem with user names containing spaces in Synology DSM #87457

Closed
XalaTheShepard opened this issue Feb 5, 2023 · 16 comments · Fixed by #87471
Closed

Problem with user names containing spaces in Synology DSM #87457

XalaTheShepard opened this issue Feb 5, 2023 · 16 comments · Fixed by #87471

Comments

@XalaTheShepard
Copy link

The problem

After upgrading from HA Core 2023.1.7 to 2022.2.0 or above I get the following error message for my Synology DSM integration:
{'api': 'SYNO.API.Auth', 'code': 400, 'reason': 'Invalid credentials', 'details': 'Invalid password or not admin account: Home Assistant VM'}
12:42:08 PM – (ERROR) Synology DSM
Reauthenticating the integration is impossible.

When deleting the integration, I am unable to add it again.
However, downgrading again to HA Core 2023.1.7 solves the issue.
Please note that the credentials are correct and that Home Assistant VM is an admin account.
This account has never caused issues before.

Could you please inform me if I am doing something wrong or how I can solve the issue?

I am running the latest version of DSM 6.2 with 2FA.

Thanks in advance.

Kind regards,

Robin

What version of Home Assistant Core has the issue?

2023.2.0 and above

What was the last working version of Home Assistant Core?

2023.1.7

What type of installation are you running?

Home Assistant OS

Integration causing the issue

Synology DSM

Link to integration documentation on our website

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

Diagnostics information

No response

Example YAML snippet

No response

Anything in the logs that might be useful for us?

Logger: homeassistant.components.synology_dsm.config_flow
Source: components/synology_dsm/config_flow.py:345
Integration: Synology DSM (documentation, issues)
First occurred: 12:42:08 PM (1 occurrences)
Last logged: 12:42:08 PM

{'api': 'SYNO.API.Auth', 'code': 400, 'reason': 'Invalid credentials', 'details': 'Invalid password or not admin account: Home Assistant VM'}

Additional information

No response

@home-assistant
Copy link

home-assistant bot commented Feb 5, 2023

Hey there @hacf-fr, @Quentame, @mib1185, mind taking a look at this issue as it has been labeled with an integration (synology_dsm) you are listed as a code owner for? Thanks!

Code owner commands

Code owners of synology_dsm can trigger bot actions by commenting:

  • @home-assistant close Closes the issue.
  • @home-assistant rename Awesome new title Change the title of the issue.
  • @home-assistant reopen Reopen the issue.
  • @home-assistant unassign synology_dsm Removes the current integration label and assignees on the issue, add the integration domain after the command.

(message by CodeOwnersMention)


synology_dsm documentation
synology_dsm source
(message by IssueLinks)

@XalaTheShepard
Copy link
Author

Additional information: I have 2 LAN ports of my Synology NAS in use, but they are bonded to the same IP address.

@avehome
Copy link

avehome commented Feb 5, 2023

@XalaTheShepard: I think you made a type 2022.2 should be 2023.2.

For me this issue also started after upgrading from 2023.1.7 -> 2023.2. After boot the integration synology_dsm was logout. If I try to login again it failed with the same error you have 'Invalid credentials'. I din't change anything on my Synology, only upgrade docker Home Assistant to 2023.2. Also running the latest version of DSM 6.2 with 2FA and the user is admin.

@mib1185
Copy link
Contributor

mib1185 commented Feb 5, 2023

please update to 2023.2.2 and test again

@avehome
Copy link

avehome commented Feb 5, 2023

I did this 1 hour ago, same result...

@mib1185
Copy link
Contributor

mib1185 commented Feb 5, 2023

ok, than please enable debug logging, restart HA and provide the home-assistant.log
To do so add the following to your configuration.yaml:

logger:
  default: info
  logs:
    homeassistant.components.synology_dsm: debug
    synology_dsm: debug

Further if possible please download and provide the diagnostics data for this integration.

Note: it is better to drag the log into the comment (which will add it as an attachment) and not copy paste as it is hard to read logs in GitHub.

@avehome
Copy link

avehome commented Feb 5, 2023

Here you are:

home-assistant.log

@mib1185
Copy link
Contributor

mib1185 commented Feb 5, 2023

@XalaTheShepard does your username really contains spaces "Home Assistant VM" ?

@avehome
Copy link

avehome commented Feb 5, 2023

FYI: My username also have spaces

@mib1185
Copy link
Contributor

mib1185 commented Feb 5, 2023

Here you are:

home-assistant.log

is it possible to downgrade HA to 2023.1.7 and provide the logs again? Would need them to compare the differences in API calls

@mib1185 mib1185 changed the title HA Core 2022.2.0 and above: Synology DSM-invalid credentials Problem with user names containing spaces in Synology DSM Feb 5, 2023
@XalaTheShepard
Copy link
Author

Dear mib1185, I confirm my username has spaces. This was no issue in previous HA Core versions.

@avehome
Copy link

avehome commented Feb 5, 2023

Here you are:
home-assistant.log

is it possible to downgrade HA to 2023.1.7 and provide the logs again? Would need them to compare the differences in API calls

Here you are:
home-assistant_2023-1-7.log

The log starts when I add the integration and login. After login I type the 2FA code and everything works fine.

@akiltopu
Copy link

akiltopu commented Feb 5, 2023

I have the same issue with the latest version of Home Assistant.

Workaround: I create a new admin account just for home assistant with 2FA enabled, without spaces in username. It is working with 2023.2.2

@avehome
Copy link

avehome commented Feb 5, 2023

I can confirm, its a user name spaces issue. Change the user name without spaces and it works!

@mib1185
Copy link
Contributor

mib1185 commented Feb 5, 2023

@avehome
Copy link

avehome commented Feb 5, 2023

Thank you mib1185 for the quick response and solution on your Sunday off. Really appreciated.

@github-actions github-actions bot locked and limited conversation to collaborators Mar 7, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants