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

In Excel Client windows, error Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'getFields'). This just started happening today. #4180

Open jimbarrett33 opened 9 months ago

jimbarrett33 commented 9 months ago

Starting today, an error occurs when office.js loads in Excel client when the add-in loads in the task pane.

image

This is the line of code: , k = oteljs.Contracts.Office.System.SDX.getFields("SDX", i)

I don't think it occurs on the web. I noticed it started happening today with my add-in but I created a new simple add-in using Visual Studio Create Project template and it occurs there too.

It doesn't appear to impact the add-in successfully continuing to run/function but I haven't done a lot of testing around this.

Your Environment

Expected behavior

There should not be an error in the console on startup. It seems as though, office.js is calling something on load that isn't created yet.

Current behavior

As detailed above.

Steps to reproduce

  1. In Visual Studio 2022, create a new Excel Add-in using the "create project" template
  2. Run the project
  3. When the add-in loads in the Excel client, right-click and "Inspect" with the debug tool
  4. Notice the error in the console window.

Context

I have a subscription-based add-in in AppSource and I want to make sure it continues to function correctly for my customers.

Useful logs

junmt commented 9 months ago

When starting the add-in in Excel 2019, other scripts stop working due to this error and the add-in cannot be used.

xai-msft commented 9 months ago

Hi @jimbarrett33 and @junmt ,

Thank you for reporting the issue. We are currently investigating it.

xai-msft commented 9 months ago

@junmt Could you please let us know which add-in you are using? Have you been using them normally on Excel 2019 in the past?

junmt commented 9 months ago

@xai-msft Thank you for checking. The add-in I'm using is "F-RevoCRM Data Connector". In Excel 2019, the '始める' button cannot be clicked.

manaunl commented 9 months ago

For Outlook add-in we experience the same issue

zhenhuangMSFT commented 9 months ago

@exextoc please note this issue

bnayak-conga commented 9 months ago

For word add-in also we are facing same issue

xai-msft commented 9 months ago

For the 'getField' issue, we are working on a fix. Internal tracking number: 8784639

xai-msft commented 9 months ago

@junmt For the "F-RevoCRM Data Connector", since the taskpane is normally loaded, and just that the button '始める' is unclickable, it might be an issue with this specific add-in. Please consider reach out to add-in's developer/technical support to report the issue.

bnayak-conga commented 9 months ago

Any ETA for this?

Thanks, Bhagya Nayak

Increase revenue lifecycle certainty Leave a review |Support|Twitter| LinkedIn From: xai-msft @.> Sent: Tuesday, February 27, 2024 5:02 PM To: OfficeDev/office-js @.> Cc: Bhagya Nayak @.>; Comment @.> Subject: Re: [OfficeDev/office-js] In Excel Client windows, error Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'getFields'). This just started happening today. (Issue #4180)

For the 'getField' issue, we are working on a fix. Internal tracking number: 8784639

- Reply to this email directly, view it on GitHubhttps://github.com/OfficeDev/office-js/issues/4180#issuecomment-1966348230, or unsubscribehttps://github.com/notifications/unsubscribe-auth/APDLEKD6X3Z2WKH2VWBF6C3YVW73BAVCNFSM6AAAAABD3HBT3SVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSNRWGM2DQMRTGA. You are receiving this because you commented.Message ID: @.**@.>>

deepak-spotdraft commented 9 months ago

Is there a way to circumvent this issue? We are facing a production outage because of this

deepak-spotdraft commented 9 months ago

Just this error, which has started coming up.. The plugin just won't load

zhenhuangMSFT commented 9 months ago

Hi @deepak-spotdraft, thanks for providing extra details. Does it happen only on Excel 2019 or also on Office of new versions?

deepak-spotdraft commented 9 months ago

Hi @zhenhuangMSFT , I should have clarified, ours is a Word Addin, using Office js,

main.3527fa813b6722f8.js:1 Unhandled Promise rejection: Cannot read properties of undefined (reading 'getFields') ; Zone: <root> ; Task: Promise.then ; Value: TypeError: Cannot read properties of undefined (reading 'getFields')
    at b.create (office.js:76:16542)
    at a (office.js:76:17631)
    at office.js:76:17762
    at v.invoke (polyfills.6724dd477cea35b3.js:1:6563)
    at M.run (polyfills.6724dd477cea35b3.js:1:1959)
    at polyfills.6724dd477cea35b3.js:1:16760
    at v.invokeTask (polyfills.6724dd477cea35b3.js:1:7181)
    at M.runTask (polyfills.6724dd477cea35b3.js:1:2576)
    at _ (polyfills.6724dd477cea35b3.js:1:9198) TypeError: Cannot read properties of undefined (reading 'getFields')
willehpeh commented 9 months ago

I suspect I have a similar issue, developing an Excel addin that has had no issues previously:

TypeError: undefined is not an object (evaluating 'oteljs.Contracts.Office.System.SDX.getFields')

bchenhs commented 9 months ago

Hi @exextoc @zhenhuangMSFT We are seeing the exact same error undefined is not an object (evaluating 'oteljs.Contracts.Office.System.SDX.getFields') on our Outlook add-in. This appears to affect our users on Outlook for Mac. It started at around Feb 26 11 PM UTC.

zhenhuangMSFT commented 9 months ago

Hi @deepak-spotdraft, could you share the repro steps? Which version of Office are you on? what add-in are you using? That could help us better investigate. Thanks!

willehpeh commented 9 months ago

@zhenhuangMSFT has this JS file been updated in the past 24-48 hours?

https://appsforoffice.microsoft.com/lib/1/hosted/office.js

janbensch commented 9 months ago

Same issue is now appearing in our Outlook-Add-In project, which is still in development. Cleared browser and Outlook Cache about 10 Minutes ago. Before then, everything worked fine.

Environment:

milannakum commented 9 months ago

The error is also there for Office 2019 Powerpoint.

bebe0806 commented 9 months ago

Confirmed Outlook on WEB:

office.js:76 Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'getFields') at b.create (office.js:76:16542) at a (office.js:76:17631) at office.js:76:17762

zhenhuangMSFT commented 9 months ago

Thank all for reporting the issue! This is a potential regression with the latest released office.js. We are working on the fix. Will update here if any news. Thanks again!

aplahore4 commented 9 months ago

issue Hi @exextoc @zhenhuangMSFT I am facing following two issues along with the stated by every one

  1. Access to fetch at 'https://excel-telemetry.officeapps.live.com/xt/RemoteUls.ashx?waccluster=PSG3&officeserverversion=16.0.17424.42305&usid=1ea3ae8d-2cc3-47b3-8d52-396251da0320' from origin 'https://excel.officeapps.live.com' has been blocked by CORS policy: Request header field x-nouls is not allowed by Access-Control-Allow-Headers in preflight response.

  2. EwaTS.js:3441 POST https://excel-telemetry.officeapps.live.com/xt/RemoteUls.ashx?waccluster=PSG3&officeserverversion=16.0.17424.42305&usid=1ea3ae8d-2cc3-47b3-8d52-396251da0320 net::ERR_FAILED

wtravO commented 9 months ago

Is there a way to circumvent this issue? We are facing a production outage because of this

Also facing a production outage because of this.

willehpeh commented 9 months ago

Can you roll back to the previous version of office.js in the meantime?

ADearingIntlFarming commented 9 months ago

Is there a way to circumvent this issue? We are facing a production outage because of this

Also facing a production outage because of this.

Same, tagging for updates

billzeman commented 9 months ago

We see this also. possibly related to the changes that cause this IE11 issue: https://github.com/OfficeDev/office-js/issues/4181 is there an archive anywhere of the previous version so we can get our customers working again?

daviddykstrajambo commented 9 months ago

We are also having this issue with our Outlook add-in. However we are only having the problem in the New Outlook on Windows, and on the web. Also on Mac.

zacfarnsworth commented 9 months ago

Hi everyone, so sorry about the issues you are facing! We have initiated a rollback of this update to office-js. It is in progress and I will update this page when it has completely rolled back.

zacfarnsworth commented 9 months ago

We completed the rollback to a stable version late last night. Please let me know if issues persist.

baymatstech commented 9 months ago

Thank you @zacfarnsworth - Working here again

aplahore4 commented 9 months ago

@zacfarnsworth Mine started working thanks!

jimbarrett33 commented 9 months ago

@zacfarnsworth all good here too. Thank you!

Could you give us a heads up on the next attempt to deploy that code so we can watch out?

Or is this a place/blog we can monitor with updates to office-js?

bebe0806 commented 9 months ago

Would be nice if you could update also the npm package.