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
687 stars 94 forks source link

Loading custom functions on macOS fails consistently every 2nd time #4918

Closed fzumstein closed 1 month ago

fzumstein commented 1 month ago

Your Environment

Expected behavior

Sideloading the manifest.xml doesn't fail with Error installing functions in the taskbar.

Current behavior

Every 2nd time that I load the manifest.xml via sideloading, it fails with Error installing functions in the taskbar and custom functions return a #NAME? error.

Steps to reproduce

  1. Download manifest from https://xlwings-server.onrender.com/manifest and sideload it. You probably get the error.
  2. Quit Excel completely and restart
  3. sideload the manifest again, you won't get the issue and you can click on "Insert custom functions" in the taskpane and everything will work.
  4. Repeat the steps again and you'll see it'll fail every 2nd time.

Useful logs

These are the debug logs. They differ slightly when it works vs when it fails: fails.log works.log

shanshanzheng-dev commented 1 month ago

Hi @fzumstein Thanks for reporting this issue, I'm trying to repro but not. It always load successfully. image could you share us the repro video? Thanks

fzumstein commented 1 month ago

Sorry about the delay, I didn't get a notification for whatever reason. You're right, I can't repro the issue anymore with the hosted URL/manifest. However, it still repros on localhost. See video: https://www.loom.com/share/63be407bbdd840cc909ddfc31903dc81?sid=a2b05f6d-53bd-40de-b9c4-618825e276ee

If you want to repro this locally, you can follow the docs here (various options, like docker compose or GH codespaces): https://server.xlwings.org/en/latest/quickstart/ You can use noncommercial as license key.

fzumstein commented 1 month ago

I currently can't repro this anymore locally. I did a few things in the meantime, so possible candidate for fixing this are:

My bet is on the first one.