Open st1992 opened 11 months ago
I have the same issue
Want to add a bit of context about this issue.
I found that when I call Office.context.ui.displayDialogAsync
in Safari and try to open completely empty pop-up window it works.
Once I added to completely empty pop-up window, the pop-up window immediately closes w/o any errors.
My event handler receives next payload:
{type: "dialogEventReceived", error: 12006}
So it seems like user closed the popup window which is not the case.
Hope you could help us with this issue.
P.s. Chrome works fine.
Found this line of code in a office.js script
if(c.hostPlatform=="web"&&c.isDialog&&window==window.top&&window.opener==b){window.open(f,"_self",f);window.close()}
Seems like trick with window.open(f,"_self",f);window.close()
doesn't work in Safari anymore
I have this issue too, set displayInIframe
to false then opened the dialog on Safari I got the event handler receives: {type: "dialogEventReceived", error: 12006}
.
Worked well on Chrome and Outlook for Mac.
@Howard-Song I'm using the same scenario. I'm using dialog API to display authentication dialog which won't work if I set displayInIframe = true
I am having the same issue.
Tried removing the window.close()
from the comment that @iliapir2 was showing (by downloading the office.js file and hosting is myself, includes the needed dependencies (like outlook-web-16.xx)), but that did not work either.
displayInIframe = true
does not work in our case, because we are doing authentication in the dialog (which does not allow iframing).
Did anyone already find a workaround/solution for this?
@st1992 We tried to repro on Safari Version 17.1 (18616.2.9.11.10, 18616). Office.context.ui.messageParent from DisplayDialog works properly. Can you share the hosted addin manifest or a video of the repro depicting the issue.
I am still having the problem. Can it be related to MO688912? I received a notification about this in the Microsoft Admin Center and I think this is related, because we experience this issue with SSO on Apple devices.
I am having this problem as well in Safari 17.1.
We can't use the dialog api in safari 17.0 as it immediately closes. Is there a list of supported browsers for office-js?
Thanks for reporting this issue. It has been put on our backlog. We unfortunately have no timelines to share at this point.
Internal tracking id: Office: [4044225]
There are 2 issues reported here:
@exextoc This issue is still reproducible in Safari 17.1 for us.
@exextoc the customers are not able to log in with our add-in and this has been raised as an issue even with the latest version of safari.
@exextoc we are also able to see the same issue on Safari 17.1v posting the snippet that we are using below..... we observed that Office.context is undefined in safari alone
Kindly please revert
if (Office && Office.onReady) {
Office.onReady().then(function() {
if (Office && Office.context && Office.context.ui) {
Office.context.ui.messageParent(code);
}
});
}
Is the issue repro only on Safari, or also on other browsers (chrome/edge)?
@ajays-msft only on Safari. works well on Chrome/Edge and FF as well.
Thank you for the confirmation. We added this to backlog and investigating. Internal tracking id: Office: [4044225]
There are 2 issues reported here:
- Office.context.ui.messageParent not working on Safari. - This is not reproducible on Safari 17.1. If this still reproduces for you, please share a sample script or a manifest for add-in.
- Non-Iframe Displaydialog closes abruptly on Safari 17.1 - This has been added to our backlog and we will update when there is a fix available. We unfortunately have no timelines to share at this point.Internal tracking id: Office: [4044225]
I created a sample add-in to demonstrate both issues. For issue 1, I was able to reproduce the issue by changing the URL with history.pushState
before loading the Office JS, which is what our SPA does for routing from the login page to the OAuth authorize page.
Here's the manifest to try it out: https://celadon-donut-33ac18.netlify.app/manifest.xml
Our add-in submission was rejected today due to these issues.
We also experience this behavior – only on Safari, as reported before.
Another potentially helpful finding is that disabling Cross-Origin-Opener-Policy headers in Safari makes everything work again. This is, of course, no vital solution in production, but might be helpful for fixing the root cause.
So for now @exextoc we will write message to our clients in login dialog that login will not work because of bug on Microsoft Office Online side
Same issue, any Dialog windows that are launched appear to open and then immediately close. The Add-In logs:
[Info] ~8:36:27 AM; Step1View FloorPlanDialogCallback (taskpane.7fb3cc675b033146f1d0.js, line 2)
succeeded
[Info] ~8:36:28 AM; Step1View FloorPlanDialogEventHandler (taskpane.7fb3cc675b033146f1d0.js, line 2)
Dialog window closed
These log messages happen when args.error == 12006
Same issue is still present for us in safari 17.2.1 - same error and behavior as the others in this thread. Chrome, firefox and edge all work as epected without issue. Currently this is not an issue as non of our clients use safari, but will become an issue if Outlook desktop for Mac updates to use safari 17.x under the hood then all of our mac clients will be locked out
Hey @st1992
The issue has been fixed and deployed. Please let us know if it's still a repro.
Just asking here before creating my own ticket since a lot of people in this thread is possibly using the dialog in this way. This has been working before but at the moment I cannot get it to work in any browser.
To start the Oauth flow, I open a dialog with displayDialogAsync
(not iframe, real popup window).
To really showcase the error I open my own domain first and then after 3 seconds redirect to the real page.
The moment I redirect my original app gets an event from the popup window {"type":"dialogEventReceived","error":12006}
and after that the communication between the windows are broken, the original app gets no more messages or events.
Feel free to test this for yourself by installing our test environment app https://testbed-office-addin.scrive.com/public/manifest-testbed.xml and clicking "Login"
Found that Office.context is an empty object on Safari 16.2, even though we are using it after Office.onReady(). Due to this behaviour, from Dialog, when we send an auth token to taskpane using Office.context.ui.messageParent, it is undefined Also, (might be related) In the dialog box opened by using Office.context.ui.displayDialogAsync, We are getting this warning Warning: Office.js is loaded outside of Office client you can see this in the screenshot below as well.
Environment
Steps to Reproduce (On Safari 16.2)