question

Sal Cangeloso avatar image
Sal Cangeloso asked

" Alexa Skills Kit may add new properties to the JSON..."

Got this error back from the certification team: [i]Future versions of the Alexa Skills Kit may add new properties to the JSON request and response formats, while maintaining backward compatibility for the existing properties. When we invoke the skill with additional parameters, the skill is rejecting it when we expect this to be accepted. Your code must be resilient to these types of changes. For example, your code for de-serializing a JSON request must not break when it encounters a new, unknown property.[/i]

Any ideas on what they are looking for or a possible fix?

alexa skills kitdebugging
1 comment
10 |5000

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

I was provided with the same reject reason, but cannot make my skill fail with extra values. Did anyone get a better answer from amazon?

1 Like 1 ·
jjaquinta avatar image
jjaquinta answered
What they are saying is that you fault when there is extra, unexpected stuff in the JSON they pass to you. Your skill needs to just use the JSON and not attempt to validate it. Check your code where you parse the JSON and use the data and be sure that you are just looking for things you need, and not iterating over it, or expecting things in a certain order.
10 |5000

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

Sal Cangeloso avatar image
Sal Cangeloso answered
So my skill is based on the trivia skill: https://github.com/amzn/alexa-skills-kit-js/blob/master/samples/reindeerGames/src/index.js Do you see any reason why that would fail? I've made some minor changes to fix the issue but have gotten two rejections based on the above violation. Thanks!
10 |5000

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

jjaquinta avatar image
jjaquinta answered
I would first try to activate your skill using the service simulator, and add random values into the JSON to see if you can trigger a failure. Failing that, I would put in a Contact Us request for them to provide you with the JSON so that you can re-create the problem. Once you can re-create the failure, you can work through which point of your code needs to be corrected to fix it.
10 |5000

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

Ikkysleepy avatar image
Ikkysleepy answered

I had the issue issue. I have not resubmitted my skill but the problem looks to be this line:

369        throw "Invalid intent";

I removed this line and and now returning a response "Bad Intent" and this seemed to fix the problem. I verified by adding a new field to the JSON request via the Lambda Test.

   "intent": {
      "name": "IncreaseVolumeIntent",
      "slots": {}
    },
    "new_field":{},
    "locale": "en-US"
10 |5000

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

Christopher avatar image
Christopher answered

I am having the same issue. I even tried a try/catch block but no luck.

10 |5000

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

Steve avatar image
Steve answered

Remove 'use strict' from the top of your lambda. For whatever frustrating reason, the Alexa skill templates include 'use strict', which causes the "...may add new properties to the JSON" test to fail. Amazon testers are ridiculously inconsistent and I've only received this rejection once in eight submissions...even though all of the submission included 'use strict'.

1 comment
10 |5000

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

Hi. Was the issue fixed by removing 'use strict'

0 Likes 0 ·