Repository: fwupd/fwupd (C)

Issue:
fwupd 2.0.1: device ID was not unique
**Describe the bug**
I have a Lenovo L14 Gen-5 notebook and a connected Universal Thunderbolt 4 Docking Station. 
The system has no internet connection. A local path for the update files is configured in the 
vendor-directory.conf file. There is a local update for the docking station available (10.16 -> 10.18). 

When I call the GetUpgrades method with fwupd 2.0.1 via dbus, I get an error that the device-id 
is not unique. 

busctl call org.freedesktop.fwupd / org.freedesktop.fwupd GetUpgrades s 481f4eef35467530fca9b1f64d81d7b14973afea

...
‣ Type=error  Endian=l  Flags=1  Version=1 Cookie=1162  ReplyCookie=2  Timestamp="Fri 2024-10-18 16:13:09.109374 UTC"
  Sender=:1.11  Destination=:1.25
  ErrorName=org.freedesktop.fwupd.NotSupported  ErrorMessage="device ID 481f4eef35467530fca9b1f64d81d7b14973afea was not unique"
  UniqueName=:1.11
  MESSAGE "s" {
          STRING "device ID 481f4eef35467530fca9b1f64d81d7b14973afea was not unique";
  };
...

But the id is only available once. 

With fwupd version 1.9.26 I get this result:

...
‣ .Type=error  Endian=l  Flags=1  Version=1 Cookie=1008  ReplyCookie=2  Timestamp="Fri 2024-10-18 18:11:52.008323 UTC"
  Sender=:1.5  Destination=:1.15
  ErrorName=org.freedesktop.fwupd.NothingToDo  ErrorMessage="Device is not updatable"
  UniqueName=:1.5
  MESSAGE "s" {
          STRING "Device is not updatable";
  };
...

**Steps to Reproduce**
busctl call org.freedesktop.fwupd / org.freedesktop.fwupd GetUpgrades s 481f4eef35467530fca9b1f64d81d7b14973afea

**Expected behavior**
ErrorName=org.freedesktop.fwupd.NothingToDo
  MESSAGE "s" {
          STRING "Device is not updatable";
  };


**fwupd version information**
compile   info.libusb                   1.0.26
compile   com.hughsie.libxmlb           0.3.21
compile   com.hughsie.libjcat           0.2.2
compile   org.freedesktop.fwupd         2.0.1
runtime   org.freedesktop.fwupd-efi     1.6
runtime   com.hughsie.libxmlb           0.3.21
runtime   com.hughsie.libjcat           0.2.2
compile   org.freedesktop.fwupd.source  2.0.1-1-g3aac369a6
runtime   org.kernel                    6.8.12-grsec+
runtime   org.freedesktop.fwupd         2.0.1

Please note how you installed it (`apt`, `dnf`, `pacman`, source, etc): source

**fwupd device information**
LENOVO 21L2S06800
│
├─ELAN06D8:00 04F3:3195:
│     Device ID:          65dd55ecb739ecf3d71334790e364396063db673
│     Summary:            Touchpad
│     Current version:    0x0005
│     Bootloader Version: 0x0002
│     Vendor:             ELAN Microelectronics (HIDRAW:0x04F3)
│     GUIDs:              4e8cda57-37ba-5dc6-b114-7610e38714e2 ← HIDRAW\VEN_04F3&DEV_3195
│                         cc456594-6f7e-5d1b-82a6-b4558a813152 ← HIDRAW\VEN_04F3&DEV_3195&MOD_0006
│                         d15e804c-570f-511b-803a-b38a4eddae29 ← ELANTP\ICTYPE_14&MOD_0006
│                         296e64f7-9e08-5717-bff2-651e41b0477e ← ELANTP\ICTYPE_14&MOD_0006&DRIVER_HID
│     Device Flags:       • Internal device
│                         • Updatable
│                         • Can tag for emulation
│   
├─Unknown Device:
│     Device ID:          5792b48846ce271fab11c4a545f7a3df0d36e00a
│     Current version:    08
│     Vendor:             PCI:0x8086
│     GUID:               5a72808c-38b6-55c8-946a-5852c6e69620 ← PCI\VEN_8086&DEV_7DD5
│     Device Flags:       • Internal device
│                         • Cryptographic hash verification is available
│                         • Can tag for emulation
│   
├─EM061K-GL:
│     Device ID:          02861494e3c701c896953cd442bd2f1ad867e1eb
│     Summary:            Mobile broadband device
│     Current version:    EM061KGLAAR01A02M2G_01.011.01.011
│     Vendor:             Quectel (USB:0x2C7C)
│     GUIDs:              7f005089-8d63-5bbf-98ed-cee55b809556 ← USB\VID_2C7C&PID_6008&REV_0504&CARRIER_COMMERCIAL-DT-VOLTE&NAME_EM061K-GL
│                         761ae017-76b2-5da5-aaa5-82265c4f3ad4 ← USB\VID_2C7C&PID_6008&REV_0504&CARRIER_COMMERCIAL-DT-VOLTE
│                         e307a004-f1d0-5e6b-9176-b38687fad115 ← USB\VID_2C7C&PID_6008&REV_0504
│                         2bdac371-5939-5239-9dfa-eb4d4ff12bc8 ← USB\VID_2C7C&PID_6008
│     Device Flags:       • Updatable
│                         • System requires external power source
│                         • Unsigned Payload
│   
├─Integrated Camera:
│     Device ID:          2f92f60a2bd2a3b2990e64d7288a99531d7491ee
│     Current version:    59.5
│     Vendor:             Chicony Electronics Co.,Ltd. (USB:0x04F2)
│     Serial Number:      0001
│     GUID:               f982820c-8af9-5150-8806-aefba2c33aa3 ← USB\VID_04F2&PID_B805
│     Device Flags:       • Updatable
│                         • Can tag for emulation
│   
├─NV140WUM-N49:
│     Device ID:          10feb8f8641be9b4f44d52078baa6338209a53ef
│     Vendor:             PNP:BOE
│     GUID:               1b95866b-427b-5cd3-b0f7-ba4bfd1349f6 ← DRM\VEN_BOE&DEV_0C3F
│     Device Flags:       • Internal device
│                         • Can tag for emulation
│   
├─SAMSUNG MZVL81T0HDLB-00BLL:
│     Device ID:          04e17fcf7d3de91da49a163ffe4907855c3648be
│     Summary:            NVM Express solid state drive
│     Current version:    4L2QKXD7
│     Vendor:             PCI:0x144D
│     Serial Number:      S7G8NF0X306233
│     GUIDs:              10d1510f-cdc7-5f79-8ff3-5aff2d94a768 ← NVME\VEN_144D&DEV_A80D
│                         36076e45-c413-542a-bd7b-cabe82613a7c ← NVME\VEN_144D&DEV_A80D&SUBSYS_144DA801
│                         842b681c-c2ff-53b9-9a46-9c0e43013e05 ← SAMSUNG MZVL81T0HDLB-00BLL
│     Device Flags:       • Internal device
│                         • Updatable
│                         • System requires external power source
│                         • Needs a reboot after installation
│                         • Device is usable for the duration of the update
│                         • Signed Payload
│                         • Can tag for emulation
│   
├─System Firmware:
│ │   Device ID:          ba75deee17d4b473a464c81269b529212b547ca0
│ │   Summary:            UEFI System Resource Table device (updated via NVRAM)
│ │   Current version:    65544
│ │   Vendor:             LENOVO (DMI:LENOVO)
│ │   Update State:       Success
│ │   GUID:               ea9b5001-5bef-4058-87b2-687ce4cb5bb4
│ │   Device Flags:       • Internal device
│ │                       • Updatable
│ │                       • System requires external power source
│ │                       • Needs a reboot after installation
│ │                       • Device is usable for the duration of the update
│ │   Device Requests:    • Message
│ │ 
│ └─UEFI dbx:
│       Device ID:        362301da643102b9f38477387e2193e57abaa590
│       Summary:          UEFI revocation database
│       Current version:  270
│       Minimum Version:  270
│       Vendor:           UEFI:Linux Foundation
│       Install Duration: 1 second
│       GUIDs:            5971a208-da00-5fce-b5f5-1234342f9cf7 ← UEFI\CRT_A9087D1044AD18F7A94916D284CBC01827CF23CD8F60B79072C9CAA1FEF4D649&ARCH_X64
│                         f8ba2887-9411-5c36-9cee-88995bb39731 ← UEFI\CRT_A1117F516A32CEFCBA3F2D1ACE10A87972FD6BBE8FE0D0B996E09E65D802A503&ARCH_X64
│                         d07ff664-b0e1-5f4e-a723-d7fbcbfcb94f ← UEFI\CRT_3CD3F0309EDAE228767A976DD40D9F4AFFC4FBD5218F2E8CC3C9DD97E8AC6F9D&ARCH_X64
│       Device Flags:     • Internal device
│                         • Updatable
│                         • Needs a reboot after installation
│                         • Device is usable for the duration of the update
│                         • Only version upgrades are allowed
│                         • Signed Payload
│     
├─ThinkPad Thunderbolt 4 Dock:
│ │   Device ID:          7073f7228b6ee3d493dfaa222ede7b68832d676e
│ │   Current version:    10.16
│ │   Vendor:             Lenovo (USB:0x17EF)
│ │   Serial Number:      1S40B0ZDHQ00PP
│ │   GUIDs:              8d30b09f-bcc5-5379-bc65-9ccceeece1f4 ← USB\VID_17EF&PID_30B4
│ │                       275e4695-9b4e-5263-835e-8681bec8cd1a ← USB\VID_17EF&PID_30B4&CID_40B0
│ │                       09f2cd6f-de67-5046-91ab-7de482e67877
│ │                       fe1be6a9-3027-5135-8e1b-737015e2b5dd ← USB\VID_17EF&PID_30B4&CID_40B0&REV_0042
│ │   Device Flags:       • Updatable
│ │                       • System requires external power source
│ │                       • Supported on remote server
│ │                       • Device stages updates
│ │                       • Signed Payload
│ │                       • Can tag for emulation
│ │   Device Requests:    • Message
│ │ 
│ ├─Thunderbolt 4 Controller:
│ │     Device ID:        481f4eef35467530fca9b1f64d81d7b14973afea
│ │     Current version:  41.81.06
│ │     Vendor:           Lenovo (USB:0x17EF)
│ │     GUID:             d6408693-09a5-5f0f-b492-275b5ed16d10 ← USB\VID_17EF&PID_30B4&CID_TBT4
│ │   
│ ├─Audio Controller:
│ │     Device ID:        dfe2931bb6add94be5da02df3211a48117190228
│ │     Current version:  49-0E-41
│ │     Vendor:           Lenovo (USB:0x17EF)
│ │     GUID:             e1443fec-2b49-5bd0-b921-662ed11e88df ← USB\VID_17EF&PID_30B4&CID_AUDIO
│ │   
│ ├─Display Port 5:
│ │     Device ID:        60c9e84314d6f1240d2f78c36baba44cbfc65671
│ │     Current version:  5.07.001
│ │     Vendor:           Lenovo (USB:0x17EF)
│ │     GUID:             755e347f-4ae7-53f8-ad69-45b3e9145ed8 ← USB\VID_17EF&PID_30B4&CID_DP5x
│ │   
│ ├─Display Port 6:
│ │     Device ID:        327ad6d3a58cd76e1b9bd94d1be094c39dcbbf85
│ │     Current version:  6.05.003
│ │     Vendor:           Lenovo (USB:0x17EF)
│ │     GUID:             a7b49eae-1c1d-5b83-ac90-9bbe78ee39c1 ← USB\VID_17EF&PID_30B4&CID_DP6x
│ │   
│ ├─Dock Management Controller:
│ │     Device ID:        dabb5a9e3514540ea7000ad6a10ed2870db13e42
│ │     Current version:  0.1.97
│ │     Vendor:           Lenovo (USB:0x17EF)
│ │     GUID:             3edd934f-9800-59c9-b02a-11be480d72e5 ← USB\VID_17EF&PID_30B4&CID_DMC
│ │   
│ ├─Dock Management Controller:
│ │     Device ID:        22cf688c0c06e52493df3a980d42b50e54c09454
│ │     Current version:  21.15
│ │     Vendor:           Lenovo (USB:0x17EF)
│ │     GUID:             c287973a-cc6b-5d2a-ac71-3956a512f73d ← USB\VID_17EF&PID_30B4&CID_MCU
│ │   
│ ├─Dock Management Controller Information:
│ │     Device ID:        582fd36647eea79870717be04e9f965544395c5c
│ │     Current version:  10.16
│ │     Vendor:           Lenovo (USB:0x17EF)
│ │     Serial Number:    1S40B0ZDHQ00PP
│ │     GUID:             697a6a95-464e-5b90-a46e-73beab89316e ← USB\VID_17EF&PID_30B5
│ │     Device Flags:     • Can tag for emulation
│ │   
│ ├─Ethernet Adapter:
│ │     Device ID:        144a1faee15887a6fe91fd3e8b96a50960681a04
│ │     Current version:  1.73.4
│ │     Vendor:           Lenovo (USB:0x17EF)
│ │     GUID:             abbc9b3e-43fe-538f-bfaf-b7e74b3fd47c ← USB\VID_17EF&PID_30B4&CID_I255
│ │   
│ ├─Power Delivery:
│ │     Device ID:        4fe69554fb0e7dd826c20dcfdf87b132400eb49e
│ │     Current version:  12.5.49
│ │     Vendor:           Lenovo (USB:0x17EF)
│ │     GUID:             e83aba6c-99b3-5e87-b982-ba57a1bf750f ← USB\VID_17EF&PID_30B4&CID_PD
│ │   
│ ├─USB 2 Hub:
│ │     Device ID:        00d196711c92508ec4925227a48fe1e3ded9008a
│ │     Current version:  V1003
│ │     Vendor:           Lenovo (USB:0x17EF)
│ │     GUID:             4eab6a92-0ec3-5221-ac0b-c841655f7989 ← USB\VID_17EF&PID_30B4&CID_USB2
│ │   
│ └─USB 3 Hub:
│       Device ID:        6b8a9783eaef815e0311460bf28cbfc3991beb92
│       Current version:  5563
│       Vendor:           Lenovo (USB:0x17EF)
│       GUID:             0e5b868b-34a4-5753-8f2e-fe5326494d7a ← USB\VID_17EF&PID_30B4&CID_USB3
│     
├─UEFI Device Firmware:
│     Device ID:          84c1ee7b500ec547692c1c661ce6f46feb7809d9
│     Summary:            UEFI System Resource Table device (updated via NVRAM)
│     Current version:    405383
│     Vendor:             DMI:LENOVO
│     Update State:       Success
│     GUID:               7feb1d5d-33f4-48d3-bd11-c4b36b6d0e57
│     Device Flags:       • Internal device
│                         • Updatable
│                         • System requires external power source
│                         • Needs a reboot after installation
│                         • Device is usable for the duration of the update
│     Device Requests:    • Message
│   
├─UEFI Device Firmware:
│     Device ID:          81b48f03e77395bb1d700a59b19f75ae6ceb9e35
│     Summary:            UEFI System Resource Table device (updated via NVRAM)
│     Current version:    405383
│     Vendor:             DMI:LENOVO
│     Update State:       Success
│     GUID:               6c8e136f-d3e6-4131-ac32-4687cb4abd27
│     Device Flags:       • Internal device
│                         • Updatable
│                         • System requires external power source
│                         • Needs a reboot after installation
│                         • Device is usable for the duration of the update
│     Device Requests:    • Message
│   
├─UEFI Device Firmware:
│     Device ID:          32946de80c503b3b790e9956418e7649b3d8c7d4
│     Summary:            UEFI System Resource Table device (updated via NVRAM)
│     Current version:    4323550
│     Vendor:             DMI:LENOVO
│     Update State:       Success
│     GUID:               88523ddf-3aac-41f6-b15f-dc7bea434b39
│     Device Flags:       • Internal device
│                         • Updatable
│                         • System requires external power source
│                         • Needs a reboot after installation
│                         • Device is usable for the duration of the update
│     Device Requests:    • Message
│   
├─UEFI Device Firmware:
│     Device ID:          b812b123324da0cf924c8007b719d2e75c45c3dd
│     Summary:            UEFI System Resource Table device (updated via NVRAM)
│     Current version:    5
│     Vendor:             DMI:LENOVO
│     Update State:       Success
│     GUID:               74a82b44-9287-4f91-bd38-612652ca8d53
│     Device Flags:       • Internal device
│                         • Updatable
│                         • System requires external power source
│                         • Needs a reboot after installation
│                         • Device is usable for the duration of the update
│     Device Requests:    • Message
│   
├─UEFI Device Firmware:
│     Device ID:          c3b4863719f80e021a8c6ffb048eaa820a269217
│     Summary:            UEFI System Resource Table device (updated via NVRAM)
│     Current version:    65543
│     Minimum Version:    65543
│     Vendor:             DMI:LENOVO
│     Update State:       Success
│     GUID:               c54f25b5-7597-49a2-91e0-739ae97b6247
│     Device Flags:       • Internal device
│                         • Updatable
│                         • System requires external power source
│                         • Needs a reboot after installation
│                         • Device is usable for the duration of the update
│     Device Requests:    • Message
│   
├─UEFI Device Firmware:
│     Device ID:          65b50e8d2268cf30957ccf3a0a860c79aa3987d8
│     Summary:            UEFI System Resource Table device (updated via NVRAM)
│     Current version:    16842760
│     Minimum Version:    1
│     Vendor:             DMI:LENOVO
│     Update State:       Success
│     GUID:               88a76235-94e3-4078-87b1-a16f22099886
│     Device Flags:       • Internal device
│                         • Updatable
│                         • System requires external power source
│                         • Needs a reboot after installation
│                         • Device is usable for the duration of the update
│     Device Requests:    • Message
│   
├─UEFI Device Firmware:
│     Device ID:          1066ca1b70846ba3b9ce8db3c360f35800b7d509
│     Summary:            UEFI System Resource Table device (updated via NVRAM)
│     Current version:    1
│     Minimum Version:    1
│     Vendor:             DMI:LENOVO
│     Update State:       Success
│     GUID:               3cb85d0d-4e08-4d4c-ac87-d5131c4f7a3c
│     Device Flags:       • Internal device
│                         • Updatable
│                         • System requires external power source
│                         • Needs a reboot after installation
│                         • Device is usable for the duration of the update
│     Device Requests:    • Message
│   
├─UEFI Device Firmware:
│     Device ID:          5979ba756fe4f7eb042ae6de90eedc0d0702dfd5
│     Summary:            UEFI System Resource Table device (updated via NVRAM)
│     Current version:    1
│     Minimum Version:    1
│     Vendor:             DMI:LENOVO
│     Update State:       Success
│     GUID:               4bde51bb-de41-45d6-acd2-a4d9700f84ab
│     Device Flags:       • Internal device
│                         • Updatable
│                         • System requires external power source
│                         • Needs a reboot after installation
│                         • Device is usable for the duration of the update
│     Device Requests:    • Message
│   
├─UEFI Device Firmware:
│     Device ID:          eab78197b2b728fe0a7a4ab86c1e8b987ea27c43
│     Summary:            UEFI System Resource Table device (updated via NVRAM)
│     Current version:    1
│     Minimum Version:    1
│     Vendor:             DMI:LENOVO
│     Update State:       Success
│     GUID:               211285dc-807b-4718-afc7-30d17d28f7b3
│     Device Flags:       • Internal device
│                         • Updatable
│                         • System requires external power source
│                         • Needs a reboot after installation
│                         • Device is usable for the duration of the update
│     Device Requests:    • Message
│   
├─UEFI Device Firmware:
│     Device ID:          28126e4fc8907abd738e9065570ca1c24e3c0f2e
│     Summary:            UEFI System Resource Table device (updated via NVRAM)
│     Current version:    590080
│     Minimum Version:    590080
│     Vendor:             DMI:LENOVO
│     Update State:       Success
│     GUID:               f7520618-0578-45c7-a832-06521700c152
│     Device Flags:       • Internal device
│                         • Updatable
│                         • System requires external power source
│                         • Needs a reboot after installation
│                         • Device is usable for the duration of the update
│     Device Requests:    • Message
│   
├─UEFI Device Firmware:
│     Device ID:          81568164782039dbd4a74856cacb9800f408d44e
│     Summary:            UEFI System Resource Table device (updated via NVRAM)
│     Current version:    70420
│     Vendor:             DMI:LENOVO
│     Update State:       Success
│     GUID:               4e88068b-41b2-4e05-893c-db0b43f7d348
│     Device Flags:       • Internal device
│                         • Updatable
│                         • System requires external power source
│                         • Needs a reboot after installation
│                         • Device is usable for the duration of the update
│     Device Requests:    • Message
│   
├─UEFI Device Firmware:
│     Device ID:          7dccda75b1f76a97e675b08e7e0f8ab9924ad9ce
│     Summary:            UEFI System Resource Table device (updated via NVRAM)
│     Current version:    1
│     Minimum Version:    1
│     Vendor:             DMI:LENOVO
│     Update State:       Success
│     GUID:               69585d92-b50a-4ad7-b265-2eb1ae066574
│     Device Flags:       • Internal device
│                         • Updatable
│                         • System requires external power source
│                         • Needs a reboot after installation
│                         • Device is usable for the duration of the update
│     Device Requests:    • Message
│   
├─UEFI Device Firmware:
│     Device ID:          587c6425a53c7997d7d62a4fb5986fad193f8433
│     Summary:            UEFI System Resource Table device (updated via NVRAM)
│     Current version:    0
│     Vendor:             DMI:LENOVO
│     Update State:       Success
│     GUID:               3dd84775-ec79-4ecb-8404-74de030c3f77
│     Device Flags:       • Internal device
│                         • Updatable
│                         • System requires external power source
│                         • Needs a reboot after installation
│                         • Device is usable for the duration of the update
│     Device Requests:    • Message
│   
├─UEFI Device Firmware:
│     Device ID:          f905a7bd8805851b14be474d006372f37cc9342d
│     Summary:            UEFI System Resource Table device (updated via NVRAM)
│     Current version:    1
│     Vendor:             DMI:LENOVO
│     Update State:       Success
│     GUID:               76ca0ad8-4a14-4389-b7e5-fd88791762ad
│     Device Flags:       • Internal device
│                         • Updatable
│                         • System requires external power source
│                         • Needs a reboot after installation
│                         • Device is usable for the duration of the update
│     Device Requests:    • Message
│   
├─UEFI Device Firmware:
│     Device ID:          7e6427fb78fdb31553c3589b14cf9a40bd2e1f2e
│     Summary:            UEFI System Resource Table device (updated via NVRAM)
│     Current version:    1
│     Vendor:             DMI:LENOVO
│     Update State:       Success
│     GUID:               626d93db-2c42-48c3-915a-71f968a81b04
│     Device Flags:       • Internal device
│                         • Updatable
│                         • System requires external power source
│                         • Needs a reboot after installation
│                         • Device is usable for the duration of the update
│     Device Requests:    • Message
│   
├─UEFI Device Firmware:
│     Device ID:          cef254ddb406e77ace86f4cd92e2a7db5aa308fc
│     Summary:            UEFI System Resource Table device (updated via NVRAM)
│     Current version:    1
│     Vendor:             DMI:LENOVO
│     Update State:       Success
│     GUID:               86a885ee-d71e-2ed6-0fc1-9d6ccc9677eb
│     Device Flags:       • Internal device
│                         • Updatable
│                         • System requires external power source
│                         • Needs a reboot after installation
│                         • Device is usable for the duration of the update
│     Device Requests:    • Message
│   
├─UEFI Device Firmware:
│     Device ID:          aab4cfca45a018c0e2b6db2baf8fb726f6b2fe5a
│     Summary:            UEFI System Resource Table device (updated via NVRAM)
│     Current version:    22789
│     Minimum Version:    1
│     Vendor:             DMI:LENOVO
│     Update State:       Success
│     GUID:               1554bfc6-e6f1-4b57-b09b-791e525fbc6d
│     Device Flags:       • Internal device
│                         • Updatable
│                         • System requires external power source
│                         • Needs a reboot after installation
│                         • Device is usable for the duration of the update
│     Device Requests:    • Message
│   
├─UEFI Device Firmware:
│     Device ID:          24042f04a129b0c4f214e2a5dad7871889015686
│     Summary:            UEFI System Resource Table device (updated via NVRAM)
│     Current version:    329778
│     Vendor:             DMI:LENOVO
│     Update State:       Success
│     GUID:               3e00e617-c8ff-4e88-8133-c3032089c5e7
│     Device Flags:       • Internal device
│                         • Updatable
│                         • System requires external power source
│                         • Needs a reboot after installation
│                         • Device is usable for the duration of the update
│     Device Requests:    • Message
│   
├─USB3.0 Hub:
│     Device ID:          287da0651bbe7af557b588ce0c9aeaa9a39487a6
│     Current version:    41.81
│     Vendor:             Intel Corporation. (USB:0x8087)
│     GUID:               350ec5bb-25c0-543e-8d4c-72c30d2b8df0 ← TBT-01082031
│     Device Flags:       • Updatable
│                         • Signed Payload
│                         • Can tag for emulation
│   
├─USB4 Retimer:
│     Device ID:          16d35c510618116e7899ae45e62605572872e713
│     Summary:            A physical layer protocol-aware, software-transparent extension device that forms two separate electrical link segments
│     Current version:    23.81
│     Vendor:             Intel (THUNDERBOLT:0x8087)
│     GUIDs:              74fb1b87-53e6-5115-bd02-a9fefd06ed9a ← THUNDERBOLT\VEN_8087&DEV_0D9C
│                         dac6f95d-7c5b-52b5-8c79-a0436a5ef784 ← TBT-80870d9c-retimer0-0:1.1
│     Device Flags:       • Internal device
│                         • Updatable
│                         • Device stages updates
│                         • Unsigned Payload
│                         • Can tag for emulation
│   
└─USB4 host controller:
      Device ID:          7bfee19a4024946c3e7f5ecce5a77d2a490fd806
      Summary:            Unmatched performance for high-speed I/O
      Current version:    41.81
      Vendor:             Lenovo (THUNDERBOLT:0x0108, TBT:0x0108)
      Problems:           [31m[1m• Device is lower priority than an equivalent device[0m
      GUIDs:              dc3a1b4e-176f-589a-949c-d058324bb6a7 ← THUNDERBOLT\VEN_0108&DEV_2031
                          350ec5bb-25c0-543e-8d4c-72c30d2b8df0 ← TBT-01082031
                          3e36d06f-3e44-5eb8-87c7-de0b723b1595 ← TBT-01082031-controller0-1
      Device Flags:       • Internal device
                          • System requires external power source
                          • Device stages updates
                          • Updatable
                          • Signed Payload
                          • Can tag for emulation


Discussion: It is a bit weird to be calling this on a device that isn't updatable, but yeah this does look like a bug very likely.
Can you please share the output for `sudo fwupdtool get-devices -vv`?
Thank you for your awnser.
Here is the output of fwupdtool get-devices -vv

[fwupdtool-get-devices-vv-2.0.1.log](https://github.com/user-attachments/files/17458647/fwupdtool-get-devices-vv-2.0.1.log)

About the background: I use the dbus-interface, the 3 functions are called: GetDevices (out: id) -> GetUpgrades (in: id) -> Install
Ahh, so that device isn't actually updatable:

	FuUsiDockChildDevice:
	  DeviceId:             481f4eef35467530fca9b1f64d81d7b14973afea
	  Plugin:               usi_dock
	  Flags:                none

You need to update via `7073f7228b6ee3d493dfaa222ede7b68832d676e`, i.e. `FuUsiDockMcuDevice`.

I think the `device ID 481f4eef35467530fca9b1f64d81d7b14973afea was not unique` error message is misleading. I can try to find that bug when I'm back at my desk tomorrow, unless someone beats me.
So I debugged this a bit just now. The multiple messages thing is actually correct, the two devices are:

	14:35:04.221 FuDeviceList         adding FuThunderboltController:
	  DeviceId:             2294959ce69ba71b10dada894868479e10d0b2eb
	  Name:                 USB4 host controller
	  Guid:                 dc3a1b4e-176f-589a-949c-d058324bb6a7 ← THUNDERBOLT\VEN_0108&DEV_2031
	  Guid:                 350ec5bb-25c0-543e-8d4c-72c30d2b8df0 ← TBT-01082031
	  Guid:                 3e36d06f-3e44-5eb8-87c7-de0b723b1595 ← TBT-01082031-controller0-1
	  Summary:              Unmatched performance for high-speed I/O
	  Plugin:               thunderbolt
	  Protocol:             com.intel.thunderbolt
	  Flags:                internal|require-ac|dual-image|updatable-hidden|signed-payload|can-emulation-tag
	  Problems:             lower-priority
	  Vendor:               Lenovo
	  VendorId:             THUNDERBOLT:0x0108
	  VendorId:             TBT:0x0108
	  Version:              41.81
	  Icon:                 thunderbolt
	  Created:              2024-10-22
	  UpdateError:          Device is lower priority than an equivalent device
	  Guid[quirk]:          847dea9d-1c72-5892-bb93-708bb4f2940b ← THUNDERBOLT\VEN_0108
	  Guid[quirk]:          f70b02b8-cac4-5138-aef2-83a4b2d3afef ← THUNDERBOLT\TYPE_THUNDERBOLT_DEVICE
	  EquivalentId:         f2d46aa175ab9e23c81b4a0108332b093956f8bf
	  PhysicalId:           00486068-1132-8780-ffff-ffffffffffff
	  BackendId:            /sys/devices/pci0000:00/0000:00:1c.0/0000:04:00.0/0000:05:00.0/0000:06:00.0/domain0/0-0/0-1
	  Vid:                  0x108
	  Pid:                  0x2031
	  AcquiesceDelay:       2500
	  GType:                FuThunderboltController
	  Order:                0
	  PossiblePlugin:       thunderbolt
	  PrivateFlags:         replug-match-guid,registered
	  Inhibit:              [lower-priority] Device is lower priority than an equivalent device
	  Events:
	  Number:               0x1
	  Subsystem:            thunderbolt
	  OpenFlags:            none
	  AuthMethod:           nvm_authenticate
	  DeviceType:           USB4 host controller
	  SafeMode:             false
	  NativeMode:           false
	  Generation:           4

	14:35:04.222 FuDeviceList         adding FuUsiDockChildDevice:
	  DeviceId:             f2d46aa175ab9e23c81b4a0108332b093956f8bf
	  CompositeId:          e1c158392fda6698c66decf536d42c5b775ba0d6
	  Name:                 Thunderbolt 4 Controller
	  Guid:                 d6408693-09a5-5f0f-b492-275b5ed16d10 ← USB\VID_17EF&PID_30B4&CID_TBT4
	  Plugin:               usi_dock
	  Flags:                none
	  Vendor:               Lenovo
	  VendorId:             USB:0x17EF
	  Version:              41.81.06
	  VersionFormat:        triplet
	  Icon:                 thunderbolt
	  Created:              2024-10-22
	  EquivalentId:         2294959ce69ba71b10dada894868479e10d0b2eb
	  PhysicalId:           5-1.1
	  LogicalId:            TBT4
	  BackendId:            /sys/devices/pci0000:00/0000:00:1c.0/0000:04:00.0/0000:05:01.0/0000:07:00.0/0000:08:00.0/0000:09:00.0/usb5/5-1/5-1.1
	  RemoveDelay:          10000
	  AcquiesceDelay:       2500
	  Order:                -1
	  Priority:             1
	  PrivateFlags:         use-parent-for-open,registered
	  ChipIdx:              tbt4

I'm not sure what the proper fix is here; they're both the same device. The entire idea of `EquivalentId` was to signify "_the same device_" although in this case it's not terribly helpful.
> I'm not sure what the proper fix is here; they're both the same device. 

How about the daemon skips inhibited devices when processing `GetUpgrades`?



Fix (patch):
diff --git a/src/fu-device-list.c b/src/fu-device-list.c
index d5eb2f6b7c48..661d6b4bd949 100644
--- a/src/fu-device-list.c
+++ b/src/fu-device-list.c
@@ -312,17 +312,13 @@ fu_device_list_item_sort_by_priority_cb(gconstpointer a, gconstpointer b)
 	return 0;
 }
 
-static FuDeviceItem *
-fu_device_list_find_by_id(FuDeviceList *self, const gchar *device_id, gboolean *multiple_matches)
+static GPtrArray *
+fu_device_list_filter_by_id(FuDeviceList *self, const gchar *device_id, GError **error)
 {
 	gsize device_id_len;
 	g_autoptr(GPtrArray) items = g_ptr_array_new();
 
-	/* sanity check */
-	if (device_id == NULL) {
-		g_critical("device ID was NULL");
-		return NULL;
-	}
+	g_return_val_if_fail(device_id != NULL, NULL);
 
 	/* support abbreviated hashes */
 	device_id_len = strlen(device_id);
@@ -333,17 +329,14 @@ fu_device_list_find_by_id(FuDeviceList *self, const gchar *device_id, gboolean *
 				      fu_device_get_equivalent_id(item_tmp->device),
 				      NULL};
 		for (guint j = 0; ids[j] != NULL; j++) {
-			if (strncmp(ids[j], device_id, device_id_len) == 0) {
-				if (j == 0 && items->len > 0 && multiple_matches != NULL)
-					*multiple_matches = TRUE;
+			if (strncmp(ids[j], device_id, device_id_len) == 0)
 				g_ptr_array_add(items, item_tmp);
-			}
 		}
 	}
 	g_rw_lock_reader_unlock(&self->devices_mutex);
 	if (items->len > 0) {
 		g_ptr_array_sort(items, fu_device_list_item_sort_by_priority_cb);
-		return g_ptr_array_index(items, 0);
+		return g_steal_pointer(&items);
 	}
 
 	/* only search old devices if we didn't find the active device */
@@ -356,23 +349,52 @@ fu_device_list_find_by_id(FuDeviceList *self, const gchar *device_id, gboolean *
 		ids[0] = fu_device_get_id(item_tmp->device_old);
 		ids[1] = fu_device_get_equivalent_id(item_tmp->device_old);
 		for (guint j = 0; ids[j] != NULL; j++) {
-			if (strncmp(ids[j], device_id, device_id_len) == 0) {
-				if (j == 0 && items->len > 0 && multiple_matches != NULL)
-					*multiple_matches = TRUE;
+			if (strncmp(ids[j], device_id, device_id_len) == 0)
 				g_ptr_array_add(items, item_tmp);
-			}
 		}
 	}
 	g_rw_lock_reader_unlock(&self->devices_mutex);
 	if (items->len > 0) {
 		g_ptr_array_sort(items, fu_device_list_item_sort_by_priority_cb);
-		return g_ptr_array_index(items, 0);
+		return g_steal_pointer(&items);
 	}
 
 	/* failed */
+	g_set_error(error,
+		    FWUPD_ERROR,
+		    FWUPD_ERROR_NOT_FOUND,
+		    "device ID %s was not found",
+		    device_id);
 	return NULL;
 }
 
+static FuDeviceItem *
+fu_device_list_find_by_id(FuDeviceList *self, const gchar *device_id, GError **error)
+{
+	FuDeviceItem *item0;
+	g_autoptr(GPtrArray) items = NULL;
+
+	items = fu_device_list_filter_by_id(self, device_id, error);
+	if (items == NULL)
+		return NULL;
+
+	/* check there are not more devices that have the same priority */
+	item0 = g_ptr_array_index(items, 0);
+	for (guint i = 1; i < items->len; i++) {
+		FuDeviceItem *item_tmp = g_ptr_array_index(items, i);
+		if (fu_device_get_priority(item_tmp->device) ==
+		    fu_device_get_priority(item0->device)) {
+			g_set_error(error,
+				    FWUPD_ERROR,
+				    FWUPD_ERROR_NOT_SUPPORTED,
+				    "device ID %s was not unique",
+				    device_id);
+			return NULL;
+		}
+	}
+	return item0;
+}
+
 /**
  * fu_device_list_get_old:
  * @self: a device list
@@ -1033,22 +1055,15 @@ FuDevice *
 fu_device_list_get_by_id(FuDeviceList *self, const gchar *device_id, GError **error)
 {
 	FuDeviceItem *item;
-	gboolean multiple_matches = FALSE;
 
 	g_return_val_if_fail(FU_IS_DEVICE_LIST(self), NULL);
 	g_return_val_if_fail(device_id != NULL, NULL);
 	g_return_val_if_fail(error == NULL || *error == NULL, NULL);
 
 	/* multiple things matched */
-	item = fu_device_list_find_by_id(self, device_id, &multiple_matches);
-	if (multiple_matches) {
-		g_set_error(error,
-			    FWUPD_ERROR,
-			    FWUPD_ERROR_NOT_SUPPORTED,
-			    "device ID %s was not unique",
-			    device_id);
+	item = fu_device_list_find_by_id(self, device_id, error);
+	if (item == NULL)
 		return NULL;
-	}
 
 	/* nothing at all matched */
 	if (item == NULL) {