Skip to content

Excel Desktop crashes when closing authentication dialog opened via displayDialogAsync (works on Web and Mac) #6356

@valse

Description

@valse

Provide required information needed to triage your issue

Your Environment

  • Platform [PC desktop, Mac, iOS, Office on the web]: PC desktop
  • Host [Excel, Word, PowerPoint, etc.]: Excel
  • Office version number: **Microsoft® Excel® for Microsoft 365 MSO (Version 2509 Build 16.0.19231.20246) 64-bit **
  • Operating System: Windows 11
  • Browser (if using Office on the web): Edge

Expected behavior

Closing an authentication dialog opened via Office.context.ui.displayDialogAsync should close cleanly and allow the add-in to continue functioning normally.

Current behavior

On Excel for Windows desktop, when the authentication dialog sends a message back to the host and the add-in calls dialog.close() inside the DialogMessageReceived callback, Excel crashes completely.

This issue does not occur in:

  • Excel on the web
  • Excel for Mac

If the dialog is not closed, Excel does not crash, but the authentication flow cannot properly complete.
The behavior started a few days ago and appears to be related to a possible update in the office.js CDN, because older and newer versions of our add-in now show the same issue despite no code changes on our side.

Steps to reproduce

  1. Call Office.context.ui.displayDialogAsync to open an authentication dialog.
  2. Perform authentication in the dialog and post a message back to the add-in.
  3. In the dialog message callback (DialogMessageReceived), invoke dialog.close().
  4. Excel for Windows desktop crashes immediately.

Provide additional details

  1. The same authentication and dialog-handling code has been stable for a long time.
  2. The crash began occurring without any updates to our add-in.
  3. The crash is 100% reproducible on Windows desktop.
  4. It happens when the local Wef folder cache is cleared

Context

This issue prevents users on Windows desktop from completing authentication (OAuth/Azure AD), effectively making the add-in unusable for them. We cannot release updates or provide a workaround until this regression is fixed.

Thank you for taking the time to review this issue. Our add-in is currently blocked on Windows desktop due to this regression.

Metadata

Metadata

Assignees

Labels

Status: under investigationIssue is being investigatedregressionFunctionality that previously worked no longer works

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions