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

Error during polling #25

Closed
crxporter opened this issue Jul 16, 2021 · 13 comments
Closed

Error during polling #25

crxporter opened this issue Jul 16, 2021 · 13 comments
Assignees

Comments

@crxporter
Copy link
Member

Shaquu - as promised, here's the error I'm getting about once per hour during polling. No interaction is required, the node re-authenticates and continues running happily. I'm polling every 2 seconds.

image

@hawkseye76
Copy link

I"m getting this same error 401. have to update credentials and restart flow to get it working again. seems like it stops working after 2 or 3 cycles.

@hawkseye76
Copy link

I"m getting this same error 401. have to update credentials and restart flow to get it working again. seems like it stops working after 2 or 3 cycles.

I figured out part of my problem. I uninstalled the old Unifi modules (for USG). Like @crxporter i'm getting authentication errors once an hour and it resumes without intervention. issue i have is i have some flows that only run once a day and if it hits during that time, it doesn't run and i have to manually intervene.

@crxporter
Copy link
Member Author

Update about the hourly error: @Shaquu has a new plan to make a periodic login update every 45 minutes. This should be ready soon I think?

We hope it will take care of the hourly 401

@hawkseye76
Copy link

I updated to the latest version a couple days ago. I'm still getting the error every hour still. Was the latest update supposed to fix this issue, or something else maybe?

@crxporter
Copy link
Member Author

No this wasn't included in 0.6.0 ... still waiting on this one. I'll see if I can encourage Mr Shaquu to have a look

@hawkseye76
Copy link

No worries. Just checking.

@Shaquu
Copy link
Member

Shaquu commented Feb 20, 2022

Please check 0.7.0-dev.4

@hawkseye76
Copy link

hawkseye76 commented Feb 21, 2022

So, i did find dev4, installed it. still getting error about once an hour. installed dev5, same thing. Also, somewhere along the way, updating wlanconf has broken. i have a flow that updates the guest network password and it now returns and error and does not update the password. This is what i get back:

Bad response from: https://xxx.xxx.xxx.xxx/proxy/network/api/s/default/rest/wlanconf/xxxxxxxxxxxxxxxxxxxxxxx

Error: Invalid Payload undefined undefined

Nothing has changed on that flow. If i need to open a new issue for that, just let me know.

*** Edit ***
I removed the devs and rolled back to 0.6.0 and the wlanconf is still broken.

@Shaquu
Copy link
Member

Shaquu commented Feb 21, 2022

@pshellguruwannabe this new error might be related to UniFi update itself

anyway, notes that fix is not done

@hawkseye76
Copy link

you referring to the 7.x update?

Shaquu added a commit that referenced this issue Feb 22, 2022
@Shaquu
Copy link
Member

Shaquu commented Feb 22, 2022

@pshellguruwannabe please try 0.7.0-dev.6 :)
If not, we will iterate again.

I am testing myself now.

Also, for live experience, join our Discord!

@Shaquu
Copy link
Member

Shaquu commented Feb 22, 2022

Works for me:

22 Feb 21:49:34 UniFi:AccessController [UDM Pro:c42f07f6222e4d62] Initialized +0ms
22 Feb 21:49:34 UniFi:AccessController [UDM Pro:c42f07f6222e4d62] Successfully pre authenticated +0ms
22 Feb 21:49:36 UniFi:Request [Bootstrap:d3581e49f2f5c4a2] Initialized +0ms
22 Feb 21:49:36 UniFi:Request [Cams:a7eabee9.d6e438] Initialized +0ms
22 Feb 21:49:36 UniFi:Request [/test:47d8c5d147e8f0d6] Initialized +0ms
22 Feb 21:49:36 UniFi:AccessController [UDM Pro:c42f07f6222e4d62] Returning stored auth cookie +1s
22 Feb 21:49:36 UniFi:WebSocket [UnifiProtect API WS Updates:ff76c97f.8a6d48] Initialized +0ms
22 Feb 21:49:36 UniFi:Request [UnifiProtect API Bootstrap:fef54124.ef293] Initialized +0ms
22 Feb 21:49:36 UniFi:WebSocket:29e168cfc3cc449a4ae33b5c60e32bcd [UnifiProtect API WS Updates:ff76c97f.8a6d48] Connection to wss://192.168.1.1/proxy/protect/ws/updates open +0ms
22 Feb 21:49:38 - [trace] comms.open yd9wc0UWK/xrEIq/B7JU7D/K8W+DvA/CFigKYswhLvQ=
22 Feb 21:49:44 UniFi:Request [UnifiProtect API Bootstrap:fef54124.ef293] Received input message: { _msgid: 'aea72264328a8a4a' } +8s
22 Feb 21:49:44 UniFi:AccessController [UDM Pro:c42f07f6222e4d62] Returning stored auth cookie +9s
22 Feb 21:49:44 UniFi:Request [UnifiProtect API Bootstrap:fef54124.ef293] Result: +61ms
22 Feb 21:49:44 UniFi:WebSocket [UnifiProtect API WS Updates:ff76c97f.8a6d48] Received input message: {
UniFi:WebSocket   payload: {
UniFi:WebSocket     endpoint: '/proxy/protect/ws/updates?lastUpdateId=bca59d91-e095-4d9c-a535-f2df9825028f'
UniFi:WebSocket   },
UniFi:WebSocket   _msgid: 'd056f39f168e9fdb'
UniFi:WebSocket } +9s
22 Feb 21:49:44 UniFi:WebSocket [UnifiProtect API WS Updates:ff76c97f.8a6d48] ws 29e168cfc3cc449a4ae33b5c60e32bcd closed +1ms
22 Feb 21:49:44 UniFi:AccessController [UDM Pro:c42f07f6222e4d62] Returning stored auth cookie +67ms
22 Feb 21:49:44 UniFi:WebSocket:61363fee6d37c43eb0831e0c618f385d [UnifiProtect API WS Updates:ff76c97f.8a6d48] Connection to wss://192.168.1.1/proxy/protect/ws/updates?lastUpdateId=bca59d91-e095-4d9c-a535-f2df9825028f open +0ms
22 Feb 22:16:51 - [info] [zigbee2mqtt-server:7701802defb8c88c] Refreshing devices
22 Feb 22:16:52 - [info] [zigbee2mqtt-server:7701802defb8c88c] Refreshing devices
22 Feb 22:32:06 - [info] [zigbee2mqtt-server:7701802defb8c88c] Refreshing devices
22 Feb 22:32:07 - [info] [zigbee2mqtt-server:7701802defb8c88c] Refreshing devices
22 Feb 22:34:34 UniFi:AccessController [UDM Pro:c42f07f6222e4d62] Cookies refreshed +45m
22 Feb 22:34:44 UniFi:Request [UnifiProtect API Bootstrap:fef54124.ef293] Received input message: { _msgid: 'a571f7f1527a23af' } +45m
22 Feb 22:34:44 UniFi:AccessController [UDM Pro:c42f07f6222e4d62] Returning stored auth cookie +10s
22 Feb 22:34:44 UniFi:Request [UnifiProtect API Bootstrap:fef54124.ef293] Result: +80ms
22 Feb 22:34:44 UniFi:WebSocket [UnifiProtect API WS Updates:ff76c97f.8a6d48] Received input message: {
UniFi:WebSocket   payload: {
UniFi:WebSocket     endpoint: '/proxy/protect/ws/updates?lastUpdateId=ce28f1ce-39d8-43d9-aec3-7ea0b12e4921'
UniFi:WebSocket   },
UniFi:WebSocket   _msgid: '8e469a6e533611d9'
UniFi:WebSocket } +45m
22 Feb 22:34:44 UniFi:WebSocket [UnifiProtect API WS Updates:ff76c97f.8a6d48] ws 61363fee6d37c43eb0831e0c618f385d closed +1ms
22 Feb 22:34:44 UniFi:AccessController [UDM Pro:c42f07f6222e4d62] Returning stored auth cookie +84ms
22 Feb 22:34:44 UniFi:WebSocket:8d9a7d2b3820ba4befa89911182269cd [UnifiProtect API WS Updates:ff76c97f.8a6d48] Connection to wss://192.168.1.1/proxy/protect/ws/updates?lastUpdateId=ce28f1ce-39d8-43d9-aec3-7ea0b12e4921 open +0ms
22 Feb 23:03:32 - [info] [zigbee2mqtt-server:7701802defb8c88c] Refreshing devices
22 Feb 23:03:32 - [info] [zigbee2mqtt-server:7701802defb8c88c] Refreshing devices

Shaquu added a commit that referenced this issue Feb 22, 2022
fix: #27 node-red crash on network errors
feat: #36 allow custom port for Requests
feat: #25 Error during polling - cookies refresh job (45m)
@hawkseye76
Copy link

the error has stopped appearing hourly for login.

Shaquu added a commit that referenced this issue Oct 20, 2022
* fix: #27 node-red crash on network errors

* feat: #36 allow custom port for Requests

* feat: #25 Error during polling - cookies refresh job (45m)

* Removed yarn

Co-authored-by: crxporter <38265886+crxporter@users.noreply.github.com>
@Shaquu Shaquu closed this as completed Oct 24, 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

3 participants