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:
- Loads modem firmware via J-link
- loads at_client via J-link
- gets the IMEI via UART
- 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'
-
- Loads the certs using the UART and at_client
- Generates a certs.csv with all the provisioned devices (the scrip can do multiple at once before uploading)
-
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:
Fullscreen
1
{"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:
Fullscreen
1
2
3
4
{
· · "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