LiveShare SDK does not work in SPFx web part #8705
Labels
area:spfx
Category: SharePoint Framework (not extensions related)
status:working-on-it
Known issue / feature being addressed. Will use other "status:*" labels & comments for more detail.
type:bug-confirmed
Confirmed bug, not working as designed / expected.
Milestone
Target SharePoint environment
SharePoint Online
What SharePoint development model, framework, SDK or API is this about?
💥 SharePoint Framework
Developer environment
None
What browser(s) / client(s) have you tested
Additional environment details
Describe the bug / error
I was trying to use LiveShare SDK for a SPFx Teams Meeting app, which is the best actual way to create collaborative multi-user experiences without writing any dedicated back-end code or using legacy technologies, which I failed.
The SPFx initializes currently teams-js the v2.4.2. The LiveShare SDK has a hard dependency of the teams-js v2.5.0 (because of the LiveShareHost class in the teams-js v2.5.0, which is missing in the v2.4.2). I tried to install the teams-js v2.5.0 using a npm alias (I am aware that it is documented and unsupported to have multiple version of the teams-js in a SPFx solution). This has worked. I could also initialize the teams-js ( app.initialize() ) without any problem. But as soon as I initialize a LiveShare container, my web part does not load at all with the following error.
After some analysis and exchange with the LiveShare team: It looks like the way that teams-js works is pretty much incompatible with having multiple versions installed and initialized at once.
The only possible solution to that is to update the teams-js to v2.5.0 which SPFx loader loads and initializes.
The apps in the meetings should allow users to collaborate seamlessly during the meetings and calls. Without the LiveShare, the developers should either use legacy technologies or invest much time to write back-end code, if they would want to use SPFx for meeting apps. To summarize: It would not make much sense to use SPFx right now to create collaborative Teams meeting apps.
My main question is: Is there any plan to upgrade teams-js in SPFx to v2.5.0 anytime soon? @VesaJuvonen @patmill @lucabandMSFT @AJIXuMuK
Thank you all in advance!!!
Steps to reproduce
Expected behavior
It took like 1 year that we can use the meeting stage with SPFx because of the bugs in Teams and SPFx site. Because of that I am hoping and expecting that we can use LiveShare SDK in meeting apps soon (Upgrade to teams-js v2.5.0) and it would not take long like the meeting stage fix.
The text was updated successfully, but these errors were encountered: