Sp-dev-docs: 馃悶 Syncing Web parts with too long names to Teams fails silently (or not verbose enough) with a 400 bad request

Created on 16 Jan 2020  路  3Comments  路  Source: SharePoint/sp-dev-docs

Category

  • [ ] Question
  • [ ] Typo
  • [x] 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.

spfx-msteams bug-confirmed

All 3 comments

Thank you for reporting this issue. We will be triaging your incoming issue as soon as possible.

Interesting find... not sure if I'd call this a bug as a SharePoint web part can have a name that's longer than 30 characters. The Teams manifest file is created dynamically if it's not present when you hit Sync to Teams.

It would be nice if when Sync to Teams fails, it would provide more detail (long-running request).

The JSON schema for the web part manifest could include this as some guidance though... I'll raise this with engineering to see what they say...

Following up... eng aware...

Was this page helpful?
0 / 5 - 0 ratings

Related issues

ken-harris picture ken-harris  路  3Comments

mikeparkie picture mikeparkie  路  3Comments

acksoft picture acksoft  路  3Comments

StfBauer picture StfBauer  路  3Comments

byrongits picture byrongits  路  3Comments