AP.events.on Doesn't fire in specific customer instance

We have a bit of code that uses AP events to communicate between macros.

AP.events.emit('tabVizLoaded')
and

AP.events.on('tabVizLoaded', function () {
  debugLogs('event recieved in ' + tabUrl + ' frame')
  let workbookName = getWorkbookName()
  if (workbookName === '' || workbookName == null) {
    debugLogs('page reload triggered in ' + tabUrl + ' frame')
    document.location.href = document.location.href// eslint-disable-line no-self-assign
  }
})

In our test instance, and our prod instance, this works without any issues. When a specific customer tries to use this functionality, the AP.events.on code never fires (debugLogs is never called) in the customer system. There are no errors in the browser console, and we have tried changing the event name to ensure that there isn’t any conflict there. We have also checked the resource the browser is loading and it is the correct up to date JS file, so this isn’t an issue with the resource being cached somewhere.

Some more info:

  • We tested this in our environment with the same 3rd party apps installed as the client, this had no effect
  • We reviewed the storage format of the page for testing and no third party macros are in use there.
  • Customer was using the Overview page, so we tested on there vs a generic page and this also had no impact on the application behavior.
  • A test using emitPublic and onPublic shows that the macros can communicate with one another using public events, but not private ones.
1 Like