Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🐞SPFx v1.8.1 Regression with MSFT Teams Tabs? #3826

Closed
1 of 4 tasks
andrewconnell opened this issue Apr 23, 2019 · 4 comments
Closed
1 of 4 tasks

🐞SPFx v1.8.1 Regression with MSFT Teams Tabs? #3826

andrewconnell opened this issue Apr 23, 2019 · 4 comments
Labels
area:spfx Category: SharePoint Framework (not extensions related) status:fixed-next-drop Issue planned to be fixed in an upcoming release. status:tracked Currently tracked with Microsoft’s internal issue tracking system. DO NOT ADD/REMOVE (MSFT managed) type:bug-suspected Suspected bug (not working as designed/expected). See “type:bug-confirmed” for confirmed bugs.

Comments

@andrewconnell
Copy link
Collaborator

Category

  • Question
  • Typo
  • Bug
  • Additional article idea

Expected or Desired Behavior

I believe this is a bug... as I can't find a mention of this in the release notes for 1.8.1.

In SPFx v1.8.1, when you create new SPFx project, you should be able to access the MSFT Teams context via this.context.microsoftTeams.... This worked in v1.8.0, but in 1.8.1, the microsoftTeams property is not defined.

Digging deeper, the BaseClientSideWebPart WebPartContext object appears to have changed from v1.8.0 => v1.8.1:

/* Excluded from this release type: microsoftTeams */

Whereas in SPFx 1.8.0 it was:

readonly microsoftTeams?: typeof teamsJs;

Observed Behavior

This code triggers a build error in an SPFx v1.8.1 web part project:

protected onInit(): Promise<void> {
  return new Promise<void>((resolve, reject) => {
    if (this.context.microsoftTeams) {
      this.context.microsoftTeams.getContext(context => {
        console.log('got teams context');
        resolve();
      });
    } else {
      resolve();
    }
  });
}

Steps to Reproduce

  • ensure install SPFx v1.8.1 is installed

  • create new SFPx web part

  • add the following code to the web part

    protected onInit(): Promise<void> {
      return new Promise<void>((resolve, reject) => {
        if (this.context.microsoftTeams) {
          this.context.microsoftTeams.getContext(context => {
            console.log('teams context', context);
            resolve();
          });
        } else {
          resolve();
        }
      });
    }
  • run gulp build & observe errors

  • repeat the same process above, but with SPFx v1.8.0 installed... observe it builds without error

@msft-github-bot
Copy link
Collaborator

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

@msft-github-bot msft-github-bot added the Needs: Triage 🔍 Awaiting categorization and initial review. label Apr 23, 2019
@andrewconnell andrewconnell added area:spfx Category: SharePoint Framework (not extensions related) type:bug-suspected Suspected bug (not working as designed/expected). See “type:bug-confirmed” for confirmed bugs. and removed Needs: Triage 🔍 Awaiting categorization and initial review. labels Apr 23, 2019
@patmill
Copy link
Contributor

patmill commented Apr 23, 2019

So, bit of background. The public typings generation process went squirelly when we released 1.8.0, and it was fixed for 1.8.1. However, it looks like the microsoftTeams property didn't get moved from beta -> public, so when the typings cleanup process ran, it removed it from the public typings. For now, you can work around this by including the beta packages. We will fix this in the next drop. Thanks for the heads up.

@VesaJuvonen VesaJuvonen added status:fixed-next-drop Issue planned to be fixed in an upcoming release. status:tracked Currently tracked with Microsoft’s internal issue tracking system. DO NOT ADD/REMOVE (MSFT managed) labels Apr 23, 2019
@VesaJuvonen
Copy link
Contributor

Fixed with the 1.8.2 release, so closing this from here. Thanks for reporting this and sorry for the inconvenience caused by this regression.

@msft-github-bot
Copy link
Collaborator

Issues that have been closed & had no follow-up activity for at least 7 days are automatically locked. Please refer to our wiki for more details, including how to remediate this action if you feel this was done prematurely or in error: Issue List: Our approach to locked issues

@SharePoint SharePoint locked as resolved and limited conversation to collaborators Jan 24, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area:spfx Category: SharePoint Framework (not extensions related) status:fixed-next-drop Issue planned to be fixed in an upcoming release. status:tracked Currently tracked with Microsoft’s internal issue tracking system. DO NOT ADD/REMOVE (MSFT managed) type:bug-suspected Suspected bug (not working as designed/expected). See “type:bug-confirmed” for confirmed bugs.
Projects
None yet
Development

No branches or pull requests

4 participants