Acknowledged
CIQQA-3928

Simulator enforces lower JSON size limit than real devices in SDK 9.1

It seems that SDK 9.1 introduced changes to how the simulator handles JSON size limits. The release notes state:

“Enforce max JSON response size limit for BLE web request.”

However, it now appears that the limits enforced by the simulator are lower than those on real devices.

I have attached an example JSON. It works correctly on my Epix Pro Gen 2 using a sideloaded app compiled with SDK 9.1. In the simulator, the same JSON now results in a -402 error.

 

{"name":"garmin_test","label":"Test Sitemap","link":"http://net-nas-1:8080/rest/sitemaps/garmin_test","homepage":{"id":"garmin_test","title":"Test Sitemap","link":"http://net-nas-1:8080/rest/sitemaps/garmin_test/garmin_test","leaf":false,"timeout":false,"widgets":[{"widgetId":"00","type":"Frame","visibility":true,"label":"Groups","labelSource":"SITEMAP_WIDGET","icon":"frame","staticIcon":false,"unit":"","mappings":[],"widgets":[{"widgetId":"0000","type":"Group","visibility":true,"label":"Switches [(2)]","labelSource":"SITEMAP_WIDGET","icon":"light","staticIcon":false,"pattern":"(%d)","unit":"","mappings":[],"item":{"members":[],"groupType":"Switch","function":{"name":"AND","params":["OFF","ON"]},"link":"http://net-nas-1:8080/rest/items/TEST_GROUP","state":"ON","lastStateUpdate":1772913530136,"lastStateChange":1772476722260,"type":"Group","name":"TEST_GROUP","label":"Test Group Switch","category":"light","tags":["Point"],"groupNames":["Test"]},"linkedPage":{"id":"0000","title":"Switches [(2)]","icon":"light","link":"http://net-nas-1:8080/rest/sitemaps/garmin_test/0000","leaf":true,"timeout":false,"widgets":[{"widgetId":"TEST_SWITCH2","type":"Switch","visibility":true,"label":"Test Switch 2","labelSource":"ITEM_LABEL","icon":"light","staticIcon":false,"unit":"","mappings":[],"item":{"link":"http://net-nas-1:8080/rest/items/TEST_SWITCH2","state":"ON","lastStateUpdate":1772476500000,"type":"Switch","name":"TEST_SWITCH2","label":"Test Switch 2","category":"light","tags":["Point"],"groupNames":["Test","TEST_GROUP"]},"widgets":[]},{"widgetId":"TEST_SWITCH","type":"Switch","visibility":true,"label":"Test Switch 1","labelSource":"ITEM_LABEL","icon":"light","staticIcon":false,"unit":"","mappings":[],"item":{"link":"http://net-nas-1:8080/rest/items/TEST_SWITCH","state":"ON","lastState":"OFF","lastStateUpdate":1772913530136,"lastStateChange":1772913530136,"type":"Switch","name":"TEST_SWITCH","label":"Test Switch 1","category":"light","tags":["Point"],"groupNames":["Test","TEST_GROUP"]},"widgets":[]}]},"widgets":[]},{"widgetId":"0001","type":"Switch","visibility":true,"label":"All","labelSource":"SITEMAP_WIDGET","icon":"light","staticIcon":false,"unit":"","mappings":[],"item":{"members":[],"groupType":"Switch","function":{"name":"AND","params":["OFF","ON"]},"link":"http://net-nas-1:8080/rest/items/TEST_GROUP","state":"ON","lastStateUpdate":1772913530136,"lastStateChange":1772476722260,"type":"Group","name":"TEST_GROUP","label":"Test Group Switch","category":"light","tags":["Point"],"groupNames":["Test"]},"widgets":[]},{"widgetId":"0002","type":"Switch","visibility":true,"label":"Switch 1","labelSource":"SITEMAP_WIDGET","icon":"light","staticIcon":false,"unit":"","mappings":[],"item":{"link":"http://net-nas-1:8080/rest/items/TEST_SWITCH","state":"ON","lastState":"OFF","lastStateUpdate":1772913530136,"lastStateChange":1772913530136,"type":"Switch","name":"TEST_SWITCH","label":"Test Switch 1","category":"light","tags":["Point"],"groupNames":["Test","TEST_GROUP"]},"widgets":[]},{"widgetId":"0003","type":"Switch","visibility":true,"label":"Switch 2","labelSource":"SITEMAP_WIDGET","icon":"light","staticIcon":false,"unit":"","mappings":[],"item":{"link":"http://net-nas-1:8080/rest/items/TEST_SWITCH2","state":"ON","lastStateUpdate":1772476500000,"type":"Switch","name":"TEST_SWITCH2","label":"Test Switch 2","category":"light","tags":["Point"],"groupNames":["Test","TEST_GROUP"]},"widgets":[]}]},{"widgetId":"01","type":"Frame","visibility":true,"label":"Generic Switch","labelSource":"SITEMAP_WIDGET","icon":"frame","staticIcon":false,"unit":"","mappings":[],"widgets":[{"widgetId":"0100","type":"Frame","visibility":true,"label":"Mappings","labelSource":"SITEMAP_WIDGET","icon":"frame","staticIcon":false,"unit":"","mappings":[],"widgets":[{"widgetId":"010000","type":"Switch","visibility":true,"label":"TV A [sCNN]","labelSource":"SITEMAP_WIDGET","icon":"screen","staticIcon":false,"pattern":"%s","unit":"","mappings":[{"command":"0","label":"mABC"}],"item":{"link":"http://net-nas-1:8080/rest/items/TEST_TV","state":"2","stateDescription":{"pattern":"%s","readOnly":false,"options":[{"value":"0","label":"sABC"},{"value":"1","label":"sBBC"},{"value":"2","label":"sCNN"}]},"commandDescription":{"commandOptions":[{"command":"0","label":"cABC"},{"command":"1","label":"cBCC"},{"command":"2","label":"cCNN"}]},"lastState":"1","lastStateUpdate":1773306205264,"lastStateChange":1773306204322,"type":"String","name":"TEST_TV","label":"Test TV","category":"screen","tags":["Point"],"groupNames":["Test","TEST_GROUP2"]},"widgets":[]},{"widgetId":"010001","type":"Switch","visibility":true,"label":"TV A/B [sCNN]","labelSource":"SITEMAP_WIDGET","icon":"screen","staticIcon":false,"pattern":"%s","unit":"","mappings":[{"command":"0","label":"mABC"},{"command":"1","label":"mBBC"}],"item":{"link":"http://net-nas-1:8080/rest/items/TEST_TV","state":"2","stateDescription":{"pattern":"%s","readOnly":false,"options":[{"value":"0","label":"sABC"},{"value":"1","label":"sBBC"},{"value":"2","label":"sCNN"}]},"commandDescription":{"commandOptions":[{"command":"0","label":"cABC"},{"command":"1","label":"cBCC"},{"command":"2","label":"cCNN"}]},"lastState":"1","lastStateUpdate":1773306205264,"lastStateChange":1773306204322,"type":"String","name":"TEST_TV","label":"Test TV","category":"screen","tags":["Point"],"groupNames":["Test","TEST_GROUP2"]},"widgets":[]},{"widgetId":"010002","type":"Switch","visibility":true,"label":"TV A/B/C [sCNN]","labelSource":"SITEMAP_WIDGET","icon":"screen","staticIcon":false,"pattern":"%s","unit":"","mappings":[{"command":"0","label":"mABC"},{"command":"1","label":"mBBC"},{"command":"2","label":"mCNN"}],"item":{"link":"http://net-nas-1:8080/rest/items/TEST_TV","state":"2","stateDescription":{"pattern":"%s","readOnly":false,"options":[{"value":"0","label":"sABC"},{"value":"1","label":"sBBC"},{"value":"2","label":"sCNN"}]},"commandDescription":{"commandOptions":[{"command":"0","label":"cABC"},{"command":"1","label":"cBCC"},{"command":"2","label":"cCNN"}]},"lastState":"1","lastStateUpdate":1773306205264,"lastStateChange":1773306204322,"type":"String","name":"TEST_TV","label":"Test TV","category":"screen","tags":["Point"],"groupNames":["Test","TEST_GROUP2"]},"widgets":[]}]},{"widgetId":"0101","type":"Frame","visibility":true,"label":"Metadata","labelSource":"SITEMAP_WIDGET","icon":"frame","staticIcon":false,"unit":"","mappings":[],"widgets":[{"widgetId":"010100","type":"Switch","visibility":true,"label":"TV A [sCNN]","labelSource":"SITEMAP_WIDGET","icon":"screen","staticIcon":false,"pattern":"%s","unit":"","mappings":[{"command":"0","label":"mABC"}],"item":{"link":"http://net-nas-1:8080/rest/items/TEST_TV","state":"2","stateDescription":{"pattern":"%s","readOnly":false,"options":[{"value":"0","label":"sABC"},{"value":"1","label":"sBBC"},{"value":"2","label":"sCNN"}]},"commandDescription":{"commandOptions":[{"command":"0","label":"cABC"},{"command":"1","label":"cBCC"},{"command":"2","label":"cCNN"}]},"lastState":"1","lastStateUpdate":1773306205264,"lastStateChange":1773306204322,"type":"String","name":"TEST_TV","label":"Test TV","category":"screen","tags":["Point"],"groupNames":["Test","TEST_GROUP2"]},"widgets":[]},{"widgetId":"010101","type":"Switch","visibility":true,"label":"TV A/B [sCNN]","labelSource":"SITEMAP_WIDGET","icon":"screen","staticIcon":false,"pattern":"%s","unit":"","mappings":[{"command":"0","label":"mABC"},{"command":"1","label":"mBBC"}],"item":{"link":"http://net-nas-1:8080/rest/items/TEST_TV","state":"2","stateDescription":{"pattern":"%s","readOnly":false,"options":[{"value":"0","label":"sABC"},{"value":"1","label":"sBBC"},{"value":"2","label":"sCNN"}]},"commandDescription":{"commandOptions":[{"command":"0","label":"cABC"},{"command":"1","label":"cBCC"},{"command":"2","label":"cCNN"}]},"lastState":"1","lastStateUpdate":1773306205264,"lastStateChange":1773306204322,"type":"String","name":"TEST_TV","label":"Test TV","category":"screen","tags":["Point"],"groupNames":["Test","TEST_GROUP2"]},"widgets":[]},{"widgetId":"010102","type":"Switch","visibility":true,"label":"TV A/B/C [sCNN]","labelSource":"SITEMAP_WIDGET","icon":"screen","staticIcon":false,"pattern":"%s","unit":"","mappings":[],"item":{"link":"http://net-nas-1:8080/rest/items/TEST_TV","state":"2","stateDescription":{"pattern":"%s","readOnly":false,"options":[{"value":"0","label":"sABC"},{"value":"1","label":"sBBC"},{"value":"2","label":"sCNN"}]},"commandDescription":{"commandOptions":[{"command":"0","label":"cABC"},{"command":"1","label":"cBCC"},{"command":"2","label":"cCNN"}]},"lastState":"1","lastStateUpdate":1773306205264,"lastStateChange":1773306204322,"type":"String","name":"TEST_TV","label":"Test TV","category":"screen","tags":["Point"],"groupNames":["Test","TEST_GROUP2"]},"widgets":[]}]}]},{"widgetId":"02","type":"Frame","visibility":true,"label":"Colors","labelSource":"SITEMAP_WIDGET","icon":"frame","staticIcon":false,"unit":"","mappings":[],"widgets":[{"widgetId":"0200","type":"Switch","visibility":true,"label":"TV A/B/C [sCNN]","labelSource":"SITEMAP_WIDGET","icon":"screen","staticIcon":false,"labelcolor":"yellow","valuecolor":"yellow","pattern":"%s","unit":"","mappings":[{"command":"0","label":"ABC"},{"command":"1","label":"BBC"},{"command":"2","label":"CNN"}],"item":{"link":"http://net-nas-1:8080/rest/items/TEST_TV","state":"2","stateDescription":{"pattern":"%s","readOnly":false,"options":[{"value":"0","label":"sABC"},{"value":"1","label":"sBBC"},{"value":"2","label":"sCNN"}]},"commandDescription":{"commandOptions":[{"command":"0","label":"cABC"},{"command":"1","label":"cBCC"},{"command":"2","label":"cCNN"}]},"lastState":"1","lastStateUpdate":1773306205264,"lastStateChange":1773306204322,"type":"String","name":"TEST_TV","label":"Test TV","category":"screen","tags":["Point"],"groupNames":["Test","TEST_GROUP2"]},"widgets":[]}]},{"widgetId":"03","type":"Frame","visibility":true,"label":"Icons","labelSource":"SITEMAP_WIDGET","icon":"frame","staticIcon":false,"unit":"","mappings":[],"widgets":[{"widgetId":"0300","type":"Switch","visibility":true,"label":"Light","labelSource":"SITEMAP_WIDGET","icon":"light","staticIcon":false,"unit":"","mappings":[],"item":{"link":"http://net-nas-1:8080/rest/items/TEST_SWITCH","state":"ON","lastState":"OFF","lastStateUpdate":1772913530136,"lastStateChange":1772913530136,"type":"Switch","name":"TEST_SWITCH","label":"Test Switch 1","category":"light","tags":["Point"],"groupNames":["Test","TEST_GROUP"]},"widgets":[]},{"widgetId":"0301","type":"Switch","visibility":true,"label":"Outlet","labelSource":"SITEMAP_WIDGET","icon":"poweroutlet","staticIcon":false,"unit":"","mappings":[],"item":{"link":"http://net-nas-1:8080/rest/items/TEST_SWITCH","state":"ON","lastState":"OFF","lastStateUpdate":1772913530136,"lastStateChange":1772913530136,"type":"Switch","name":"TEST_SWITCH","label":"Test Switch 1","category":"light","tags":["Point"],"groupNames":["Test","TEST_GROUP"]},"widgets":[]},{"widgetId":"0302","type":"Slider","visibility":true,"label":"Slider [50 %]","labelSource":"SITEMAP_WIDGET","icon":"light","staticIcon":false,"pattern":"%.0f %%","unit":"","mappings":[],"switchSupport":false,"releaseOnly":false,"minValue":0,"maxValue":100,"step":10,"item":{"link":"http://net-nas-1:8080/rest/items/TEST_DIMMER","state":"50.000000","stateDescription":{"pattern":"%.0f %%","readOnly":false,"options":[]},"lastState":"60.000000","lastStateUpdate":1772719408323,"lastStateChange":1772719408323,"type":"Dimmer","name":"TEST_DIMMER","label":"Test Dimmer","category":"light","tags":["Point"],"groupNames":["Test","TEST_GROUP2"]},"widgets":[]},{"widgetId":"0303","type":"Switch","visibility":true,"label":"Shutters","labelSource":"SITEMAP_WIDGET","icon":"rollershutter","staticIcon":false,"unit":"","mappings":[],"item":{"link":"http://net-nas-1:8080/rest/items/TEST_ROLLERSHUTTER","state":"100","lastState":"0","lastStateUpdate":1772813106839,"lastStateChange":1772810596939,"type":"Rollershutter","name":"TEST_ROLLERSHUTTER","label":"Test Rollershutter","category":"rollershutter","tags":["OpenLevel"],"groupNames":["Test"]},"widgets":[]},{"widgetId":"0304","type":"Switch","visibility":true,"label":"TV [Channel: sCNN]","labelSource":"SITEMAP_WIDGET","icon":"screen","staticIcon":false,"pattern":"Channel: %s","unit":"","mappings":[{"command":"0","label":"ABC"},{"command":"1","label":"BBC"},{"command":"2","label":"CNN"}],"item":{"link":"http://net-nas-1:8080/rest/items/TEST_TV","state":"2","stateDescription":{"pattern":"%s","readOnly":false,"options":[{"value":"0","label":"sABC"},{"value":"1","label":"sBBC"},{"value":"2","label":"sCNN"}]},"commandDescription":{"commandOptions":[{"command":"0","label":"cABC"},{"command":"1","label":"cBCC"},{"command":"2","label":"cCNN"}]},"lastState":"1","lastStateUpdate":1773306205264,"lastStateChange":1773306204322,"type":"String","name":"TEST_TV","label":"Test TV","category":"screen","tags":["Point"],"groupNames":["Test","TEST_GROUP2"]},"widgets":[]},{"widgetId":"0305","type":"Text","visibility":true,"label":"Gates [50 %]","labelSource":"SITEMAP_WIDGET","icon":"garagedoor","staticIcon":false,"pattern":"%.0f %%","unit":"","mappings":[],"item":{"link":"http://net-nas-1:8080/rest/items/TEST_DIMMER","state":"50.000000","stateDescription":{"pattern":"%.0f %%","readOnly":false,"options":[]},"lastState":"60.000000","lastStateUpdate":1772719408323,"lastStateChange":1772719408323,"type":"Dimmer","name":"TEST_DIMMER","label":"Test Dimmer","category":"light","tags":["Point"],"groupNames":["Test","TEST_GROUP2"]},"widgets":[]},{"widgetId":"0306","type":"Switch","visibility":true,"label":"Door [-]","labelSource":"SITEMAP_WIDGET","icon":"door","staticIcon":false,"pattern":"%s","unit":"","mappings":[{"command":"OPEN","label":"OPEN"},{"command":"CLOSED","label":"CLOSED"}],"item":{"link":"http://net-nas-1:8080/rest/items/TEST_DOOR","state":"NULL","stateDescription":{"pattern":"%s","readOnly":false,"options":[]},"type":"String","name":"TEST_DOOR","label":"Test Door","category":"door","tags":["Point"],"groupNames":["Test"]},"widgets":[]},{"widgetId":"0307","type":"Switch","visibility":true,"label":"Frontdoor [-]","labelSource":"SITEMAP_WIDGET","icon":"frontdoor","staticIcon":false,"pattern":"%s","unit":"","mappings":[{"command":"OPEN","label":"OPEN"},{"command":"CLOSED","label":"CLOSED"}],"item":{"link":"http://net-nas-1:8080/rest/items/TEST_DOOR","state":"NULL","stateDescription":{"pattern":"%s","readOnly":false,"options":[]},"type":"String","name":"TEST_DOOR","label":"Test Door","category":"door","tags":["Point"],"groupNames":["Test"]},"widgets":[]},{"widgetId":"0308","type":"Text","visibility":true,"label":"Vehicle SoC [60%]","labelSource":"SITEMAP_WIDGET","icon":"batterylevel","staticIcon":false,"pattern":"%.0f%unit%","mappings":[],"item":{"link":"http://net-nas-1:8080/rest/items/evcc_KOG_Vehicle_SoC","state":"60 %","stateDescription":{"pattern":"%.0f%unit%","readOnly":false,"options":[]},"lastStateUpdate":1772476500000,"unitSymbol":"%","type":"Number:Dimensionless","name":"evcc_KOG_Vehicle_SoC","label":"Vehicle SoC","category":"BatteryLevel","tags":["Point"],"groupNames":["evcc_KOG"]},"widgets":[]}]}]}}

  • It makes sense you see it in the SDK first as it could be some time before the fix rolls out to the firmware for all the devices and this way you can test/verify your apps before it hits users on real devices

    My question would then be what the actual "bug" is here. Everything worked fine before. Limits were already in place and enforced.In fact, the communications module has been one example where limits were enforced in a relatively graceful way that applications can handle well, especially when compared to modules such as Storage or the Watchdog.

    I would be quite disappointed if the same lower limit were implemented on real devices. There are limits in place on real devices today, and I do not see them causing any real-world problems. It is unclear what the benefit of reducing them would be, other than making life more difficult for existing apps.

  • This is listed as a bug fix.  It makes sense you see it in the SDK first as it could be some time before the fix rolls out to the firmware for all the devices and this way you can test/verify your apps before it hits users on real devices

  • I just checked but could not find anything in simulator.json that defines this limit.

    My guess is that it is a global limit, independent of the device.

    It is also worth noting that a limit was enforced before as well. In the past, I was already able to trigger -402 errors in the simulator, just with much larger JSON responses.

  • If the simulator knows (or should know) the limit, then it is somewhere in the simulator.json? That would be an interesting piece of information. I hope they'll also add the limit for web requests!