sp-dev-docs icon indicating copy to clipboard operation
sp-dev-docs copied to clipboard

SPFx as Teams tab - pop out tab not working

Open kjdahlsp opened this issue 5 years ago • 27 comments

Category

  • [x] Bug

Describe the bug

I have an SPFx app running in Teams (TeamsTab) and SharePoint. Everything works fine except when trying "pop out tab" in Teams Desktop client, where nothing happens. I have tried updating to 1.1 and also doing an empty hello world project with the same result.

Steps to reproduce

  1. Follow https://docs.microsoft.com/en-us/sharepoint/dev/spfx/web-parts/get-started/using-web-part-as-ms-teams-tab
  2. In Teams Desktop, click pop out tab teams

Expected behavior

Webpart should load in a pop out window.

Environment details (development & target environment)

  • Your Developer Environment: Windows 10
  • Target Environment: SharePoint Online
  • Framework: Node.js 10.23.1
  • Browser(s): Teams Desktop Client (Microsoft Teams Version 1.3.00.34662 (64-bit))
  • Tooling: SPFx v1.11.0

kjdahlsp avatar Feb 01 '21 13:02 kjdahlsp

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

ghost avatar Feb 01 '21 13:02 ghost

I have the same problem. In devtools I see a request without de tenant host -> undefined

https://undefined/_layouts/15/TeamsLogon.aspx?SPFX=true&dest=/_layouts/15/teamshostedapp.aspx%3Fteams%26personal%26componentId=....

raclettierer avatar Nov 22 '21 12:11 raclettierer

I have the same problem as well with the same error as above (undefined domain in the URL). The Pop out Teams tab functionality doesn't work due to this issue .

shajumohamed avatar Nov 28 '21 05:11 shajumohamed

Same issue here. All our SPFx apps stopped showing in pop up (I'm pretty sure they were showing at some point recently in the past few months...). We really need this core feature to be fixed to support a Team's first approach.

GuillermoBas avatar Nov 30 '21 09:11 GuillermoBas

Same issue here. It was working at least a couple weeks ago, if not more recently.

jon85 avatar Nov 30 '21 23:11 jon85

For me, the problem was resolved in connection to https://github.com/SharePoint/sp-dev-docs/issues/6563

kjdahlsp avatar Dec 02 '21 09:12 kjdahlsp

For me, the problem was resolved in connection to #6563

Is that still working for you today? We also saw that fixed for a few months but It stopped working again recently starting in the past few weeks...

GuillermoBas avatar Dec 02 '21 11:12 GuillermoBas

For me, the problem was resolved in connection to #6563

Is that still working for you today? We also saw that fixed for a few months but It stopped working again recently starting in the past few weeks...

Yes, at least the existing solution is still working.

kjdahlsp avatar Dec 02 '21 13:12 kjdahlsp

@kjdahlsp What was the solution?

raclettierer avatar Dec 02 '21 17:12 raclettierer

Can you add a bit more information, like what kind of app this is? (channel, personal, meeting, etc.)? We have fixed some issues in the past in this area, and there is another fix currently rolling out.

patmill avatar Dec 02 '21 19:12 patmill

In my case I have a personal app which was implemented using SPFX V 1.11. For a few months now the pop-out shows only a blank screen

in Browser i saw a network error. I think the host will not be sumittet

https://undefined/_layouts/15/TeamsLogon.aspx?SPFX=true&dest=/_layouts/15/teamshostedapp.aspx%3Fteams%26personal%26componentId=

raclettierer avatar Dec 02 '21 19:12 raclettierer

The app we are having an issue with is standalone available from the lefthand main toolbar. I have added some info below, please let me know what else might help. Thanks!

I see the following error logged in the main teams console when i try and pop out the app or refresh the pop out:

?agent=electron&version=21110108719:1 AuthenticationService: Authentication - {"context":"ShellService::requestMessage","subContext":"AuthElectron","message":"Received an error from IPC::{\"eventName\":\"aadGetToken\",\"error\":\"resourceRequiresConsent\",\"correlationId\":\"<removed>\"}::isOnline-true","errorCode":"RemoteOperationFailed","correlationId":"<removed>","isExpected":false}

When I inspect the pop out, I see:

iframe id="extension-tab-frame" class="extension-tab-frame" name="extension-tab-frame" src="https://undefined/_layouts/15/TeamsLogon.aspx?SPFX=true&dest=/_layouts/15/teamshostedapp.aspx%3Fteams%26personal%26componentId=removed%26forceLocale=en-us" frameborder="0" sandbox="allow-forms allow-modals allow-popups allow-pointer-lock allow-scripts allow-same-origin allow-downloads" allow="geolocation *; microphone *; camera *; midi *; encrypted-media *;" allowfullscreen="">

jon85 avatar Dec 23 '21 17:12 jon85

The issue still exists in my Teams Personal app solution with teams toolkit v3.1.1 . SPFx version is 1.13.1 . This only affects the tab with the web part .

The following is the content URL for the tab from the manifest .

"contentUrl": "https://{teamSiteDomain}/_layouts/15/TeamsLogon.aspx?SPFX=true&dest=/_layouts/15/teamshostedapp.aspx%3Fteams%26personal%26componentId=d817c1bd-e96c-44da-80cd-6f7ae91de016%26forceLocale={locale}"

I added another tab in the manifest with a SharePoint page as the Content URL and it is working fine .

As a workaround, can the pop out option be disabled through the manifest ?

shajumohamed avatar Jan 06 '22 06:01 shajumohamed

@patmill anything else I can do to provide more information?

I'm unsure how to catch the event opens the pop out, but if I check window.location.hash in "onDOMContentLoaded" function in the iframe-container.html, I see domain is passed undefined: "#iframeurl=https%3A%2F%2Fundefined%2F_layouts%2F15%2FTeamsLogon.aspx".

Please let me know what else I can do to help track this down. Thanks!

jon85 avatar Jan 11 '22 23:01 jon85

Had a whole write up with extra questions, etc. but just found the special case. Tab apps work correctly, but personal ones don't (with the same 'undefined' URL). Looking into it.

patmill avatar Jan 19 '22 18:01 patmill

Yes, that's the behavior we see. We can add the same personal app as a tab and it pops out just fine. Glad you were able to reproduce, thank you!

I spent a good bit of time tracing the execution of the code from the pop out event and couldn't track where the variable was getting lost. My guess/hunch is it has something to do with the fact that there is no team site for a personal app, so {teamSiteDomain} is therefore undefined.

jweiss-eqrx avatar Jan 20 '22 01:01 jweiss-eqrx

It looks like a regression in how teams handles pop-outs of personal apps. We're working with the Teams folks on getting a fix in. I'll update here when I get a firm timeline.

patmill avatar Jan 20 '22 01:01 patmill

excellent, thanks again!

jweiss-eqrx avatar Jan 20 '22 01:01 jweiss-eqrx

Hello, any update on this feature please? It is still not working. Thanks a lot for any update.

petrp314 avatar Feb 23 '22 11:02 petrp314

It's working here now!

Tanddant avatar Mar 07 '22 13:03 Tanddant