Skip to content

SPFx Copilot Component generated with 1.24.0-beta.2 works in Copilot Component Workbench but fails in Agent Catalog with "Cannot read properties of undefined (reading 'map')" #10948

Description

@ejazhussain

Target SharePoint environment

SharePoint Online

What SharePoint development model, framework, SDK or API is this about?

💥 SharePoint Framework

Developer environment

Windows

What browser(s) / client(s) have you tested

  • 💥 Internet Explorer
  • 💥 Microsoft Edge
  • 💥 Google Chrome
  • 💥 FireFox
  • 💥 Safari
  • mobile (iOS/iPadOS)
  • mobile (Android)
  • not applicable
  • other (enter in the "Additional environment details" area below)

Additional environment details

SPFx Version: 1.24.0-beta.2
Generator Version: @microsoft/generator-sharepoint@1.24.0-beta.2

Browser:
Microsoft Edge (latest)

Environment:
SharePoint Online
Microsoft 365 Copilot
Agent Catalog

Component Type:
SPFx Copilot Component

Sample:
HelloWorldCopilotComponent generated from Yeoman generator

Describe the bug / error

I created a new SPFx Copilot Component using the SharePoint Framework Yeoman generator version 1.24.0-beta.2.

The component renders successfully inside the Copilot Component Workbench and all initialization steps appear to complete successfully.

After packaging and deploying the solution to the tenant App Catalog and making it available through the Agent Catalog, the component fails to render inside Microsoft 365 Copilot.

Instead of loading the component, Copilot displays:

Something went wrong

When clicking "Try again", the browser developer console shows:

TypeError: Cannot read properties of undefined (reading 'map')
    at I (route-shared.chatpro…chunk.js)
    at Z (route-shared.chatpro…chunk.js)
    at ...

Additional Notes

  • Component works correctly in Copilot Component Workbench.
  • Issue occurs only when running through Microsoft 365 Copilot via Agent Catalog.
  • Reproduced with a newly generated Hello World Copilot Component.
  • No custom business logic has been added.
  • Generator version: 1.24.0-beta.2.
  • Browser: Microsoft Edge (latest).
  • Tenant: Microsoft 365 Copilot enabled.

Console Error:

TypeError: Cannot read properties of undefined (reading 'map')
Image Image Image

Steps to reproduce

The issue is reproducible using a freshly generated Hello World Copilot Component with no custom code changes.

  1. Install the SharePoint Framework Yeoman generator version 1.24.0-beta.2.

    npm install -g @microsoft/generator-sharepoint@1.24.0-beta.2
  2. Create a new SPFx Copilot Component project using the generator.

  3. Generate the default Hello World Copilot Component without custom modifications.

  4. Run the project locally and verify that the component renders successfully in the Copilot Component Workbench.

  5. Bundle and package the solution.

  6. Deploy the generated .sppkg package to the SharePoint App Catalog.

  7. Make the Copilot Component available through the Agent Catalog.

  8. Open Microsoft 365 Copilot and invoke the deployed agent/component.

  9. Observe that the Copilot UI displays:

    Something went wrong
    
  10. Click Try again.

  11. Open the browser Developer Tools and observe the following error in the Console:

TypeError: Cannot read properties of undefined (reading 'map')

Expected behavior

The Copilot Component should render successfully in Microsoft 365 Copilot after deployment through the Agent Catalog, matching the behavior observed in the Copilot Component Workbench.

A newly generated Hello World Copilot Component should work without requiring additional code changes after deployment.

No JavaScript errors should occur during component initialization or rendering.

Metadata

Metadata

Labels

Type

No type

Fields

No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions