Can't find, edit, delete device - "Object already exist"

Hello,

I am stuck in a paradox situation, I can’t find, add, edit, or even delete a group of devices

  1. The search using the DevEUI show up no results:

  2. Adding this same devEUI give this error message: “object already exists (code: 6)

  1. Using the /api/ to detele the same device, I’ve got the same error:

  2. If I try to EDIT using put /api/devices/{device.dev_eui} ( [Update updates the device matching the given DevEUI.])
    → it return: Device or Object does not exist.

It looks that this nodes was there, and maybe badly inserted in the Chirpstack database ?

if it’s the case , how I can delete it ?

Any suggestion please ?

Many Thanks

Tao

Are you potentially running multiple organizations? If so, check the other orgs. I had this issue before.

Thanks @np0 , unfortunately there is one Org that was created only.

Additional info:
I’ve tried to add this device with different “Device names” , and same result:“Object already exist” (code: 6),
it looks that the system the device per its existing DevEUI.

Info: This issue has been solved by accessing and deleting them directly the chirpstack_ns database and for some cases in chirpstack_as as well.
after the delete it is possible to ADD back the device properly.

We’ve just had the same issue on a new V3 instance but with over 1000 devices and we’ve had it occur on older versions of Chirpstack as well. Is there any explanation as to why this happens? Is there a way to re-index the database or something? or do we really have to delete these and re insert them? How do we know it won’t happen again?

If the databases are out of sync, then this would require a manual action to delete the “ghost” records. Please note that this is one of the improvements of ChirpStack v4, where data is no longer separated in two databases.