OfficeDev / office-js

A repo and NPM package for Office.js, corresponding to a copy of what gets published to the official "evergreen" Office.js CDN, at https://appsforoffice.microsoft.com/lib/1/hosted/office.js.
https://learn.microsoft.com/javascript/api/overview
Other
670 stars 96 forks source link

displayDialogAsync throwing an error in Outlook on the Web #3731

Open Suntechnick opened 11 months ago

Suntechnick commented 11 months ago

displayDialogAsync API throwing an error when called in Outlook on the Web. For details, please, check the screenshot. Issue is not present in Outlook Desktop. display

Your Environment

Expected behavior

Dialog should open as it is stated in documentation.

Current behavior

Dialog does not open and the error is reported.

Steps to reproduce

  1. Call the displayDialogAsync API in Outlook on the Web

Provide additional details

The error suggests that there is an error in manifest file, but we didn't make any changes there recently and dialog opens fine on Outlook Desktop for the same addin manifest. Also, the issue is present on local dev environment so everything is hosted on localhost so the domains politics should not be violated. Considering this, we assume that the issue is not related to manifest being invalid.

exextoc commented 11 months ago

Is the displayInIframe value true or false when the api is called

Suntechnick commented 11 months ago

It's true

P.S. Don't know if it may help, but this issue is not consistent. I personally encountered it last Friday, but it stopped happening this week for me. At the same time, my coworker still consistently facing this issue for more than a week now.

Suntechnick commented 10 months ago

Are there any updates regarding this issue? As of now, it is consistently occurring for some members of our team.

AyushJ09 commented 10 months ago

I am facing the same issue. displayDialogAsync API throwing an error when called from Web Outlook. Calling displayDialogAsync API returns strange response due to which it is difficult to understand and fix the issue. In result of that Dialog does not open in Web Outlook. for me displayInIframe value is true.

273151210-a4bcf240-407e-4852-a8cb-6fd816c76820

AyushJ09 commented 10 months ago

No information provided in release notes if there are any changes in OfficeJs library. API suddenly stopped working with some strange error.

bfritscher commented 3 weeks ago

This seems to b similar to this issue https://github.com/OfficeDev/office-js/issues/3337 I have the same problem. Using the new unifed manifest does not work as there is no appdomains settings and setting the validDomains settings does not fix the problem. However using the old xml manifest and setting appdomain works.