question

doug avatar image
doug asked

SMAPI Skill Manifest Update errors: Please provide image in PNG format.

I am attempting to use the SMAPI HTTP REST API to update my skill manifest and set a small and large skill icon.

I am first uploading the PNG icons to an S3 bucket where they are publicly available:
- https://s3.amazonaws.com/demo-assets.conversable/editor/025a1b0a-8104-49c7-b680-804ffe7b061d

- https://s3.amazonaws.com/demo-assets.conversable/editor/9e7c3626-3071-4396-8157-238aab314fd4

$ curl -v -H "Origin: http://localhost" -X GET "https://s3.amazonaws.com/demo-assets.conversable/editor/025a1b0a-8104-49c7-b680-804ffe7b061d" 
*  SSL certificate verify ok.
> GET /demo-assets.conversable/editor/025a1b0a-8104-49c7-b680-804ffe7b061d HTTP/1.1
> Host: s3.amazonaws.com
> User-Agent: curl/7.54.0
> Accept: */*
> Origin: http://localhost
>
< HTTP/1.1 200 OK
< x-amz-id-2: Oh1pT71iAwOlNr4HxeGl7xGXNrWBulPo1/IvIxg4jeptSS8lnv3hbx73/q7z+X+SzD+y6yHxFMw=
< x-amz-request-id: 235217F1C5F47884
< Date: Sun, 26 Aug 2018 20:48:50 GMT
< Access-Control-Allow-Origin: *
< Access-Control-Allow-Methods: GET
< Vary: Origin, Access-Control-Request-Headers, Access-Control-Request-Method
< Last-Modified: Sun, 26 Aug 2018 20:31:13 GMT
< ETag: "ff0fa3d57e3a0c510020d875df71c386"
< Content-Encoding: gzip
< x-amz-meta-name: skill-template-default-sm.png
< x-amz-meta-id: 025a1b0a-8104-49c7-b680-804ffe7b061d
< x-amz-version-id: iUV3SrQbQb1OIta4o4DmaG406RpjhHJ.
< Accept-Ranges: bytes
< Content-Type: image/png
< Content-Length: 1289
< Server: AmazonS3

Then I upload via the Update Manifest endpoint, and then I poll for manifest build status which then returns the error: "Please provide image in PNG format."

[http request]
  PUT /v1/skills/amzn1.ask.skill.d91f011c-5744-4082-87c7-1a3c845c24f8/stages/development/manifest HTTP/1.1
  Host: api.amazonalexa.com
...


  {
  "manifest": {
    "apis": {
      "custom": {
        "endpoint": {
          "uri": "https://conversable-doug-alexa.ngrok.io/webhook?accountID=1040bd2a-ee61-47f2-ac3a-67898fba59b0",
          "sslCertificateType": "Wildcard"
        }
      }
    },
    "publishingInformation": {
      "locales": {
        "en-US": {
          "summary": "Improve your mental math skills every day with Alexa (What's 4 x 8?) and create the longest streak of correct answers.",
          "examplePhrases": [
            "Alexa, ask doug localizes",
            "Alexa, ask doug localizes to translate",
            "Alexa, ask doug localizes to answer things"
          ],
          "keywords": [
            "math",
            "arithmetic",
            "practice",
            "numbers"
          ],
          "smallIconUri": "https://s3.amazonaws.com/demo-assets.conversable/editor/025a1b0a-8104-49c7-b680-804ffe7b061d",
          "largeIconUri": "https://s3.amazonaws.com/demo-assets.conversable/editor/9e7c3626-3071-4396-8157-238aab314fd4",
          "name": "Doug's Alexa 4 - Autodeployerz",
          "description": "Math Streak is a quick way to improve your math skills for every day use.  Practice with addition, subtraction, multiplication, and division problems that get progressively harder, and create the longest streak of correct answers that you can. \n\nPractice every day to keep your mind sharp and do quick mental calculations as opposed to reaching for that calculator.\n\nIf you enjoy the skill, please give us a review!"
        }
      },
      "isAvailableWorldwide": false,
      "testingInstructions": "Available for anyone to try.  No account linking or special device permissions needed.",
      "category": "BUSINESS_AND_FINANCE",
      "distributionCountries": [
        "US"
      ]
    },
    "manifestVersion": "1.0",
    "privacyAndCompliance": {
      "allowsPurchases": false,
      "usesPersonalInfo": false,
      "isChildDirected": false,
      "isExportCompliant": false,
      "containsAds": false,
      "locales": {
        "en-US": {
          "privacyPolicyUrl": "http://conversable.com/privacy-policy/",
          "termsOfUseUrl": "https://conversable.box.com/s/y7oalrasql412s63rqd5ll8urhgezqvj"
        }
      }
    }
  }
}






  [http request]
  GET /v1/skills/amzn1.ask.skill.d91f011c-5744-4082-87c7-1a3c845c24f8/status?resource=manifest&resource=interactionModel HTTP/1.1
  Host: api.amazonalexa.com




  [http response]
  HTTP/1.1 200 OK
  Connection: keep-alive
  Content-Type: application/json
  Date: Sun, 26 Aug 2018 20:31:24 GMT
  Server: Server
  Vary: Accept-Encoding,User-Agent
  X-Amz-Date: Sun, 26 Aug 2018 20:31:24 GMT
  X-Amzn-Requestid: 00473216-a96f-11e8-9514-f10eb05ac56c


  {
  "interactionModel": {
    "en-US": {
      "eTag": "1852e5b8d460235f0de9b11943f3235e",
      "lastUpdateRequest": {
        "status": "SUCCEEDED"
      }
    }
  },
  "manifest": {
    "eTag": "a8604d3415690e191f791c0e2c7673db",
    "lastUpdateRequest": {
      "errors": [
        {
          "message": "Please provide image in PNG format."
        }
      ],
      "status": "FAILED"
    }
  }
}

I've checked that the CORS policy for my S3 bucket allows for cross origin resource sharing on GET:

$ curl -H "Access-Control-Request-Method: GET" -H "Origin: http://localhost" --head https://s3.amazonaws.com/demo-assets.conversable/editor/9e7c3626-3071-4396-8157-238aab314fd4
HTTP/1.1 200 OK
x-amz-id-2: pz4TTxlTI7jnDUy87QU3nXoxN2EqbUARaLGFLctuJpon7XRF+Lu7mSKHAJlR6ZN6CM7gtCXVY6Y=
x-amz-request-id: 6992076A12C1D044
Date: Sun, 26 Aug 2018 20:38:30 GMT
Access-Control-Allow-Origin: *
Access-Control-Allow-Methods: GET
Vary: Origin, Access-Control-Request-Headers, Access-Control-Request-Method
Last-Modified: Sun, 26 Aug 2018 20:31:20 GMT
ETag: "09d0337a15cbc21b2a30f9bd997769bf"
Content-Encoding: gzip
x-amz-meta-name: skill-template-default-lg.png
x-amz-meta-id: 9e7c3626-3071-4396-8157-238aab314fd4
x-amz-version-id: c1u84CnlC5QtVKDabXhJRBKGN_FvzWM1
Accept-Ranges: bytes
Content-Type: image/png
Content-Length: 5708
Server: AmazonS3


I've also ensure that the content-type of the file is PNG and the actual format of the file is PNG (as I got it from this example skill: https://github.com/skilltemplates/videoapp-starter-alexa/blob/master/skill.json).

It works fine if I upload the image icons via the Alexa web portal: https://developer.amazon.com/alexa/console/ask/publish/alexapublishing/amzn1.ask.skill.d91f011c-5744-4082-87c7-1a3c845c24f8/development/en_US/privacy

Are there any other requirements for SMAPI to recognize the image icons as PNGs?

alexa skills kitalexaskillssmapi
10 |5000 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

Jenn@amazon avatar image
Jenn@amazon answered

I think the file extension needs to be .png, not just the format. Try renaming and adding the .png to the name of the file.

10 |5000 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.