Office-js: Repeated calls to insertHtml() causes 413 Http Error

Created on 28 Mar 2019  路  8Comments  路  Source: OfficeDev/office-js

Our application needs to update content in several ContentControls in a single operation. Currently, we are using insertHtml() to do this, however we have noticed that Office365 can become unstable after a few rounds of updates.

Digging into this, we noticed that the form-data for a particular request in the console was returning a 413 error, as it was becoming too large.

The failing post request url is: https://word-edit.officeapps.live.com/we/RemoteUls.ashx?build=16.0.11422.32653&waccluster=NL3

Inspecting the form data, we see a preponderance of the following error: dynamic range object with id <UUID> hasn't been found.

We've been unable to trace this back to anything in our code, and we have reproduced in individual scripts, so we thought we would raise an issue.

Expected Behavior

Office 365 should update the ContentControls as expected

Current Behavior

Office365 becomes unstable (sometimes displaying a warning that it couldn't save the current document), and the console displays a 413 payload too large error on the request to https://word-edit.officeapps.live.com/we/RemoteUls.ashx?build=16.0.11422.32653&waccluster=NL3

Steps to Reproduce, or Live Example

  1. Open this gist in ScriptLab https://gist.github.com/dannycurrie/ba47654314e7817af4812ba5eb887fae
  2. Click Insert Content Controls
  3. Open the Network tab in DevTools and filter for RemoteUls
  4. Click Update Content Controls
  5. Repeat until the Network tab shows a failing request

Context

We are building an Add-in to allow users to insert citations - we need to use insertHtml so that citations can be consistently formatted when the User chooses to change citation style for all of the citations within their document (this could be several hundred).

Your Environment

  • Platform: Office Online
  • Host: Word
  • Office version number: Online
  • Operating System: MacOS High Sierra
  • Browser (if using Office Online): Chrome

Useful logs

Attached
consoleError.log
insertHtmlIssue_Network_Error.txt

Word under investigation product bug

Most helpful comment

I have created a tracking bug #3312218 and assigned it to our OCE team.

All 8 comments

Has anyone had a chance to look at this yet? It's crippling our application performance and we're having to work around it with insertText but this isn't ideal due to the stylings we need to apply.

Perhaps @JuaneloJuanelo ?

Anyone had a chance to have a look at this @tutieu @lumine2008 ? Could really use help with this bug.

Hey all - would really appreciate if someone could take a look into this please.

@dmahugh ?

Sorry for the delay here. @weshi, can you take a look at this? It sounds like a bug, and they've provided a repro above.

Much appreciated @dmahugh 馃憤 @weshi let me know if you need any more details and we can provide them for you.

I have created a tracking bug #3312218 and assigned it to our OCE team.

Could some give an estimate for when you expect the issue to be fixed? Thanks

FYI for all -- based on the (MSFT-internal) tracking bug that @tutieu mentions above, looks like this issue is still being investigated. @weshi can you please update this GitHub issue as the status of the internal tracking bug evolves? Thanks!

Was this page helpful?
0 / 5 - 0 ratings