moeru-ai/airi · error · Error

The HID device is not a standard DualSense controller.

Error message

The HID device is not a standard DualSense controller.

What it means

DualSenseController's constructor is meant to be constructed only from HID devices that pass isDualSenseDevice (matching vendor/product IDs and a DualSense-shaped report descriptor). The guard throws for any other HIDDevice — e.g. a generic gamepad, a DualShock 4, or a HID device that merely shares the interface — because the report parsing and output-report layouts in this package assume DualSense hardware.

Source

Thrown at packages/input-playstation-dualsense-5/src/controller.ts:30

  constructor(device: HIDDevice) {
    if (!isDualSenseDevice(device))
      throw new Error('The HID device is not a standard DualSense controller.')

    this.#device = device
    this.#connectionType = detectDualSenseConnectionType(device)
  }

View on GitHub (pinned to 9c213115f8)

Solutions

  1. Filter devices with isDualSenseDevice(device) before requesting/constructing, e.g. `devices.filter(isDualSenseDevice)`.
  2. Use the package's request/exported device filter in navigator.hid.requestDevice so only DualSense devices are paired.
  3. If another controller type must be supported, add a dedicated controller class for it rather than reusing DualSenseController.
Defensive patterns

Strategy: type-guard

When it happens

Trigger: Thrown at packages/input-playstation-dualsense-5/src/controller.ts:30 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of moeru-ai/airi@9c213115f8 (2026-09-02). Data as JSON: /api/errors/fd1016000d16d676. Report an issue: GitHub.