Open bogdanst24 opened 1 week ago
@bogdanst24 We are unable to reproduce the issue. Could you please provide a manifest and a video of the issue so we can investigate it more effectively?
Probably important to emphasize that it was working for a long time without issues. I can reproduce it with this very basic add-in:
void Office.onReady(() => {});
Office.actions.associate(
'onMessageComposeHandler',
(event: Office.AddinCommands.Event) =>
void onMessageComposeHandler(event),
);
export function onMessageComposeHandler(
event: Office.AddinCommands.Event,
contextParameters: WebAddInContextParameters,
) {
Office.context.mailbox.item?.loadCustomPropertiesAsync((result) => {
if (result.status === Office.AsyncResultStatus.Failed) {
console.log('ERROR', result.error);
}
const allValues = result.value.get('test');
console.log('allValues', allValues);
result.value.set('test', 'testValue');
result.value.saveAsync((result) => {
console.log('saveAsync', result);
});
});
}
Result:
Relevant part in the manifest:
<ExtensionPoint xsi:type="LaunchEvent">
<LaunchEvents>
<LaunchEvent Type="OnNewMessageCompose" FunctionName="onMessageComposeHandler" />
....
</LaunchEvents>
</ExtensionPoint>
I can send the full manifest via email, but I find it useless as you won't be test with it.
Later edit: I can reproduce it also by using the simple code from the Script Lab (moving it into an event based one)
Again, I can only reproduce it in the New Outlook for Windows.
@bogdanst24 Based on the details that you have provided, we are still unable to repro the issue. Could you please share your manifest and a video of the issue to understand the issue better?
Could you please share an email address I can send to?
@bogdanst24 Please host your manifest in a private repo, and grant access to me!
Done. You won't be able to log in, but that shouldn't matter as the issue is reproducible before that. Triggering a new email is enough. You should be able to see 3 Post requests ending up with 400 status code
@bogdanst24 We have been able to reproduce the issue. To better understand the problem, could you please confirm if subsequent requests after logging in or saving custom properties again are successful as this seems to be an auth problem.
To better understand the problem, could you please confirm if subsequent requests after logging in or saving custom properties again are successful
Yes, exactly. What you are seeing now being logged, are some operations we introduced as a workaround. Exactly because, as described also in the title of the issue, only the first one seems to fail. Or, it might be all operations for the first x seconds.
this seems to be an auth problem.
No specific authentication is performed. I think we have been seeing this error in our logs for a long time for some customers (~20%), but we were never able to reproduce it. Now, since 2-3 weeks ago, it is affecting everyone.
@bogdanst24 Thanks for the clarification. It has been put on our backlog. We, unfortunately, have no timelines to share at this point. Internal tracking id: Eg: Office: 4707994
Provide required information needed to triage your issue
Your Environment
Expected behavior
When saving the custom properties (after setting them) for the first time in an event-based add-in (onMessageCompose), the properties are successfully saved
Current behavior
When saved for the first time, the operation throws an internal error![image](https://github.com/OfficeDev/office-js/assets/65173226/b1d69fef-0b39-4821-b74e-15c731d5a4b6)
The error comes after a failed post request to
https://outlook.office.com/owa/service.svc?action=SaveExtensionCustomProperties&app=Mail&n=1336
Steps to reproduce
Example:
Context
Useful logs
Thank you for taking the time to report an issue. Our triage team will respond to you in less than 72 hours. Normally, response time is <10 hours Monday through Friday. We do not triage on weekends.