Skip to content

🐞 Syncing Web parts with too long names to Teams fails silently (or not verbose enough) with a 400 bad request #5148

@MortenGuldbaek

Description

@MortenGuldbaek

Category

  • Question
  • Typo
  • Bug
  • Additional article idea

Expected or Desired Behavior

  1. Building a SharePoint Framework package containing multiple web parts (no other types of components).
  2. One or more web parts have a 'long' name.
  3. Building, bundling, packaging and uploading to Tenant app catalog as we have done 1000 times before.
  4. Clicking 'yes' to tenant wide deployment.
  5. Hitting 'Sync to Teams' button in Ribbon menu.
  6. Seeing a small notification that the package was synced successfully.
  7. Web parts should now be available in the associated Team.

Observed Behavior

Following all the above steps from 1 to 4 works a charm, but when performing step 5, the following happens:

The network panel in Chrome's web developer tools show the request as returning a 400 (Bad request) with no explanation whatsoever.

I found out (after way too much investigation and testing) that the culprit is the Web part manifests which have a preconfiguredEntries[].title.default that is over 30 chars in length.

Steps to Reproduce

Example web part configuration that will lead to this bug:
image

Improvement or bugfix

Could we get a more verbose message than 400 Bad request? I am hoping that others can save some time by me submitting this, as the documentation is not very specific from the SharePoint side that this is a requirement. Either this or notice it in the Web part documentation or in the schema file: https://developer.microsoft.com/json-schemas/spfx/client-side-web-part-manifest.schema.json

The following documentation for creating Teams manifests for Web parts manually
image
led me to find the error, but nowhere does SharePoint Web part development mention that this is an issue.

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:spfxCategory: SharePoint Framework (not extensions related)type:bug-confirmedConfirmed bug, not working as designed / expected.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions