Web Author loading/caching issue

Having trouble deploying Oxygen XML Web Author? Got a bug to report? Post it all here.
david.badger
Posts: 25
Joined: Tue Feb 25, 2014 12:14 am

Web Author loading/caching issue

Post by david.badger »

Hello,

We are using Web Author 22.0 inside a client's firewall. We have been able to successfully load XML files into the editor using the following setup:
  1. embed Web Author inside iFrame with url parameter pointing to a dummy document
  2. in plugin.js, stop loading dummy document with event.preventDefault() in BEFORE_EDITOR_LOADED
  3. send message to parent window that editor is ready in BEFORE_EDITOR_LOADED
  4. send editorOptions object via postMessage() to iFrame that contains dummy url and XML to be loaded
This was working very well, until they deployed a load balancer. Now on first load, we get the following error:

Code: Select all

TypeError: Cannot read property 'substring' of undefined

    at sync.support.AuthorEditingSupport.load (workspace-bf5835e8c0.js:3449)

    at sync.Editor.init (workspace-bf5835e8c0.js:3793)

    at sync.Editor.<anonymous> (workspace-bf5835e8c0.js:3787)

    at d.onFulfilled (workspace-bf5835e8c0.js:737)

    at Function.goog.Promise.invokeCallback_ (workspace-bf5835e8c0.js:745)

    at goog.Promise.executeCallback_ (workspace-bf5835e8c0.js:744)

    at goog.Promise.executeCallbacks_ (workspace-bf5835e8c0.js:743)

    at goog.async.run.processWorkQueue (workspace-bf5835e8c0.js:723) "Message: Cannot read property &#39;substring&#39; of undefined<br>Url: <a href="view-source:https://domainA/oxygen-web-author/app/oxygen.html?url=https://domainB:4787/app/editor/Loading" target="_new">https://domainA/oxygen-web-author/app/oxygen.html?url=https://domainB:4787/app/editor/Loading</a><br>Line: Not available<br>
However, if the user then refreshes the page, the document loads OK, so it also appears to be related to the browser cache.

In the browser debugger, this error does not show until we call window.editor.load(editorOptions), which looks something like this:

Code: Select all

autoSaveInterval: 0
 
content: "<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE Section PUBLIC "--REMOVED--" "client.dtd">↵<Section PartNumber="00" ChapterNumber="030" SubchapterNumber="01" SectionNumber="999">↵<Title><?oxy_insert_start author="Anonymous" timestamp="20200505T175013-0400"?>Ron is Testing↵<?oxy_insert_end?><?oxy_delete author="Anonymous" timestamp="20200505T175016-0400" content="TEST"?></Title>↵<Para><?oxy_insert_start author="Anonymous" timestamp="20200430T165015-0400"?>Test save↵function<?oxy_insert_end?></Para>↵</Section>↵<?oxy_options track_changes="on"?>"

trackChanges: "enabled"

url: "https://domainB:4787/app/editor/Loading"

userName: ""
We are using a dummy URL because we are not resolving any references and the XML is stored in a relational database.

We hope you can help shed some light as to what's going on. Thank you!
cristi_talau
Posts: 495
Joined: Thu Sep 04, 2014 4:22 pm

Re: Web Author loading/caching issue

Post by cristi_talau »

Hello,

To help you troubleshoot this problem we would need more information:
  • Send us the HAR file with the requests made by the browser. You can find instructions here on how to obtain it [1].
  • Use the browser debugger to find the value of the first parameter passed to AuthorEditingSupport.load which is at the top of the stack trace. To see them, activate "Pause on exceptions" and inspect parameters of the current method when the browser stops.
You can send the information either here or using our support email address: support@oxygenxml.com.

Best,
Cristian

[1] https://support.zendesk.com/hc/en-us/ar ... leshooting
david.badger
Posts: 25
Joined: Tue Feb 25, 2014 12:14 am

Re: Web Author loading/caching issue

Post by david.badger »

Hi,

Thanks for the quick response. I'm not sure when our client will make time to provide this information, but for the moment they have worked around the issue and set their load balancer to only use one node. I'll update this thread when they're able to provide more information.
cristi_talau
Posts: 495
Joined: Thu Sep 04, 2014 4:22 pm

Re: Web Author loading/caching issue

Post by cristi_talau »

Hello,

Also, please note that you need to configure sticky sessions in your load balancer. Here [1] you can find more instructions about deploying Web Author behind a load-balancer.

Best,
Cristian

[1] https://www.oxygenxml.com/doc/versions/ ... ncing.html
Post Reply