mgth/LittleBigMouse · error · UnauthorizedAccessException

VIDAA rejected every authentication variant for protocol

Error message

VIDAA rejected every authentication variant for protocol {protocol} and controller {identity}. Check the projector date, time and timezone.

What it means

StartDynamicAsync exhausts every authentication/pairing variant the protocol offers and the device still refuses authorization. The library throws UnauthorizedAccessException with the last protocol version and controller identity so the developer can see which combination failed, and explicitly hints that clock skew is a common cause since VIDAA validates request timestamps/signatures.

Solutions

  1. Verify the projector's date, time and timezone (Settings > System) and NTP sync, then retry pairing
  2. Confirm configuration.ProtocolVersion matches the device firmware generation; unset it to let the library probe variants
  3. Re-run the full pairing flow from scratch (delete stored pairing first)
  4. Check the device isn't already paired to a different controller/app and clear old pairings on the device
  5. Capture lastAuthorizationError (InnerException) for the device's actual rejection reason

Example fix

// before
configuration.ProtocolVersion = 5; // guessed
await session.StartAsync(ct);
// after
configuration.ProtocolVersion = null; // let StartDynamicAsync probe variants
await session.StartAsync(ct);
Defensive patterns

Strategy: try-catch

Validate before calling

// sanity-check device clock reachability and config before pairing
if (string.IsNullOrEmpty(configuration.ClientId))
    throw new InvalidOperationException("ClientId required for pairing");

Try / catch

try
{
    await session.StartAsync(ct);
}
catch (UnauthorizedAccessException ex)
{
    logger.LogError(ex, "VIDAA pairing rejected; check device date/time/timezone and ProtocolVersion");
    // surface the lastAuthorizationError inner exception to the user
}

Prevention

When it happens

Trigger: Calling StartAsync (which delegates to StartDynamicAsync) on a newer VIDAA device where the pairing request, app-connect handshake and all fallback auth payloads are rejected; wrong ProtocolVersion configured; controller identity not recognized by the device.

Common situations: Projector/TV system clock wrong or in the wrong timezone so signed requests fall outside the accepted window; firmware update changed the pairing protocol; misconfigured ProtocolVersion in connection settings; device paired to another controller.

Understand the failure class

Related errors


AI-assisted analysis of mgth/LittleBigMouse@7a42f01d47 (2026-09-16). Data as JSON: /api/errors/c07e6a3a5b33b343. Report an issue: GitHub.

Appendix: source

Thrown at LittleBigMouse.Plugins/LittleBigMouse.Plugin.Vcp.Avalonia/HisenseVidaa/VidaaPairing.cs:165

                configuration.DeviceUuid = candidate;
                configuration.AuthMethod = method;
                configuration.ClientId = credentials.ClientId;
                configuration.MqttUsername = credentials.Username;
                configuration.AccessToken = "";
                configuration.RefreshToken = "";

                _ = responses.PinAccepted.Expect();
                _ = responses.TokenIssued.Expect();
                if (requestPin)
                    await session.PublishAsync(
                        HisenseVidaaProtocol.Topic("ui_service", configuration.ClientId, "vidaa_app_connect"),
                        HisenseVidaaProtocol.PairingRequestPayload(), cancellationToken).ConfigureAwait(false);
                return;
            }

        var protocol = configuration.ProtocolVersion?.ToString() ?? "unknown";
        throw new UnauthorizedAccessException(
            $"VIDAA rejected every authentication variant for protocol {protocol} and controller {identity}. " +
            "Check the projector date, time and timezone.", lastAuthorizationError);
    }

    string NormalizedBrand()
    {
        var brand = configuration.Brand.Trim().ToLowerInvariant();
        return string.IsNullOrWhiteSpace(brand) || brand.Contains("hisense", StringComparison.Ordinal)
            ? "his"
            : brand;
    }

    string PairingIdentity()
    {
        var configured = HisenseVidaaProtocol.NormalizeMac(configuration.DeviceUuid, preserveCase: true);
        if (configured.Count(Uri.IsHexDigit) == 12) return configured;
        return HisenseVidaaProtocol.NormalizeMac(configuration.ControllerMacAddress, preserveCase: true);
    }

View on GitHub (pinned to 7a42f01d47)