core icon indicating copy to clipboard operation
core copied to clipboard

Synology Integration "Add entry" Unknow error occurred

Open azutc opened this issue 11 months ago • 6 comments

The problem

When adding a Synology Diskstation, the error “Unknown error occurred” always appears in the UI. However, the debug log shows that the connection is established and the requests are executed successfully. I cannot recognize any errors in the logs.

Image

What version of Home Assistant Core has the issue?

core-2025.4.4

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

Synology DSM

Link to integration documentation on our website

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

Diagnostics information

home-assistant_2025-05-09T09-44-47.360Z.log

Example YAML snippet


Anything in the logs that might be useful for us?


Additional information

No response

azutc avatar May 09 '25 10:05 azutc

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 Renames 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.
  • @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)


synology_dsm documentation synology_dsm source (message by IssueLinks)

home-assistant[bot] avatar May 09 '25 10:05 home-assistant[bot]

The log looks truncated. Please restart HA, enable the debug logging again and provide the full home-assistant.log afterwards, thx 👍

mib1185 avatar May 09 '25 15:05 mib1185

I had removed sensitive data from other devices. This is the home-assistant.log after the restart.

home-assistant_synology_dsm_2025-05-12T04-58-47.907Z.log

azutc avatar May 12 '25 05:05 azutc

Is this new log actual not truncated? It looks like to be interrupted in the middle of an api call. These are the last 3 lines in the log, but there is no response or result for this api call in the log

2025-05-12 06:55:42.649 DEBUG (MainThread) [synology_dsm.synology_dsm] ---------------------------------------------------------
2025-05-12 06:55:42.649 DEBUG (MainThread) [synology_dsm.synology_dsm] API: SYNO.Storage.CGI.Storage
2025-05-12 06:55:42.649 DEBUG (MainThread) [synology_dsm.synology_dsm] Request Method: GET

mib1185 avatar May 12 '25 16:05 mib1185

This log is complete, from restart. In other attempts I have also noticed that there is no response in the log.

azutc avatar May 12 '25 18:05 azutc

unfortunately, without any hints in the log (I would expect at least a timeout or connection error or what else) I can't do anything to analyse your issue. Maybe the nas is overloaded? Did you try to restart the nas?

mib1185 avatar May 12 '25 19:05 mib1185

The NAS has no task yet, so there is no load yet.

I have restarted the NAS and repeated everything with the same result. The error message in the UI appears after approx. 4 seconds and the log always closes after the request method has been issued.

Is it correct that the request is also not in the log?

I have traced the requests with postman in the same order, they are answered immediately with HTTP 200.

Is it possible that several NAS with almost simultaneous requests can lead to errors in the handling of requests and responses? In other logs I could see new requests for other NAS immediately after the missing response.

Addendum: I have deactivated all other NAS in the integration and repeated the addition, unfortunately with the same result. After outputting the API: and the Request Method:, no more activity appears in the log.

azutc avatar May 13 '25 05:05 azutc

I've checked the log again and compared with the codebase - there must be an error message from homeassistant.components.synology_dsm logged, but it is not in the logfile - did you somehow truncated the log manually or did not enable debug logging for homeassistant.components.synology_dsm? Please also check the overview page under Settings > System > Logs if there is an error message for the Synology DSM integration logged

mib1185 avatar Jun 26 '25 19:06 mib1185

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.

Hello @mib1185, I tried again to add the affected DiskStation with debug mode enabled. I have attached the current log as it was created. The error shown in the screenshot above still occurs and the DiskStation is not added.

home-assistant_synology_dsm_2025-07-25T04-22-33.912Z.log

azutc avatar Jul 25 '25 04:07 azutc

I'm sorry, but there is still no error message in the log, which explains the "Unknown error occurred", but there must be one. Do you have any special logger configuration (especial using the critical or fatal level somewhere)?

mib1185 avatar Jul 26 '25 23:07 mib1185

i have this error when i create a new user on my nas, add this user to the admin group. i have an active 2fa policy. so i have to log out and log in with that new admin user to active 2fa for this user. if i dont switch the user and activate 2fa then i get this unkown error. if i active 2fa then the integration asks me for a otp code. when i enter a valid code i will be asked to select some folder info. and then i get an error that the 2fa code is no longer valid. if i enter a new valid code the process will be canceled. so currently 2fa with otp code is not working. maybe this is another issue.

Lars-Integraleo avatar Jul 28 '25 22:07 Lars-Integraleo

Having the exat same issue as described by @Lars-Integraleo

crookz avatar Aug 03 '25 13:08 crookz

I also have the exact same issue. I turned on debugging for this integration and get the error below. Note that this integration used to work. I can't pinpoint exactly when, as it's been an ongoing issue since April, but I'm just getting back around to this now.

Logger: homeassistant.components.synology_dsm.config_flow
Source: components/synology_dsm/config_flow.py:218
integration: Synology DSM (documentation, issues)
First occurred: August 21, 2025 at 8:50:18 PM (8 occurrences)
Last logged: 7:06:01 AM

{'api': 'SYNO.Core.System.Utilization', 'code': 1052, 'reason': 'Unknown', 'details': {'err_line': 191, 'err_msg': 'Transmition get failed Result.'}}

larrybud2004 avatar Aug 22 '25 11:08 larrybud2004

@larrybud2004 your issue is different and there are already some closed report about this "Transmition get failed Result" error

mib1185 avatar Sep 01 '25 20:09 mib1185

@Lars-Integraleo This sounds a bit like another issue/situation. Please open an new issue report and provide the debug log and diagnostics data within this report (as described in the troubleshooting section)

mib1185 avatar Sep 01 '25 20:09 mib1185

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.