Unexpected Number in JSON at position 1 (AWS IoT example)

Hello,

I am attempting to follow along with the AWS IoT example. Everything has gone OK so far (Create a Thing, Create a Policy, Create and download certificates) until I get to the Provisioning of Certificates step. 

When I copy the certificate into the CA Certificate box I get an error message "Unexpected number in JSON at position 1". 

Any ideas? Thank you. 

Parents Reply Children
  • Downloading the certificate from AWS done in the standard way. Then Link Monitor seemed like it wanted to file dragged and dropped into the CA Certificate box. 

    I won't post the entire contents of the PEM file, but it was as you would expect. Something like this:

    -----BEGIN CERTIFICATE-----
    MIIDQTCCAimgAwIBAgITBmyfz5m/jAo54vB4ikPmljZbyjANBgkqhkiG9w0BAQsF
    ADA5MQswCQYDVQQGEwJVUzEPMA0GA1UEChMGQW1hem9uMRkwFwYDVQQDExBBbWF6

    .

    .

    .

    .

    o/ufQJVtMVT8QtPHRh8jrdkPSHCa2XV4cdFyQzR1bldZwgJcJmApzyMZFo6IQ6XU
    5MsI+yMRQ+hDKXJioaldXgjUkK642M4UwtBV8ob2xJNDd2ZhwLnoQdeXeGADbkpy
    rqXRfboQnoZsG4q5WTP468SQvvG5
    -----END CERTIFICATE-----

    Certificate Manager specifically asks for a JSON file to be drag and dropped into the window. The problem seems to be the PEM file format vs. JSON? 

    There's nothing noteworthy in the screenshot or log, just the error message "Unexpected number in JSON at position 1".

  • When creating JITP certificates in nRF Cloud, you can download them as a JSON file containing AWS's CA certificate, and the devices private key and public certificate. This JSON file can be loaded into the Certificate Manager tab in the Link Monitor by drag-and-drop, or by pressing the "Load from JSON" button.

    However, if you don't have such a JSON file (as in your case), you can copy (the text/content of) each of the certificates manually into the text boxes.

Related