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
690 stars 95 forks source link

Certain files do not work in Excel Online due to WEF reference ID attribute's case-sensitivity #5110

Closed wh1t3cAt1k closed 1 week ago

wh1t3cAt1k commented 1 week ago

Summary

Upon opening of the following file, await Office.addin.setStartupBehavior(Office.StartupBehavior.load); or any Excel.run(...) calls hang indefinitely during our add-in's start-up sequence so it cannot initialise.

Sage Intacct Demo GM Fixed.xlsx

Session ID: 035bc6eb-68f2-2001-b9d2-b2f9d9092f3a

There are no suspicious errors in the console so it's impossible to understand what went wrong.

The issue replicates only on a subset of files, so it might be because of an internal metadata issue.

UPD: this is confirmed, see below

image

Your Environment

Expected behavior

The file to open and the add-in to start without any problems.

Current behavior

The add-in cannot interact with the Excel API because it simply hangs.

Steps to reproduce

  1. Install the Velixo NX add-in from the AppSource.
  2. Try to open the attached file and click the ribbon button.

Velixo internal tracking item

microsoft-github-policy-service[bot] commented 1 week ago

Thank you for letting us know about this issue. We will take a look shortly. Thanks.

wh1t3cAt1k commented 1 week ago
image

Note that there are two reference IDs in webextension1.xml inside the file structure. They differ only by case and by store value.

Does anything here looks unexpected and suspicious? I can guarantee that this file has not been manually tampered with but it was opened on both Excel Online and Excel for Mac.

Also, this file works just fine on Excel for Mac so it is an Excel Online-specific issue.

wh1t3cAt1k commented 1 week ago

Once I manually convert the reference ID to uppercase (I suspect I didn't even have to remove the alternate references):

image

The file opens without any problems.

Guys, this seems like an easy fix to handle on the Excel's side? You could either

  1. Auto-correct the reference ID in the file? OR
  2. Not touch the file but do a .toUpper() on any reference ID encountered when processing web extension references?

I think that manually fixing the files is not a good option here and I'd rather have an in-product fix.

wh1t3cAt1k commented 1 week ago

In conclusion, I think this is the same as #3993, just a new instance of the same issue... Maybe a fix could be expedited?

wh1t3cAt1k commented 1 week ago

Duplicate of #3993

guoms1 commented 1 week ago

Hi, wh1t3cAt1k

Thank you very much for reporting this issue.

Since it is the same as issue 3993, and 3993 contains more detailed information, I will continue to follow up on this matter there.