1

I have a Lightning application, which is running in a Visualforce page, so it can be accessed from Classic Salesforce.

If I open the page with the app, use the app for a while, then leave it for a while, when I try and use the page and it makes a call to the APEX controller I get an exception.

The exception detail sent from APEX is:

  "defaultHandler":function() {$A.clientService.setOutdated()},
    "event":{
      "descriptor":"markup://aura:clientOutOfSync",
        "eventDef":{
          "s":1,
          "v":{
            "descriptor":"markup://aura:clientOutOfSync",
            "type":"APPLICATION",
            "superDef":{
              "s":2,
              "v":{
                "descriptor":"markup://aura:applicationEvent",
                "type":"APPLICATION",
                "xs":"G",
                "attributes":{

                }
            }
          },
          "attributes":{

          }
        }
      }
    },
  "exceptionEvent":true

The stack trace in JavaScript is:

Received exception event from server
  at AuraClientService.$processErrors$ (https://xxx.visual.force.com/auraFW/javascript/ot_aUc3gWVJCViXm5-AclQ/aura_proddebug.js:9591:19)
  at AuraClientService.$receive$ (https://xxx.visual.force.com/auraFW/javascript/ot_aUc3gWVJCViXm5-AclQ/aura_proddebug.js:9571:16)
  at TransportMetricsPlugin.$receiveOverride$ (https://xxx.visual.force.com/auraFW/javascript/ot_aUc3gWVJCViXm5-AclQ/aura_proddebug.js:16108:23)
  at Object.Aura.$Utils$.$Override$.$continuation$ (https://xxx.visual.force.com/auraFW/javascript/ot_aUc3gWVJCViXm5-AclQ/aura_proddebug.js:2912:20)
  at Override.Aura.$Utils$.$Override$.start (https://xxx.visual.force.com/auraFW/javascript/ot_aUc3gWVJCViXm5-AclQ/aura_proddebug.js:2890:30)
  at XMLHttpRequest.onReady (https://xxx.visual.force.com/auraFW/javascript/ot_aUc3gWVJCViXm5-AclQ/aura_proddebug.js:9463:12)
  at XMLHttpRequest.<anonymous> (https://xxx.visual.force.com/auraFW/javascript/ot_aUc3gWVJCViXm5-AclQ/aura_proddebug.js:14713:23)

When this happens the app becomes unusable until the user manually reloads the page. All calls further to the server fail.

This is happening in a Lightning app hosted within a Visualforce page. How do I stop this happening ?

1

aura:clientOutOfSync occurs when the framework source changes. Aura will generate a UID on the server and if it detects this value has changed it will throw and serialize down a ClientOutOfSyncException to the client letting it know it needs to refresh itself to get the latest code.

This is probably happening after you don't interact with the app for a while because while you were away the framework got updated on the server in a patch. In a standalone Aura/Lightning app this should all be automatically handled for you and your app should refresh itself to get the newest framework code.

I'm not sure what exactly your question is or what behavior you are experiencing. If you clarify maybe I can help further.

| improve this answer | |
  • I had this happen about three times in a day. Does that match with the server patch theory ? – andynormancx Aug 1 '16 at 12:12
  • Are you or someone in your org making changes to the Lightning application source? That may cause the clientOutOfSync. – TrevorBliss Aug 1 '16 at 19:34

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.