Device security-context out of sync


#1

I’m trying to send a data to the end node using “/api/devices/{device_queue_item.dev_eui}/queue”
Actually, it was working several days ago. but today it responds an error message below.

    {
  "error": "enqueue downlink payload error: create device-queue item error: rpc error: code = InvalidArgument desc = device security-context out of sync",
  "message": "enqueue downlink payload error: create device-queue item error: rpc error: code = InvalidArgument desc = device security-context out of sync",
  "code": 13,
  "details": []
}

Please give me an advice.
This is what I sent.


#2

This happens when the device OTAA joined (again), but LoRa Server did not signal the new AppSKey to LoRa App Server because it didn’t receive a first uplink yet.

Thus, the LoRa App Server security-context is not in sync during a short interval which causes the above error.