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
2FA broken with Synology DSM version 7.0.1-42218 update 2 #64867
Comments
synology documentation |
Hey there @hacf-fr, @Quentame, @mib1185, mind taking a look at this issue as it has been labeled with an integration ( synology_dsm documentation |
Hi @j6s33m , logger:
default: info
logs:
homeassistant.components.synology_dsm: debug
synology_dsm: debug Furthermore, are still able to login to you NAS with the same account directly via UI? |
I've added this, but am not getting logs that are different from the error I added above. Nothing is showing up related to Synology for debug. |
Did you have a look into the full log for this? |
Nope. Only shows Warning…not debug. I get plenty of logs, but can’t seem to get the debug to work…seems like a bug many others have had over the years.
Another person who’s having the same issue replied with their debug output…can you just use theirs?
… On Jan 25, 2022, at 10:12 AM, Michael ***@***.***> wrote:
Did you have a look into the full log for this?
There must be many more outputs with DEBUG [homeassistant.components.synology_dsm] and DEBUG [synology_dsm] visible.
—
Reply to this email directly, view it on GitHub <#64867 (comment)>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/AEIZISW3AD62YINCBP3RI2TUX3DYNANCNFSM5MWLBCLQ>.
You are receiving this because you were mentioned.
|
Could you please try again to enable the debug logging, since the very first visible error could be the same, even the cause is different and to obtain the cause I need the debug logs. |
I’ve tried six ways to Sunday and am in the log file in my console … no dice getting the debug data. If you look in the forums, this is a problem for a bunch of folks. Can you not use the debug data from the other poster having the same problem (including below)?
Same , web ui login is ok.
Here is my log.
2022-01-25 19:37:56 DEBUG (SyncWorker_4) [synology_dsm.synology_dsm] Request url: https://192.168.2.225:5001/webapi/entry.cgi?account=********&passwd=********&enable_device_token=yes&device_name=homeassistant&format=sid&api=SYNO.API.Auth&version=7&method=login <https://192.168.2.225:5001/webapi/entry.cgi?account=********&passwd=********&enable_device_token=yes&device_name=homeassistant&format=sid&api=SYNO.API.Auth&version=7&method=login> 2022-01-25 19:37:56 DEBUG (SyncWorker_4) [synology_dsm.synology_dsm] Request status_code: 200 2022-01-25 19:37:56 DEBUG (SyncWorker_4) [synology_dsm.synology_dsm] Request headers: {'Server': 'nginx', 'Date': 'Tue, 25 Jan 2022 11:37:56 GMT', 'Content-Type': 'application/json; charset="UTF-8"', 'Transfer-Encoding': 'chunked', 'Connection': 'keep-alive', 'Keep-Alive': 'timeout=20', 'Vary': 'Accept-Encoding', 'X-Content-Type-Options': 'nosniff', 'X-XSS-Protection': '1; mode=block', 'Cache-Control': 'max-age=0, no-cache, no-store, must-revalidate', 'Pragma': 'no-cache', 'Expires': '0', 'Content-Encoding': 'gzip'} 2022-01-25 19:37:56 DEBUG (SyncWorker_4) [synology_dsm.synology_dsm] Request Method: GET 2022-01-25 19:37:56 DEBUG (SyncWorker_4) [synology_dsm.synology_dsm] Successful returned data 2022-01-25 19:37:56 DEBUG (SyncWorker_4) [synology_dsm.synology_dsm] API: SYNO.API.Auth 2022-01-25 19:37:56 DEBUG (SyncWorker_4) [synology_dsm.synology_dsm] RESPONSE: {'error': {'code': 403, 'errors': {'token': 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJhdWQiOiIyRkEiLCJleHAiOjE2NDMxMTA5NzYsImlhdCI6MTY0MzExMDY3Niwic3ViIjoiYWRtaW4ifQ.pVpXkRQrxJTdLadzk_aGwKw0jtFnm7Rjo1JLDIf8AX8', 'types': [{'type': 'otp'}]}}, 'success': False} 2022-01-25 19:38:02 DEBUG (SyncWorker_9) [synology_dsm.synology_dsm] Creating new session 2022-01-25 19:38:02 DEBUG (SyncWorker_9) [synology_dsm.synology_dsm] Request url: https://192.168.2.225:5001/webapi/query.cgi?api=SYNO.API.Info&version=1&method=query <https://192.168.2.225:5001/webapi/query.cgi?api=SYNO.API.Info&version=1&method=query> 2022-01-25 19:38:02 DEBUG (SyncWorker_9) [synology_dsm.synology_dsm] Request status_code: 200 2022-01-25 19:38:02 DEBUG (SyncWorker_9) [synology_dsm.synology_dsm] Request headers: {'Server': 'nginx', 'Date': 'Tue, 25 Jan 2022 11:38:02 GMT', 'Content-Type': 'application/json; charset="UTF-8"', 'Transfer-Encoding': 'chunked', 'Connection': 'keep-alive', 'Keep-Alive': 'timeout=20', 'Vary': 'Accept-Encoding', 'X-Content-Type-Options': 'nosniff', 'X-XSS-Protection': '1; mode=block', 'Cache-Control': 'max-age=0, no-cache, no-store, must-revalidate', 'Pragma': 'no-cache', 'Expires': '0', 'Content-Encoding': 'gzip'} 2022-01-25 19:38:02 DEBUG (SyncWorker_9) [synology_dsm.synology_dsm] Request Method: GET 2022-01-25 19:38:02 DEBUG (SyncWorker_9) [synology_dsm.synology_dsm] Successful returned data 2022-01-25 19:38:02 DEBUG (SyncWorker_9) [synology_dsm.synology_dsm] API: SYNO.API.Info
… On Jan 25, 2022, at 12:14 PM, Michael ***@***.***> wrote:
Did you try to get the full log of home assistant via UI or by console/ssh or maybe fileshare access?
|
Sorry, but on a first fast search I only found one actual forum thread which is about connection issues from HA to Synology -> https://community.home-assistant.io/t/did-2021-12-break-synology-integration/367264
There is no other user involved in this issue here, so I do not have any clue where this (partial) logs came from 🧐
If you share your Please allow me further questions about your issue description:
|
logger:
default: info
logs:
homeassistant.components.synology_dsm: debug
synology_dsm: debug
… On Jan 25, 2022, at 1:56 PM, Michael ***@***.***> wrote:
If you look in the forums, this is a problem for a bunch of folks
Sorry, but on a first fast search I only found one actual forum thread which is about connection issues from HA to Synology -> https://community.home-assistant.io/t/did-2021-12-break-synology-integration/367264 <https://community.home-assistant.io/t/did-2021-12-break-synology-integration/367264>
The this issue was caused by an issue with an local NFS service ... so not related to HA.
If you could point my out some current forum threads/posts, where the user observe connection issues from HA to Synology DSM, than please provide them.
use the debug data from the other poster
There is no other user involved in this issue here, so I do not have any clue where this (partial) logs came from 🧐
I’ve tried six ways to Sunday and am in the log file in my console
If you share your configuration.yaml (limited to the part about logging configuration, so that no sensitive data is shared), so I could have a look and maybe give you a hint, why the debug log will not work for you?
—
Reply to this email directly, view it on GitHub <#64867 (comment)>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/AEIZISWAKDEG7GB5NABZ7BTUX355LANCNFSM5MWLBCLQ>.
You are receiving this because you were mentioned.
|
logger:
default: info
logs:
homeassistant.components.synology_dsm: debug
synology_dsm: debug if the indention is correct and there is no other |
|
I removed some of my information (url, NAS name, token, etc) |
could you please provide more logs around this single log entry? |
I have no idea what else you want me to give you...these are the DEBUG logs tied to the Synology_dsm
|
Could you also please answer my last questions from #64867 (comment) and also provide the DSM version and model of your NAS? From the provided logs, it looks like, that the NAS is not configured with 2FA in HA, since there is not Therefore may I ask you to perform the reconfiguration via UI and provide the logs (debug and info and warning ... just the logs during the timeframe, you perform the reconfiguration) |
I'm using 2FA...I tried deleting the integration and reading it and so I don't know if that's the reason it's not showing the 2FA anymore. I just reconfigured again and can't include the logs because they exceeded the maximum 655536 character limit. Synology DS220+ |
Sorry, forgot to mention that - just save the logs in a txt file and drag&drop it here - so it will be added as attachment |
could you please provide the log including the integration related log messages? |
There is nothing in the log with "grep" or grep synology_dsm homeassistant.log I noticed you pushed new code 4 days ago here: #64480 Everything seemed to be working fine until right around this date. Are you sure your latest pull request didn't break the code somewhere? |
Others are having this problem too... https://community.home-assistant.io/t/synology-dsm-7-2fa-problem/314505 |
no no,
on initial post you mentioned, that you are on home assistant version 2021.12.10? So #64480 is not included in this version. From the provided logs, I can see, that your NAS does not provide the I'm on DSM DSM 7.0.1-42218 (without update 2!) and everything works as expected ... from the logs I see, that you are already on DSM "7.0.1-42218 update 2". DId you do an update of your DSM? |
Yes, my synology pushed an update last week (released on Jan 13) for v2. If that's the only variable that's different, then you probably found the culprit ... |
ok, than I will skip this update on my NAS 😆 |
When I run {
"data": {
"account":"<user>",
"device_id":"",
"ik_message":"",
"is_portal_port":false,
"sid":"<token>",
"synotoken":"--------"
},
"success":true
} I am assuming |
Yes of course: Both Synology and HA :-) and it keeps running... I cannot destroy this one :-) |
@mundschenk-at this is exact the issue, we are trying to catch here 👍 let me try to summarize the available data @littletruckman from #64867 (comment)
{
"data": {
"account": "user",
"device_id": "H5ZvWUp2M0VB3YbU38kYV25yZwwc2AJDB9IByFwHy0I5_mNHBNJMh0DCb3G8BAudU1zcpDlxixG1IggkTOSJCA",
"ik_message": "",
"is_portal_port": false,
"sid": "fg97EITQIXhcP5K2MC5hdOqxWCNySoz8fZbGCZkmd5og82O8igrkOAWfj6ZGO97JPRHPDtaWwdy0QmhBsJowZ4",
"synotoken": "--------"
},
"success": true
} @mundschenk-at from #64867 (comment)
{
"data": {
"account":"<user>",
"device_id":"",
"ik_message":"",
"is_portal_port":false,
"sid":"<token>",
"synotoken":"--------"
},
"success":true
} @j6s33m extracted from debug.txt from #64867 (comment)
{
"data": {
"account":"Jordan",
"device_id":"",
"ik_message":"",
"is_portal_port":false,
"sid":"XHuIVY2PU07GcJeU4TXnNYYheJVBJ9ZP3Z-Mo0wkok8NbJPEYJ3E4Zq7XULM9D3M0R6t19LezwuJQzlqZNAqmI",
"synotoken":"--------"
},
"success":true
} based on the summarization @littletruckman may I ask you, to please verify again your results? |
I have just repeated the tests:
|
I also did the followings:
The error code is the one that I get if I play it in a browser... and is normal BECAUSE the request is formated as it should be for a Login with OTP to enable to omit 2-factor verification AND EXCEPT that OTP is missing !!!! The question is why is it issuing such a Login without BR |
@littletruckman could you please provide the full home-assistant.log?
this is because HA does not get the |
I could send you the full home-assistant log but you will not have much more concerning the DSM integration that what is shown in the extract I have sent. If it can help you, I will be able to start from scratch, cleanning all DSM integrations and adding one back, but I will need some time :-) Let me know what is the more probant for you |
@littletruckman many thanks for this effort 👍 |
@littletruckman could you please re-test, but with a cleared browser cache or just in a private browser window? |
Damned You are ... again... right :-) In fact once the cache is cleared as well as all site cookies, le device_id is not anymore returned when I issue the URL in the web browser.... ..... Do you known if there is s possibility to make the same kind of tests from the Home-Assistant serveur (docker instance) ? |
you could just use curl from a command line ( |
Thanks @mib1185 Here are the results:
=> "device_id":""
=> "device_id" is now set ! Default behavior of the SYNO.API is That's why I had Postman working because my PC was previously connected to DSM Manager and had a "did" cookie that identify the device for SYNO.API... What do you think about trying to remove the |
@littletruckman nice finding 👍 |
@mib1185 |
I would not hold my breath. Their last responses to my ticket came close to satire (they told me to subscribe to their newsletter for any "news and changes" resulting from my ticket 🤡). |
I am optimist by nature :-) |
Could you please mantain this bug open until synology will risolve it?
So we (follower) can be updated about resolution...
Il Gio 24 Mar 2022, 02:08 Paulus Schoutsen ***@***.***> ha
scritto:
… Closed #64867 <#64867> via
#68584 <#68584>.
—
Reply to this email directly, view it on GitHub
<#64867 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/APW3TYEXLZBUK6H7I7ZL373VBO57FANCNFSM5MWLBCLQ>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
|
From HA point of view the issue has been resolved by providing a workaround. Tracking the bug of another product is not intended here. |
Ok, thanks for you work
Il Gio 24 Mar 2022, 08:58 Michael ***@***.***> ha scritto:
… From HA point of view the issue has been resolved by providing a
workaround. Tracking the bug of another product is not intended here.
—
Reply to this email directly, view it on GitHub
<#64867 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/APW3TYF2XC5IXHN2REI7MODVBQOA3ANCNFSM5MWLBCLQ>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
|
I tried it and it works OK! |
Thanks again for the solution. It works like a charm! As agreed, an update from the support from Synology for those who are interested. After trying to discuss about: should we use "version=7" or "version=6" they finally agreed that "version=7" is OK (it is given has "maxVersion" in the SYNO.API.info answer.
They also recognized that the issue is due to the tag "format=sid" and this is now an identified problem that will be solved in a future DSM Update.....
Best regards and thanks |
@littletruckman could you please share your ticket number with me (discord: |
Here's mine. #3033970. And many thanks for looking into this one. |
And mine: #3043290 |
Checklist
Describe the issue you are experiencing
Since restarting HA this morning, I have a notification that let's me know that I need to reconfigure my Synology integration. I follow the steps and use my login/password + 2FA and get success message. However, the integration does not update and show connection. I've restarted several times and it's still showing the same problem.
Describe the behavior you expected
I expect after successfully logging in that it works and the integration refreshes properly.
Steps to reproduce the issue
1.Click Reconfigure button in integration page for Synology
2.Login in with username, password, and then 2FA code
...
What version of Home Assistant Core has the issue?
core-2021.12.10
What was the last working version of Home Assistant Core?
core-2021.12.10
In which browser are you experiencing the issue with?
Google Chrome Version 97.0.4692.99 (Official Build) (x86_64)
Which operating system are you using to run this browser?
macOS Big Sur 11.6.2
State of relevant entities
No response
Problem-relevant frontend configuration
No response
Javascript errors shown in your browser console/inspector
Additional information
No response
The text was updated successfully, but these errors were encountered: