Skip to content

myUplink Test connection fails with invalid_grant #1502

Description

@segran2

Summary

The Test connection action for the myUplink connection device fails, although the regular myUplink poller can read the same NIBE F750 account. This action is currently the only way to view the myUplink metrics in this flow.

Environment

  • FTW: v0.138.2-beta.1471
  • Device: NIBE F750 via myUplink
  • Driver: /var/lib/ftw/drivers/myuplink.lua
  • Regular polling: 112 API points read, 110 emitted

Steps to reproduce

  1. Configure the myUplink connection device with the existing working account.
  2. Confirm regular polling succeeds.
  3. Select Test connection.

Observed

  • The test creates a separate driver instance.
  • Its token refresh request fails with HTTP 400 invalid_grant.
  • The test then reports no telemetry within 8 seconds.
  • A token save also logged database is locked (SQLITE_BUSY).
  • This worked before patching.

Expected

The test should use and persist the current OAuth token state, then report the API/device result. If token refresh fails, show that authentication error directly instead of reporting only a telemetry timeout.

Suspected cause

The isolated test instance does not share or persist refreshed OAuth token state used by the regular poller, so it tries to refresh with a stale token. The SQLite busy error may also prevent a refreshed token from being saved. Please check token ownership/storage and serialize refresh/save operations between the regular poller and the test instance.

No client secret, access token, or refresh token is included.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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