Background commander fails to apply user changes due to missing thread argument
Description
User changes made in the panel are committed to the database, but the generated service configurations are not refreshed. For example, after deleting a user while Telemt is enabled, the deleted UUID remains in other/telegram/telemt/config.toml and Telemt continues accepting it.
The problem affects all background calls to commander(...), not only Telemt.
Root cause
hiddifypanel/panel/run_commander.py starts cmd_in_back without passing its required cmd argument:
t = threading.Thread(target=cmd_in_back, daemon=True)
t.start()
but the target is declared as:
def cmd_in_back(cmd):
p = subprocess.Popen(cmd, cwd=str(os.environ['HIDDIFY_CONFIG_PATH']), start_new_session=True)
p.wait()
Every background invocation therefore fails with:
TypeError: cmd_in_back() missing 1 required positional argument: 'cmd'
The caller returns success immediately, so the UI does not report the failure.
Steps to reproduce
- Install Hiddify Manager 12.3.3 and enable the Telemt Telegram proxy.
- Create a user and apply the configuration.
- Delete that user in the panel UI.
- Inspect
other/telegram/telemt/config.toml. - Inspect the panel/background-task error logs.
Actual result
- The user is deleted from the panel/database.
- The UUID remains in Telemt's generated
config.toml. - The configuration modification time does not change.
- Logs contain
TypeError: cmd_in_back() missing 1 required positional argument: 'cmd'.
Expected result
The apply-users command should run in the background, regenerate configurations from the current database state, and apply the user change.
Proposed fix
Pass base_cmd to the thread target:
t = threading.Thread(target=cmd_in_back, args=(base_cmd,), daemon=True)
A pull request with this change will be linked below.
Environment
- Hiddify Manager: 12.3.3
- Hiddify Panel: 12.3.3
- Installation: standard installer
- OS: Ubuntu 22.04
- Telegram proxy implementation: Telemt
Additional note
Telemt's add_client and remove_client methods are currently no-ops, so it relies on generated configuration updates. Telemt may also need to be reloaded/restarted after regeneration for the changed access list to take effect in the running process.
Proposed fix: https://github.com/hiddify/HiddifyPanel/pull/32
Yes, their last release was with errors, nothing works. And the feedback is 0. I am surprised at the attitude towards project, they would tell people to wait two or three months. Otherwise, it is unknown.
Likely related to our production issue: Admin API renew updates panel DB but sing-box protocols stay stale until manual apply-users. Background apply appears to fail silently. Details: #5505
This issue has been resolved in the new version (v14.0.5). Please update, and if it still happens, open a new issue with your version and logs.