Failed to execute 'postMessage' on 'DOMWindow' for add-in within message inspector RRS feed

  • Question

  • I'm working on an add-in for Outlook which redirects to another URL after authentication. The redirect works fine when running the add-in from the message list viewer. However, if I open a message in an inspector and run the add-in the redirect displays this error:

    Failed to execute 'postMessage' on 'DOMWindow': The target origin provided ('') does not match the recipient window's origin ('').

    The URL for the message list viewer is

    The URL for the inspector is

    Edit: Investigating this further, it appears that initialising OfficeJS fails after redirecting. The call to Office.onReady() just hangs and doesn't return (I'm using `await Office.onReady()`). I tested this running a test add-in locally which redirected to my add-in running locally and calling Office.onReady() does not do anything and just hangs at that call.

    So URL redirection works but then the add-in doesn't initialise.

    • Edited by camden_kid Friday, October 4, 2019 8:57 AM
    Tuesday, October 1, 2019 11:16 AM