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 timeout Axios #731

Open
1onar opened this issue Dec 16, 2023 · 23 comments · May be fixed by #770
Open

Error timeout Axios #731

1onar opened this issue Dec 16, 2023 · 23 comments · May be fixed by #770
Labels

Comments

@1onar
Copy link

1onar commented Dec 16, 2023

[updateUnifiData-login site undefined] error: timeout of 10000ms exceeded, stack: AxiosError: timeout of 10000ms exceeded at RedirectableRequest.handleRequestTimeout (/opt/iobroker/node_modules/axios/lib/adapters/http.js:643:16) at RedirectableRequest.emit (node:events:517:28) at RedirectableRequest.emit (node:domain:489:12) at Timeout.<anonymous> (/opt/iobroker/node_modules/follow-redirects/index.js:169:12) at listOnTimeout (node:internal/timers:569:17) at processTimers (node:internal/timers:512:7)

@Fontheweg
Copy link

image

Same here

UniFi OS v3.2.7
Network Version 8.0.24
Protect Version 2.10.11

@chris199512
Copy link

chris199512 commented Dec 18, 2023

same here after updating to OS v3.2.7
[updateUnifiData-login site undefined] error: Request failed with status code 401, stack: AxiosError: Request failed with status code 401 at settle (/opt/iobroker/node_modules/node-unifi/node_modules/axios/lib/core/settle.js:19:12) at IncomingMessage.handleStreamEnd (/opt/iobroker/node_modules/node-unifi/node_modules/axios/lib/adapters/http.js:570:11) at IncomingMessage.emit (node:events:525:35) at IncomingMessage.emit (node:domain:489:12) at endReadableNT (node:internal/streams/readable:1358:12) at processTicksAndRejections (node:internal/process/task_queues:83:21)

Error site undefined (data): {"error":{"code":401,"message":"Unauthorized"}}

@Pino72de
Copy link

Same here.
OS 3.2.7

[updateUnifiData-login site undefined] error: timeout of 10000ms exceeded, stack: AxiosError: timeout of 10000ms exceeded at RedirectableRequest.handleRequestTimeout (C:\Program Files\ioBroker\node_modules\axios\lib\adapters\http.js:643:16) at RedirectableRequest.emit (node:events:517:28) at RedirectableRequest.emit (node:domain:489:12) at Timeout.<anonymous> (C:\Program Files\ioBroker\node_modules\follow-redirects\index.js:179:12) at listOnTimeout (node:internal/timers:569:17) at processTimers (node:internal/timers:512:7)

@Fontheweg
Copy link

For the Unifi-Protect Adapter the problem is solved: https://github.com/peterbaumert/ioBroker.unifi-protect/pull/199/files?diff=split&w=0

I modified my main.js an the adater is running now.
I tried to compare the main.js from unifi-protect with the main.js from unifi, but there are many differences and I can't figure out how the login is done here ...
So I hope somebody can adopt the solution from the unifi-protect adapter.

@chris199512
Copy link

with the update of the adapter to 0.6.7 beta it works

@1onar
Copy link
Author

1onar commented Dec 30, 2023

@mcm1957 why close this issue? Where is the fix. I can't see a mentioned 0.6.7 "beta". The last commit is 3 weeks ago.

@mcm1957
Copy link
Member

mcm1957 commented Dec 30, 2023

a) According to chris199512 's posting two days ago the adapter works with 0.6.7.
So 've marked the issue as fixed.

b) If you cannot install 0.6.7 please open a topic at forum (https://forum.iobroker.net) This release ist available at latest and at stable repository. If you do not see it, there could be something wrong with you installation.

image

c) If the problem still exists with adapter release 0.6.7 please attach a log and note the currently used versions of releavant adapters (Adpater - should be 0.6.7, js-controller, node, o/s)

@1onar
Copy link
Author

1onar commented Dec 30, 2023

a) The adapter functions, but it still triggers errors. Perhaps you misunderstood @chris199512's post. The error has not been resolved.

b) 0.6.7 is installed. But thank you for your advise.

c) Yes, it does:

  • Adapter: 0.6.7
  • js-controller: 5.0.17
  • node.js: v18.19.0

time: 2023-12-30 11:31:15.497
debug: error

[updateUnifiData-login site undefined] error: timeout of 10000ms exceeded, stack: AxiosError: timeout of 10000ms exceeded at RedirectableRequest.handleRequestTimeout (/opt/iobroker/node_modules/axios/lib/adapters/http.js:643:16) at RedirectableRequest.emit (node:events:517:28) at RedirectableRequest.emit (node:domain:489:12) at Timeout.<anonymous> (/opt/iobroker/node_modules/follow-redirects/index.js:169:12) at listOnTimeout (node:internal/timers:569:17) at processTimers (node:internal/timers:512:7)

Bildschirmfoto 2023-12-30 um 11 36 15 Bildschirmfoto 2023-12-30 um 11 36 29

@mcm1957 mcm1957 removed the fixed label Dec 30, 2023
@mcm1957
Copy link
Member

mcm1957 commented Dec 30, 2023

Thanks for detailled feedback.
I've removed the fixed label.

@1onar
Copy link
Author

1onar commented Dec 30, 2023

Thanks for detailled feedback.
I've removed the fixed label.

Thank you! My initial post should have been more detailed.

@chris199512
Copy link

After a few days I don't get the error, but the clients aren't updating again. So the fix only fixed the login, which was also where this error was thrown. Sorry, it looked like it was working

@Pino72
Copy link

Pino72 commented Dec 30, 2023

Same here, reinstalled 0.6.7 over the "old" 0.6.7 and still I get the error and no updates after a while. Still the issue is not fixed. No idea where I can get the link for a possbile "beta" version...used the link from this github repo.

unifi.0 2023-12-30 10:23:52.104 error [updateUnifiData-login site undefined] error: timeout of 10000ms exceeded, stack: AxiosError: timeout of 10000ms exceeded at RedirectableRequest.handleRequestTimeout (C:\Program Files\ioBroker\node_modules\node-unifi\node_modules\axios\lib\adapters\http.js:643:16) at RedirectableRequest.emit (node:events:517:28) at RedirectableRequest.emit (node:domain:489:12) at Timeout.<anonymous> (C:\Program Files\ioBroker\node_modules\follow-redirects\index.js:179:12) at listOnTimeout (node:internal/timers:569:17) at processTimers (node:internal/timers:512:7)

@Knallix
Copy link

Knallix commented Jan 5, 2024

I'm very interested in a solution. Is anyone here still actively working on the problem? What other logs are needed to locate the problem?

@Rello
Copy link

Rello commented Jan 27, 2024

Anyone feels motivated to look into it?
did not have time yet :-(

@mcm1957
Copy link
Member

mcm1957 commented Jan 27, 2024

@jens-maus
@Scrounger

Any chance to take a look?
I don't have any matching equipment so I cannot do anything here.

@Hant0r
Copy link

Hant0r commented Mar 11, 2024

hi ... is there already a solution?

@nevermind2001
Copy link

Would be really great if a Developer can take a look ...

@Pino72de
Copy link

Pino72de commented May 2, 2024

New version 0.7.0 seems to have solved this issue :-)!! Thanks.

@Pino72
Copy link

Pino72 commented May 4, 2024

Well, so I thought. Problem still exists:

[updateUnifiData-login site undefined] error: timeout of 10000ms exceeded, stack: AxiosError: timeout of 10000ms exceeded at RedirectableRequest.handleRequestTimeout (C:\ioBroker\node_modules\node-unifi\node_modules\axios\lib\adapters\http.js:643:16) at RedirectableRequest.emit (node:events:517:28) at RedirectableRequest.emit (node:domain:489:12) at Timeout.<anonymous> (C:\ioBroker\node_modules\follow-redirects\index.js:210:12) at listOnTimeout (node:internal/timers:569:17) at processTimers (node:internal/timers:512:7)

@Negalein
Copy link

Fehler besteht auch noch bei V 0.7.0

unifi.0 | 2024-05-28 23:35:41.748 | error | [updateUnifiData-login site undefined] error: timeout of 10000ms exceeded, stack: AxiosError: timeout of 10000ms exceeded at RedirectableRequest.handleRequestTimeout (/opt/iobroker/node_modules/node-unifi/node_modules/axios/lib/adapters/http.js:643:16) at RedirectableRequest.emit (node:events:519:28) at RedirectableRequest.emit (node:domain:488:12) at Timeout.<anonymous> (/opt/iobroker/node_modules/follow-redirects/index.js:210:12) at listOnTimeout (node:internal/timers:573:17) at processTimers (node:internal/timers:514:7)

@Rello
Copy link

Rello commented Jun 10, 2024

There are several errors.
the 4 upper ones come from the sentry plugin, if this is enabled. it is not catching the "undefined" correctly and brakes painfully. we can improve this later...

Bildschirmfoto 2024-06-10 um 15 05 15

the main error is triggered here
https://github.com/iobroker-community-adapters/ioBroker.unifi/blob/master/main.js#L269

try { await defaultController.login(); } catch (err) { this.handleError(err, undefined, 'updateUnifiData-login');

@Fontheweg you are doing the login yourself in your codeing.
this Adapter here is using the node-unifi from @jens-maus
and here it seems, that the timeout is exceeded here
https://github.com/jens-maus/node-unifi/blob/master/unifi.js#L114

@Fontheweg I am not sure about your fix to protect. Do you have any input when comparing this to the node-unifi?
I am not sure if just raising the timeout >10seconds would help?

@Rello
Copy link

Rello commented Jun 12, 2024

I raised the timeout to 30 seconds and did not have any issues since then.
Perhaps the unifi is just a little slower than 10 seconds form time to time? I would submit a pull to raise this to 30s and hope we are done then

@Rello
Copy link

Rello commented Jun 13, 2024

I did not receive any further errors. will provide the pull for review...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.