Skip to content

[NetworkOptimizer] Local Account connection test can ignore typed credentials #16741

Description

@djmaxwell1975

Script

NetworkOptimizer, v2.7.2

Environment

  • Proxmox VE 9.x
  • Debian 13 unprivileged LXC
  • Network Optimizer installed from the community script

Description

The Settings → UniFi Console → Local Account connection test failed with:

Authentication failed

The same controller, credentials, login payload, and TLS-ignore behavior succeeded when tested directly from inside the container with the application’s login endpoint. This isolated the problem to the Settings form state rather than the UniFi controller, credentials, network path, or reverse proxy.

Root cause

The Blazor settings form used default @bind behavior for the connection fields. In this flow, the server-side component state was not reliably updated with the values typed into the URL, username, password, or API-key fields before the Test Connection / Connect handler built its configuration. The handler therefore tested stale or empty credentials.

Local fix applied and verified

Changed the relevant settings inputs to update on every keystroke:

@bind:event="oninput"

Applied to the console URL, username, password, and API-key fields (and the site selector where applicable).

After rebuilding and restarting the service:

  1. Test Connection succeeded against the UniFi gateway.
  2. The configuration saved successfully.
  3. The dashboard reported Console Connected.
  4. Service logs confirmed successful authentication and connection to the UniFi OS controller.

No credentials or private infrastructure identifiers are included here.

Additional deployment note

A framework-dependent publish replaced the previous self-contained launcher, causing the service to enter a runtime-not-found restart loop. The container was recovered by using the installed system .NET runtime to launch the published application.

Please make the installer/service explicit about either self-contained publishing or the system-runtime launcher so future rebuilds do not create this mismatch.

Suggested upstream patch

Use @bind:event="oninput" on the connection fields, then rebuild the next release and verify the Local Account flow with a fresh browser session.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions