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

Server Reported Invalid Token. This should never happen #367

Closed
BigGeorgeTx opened this issue May 18, 2022 · 7 comments
Closed

Server Reported Invalid Token. This should never happen #367

BigGeorgeTx opened this issue May 18, 2022 · 7 comments

Comments

@BigGeorgeTx
Copy link

Running openHAB 3.3.0M5 on a Pi4B with openhabian and version 3.2.12 of the Smarthome/J Tuya binding, I am seeing this in the logs:

2022-05-18 08:38:24.735 [WARN ] [ding.tuya.internal.cloud.TuyaOpenAPI] - Server reported invalid token. This should never happen. Trying to re-login. 2022-05-18 08:38:24.738 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'tuya:project:TuyaCloudProject' changed from ONLINE to OFFLINE (COMMUNICATION_ERROR) 2022-05-18 08:39:24.867 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'tuya:project:TuyaCloudProject' changed from OFFLINE (COMMUNICATION_ERROR) to ONLINE 2022-05-18 08:43:24.651 [WARN ] [ding.tuya.internal.cloud.TuyaOpenAPI] - Server reported invalid token. This should never happen. Trying to re-login. 2022-05-18 08:43:24.657 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'tuya:project:TuyaCloudProject' changed from ONLINE to OFFLINE (COMMUNICATION_ERROR) 2022-05-18 08:44:24.779 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'tuya:project:TuyaCloudProject' changed from OFFLINE (COMMUNICATION_ERROR) to ONLINE 2022-05-18 08:48:24.879 [WARN ] [ding.tuya.internal.cloud.TuyaOpenAPI] - Server reported invalid token. This should never happen. Trying to re-login. 2022-05-18 08:48:24.884 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'tuya:project:TuyaCloudProject' changed from ONLINE to OFFLINE (COMMUNICATION_ERROR) 2022-05-18 08:49:25.010 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'tuya:project:TuyaCloudProject' changed from OFFLINE (COMMUNICATION_ERROR) to ONLINE 2022-05-18 08:53:24.855 [WARN ] [ding.tuya.internal.cloud.TuyaOpenAPI] - Server reported invalid token. This should never happen. Trying to re-login. 2022-05-18 08:53:24.858 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'tuya:project:TuyaCloudProject' changed from ONLINE to OFFLINE (COMMUNICATION_ERROR) 2022-05-18 08:54:24.983 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'tuya:project:TuyaCloudProject' changed from OFFLINE (COMMUNICATION_ERROR) to ONLINE 2022-05-18 08:58:24.694 [WARN ] [ding.tuya.internal.cloud.TuyaOpenAPI] - Server reported invalid token. This should never happen. Trying to re-login. 2022-05-18 08:58:24.697 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'tuya:project:TuyaCloudProject' changed from ONLINE to OFFLINE (COMMUNICATION_ERROR) 2022-05-18 08:59:24.834 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'tuya:project:TuyaCloudProject' changed from OFFLINE (COMMUNICATION_ERROR) to ONLINE 2022-05-18 09:03:24.631 [WARN ] [ding.tuya.internal.cloud.TuyaOpenAPI] - Server reported invalid token. This should never happen. Trying to re-login. 2022-05-18 09:03:24.634 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'tuya:project:TuyaCloudProject' changed from ONLINE to OFFLINE (COMMUNICATION_ERROR) 2022-05-18 09:04:24.768 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'tuya:project:TuyaCloudProject' changed from OFFLINE (COMMUNICATION_ERROR) to ONLINE 2022-05-18 09:08:24.735 [WARN ] [ding.tuya.internal.cloud.TuyaOpenAPI] - Server reported invalid token. This should never happen. Trying to re-login. 2022-05-18 09:08:24.740 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'tuya:project:TuyaCloudProject' changed from ONLINE to OFFLINE (COMMUNICATION_ERROR) 2022-05-18 09:09:24.864 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'tuya:project:TuyaCloudProject' changed from OFFLINE (COMMUNICATION_ERROR) to ONLINE 2022-05-18 09:13:24.708 [WARN ] [ding.tuya.internal.cloud.TuyaOpenAPI] - Server reported invalid token. This should never happen. Trying to re-login. 2022-05-18 09:13:24.710 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'tuya:project:TuyaCloudProject' changed from ONLINE to OFFLINE (COMMUNICATION_ERROR) 2022-05-18 09:14:24.840 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'tuya:project:TuyaCloudProject' changed from OFFLINE (COMMUNICATION_ERROR) to ONLINE 2022-05-18 09:18:24.646 [WARN ] [ding.tuya.internal.cloud.TuyaOpenAPI] - Server reported invalid token. This should never happen. Trying to re-login. 2022-05-18 09:18:24.649 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'tuya:project:TuyaCloudProject' changed from ONLINE to OFFLINE (COMMUNICATION_ERROR) 2022-05-18 09:19:24.783 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'tuya:project:TuyaCloudProject' changed from OFFLINE (COMMUNICATION_ERROR) to ONLINE 2022-05-18 09:23:24.794 [WARN ] [ding.tuya.internal.cloud.TuyaOpenAPI] - Server reported invalid token. This should never happen. Trying to re-login. 2022-05-18 09:23:24.798 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'tuya:project:TuyaCloudProject' changed from ONLINE to OFFLINE (COMMUNICATION_ERROR) 2022-05-18 09:24:24.929 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'tuya:project:TuyaCloudProject' changed from OFFLINE (COMMUNICATION_ERROR) to ONLINE 2022-05-18 09:28:24.653 [WARN ] [ding.tuya.internal.cloud.TuyaOpenAPI] - Server reported invalid token. This should never happen. Trying to re-login. 2022-05-18 09:28:24.655 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'tuya:project:TuyaCloudProject' changed from ONLINE to OFFLINE (COMMUNICATION_ERROR) 2022-05-18 09:29:24.786 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'tuya:project:TuyaCloudProject' changed from OFFLINE (COMMUNICATION_ERROR) to ONLINE 2022-05-18 09:33:24.797 [WARN ] [ding.tuya.internal.cloud.TuyaOpenAPI] - Server reported invalid token. This should never happen. Trying to re-login. 2022-05-18 09:33:24.799 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'tuya:project:TuyaCloudProject' changed from ONLINE to OFFLINE (COMMUNICATION_ERROR) 2022-05-18 09:34:24.931 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'tuya:project:TuyaCloudProject' changed from OFFLINE (COMMUNICATION_ERROR) to ONLINE 2022-05-18 09:38:24.674 [WARN ] [ding.tuya.internal.cloud.TuyaOpenAPI] - Server reported invalid token. This should never happen. Trying to re-login. 2022-05-18 09:38:24.677 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'tuya:project:TuyaCloudProject' changed from ONLINE to OFFLINE (COMMUNICATION_ERROR) 2022-05-18 09:39:24.833 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'tuya:project:TuyaCloudProject' changed from OFFLINE (COMMUNICATION_ERROR) to ONLINE 2022-05-18 09:43:24.806 [WARN ] [ding.tuya.internal.cloud.TuyaOpenAPI] - Server reported invalid token. This should never happen. Trying to re-login. 2022-05-18 09:43:24.810 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'tuya:project:TuyaCloudProject' changed from ONLINE to OFFLINE (COMMUNICATION_ERROR) 2022-05-18 09:44:24.941 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'tuya:project:TuyaCloudProject' changed from OFFLINE (COMMUNICATION_ERROR) to ONLINE 2022-05-18 09:48:24.719 [WARN ] [ding.tuya.internal.cloud.TuyaOpenAPI] - Server reported invalid token. This should never happen. Trying to re-login. 2022-05-18 09:48:24.721 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'tuya:project:TuyaCloudProject' changed from ONLINE to OFFLINE (COMMUNICATION_ERROR) 2022-05-18 09:49:24.872 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'tuya:project:TuyaCloudProject' changed from OFFLINE (COMMUNICATION_ERROR) to ONLINE 2022-05-18 09:53:24.737 [WARN ] [ding.tuya.internal.cloud.TuyaOpenAPI] - Server reported invalid token. This should never happen. Trying to re-login. 2022-05-18 09:53:24.741 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'tuya:project:TuyaCloudProject' changed from ONLINE to OFFLINE (COMMUNICATION_ERROR) 2022-05-18 09:54:24.871 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'tuya:project:TuyaCloudProject' changed from OFFLINE (COMMUNICATION_ERROR) to ONLINE 2022-05-18 09:58:24.685 [WARN ] [ding.tuya.internal.cloud.TuyaOpenAPI] - Server reported invalid token. This should never happen. Trying to re-login. 2022-05-18 09:58:24.688 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'tuya:project:TuyaCloudProject' changed from ONLINE to OFFLINE (COMMUNICATION_ERROR) 2022-05-18 09:59:24.823 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'tuya:project:TuyaCloudProject' changed from OFFLINE (COMMUNICATION_ERROR) to ONLINE 2022-05-18 10:03:24.659 [WARN ] [ding.tuya.internal.cloud.TuyaOpenAPI] - Server reported invalid token. This should never happen. Trying to re-login. 2022-05-18 10:03:24.662 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'tuya:project:TuyaCloudProject' changed from ONLINE to OFFLINE (COMMUNICATION_ERROR) 2022-05-18 10:04:24.795 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'tuya:project:TuyaCloudProject' changed from OFFLINE (COMMUNICATION_ERROR) to ONLINE

It doesn't seem to affect the functioning.

@J-N-K
Copy link
Member

J-N-K commented May 18, 2022

No, it only affects discovery of new devices. Did you try disabling and re-enabling the project thing? What happened before that? Did you put the system to sleep or were there any longer internet outages?

@BigGeorgeTx
Copy link
Author

Cycling the Tuya Cloud account Thing did not resolve it.

This is on my 2nd openHAB installation. I hadn't check it in a while and when I did, the Tuya Cloud Account Thing was Uninitialized and all the device Things were offline. The Tuya Cloud Account Thing didn't show any detail in the UI, so I couldn't cycle it. I restarted openHAB, but that didn't help. I removed the binding and then installed it, and then it worked. I then upgraded openHAB to 3.3.0M5, removed and reinstalled the Smarthome/J bindings I use (Tuya and amazonechocontrol. It was after this that I noticed the above in the log.

@J-N-K
Copy link
Member

J-N-K commented Jun 20, 2022

Sorry for the long delay. Are you using the same login credentials and the same cloud project on different devices at the same time? I'm not sure that this is possible.

@BigGeorgeTx
Copy link
Author

BigGeorgeTx commented Jun 21, 2022

I was still seeing this message on one of my installations (but not the other) today. I updated that installation to M7 today and haven't seen the message in the log since I restarted. Before I was seeing it every 10 minutes.

Edit: I spoke too soon. I'm still seeing it in the log:
2022-06-20 19:03:33.176 [WARN ] [ding.tuya.internal.cloud.TuyaOpenAPI] - Server reported invalid token. This should never happen. Trying to re-login.

@J-N-K
Copy link
Member

J-N-K commented Jul 5, 2022

The re-login succeeds, correct?

@BigGeorgeTx
Copy link
Author

Yes, it always reconnects.

I'm not seeing it today. I'm now running openHAB 3.3 Release with the 3.2.13 Smarthomej Tuya binding.

@J-N-K
Copy link
Member

J-N-K commented Aug 16, 2022

Seems to be fixed. A probable cause would be an expiring token when the internet connection is down.

@J-N-K J-N-K closed this as completed Aug 16, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants