Recent Losant Update Appears to have Introduced New Webpage View Error

Starting yesterday, one of our webpages is no longer able to load correctly. The workflow debug info shows that a “View Render Error” is occurring. This workflow has not been modified recently and so it is suspected that this is a result of the recent Aug 26 update.

Using the new render preview feature I have managed to narrow down the source of the issue to some sort of size constraint on our dropdown list. More specifically, the render preview returns an error for lists larger than 34 items.

Is this intended behavior for webpages? If so, could you please provide more information on new webpage constraints so that we can get our webpage working again and also avoid this issue in the future. This is currently a blocking issue for our clients.

Thanks,

April Jang

@April_Jang I’m going to look into this for you ASAP. If you can provide more information it would be extremely helpful.

Without exposing any sensitive or proprietary information, can you provide the body of the page and the context object you are passing into it that is causing an instance of the error? You can PM me this information if you’d prefer.

If not, can you provide at least the application and page ID? You can simply visit the URL of the page in the web app editor and paste it here. Neither ID is considered sensitive information.

@April_Jang I haven’t heard back from you yet but I did some digging and I think this is the source of the error you were seeing:

In our most recent platform update, we did add some safety limits to our Handlebars rendering engine, such as:

  • Max. number of items iterated over
  • Max. depth of nested {{#each}} statements
  • Max. size of the output of an {{#each}} statement (this is the one I think you hit)

In other words, I believe the page you were rendering was outputting so much HTML that it was exceeding that 1MB limit.

I don’t want to discuss your implementation too much in this public forum, but I do have some ideas for how to get that page size way down, which would not only prevent that error from happening again but would also lead to a performance boost in your application by reducing the render time and the size of the page that is being sent down to your clients. If you’re interested in pursuing that, please reach out to me via private message and I can give you some tips.

Hi Dylan,

Thanks for looking into this for me. The safety limits being the source of our issue makes sense.

I inherited this code and so would definitely appreciate your perspective. I’ll be reaching out to you privately.

Strange thing, I just recently noticed that I was able to get the page in question to successfully load. It failed when I tried again, but that doesn’t make sense as the amount of data in the {{#each}} statement should be the same both times.