Cannot download limits from [...] DNS Failed: resolve dns name #143

Closed
opened 2024-02-16 22:35:47 +00:00 by stanto · 2 comments

Expected Behaviour

That powertools can resolve DNS addresses when needed.

Actual Behaviour

Powertools appears to attempt to connect to a remote server either before the steam deck has an internet connection or before it's able to resolve a DNS address.

18:01:05 [WARN] Cannot download limits from http://limits.ngni.us:45000/powertools/v1: http://limits.ngni.us:45000/powertools/v1: Dns Failed: resolve dns name 'limits.ngni.us:45000': failed to lookup address information: Temporary failure in name resolution

This address tends to be resolved on a consequent reboot or restart of steamos, but since we don't want to keep rebooting our steam deck for a plugin it should either wait for a network connection or at least inform the user it cannot connect if it's important to the user. Or it shouldn't be connecting to a remote server at all, as this behaviour isn't told to the user unless they look at the log.

Steps To Reproduce

  1. Install power tools
  2. Turn off steam deck
  3. Turn on steam deck
  4. Look at powertools log file, see the error message

Anything else?

No response

Version

1.4.0-rls

Platform

SteamDeck

OS

SteamOS 3 (Stable)

### Expected Behaviour That powertools can resolve DNS addresses when needed. ### Actual Behaviour Powertools appears to attempt to connect to a remote server either before the steam deck has an internet connection or before it's able to resolve a DNS address. 18:01:05 [WARN] Cannot download limits from `http://limits.ngni.us:45000/powertools/v1`: http://limits.ngni.us:45000/powertools/v1: Dns Failed: resolve dns name 'limits.ngni.us:45000': failed to lookup address information: Temporary failure in name resolution This address tends to be resolved on a consequent reboot or restart of steamos, but since we don't want to keep rebooting our steam deck for a plugin it should either wait for a network connection or at least inform the user it cannot connect if it's important to the user. Or it shouldn't be connecting to a remote server at all, as this behaviour isn't told to the user unless they look at the log. ### Steps To Reproduce 1. Install power tools 2. Turn off steam deck 3. Turn on steam deck 4. Look at powertools log file, see the error message ### Anything else? _No response_ ### Version 1.4.0-rls ### Platform SteamDeck ### OS SteamOS 3 (Stable)
stanto added the
bug
label 2024-02-16 22:35:47 +00:00
Owner

This is caused by PowerTools starting before the network is fully connected. This was actually fixed recently in the dev branch, though it's technically a workaround. I suppose I could make it retry endlessly when it fails but that's a bit of waste of resources.

Fix is in 1da7bafe5e

it shouldn't be connecting to a remote server at all

I disagree. Fetching configuration from online allows me to add and fix device support without pushing an update. The latest config at release time is compiled into PowerTools for fallback, but there have been 2 critical changes since v1.4.0 was released:

  • The Steam Deck OLED CPU name changed in a firmware update (which I fixed in hours instead of the weeks it would take to get an update ready and onto the store)
  • The battery limit was found to be buggy (which I could warn people about with a dev message sent through the config)

If anyone doesn't like that, they're welcome to re-compile the PowerTools binary without the online feature flag just in case someone wanted it truly disabled. Removing the refresh field in the cache file should have a similar effect.

The server is open source (it's in the backend/limits_srv directory) and I do address some of the concern about it in the FAQ. You do have to trust that I'm running that server, but the information that is being sent to that server is easy to verify.

This is caused by PowerTools starting before the network is fully connected. This was actually fixed recently in the dev branch, though it's technically a workaround. I suppose I could make it retry endlessly when it fails but that's a bit of waste of resources. Fix is in https://git.ngni.us/NG-SD-Plugins/PowerTools/commit/1da7bafe5e3ed2d13c9dcb17412ee46c48a414e7 > it shouldn't be connecting to a remote server at all I disagree. Fetching configuration from online allows me to add and fix device support without pushing an update. The latest config at release time is compiled into PowerTools for fallback, but there have been 2 critical changes since v1.4.0 was released: - The Steam Deck OLED CPU name changed in a firmware update (which I fixed in hours instead of the weeks it would take to get an update ready and onto the store) - The battery limit was found to be buggy (which I could warn people about with a dev message sent through the config) If anyone doesn't like that, they're welcome to re-compile the PowerTools binary without the `online` feature flag just in case someone wanted it truly disabled. Removing the `refresh` field in the cache file should have a similar effect. The server is open source (it's in the `backend/limits_srv` directory) and I do address some of the concern about it in the [FAQ](https://git.ngni.us/NG-SD-Plugins/PowerTools/wiki/FAQ#user-content-do-you-collect-analytics). You do have to trust that I'm running that server, but the information that is being sent to that server is easy to verify.
NGnius added the
tbr
label 2024-02-17 04:21:59 +00:00
Author

If anyone doesn't like that, they're welcome to re-compile the PowerTools binary without the online feature flag

I don't believe that's a fair expectation if someone wants to make sure that something they're running doesn't connect online. It sounds like it could easily be a toggle.

I'm also a believer of appropriate effort versus purpose and such, and I don't believe this is sufficient to kick up a fuss over.

> If anyone doesn't like that, they're welcome to re-compile the PowerTools binary without the online feature flag I don't believe that's a fair expectation if someone wants to make sure that something they're running doesn't connect online. It sounds like it could easily be a toggle. I'm also a believer of appropriate effort versus purpose and such, and I don't believe this is sufficient to kick up a fuss over.
Sign in to join this conversation.
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: NG-SD-Plugins/PowerTools#143
No description provided.