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

Recently getting error on Microsoft Partner that Excel Add-in is not compatible but still works on Excel Web #5002

Open nkjha-epi opened 1 month ago

nkjha-epi commented 1 month ago

Summary:

The Excel Addin Risk Adjustment Toolkit does not seem to be working properly on Windows as well as MacOS Excel Desktop application since around 2 Months but it works on the Web. Configured some CORS policies, the CORS errors did not appear on the web since then but unsure about the error in the desktop version of the Excel app.

Your Environment

Expected behavior

The Addin should work properly on Windows as well as MacOS applications. I can't even see any relevant errors in my Cloudfront distribution from where the Add-in is hosted.

Current behavior

  1. Currently, when trying to publish the Addin, I see these errors frequently: image image Not sure as to what can be done, as I see there is already WebView2 installed on the Windows system on which I'm trying to use this app.

Steps to reproduce

  1. Go to the Link to Risk Adjustment Toolkit
  2. Try to install it.
  3. It will show this error: On Windows Excel App: Add-In+error-1 On MacOS the Taskpane doesn't even load and at the bottom I see: image

Provide additional details

  1. I have tried resolving the CORS issues, but this error on the Partner account has started recently, less than a month ago.
  2. I tried purging the cache from Cloudfront so as to avoid getting 304 error codes.
  3. The S3 policies were reviewed n number of times, have added * in AllowedHeaders as well as AllowedMethods.
  4. Added a new policy for the CORS to let the origins: https://*.microsoft.com https://*.office.com https://*.office365.com https://localhost https://excel.officeapps.live.com https://excel.office.com https://usc-excel.officeapps.live.com

Context

The Excel Add-in has been down in production since 2 months and it's affecting the reliability of this add-in for the majority of the users.

Useful logs

E2TA6KCZKB1HSN.2024-10-25-11.bb2ba305.gz E2TA6KCZKB1HSN.2024-10-25-11.769c2390.gz E2TA6KCZKB1HSN.2024-10-25-11.a002c845.gz E2TA6KCZKB1HSN.2024-10-25-10.86d5cb4d.gz E2TA6KCZKB1HSN.2024-10-25-10.8e644dcf.gz

RuizhiSunMS commented 3 weeks ago

ACK. Thx for your submit. Here I want to confirm something, please correct me if wrong:

  1. suppose you are the developers of this addin?
  2. if you are, the attached two imgs mean you also encountered blocks in publishing?
  3. no valuable error msg when failing to load addin on both Windows and Mac.
  4. the addin works well on Web, both loading and functionalities are good? (the TaskPane showed 403 on web at my side)
  5. would you please share your user numbers?
nkjha-epi commented 3 weeks ago

ACK. Thx for your submit. Here I want to confirm something, please correct me if wrong:

  1. suppose you are the developers of this addin?
  2. if you are, the attached two imgs mean you also encountered blocks in publishing?
  3. no valuable error msg when failing to load addin on both Windows and Mac.
  4. the addin works well on Web, both loading and functionalities are good.
  5. would you please share your user numbers?

Hi @RuizhiSunMS, thanks for reverting back. I'll provide you the answers to your queries...

  1. Yes I'm the developer of this Addin.
  2. Yes I faced issues earlier in publishing.
  3. I have attached the Cloudfront log files in the end of the description, did it not help though?
  4. Yeah the Add-in works well on the Web, and I didn't encounter 403 (CORS errors) on the web, can you please confirm whether even after that you were able to use the Add-in or not? Did the functions.js file load properly?
  5. The User count from the Microsoft Partner center's Insights? If yes, then the active devices are 8-10 and the geographical distribution of sessions has 110 in India, ~45 in US.
nkjha-epi commented 3 weeks ago

ACK. Thx for your submit. Here I want to confirm something, please correct me if wrong:

  1. suppose you are the developers of this addin?
  2. if you are, the attached two imgs mean you also encountered blocks in publishing?
  3. no valuable error msg when failing to load addin on both Windows and Mac.
  4. the addin works well on Web, both loading and functionalities are good.
  5. would you please share your user numbers?

Hi @RuizhiSunMS, thanks for reverting back. I'll provide you the answers to your queries...

  1. Yes I'm the developer of this Addin.
  2. Yes I faced issues earlier in publishing.
  3. I have attached the Cloudfront log files in the end of the description, did it not help though?
  4. Yeah the Add-in works well on the Web, and I didn't encounter 403 (CORS errors) on the web, can you please confirm whether even after that you were able to use the Add-in or not? Did the functions.js file load properly?
  5. The User count from the Microsoft Partner center's Insights? If yes, then the active devices are 8-10 and the geographical distribution of sessions has 110 in India, ~45 in US.

Another update: I think the build file size of functions.js file is also a huge consideration. It increased to ~54MB which seems to be very high. I tried reducing it by removing some of the unused data etc. and got it reduced to ~31MB and now it was able to load through Manifest upload in the MacOS Excel Application though, which earlier it could not. I have initiated the Publish with this update on Microsoft Partner center, the working of the Add-in on MacOS Excel will be verified once it gets published successfully.

RuizhiSunMS commented 3 weeks ago

hi @nkjha-epi. After some efforts, finally I got a mac to have a try. The addin didn't work on Mac. In fact, none of web, win32 client and mac client work here. I tried on about 4-5 devices. Mac's appearance (as well as error msg) was like what it was on web, which showing 403. You mean this 403 is not an apart of CORS problems? image

Q: I have attached the Cloudfront log files in the end of the description, did it not help though? A: I downloaded those 5 files but only found 0-size files. Is this correct? if yes, how to open such file?

nkjha-epi commented 3 weeks ago

Hi @RuizhiSunMS, not sure as to why the Add-in failed on your Mac on all platforms. Just wanna make sure you used versions from the following list:

Q/A: It's they are compressed files I believe, you can try opening them in VS Code. If still not working, I'll try to upload them in G Drive in a different format and attach a Link here.

Update: I have just updated the Add-in on Microsoft Partner with the reduced bundle size. Can you reconfirm if it's working on Mac or not? I have purged the cache as well from Cloudfront where it's hosted. I can see it's working on some systems but not on mine.

nkjha-epi commented 3 weeks ago

Hi @RuizhiSunMS , can you please confirm and let me know if there are any file size limits on Microsot Excel App? Now that the MacOS issue is resolved, I see weird behaviour of my Add-in, some of the functions are working while some are not, and when I try to find the functions file - functions.js, I can't see it in the Sources. (You can see it in the attached video.)

In the Microsoft Partner Center I see the below issues: image But I am running on Excel version greater than the mentioned one and it even has WebView2 installed on the system which I have confirmed. image

https://github.com/user-attachments/assets/8c5dda58-762d-44b8-8bd1-926d064376c7

RuizhiSunMS commented 3 weeks ago

Hi @nkjha-epi , thx for the information you shared.

  1. Now I can open the log file and will try to find something. If you have anyone you suspect, please share as well.
  2. web and win32 client still failed to load the Addin. I still got 403 on the web. Sorry but I can only try Mac tomorrow.
  3. Excel on the web, Excel on Mac (Microsoft 365), Excel on Windows (Microsoft 365) are covered.
  4. "if there are any file size limits on Microsot Excel App?" I'll let you know if any confirmation.

Based on your video, could I understand it as:

  1. in the past, you often encountered issues in publishing. Now there is no publishment issues after you reduced the size of that .js?
  2. win32 still can't load Addin while the web and Mac are ok on your side?
nkjha-epi commented 3 weeks ago

Hi @nkjha-epi , thx for the information you shared.

  1. Now I can open the log file and will try to find something. If you have anyone you suspect, please share as well.
  2. web and win32 client still failed to load the Addin. I still got 403 on the web. Sorry but I can only try Mac tomorrow.
  3. Excel on the web, Excel on Mac (Microsoft 365), Excel on Windows (Microsoft 365) are covered.
  4. "if there are any file size limits on Microsot Excel App?" I'll let you know if any confirmation.

Based on your video, could I understand it as:

  1. in the past, you often encountered issues in publishing. Now there is no publishment issues after you reduced the size of that .js?
  2. win32 still can't load Addin while the web and Mac are ok on your side?

Hi @RuizhiSunMS ,

  1. As of now I see these log patterns only, but I'll share the logs when the Add-in is loaded in a Windows Excel app. E2TA6KCZKB1HSN.2024-10-30-07.fd0a28fa.gz

  2. Sure, please try on Mac and lmk.

  3. By "covered", do you mean Web, Mac and Windows, you tested and they were working fine? (I assume you already did try on Mac?)

  4. Sure, please do, thank you.

Video based queries:

  1. There are still these 2 warnings that I attached with my last comment, doesn't stop the Addin from getting published though.
  2. Yes after the reduced build file size publish, the Addin is working on my MacOS' Excel App but this weird behaviour in Windows that is mentioned in the video: 80-90% functions aren't working, but that still confuses me as the functions.js is not getting fetched from the server/Cloudfront then how can even 10-20% of functions work? I had invalidated the cache as well from Cloudfront.
RuizhiSunMS commented 3 weeks ago

Hi @nkjha-epi. The addin couldn't be installed on any of our devices, no matter win32, web or mac. My colleague did a quick check with console and found no resources were downloaded. My colleague suspected there could be something wrong with your service. Would you please make a double check or let some devices outside your development env take a try? Anyway, looks your case is rather than API cause. I'll involve another team in.

nkjha-epi commented 3 weeks ago

Hi @nkjha-epi. The addin couldn't be installed on any of our devices, no matter win32, web or mac. My colleague did a quick check with console and found no resources were downloaded. My colleague suspected there could be something wrong with your service. Would you please make a double check or let some devices outside your development env take a try? Anyway, looks your case is rather than API cause. I'll involve another team in.

Hi @RuizhiSunMS Yes I tried it outside my development environment/system and even tried reinstalling Excel on my development MacOS machine, it worked then but on Windows, as I mentioned, 90% of the functions are not working but some of them are. But I'm still not sure as to why this is happening if the file functions.js hasn't been downloaded into the App's runtime.

Please inform if you find some useful information on this. Thank you

RuizhiSunMS commented 2 weeks ago

@nkjha-epi, I've reached out to folks who are experts in Store and Installation. Will update here if they find anything.

nkjha-epi commented 2 weeks ago

Hi @RuizhiSunMS, thank you! If possible you can add those experts in this conversation as well? If that's an option...

nkjha-epi commented 1 week ago

Hi @RuizhiSunMS , did you find anything from your team?