Problems with Decommission device [ UI / API ]

Hello community, I encounter strange behavior when I try to decommission a device, create a pre-authorization of a device and interactions between them.

I created a process where I make a call of the Mender API for a pre-authorization of a device. To know if the device is already processed, I check the MAC address, if I find the MAC I decommission the device and pre-authorize a new device, if I do not find the device, I pre-authorize a new device.

Docs api:

This leads to strange behaviors:

  1. First strange behavior:
    I try to decommission a device from the API, once I do this, something it did not get decommission and I cannot decommission them from the API nor the UI.

  1. Second strange behavior:
    I try to decommission a device but it lose the authorization (post pre-authorization and post acceptance). But it keeps in the UI of the devices. Sometime it decommission after 30 minutes, but there are some that do not. I cannot decommission those devices.

  1. Third strange behavior:
    I try to decommission a device and creates a no-auth / accepted state at the same time.

mender_noauth_accepted

It keeps flicking in this state and I also cannot deleted (this more often decommission after 30 minutes or so).

Normally this issues happen when I try to do decommission and pre-authorization one after the other.
Today I find the First strange behavior without this, just pre-authorization.

I want to know if after decommission a device from the API I need to wait certain time or after any decommission if I need to wait certain time before I make a new pre-authorization.
Does anyone find something similar?

Version:

{“Mender-Client”:“4.0.2”,“Mender-Artifact”:“3.11.2”,“Meta-Mender”:“”,“Deployments”:“”,“Deviceauth”:“”,“Inventory”:“”,“GUI”:“saas-v2024.04.11”,“backend”:“saas-v2024.04.11”}
It is hosted by Mender. It is not self-hosted.

Hi @caleb ,
if you’re using Hosted Mender, we’ve seen some issues regarding NATS messages this night, but the problem should be solved now. Can you please check?

Thanks @robgio for your quick response.

Today I decommissioned some devices and made some pre-authorizations without problems. But on Thursday I’ll test the complete flow and have a better answer.

Thanks again for your time answering my question.