-
Notifications
You must be signed in to change notification settings - Fork 381
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
Plugins tab does not load without internet access #598
Comments
Those are series of DNS lookup timeouts. I'll check this out - the page does load if you're completely offline - i.e. don't have your server configured with DNS servers it can't connect to. |
My ISP is down right now, so this was the test case for me (: |
@buenyamin-olgun, if your ISP is still down but you're somehow able to download updates, I've pushed a bugfix for this to https://github.com/oznu/homebridge-config-ui-x/wiki/How-To-Test-Upcoming-Changes While the "request" timeout was set to 5 seconds, the dns lookup portion of this did not count towards the 5 seconds. Adding to the problem is the fact that dns lookups a synchronous, which means if you had more than a couple plugins the page would never load like what you have experienced. The dns lookups are also handled by the OS and unfortunately Node.js provides no way to set a dns lookup timeout dynamically. To fix this I set a hard cap of 15 seconds on the request. All the plugins are checked for updates asynchronously already, so there will only be a single ~15 second delay. After the 15 seconds you will see a message like this in the log, but the plugins will load.
I've set it to 15 seconds for now as I want to make sure I don't break anything for users running really slow machines (like the Raspberry Pi Zero). I'll drop this down further if no one raises any issues. |
Describe The Bug:
If you have no internet connection the plugins tab will just load forever and show no plugins.
To Reproduce:
Block the outgoing / incoming internet traffic to your homebridge-config-ui-x device and go to http://192.168.0.100:8080/plugins
http://192.168.0.100:8080/api/plugins seems does not respond.
Expected behavior:
You should be able to delete and configure the installed plugins without any internet access.
Logs:
Screenshots:
Environment:
The text was updated successfully, but these errors were encountered: