Skip to content

[Bug] 订阅更新按钮忽略接口结果,失败时无提示 #5239

Description

@madcpt

OpenClash Version

0.47.116 (latest release at the time of reporting)

Environment

  • OpenWrt 21.02-SNAPSHOT
  • Platform: Linux-arm64 (GL-MT3000)

Describe the Bug

In the subscription configuration page, clicking the UpDate button gives no reliable completion or error feedback. The button is immediately re-enabled and the XHR callback is empty. If the request fails, times out, or the update script cannot complete, the user cannot distinguish that from a successful update.

The relevant template is luci-app-openclash/luasrc/view/openclash/update_config.htm:

XHR.get(url, {filename: filename}, function(x, status) {});
btn.disabled = false;

The backend endpoint (action_update_config) reports success when /usr/share/openclash/openclash.sh <filename> returns 0, with the message Config update started successfully; it does not report actual download/validation/write success.

To Reproduce

  1. Add a config subscription.
  2. Open the subscription configuration page.
  3. Click UpDate.
  4. Observe that the button is re-enabled immediately and no result is shown.
  5. Make the request fail (for example, temporarily disconnect WAN) or use a subscription whose update cannot finish. The UI remains silent.

Expected Behavior

  • Keep the button disabled until the HTTP request returns.
  • Show a visible success/error result from the endpoint.
  • Ideally expose the actual update completion/failure status (download, validation, and write), rather than only indicating that the script was invoked.

OpenClash Log

No debug log is attached because this report concerns the UI code path. The relevant runtime log was also rotated by the OpenClash watchdog before it could be preserved.

Manual invocation of the same backend command succeeded afterward and updated the downloaded config, so this is not evidence of an inaccessible subscription endpoint.

Additional Context

The newer status-page update flow handles the immediate JSON response, but that response still represents script invocation rather than confirmed update completion. This report focuses on the legacy subscription-page button, whose callback is empty.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions