Error: Failed to retrieve the name property of an undefined value within the Array.forEach method

Upon pressing the button to display the task pane, I encountered an error message in the console window that reads: "Uncaught (in promise) TypeError: Cannot read property 'name' of undefined". This error persists and I am unable to resolve or comprehend it.

"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

https://i.sstatic.net/w41rg.png

To recreate this issue, sideload the TypeScript add-in into Word Online and press the button to show the task pane. Despite displaying the task pane successfully, the aforementioned error message persists.

I have attempted various URLs for the Office.js script files but the error message remains consistent:

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 error occurs on Word Online for Windows 10 64-bit running Office 64-bit with Microsoft Edge browser version 88.0.705.68.

The project repository, consisting of only 5 files, can be found at: https://github.com/OfficeAddins/undefined

An issue regarding this error has been raised on GitHub but remains unanswered: https://github.com/OfficeDev/office-js/issues/1644

Answer №1

Would you mind giving this a shot with lowercased "o" when mentioning the office.js URL - src="appsforoffice.microsoft.com/lib/beta/hosted/office.js"

This issue might stem from a case-sensitive string comparison glitch, which we are in the process of resolving. You can try using lowercase for office.js as a temporary solution.

Similar questions

If you have not found the answer to your question or you are interested in this topic, then look at other similar questions below or use the search

Launching a program through a web browser - a step-by-step guide

I am looking to create a specific sequence of events: A web browser opens, and a user logs in (the exact action is not crucial) The user is then redirected to a new page where another program should automatically open This process is similar to what happ ...

Building Dynamic Columns within a react.js Environment

Can anyone help me with creating a dynamic column in react.js? I've already managed to do it with static columns, but now I want to make them dynamic. Take a look at my code below and please provide suggestions. import React from 'react'; i ...

Mobile Drag and Drop with JavaScript

While experimenting with a user interface I created, I utilized jQuery UI's draggable, droppable, and sortable features. However, I observed that the drag and drop functionality does not work in mobile browsers. It seems like events are triggered diff ...

Using npm link with Webpack results in eslint errors

I have a multi-package project setup, where I have one JavaScript package that depends on a TypeScript library. Initially, I was using Sinopia and had to reinstall the TypeScript library every time I made changes to it. Then I discovered npm link and thoug ...

Guide to implementing function callbacks in Nodejs using xml2js

In my Node.js project, I am utilizing xml2js to parse XML documents. Since the XML files I need are stored remotely, I make use of a Node.js http request to fetch the XML data and then perform parsing with xml2js in the following manner: var parser = new ...

What steps should I take to implement the features I want using Node.js?

My request is as follows: I need to pass an array of IDs to a function that will perform the following tasks: Check if a document exists in MongoDB. If it does, move on to the next ID. If not, create a document with the specified ID. If all the IDs ...

What is the method for displaying script commands within package.json files?

With a multitude of repositories, each one unique in its setup, I find myself constantly referencing the package.json file to double-check the scripts. "scripts": { "start": "npm run dev" "build:dev": "N ...

Is it normal for Tailwind animation to loop twice when transitioning between pages in Next.js?

I'm currently utilizing react-hot-toast for displaying alerts and animating them during page transitions. The animation involves a double fade-in effect when transitioning between pages. In my project, I've integrated tailwindcss-animate within ...

Exploring the capabilities of indexing an array within an array in Nativescript

I am working with JSON data retrieved from an API and trying to figure out how to index an array inside an array using Nativescript. JS: cart [{ JS: "_id": "5d3988cd287bad2943686920", JS: "userid": "11E76234942299FCC13FFA163EDC2079", JS: "products": ...

Error: Attempting to access the 'getCroppedCanvas' property of an undefined value in VueJs

I've been exploring the vue-cropperjs library, but every time I execute the code, I encounter error messages: Uncaught TypeError: Cannot read property 'getCroppedCanvas' of undefined Uncaught TypeError: Cannot read property 'replace&ap ...

Tips to instantiate an object of a different JavaScript class in Node.js

Hey there! I'm having trouble creating an instance of ProfileComparator in a different JavaScript file called index.js. Can someone help me resolve this error? strategy.js var cosineUtils = require("./jscosine"); var ProfileComparator = function(al ...

What is the process for receiving updates while subscribing in ReactReduxContext.Consumer?

I am currently seeking a solution to staying updated on changes to a stored value in the Redux store by subscribing. I have attempted the following method: <ReactReduxContext.Consumer> {({store}) => { console.log('store:& ...

Encountering an issue with accessing a property in Angular's TypeScript module

I encountered an issue while trying to access a property of a static array that I created in a TypeScript class. The error message I received is as follows: ERROR TypeError: Cannot read property 'forbiddenProjectNames' of undefined Below is th ...

What is the process for including body text in a Bootstrap tooltip?

I am attempting to enhance a Bootstrap tooltip by adding body text, as it typically only includes a basic title. After reviewing the Bootstrap 5 documentation, it seems that the simplest approach is to utilize the template option: template Base HTML used ...

Tips for inputting transition properties in Material UI Popper

Currently, I am making use of material ui popper and I would like to extract the transition into a separate function as illustrated below: import React from 'react'; import { makeStyles, Theme, createStyles } from '@material-ui/core/styles& ...

Node.js setInterval is a method used to repeatedly execute a function

I have a code snippet for an http request that is supposed to run every one minute. However, I am encountering an issue with the following error: "Error: listen EADDRINUSE". Here is my current code: var express = require("express"); var app = express(); v ...

What's the best way to refactor the `await nextEvent(element, 'mousemove')` pattern in my code once it is no longer necessary?

Within my React component, the code includes the following: class MyComponent extends React.Component { // ... trackStats = false componentDidMount() { this.monitorActivity() } componentWillUnmount() { this.trackStat ...

Show a malfunction with the `show_message` function

How can I show the die() message in if($allowed) in the same location as the move_uploaded_file result? <?php $destination_path = $_SERVER['DOCUMENT_ROOT'].'/uploads/'; $allowed[] = 'image/gif'; $allowed[] = ' ...

Why is DynamoDB still not deleting the item even though the promise returns successfully?

Using the DynamoDB DocumentClient, I attempted to delete items across multiple tables using Class: AWS.DynamoDB.DocumentClient A problem arose when I tried to delete items from multiple tables using promised.all(). The operation ran without deleting the i ...

Tips for automatically choosing several choices from a multiple-select using Chosen.JS

I am struggling to programmatically select multiple values in a multiple select using chosenJS/chosen.js while still ensuring that the selected values are bound to my ng-model (angularJS). In this scenario, I have a list of users, some of whom are already ...