1

After making some changes in a JSON manifest file, I was trying to update it following the Amazon documentation:

ask smapi update-skill-manifest -g development -s amzn1.ask.skill.xxxx --manifest "skillManifest.json" --debug

I kept getting this error: enter image description here

The error was not pointing to what the error was but my guess was that it was related to the parameters, but that was strange as I was following the documentation to letter.

I then tried, instead of passing the json file, to cat the content of the file, which would be either:

For Powershell: --manifest "$(type skillmanifest.json)"

For Linux: --manifest "$(cat skillmanifest.json)"

I still kept getting the same error.

shini
  • 188
  • 2
  • 13

1 Answers1

5

Firstly, for debugging and getting a more accurate error, I checked my ASK-CLi version, which was outdated.

After updating ASK to the latest version I was still getting the same error. At that point it started including an error object, which was saying: enter image description here

When looking into Parsing error due to invalid body. and INVALID_REQUEST_PARAMETER through the error codes, it just said the body of the request cannot be parsed.

After research and playing around, the problem was the manifest parameter, changing it to "file:FILENAME" solved the issue:

 --manifest "file:skillmanifest.json"

The documentation is not stating this but it seems necessary for it to go through.

I hope this helps someone out there avoid spending a full day troubleshooting.

shini
  • 188
  • 2
  • 13
  • 1
    Thank You! I just hit this error today and you're right, their documentation is really off on this one. I used your fix and it the update worked. – Robert Oschler Apr 03 '21 at 17:19
  • is this manifest file different from JSON Editor on console? is there any way by which we can create and upload manifest from console? or we need to do by CLI? – Snehil Chouhan Dec 10 '22 at 04:05
  • Sorry to bump an old thread, but trying the file: trick (nice, btw!) with --debug spits out a payload that looks like it is unencoded into \\u0000* sequences. And of course, error 400. Using the $(type ...) for powershell didn't do this, BUT the results were truncated and so... error 400. – Scott Jul 02 '23 at 19:03
  • And... following up on the comment I just left, the problem was that the file I pull from AWS is UTF-16 LE encoded. If I force it into ANSI (thru Notepad++ for instance)... works! – Scott Jul 02 '23 at 19:12