microsoft / MHA

Message Header Analyzer Add-in For Outlook
MIT License
283 stars 50 forks source link

EWS callback failed #896

Open andrewpmiller opened 7 months ago

andrewpmiller commented 7 months ago

Plugin fails to display headers every time and displays an error dialog.

Outlook for iOS Version: 4.2403.0

image

stephenegriffin commented 7 months ago

If you click the gear icon there is a diagnostics button. Could you open the diagnostics panel and copy/paste what you see in there?

andrewpmiller commented 7 months ago

Diagnostics:

User Agent = Mozilla/5.0 (iPhone; CPU iPhone OS 17_2_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148
Requirement set = 1.11
ui = new-mobile
Last Update = Wed, 31 May 2023 15:21:33 GMT
mhaVersion = 11728c4a3
contentLanguage = en-US
displayLanguage = en-US
hostname = OutlookIOS
hostVersion = 4.2404.0.0
permissionLevel = 3
canUseAPI = true
canUseRest = true
sufficientPermission = true
origin = https://mha.azurewebsites.net
path = /Pages/parentframe.html
API used = EWS
itemId = true
itemType = message
itemClass = IPM.Note
getAllInternetHeadersAsyncFailure = {"status":"failed","error":{"name":"Permission Denied","message":"You don't have sufficient permissions for this action.","code":7000}}
callbackTokenFailure = {"status":"failed","error":{"name":"AccessRestricted","message":"Internal protocol error: '-2147467259'.","code":9017},"diagnostics":{"InvokeCodeResult":-2147467259}}
ERROR: Unable to obtain callback token.
Fallback to Rest.
{
  "status": "failed",
  "error": {
    "name": "Permission Denied",
    "message": "You don't have sufficient permissions for this action.",
    "code": 7000
  }
} : You don't have sufficient permissions for this action.
Office.context.mailbox.item.getAllInternetHeadersAsync(function (webpack://mha/src/Scripts/GetHeadersAPI.ts:42:31)
a (https://appsforoffice.microsoft.com/lib/1/hosted/outlook-ios-16.00.js:20:199653)
d (https://appsforoffice.microsoft.com/lib/1/hosted/outlook-ios-16.00.js:20:114182)
b (https://appsforoffice.microsoft.com/lib/1/hosted/outlook-ios-16.00.js:20:109625)
::
::
ERROR: Unable to obtain callback token.
Fallback to EWS.
{
  "status": "failed",
  "error": {
    "name": "AccessRestricted",
    "message": "Internal protocol error: '-2147467259'.",
    "code": 9017
  },
  "diagnostics": {
    "InvokeCodeResult": -2147467259
  }
} : Internal protocol error: '-2147467259'.
Office.context.mailbox.getCallbackTokenAsync (webpack://mha/src/Scripts/GetHeadersRest.ts:164:31)
a (https://appsforoffice.microsoft.com/lib/1/hosted/outlook-ios-16.00.js:20:199653)
d (https://appsforoffice.microsoft.com/lib/1/hosted/outlook-ios-16.00.js:20:114182)
b (https://appsforoffice.microsoft.com/lib/1/hosted/outlook-ios-16.00.js:20:109625)
::
::
ERROR: Async Response
{
  "status": "succeeded"
}
asyncResult (webpack://mha/src/Scripts/GetHeadersEWS.ts:95:27)
mailbox.makeEwsRequestAsync (webpack://mha/src/Scripts/GetHeadersEWS.ts:145:46)
a (https://appsforoffice.microsoft.com/lib/1/hosted/outlook-ios-16.00.js:20:199653)
d (https://appsforoffice.microsoft.com/lib/1/hosted/outlook-ios-16.00.js:20:114182)
b (https://appsforoffice.microsoft.com/lib/1/hosted/outlook-ios-16.00.js:20:109625)
::
::
ERROR: EWS callback failed : Failed to retrieve headers.
mailbox.makeEwsRequestAsync (webpack://mha/src/Scripts/GetHeadersEWS.ts:145:46)
a (https://appsforoffice.microsoft.com/lib/1/hosted/outlook-ios-16.00.js:20:199653)
d (https://appsforoffice.microsoft.com/lib/1/hosted/outlook-ios-16.00.js:20:114182)
b (https://appsforoffice.microsoft.com/lib/1/hosted/outlook-ios-16.00.js:20:109625)
::
::
PDWP commented 2 months ago

Same issue with me. It's not been working for quite some time. Just now decided to try doing something about it. The extension is really one of my must haves, and I miss it. Here is my diagnostics log. Please advise.

User Agent = Mozilla/5.0 (iPhone; CPU iPhone OS 17_5_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148 Requirement set = 1.11 ui = new-mobile Last Update = Tue, 16 Apr 2024 13:49:50 GMT mhaVersion = 206795b contentLanguage = en-US displayLanguage = en-US hostname = OutlookIOS hostVersion = 4.2423.0.0 permissionLevel = 3 canUseAPI = true canUseRest = true sufficientPermission = true origin = https://mha.azurewebsites.net/ path = /Pages/parentframe.html API used = EWS itemId = true itemType = message itemClass = IPM.Note getAllInternetHeadersAsyncFailure = {"status":"failed","error":{"name":"Permission Denied","message":"You don't have sufficient permissions for this action.","code":7000}} callbackTokenFailure = {"status":"failed","error":{"name":"AccessRestricted","message":"Internal protocol error: '-2147467259'.","code":9017},"diagnostics":{"InvokeCodeResult":-2147467259}} ERROR: Unable to obtain callback token. Fallback to Rest. { "status": "failed", "error": { "name": "Permission Denied", "message": "You don't have sufficient permissions for this action.", "code": 7000 } } : You don't have sufficient permissions for this action. Office.context.mailbox.item.getAllInternetHeadersAsync(function (webpack://mha/src/Scripts/GetHeadersAPI.ts:42:31) a (https://appsforoffice.microsoft.com/lib/1/hosted/outlook-ios-16.00.js:20:202989) d (https://appsforoffice.microsoft.com/lib/1/hosted/outlook-ios-16.00.js:20:114717) b (https://appsforoffice.microsoft.com/lib/1/hosted/outlook-ios-16.00.js:20:110160) :: :: ERROR: Unable to obtain callback token. Fallback to EWS. { "status": "failed", "error": { "name": "AccessRestricted", "message": "Internal protocol error: '-2147467259'.", "code": 9017 }, "diagnostics": { "InvokeCodeResult": -2147467259 } } : Internal protocol error: '-2147467259'. Office.context.mailbox.getCallbackTokenAsync (webpack://mha/src/Scripts/GetHeadersRest.ts:164:31) a (https://appsforoffice.microsoft.com/lib/1/hosted/outlook-ios-16.00.js:20:202989) d (https://appsforoffice.microsoft.com/lib/1/hosted/outlook-ios-16.00.js:20:114717) b (https://appsforoffice.microsoft.com/lib/1/hosted/outlook-ios-16.00.js:20:110160) :: :: ERROR: Async Response { "status": "succeeded" } asyncResult (webpack://mha/src/Scripts/GetHeadersEWS.ts:95:27) mailbox.makeEwsRequestAsync (webpack://mha/src/Scripts/GetHeadersEWS.ts:145:46) a (https://appsforoffice.microsoft.com/lib/1/hosted/outlook-ios-16.00.js:20:202989) d (https://appsforoffice.microsoft.com/lib/1/hosted/outlook-ios-16.00.js:20:114717) b (https://appsforoffice.microsoft.com/lib/1/hosted/outlook-ios-16.00.js:20:110160) :: :: ERROR: EWS callback failed : Failed to retrieve headers. mailbox.makeEwsRequestAsync (webpack://mha/src/Scripts/GetHeadersEWS.ts:145:46) a (https://appsforoffice.microsoft.com/lib/1/hosted/outlook-ios-16.00.js:20:202989) d (https://appsforoffice.microsoft.com/lib/1/hosted/outlook-ios-16.00.js:20:114717) b (https://appsforoffice.microsoft.com/lib/1/hosted/outlook-ios-16.00.js:20:110160) :: ::