2

Hi I'm trying to load the SP request executor as per the Microsoft samples (inside a provided hosted app) SP2013 I have this error:

Failed to execute 'postMessage' on 'DOMWindow': The target origin provided ('https://app-1177ea488f408e.apps.****.local') does not match the recipient window's origin ('null'). SP.RequestExecutor.$B @ SP.RequestExecutor.js?_=1502881518378:2 jquery.min.js:2 in chrome; it dies silently in ie11

Any pointers?

https://dev.office.com/sharepoint/docs/sp-add-ins/complete-basic-operations-using-sharepoint-rest-endpoints

My code as follows:

  $.getScript(scriptbase + "SP.RequestExecutor.js", execCrossDomainRequest);
  function execCrossDomainRequest() {
      var executor;

      console.log('3');

       // Initialize the RequestExecutor with the app web URL.
       executor = new SP.RequestExecutor(appweburl);

       executor.executeAsync(
           {
               url:
                   appweburl +
                   "/_api/SP.AppContextSite(@@target)/web/title?@@target='" +
                   hostweburl + "'",
                   method: "GET",
                   headers: { "Accept": "application/json; odata=verbose" },
                   success: successHandler,
                   error: errorHandler
                }
            );
        }

Your Answer

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

Browse other questions tagged or ask your own question.