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.
Example web part configuration that will lead to this bug:
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
led me to find the error, but nowhere does SharePoint Web part development mention that this is an issue.
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...