Can't Add Device to nrfCloud via REST API

Recently I had been having trouble with one of our test devices (shadow was corrupted) on nrfCloud so I decided to delete it and then re-provision and re-add it to nrfCloud to start fresh (something we have done several times before). 

We have a a python script that automates this process by doing the following steps:

  1. Loads modem firmware via J-link
  2. loads at_client via J-link
  3. gets the IMEI via UART
  4. generates the certificates by calling -> curl -X POST api.nrfcloud.com/.../{' + IMEI + '}/certificates -d "123456" -H "Authorization: Bearer XXXXXXXXXXX" -H "Content-Type: text/plain" -o' + IMEI + '.json'
  5. Loads the certs using the UART and at_client
  6. Generates a certs.csv with all the provisioned devices (the scrip can do multiple at once before uploading)
  7. Uploades to nrfcloud using -> curl --location --request POST api.nrfcloud.com/.../devices --header "Authorization: Bearer XXXXXXXXX" --header "Content-Type: text/csv" --data-binary "@certs.csv

After running this script the bulk operation failed. with the following error: 

{"errors":"A total of 1 error(s) occurred while processing the CSV [failed row indices (1-based)]: {\"Thing m8-351358811339107 already exists in account with different attributes\":[1]}."}

This seems to indicate that the device already exists, but there is no record of it in GUI interface and when call FetchDevice via the API I get:
{
    "message": "Cannot verify device ownership (missing tenantId attribute)",
    "code": 40410
}
We had previously see this same scrip work as recently as 2024-01-24T21:31:58.073Z(UTC)
Any help would be great, we currently have not way to use this development device in question until this is resolved.
Thanks
Parents Reply
  • We have recently been using our provisioning script mentioned above. We now can't add a device for a different reason. The bulk upload to nrfCloud succeeds: with the expected:

    {"bulkOpsRequestId":"01HTE5RFRJTY1CP78K1XXX2DSA"}
     

    However, nrfCloud UI simply shows. Failed with no feedback. 

    Any idea what could be wrong here? Before we at least had some indication of what the issue was. It's the same device previously discussed in this thread. 

Children
Related