TypeError: Cannot read property 'name' of undefined, at Array.forEach

Viewed 2305

When I press the button to display the task pane, I am seeing the following error message in the console window which I cannot remove or explain ?

"Uncaught (in promise) TypeError: Cannot read property 'name' of undefined"
at t (word-web-16.00.js:26)
at word-web-16.00.js:26
at Office.js:46
at Array.forEach ()
at d (Office.js:46)
at Office.js:46

enter image description here

Steps to Reproduce - Side load the TypeScript add-in into Word Online and press the Button to display the task pane.

The task pane is displayed but why is this error message appearing.

This error message might have always been there, not sure. I have tried all the following URLs and the message is consist.

src="appsforoffice.microsoft.com/lib/beta/hosted/Office.js"
src="appsforoffice.microsoft.com/lib/1/hosted/Office.js"
src="appsforoffice.microsoft.com/lib/1.1/hosted/Office.js"

This appears in Word Online Windows 10 64 bit and Office 64 bit Browser - Microsoft Edge, Version 88.0.705.68 (Official build) (64-bit)

The following repository contains the project (only 5 files): https://github.com/OfficeAddins/undefined

This issue was logged on github but no-one has replied yet: https://github.com/OfficeDev/office-js/issues/1644

1 Answers

Can you try using this using lowercase o when referencing the office.js url - src="appsforoffice.microsoft.com/lib/beta/hosted/office.js"

This could be due to a case sensitive string comparison bug, which we will fix. You should be able to workaround it by using the lowercase office.js.

Related