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

Domain Isolated Web Part fails to load in SingleWebPartAppPage

Open PaoloPia opened this issue 6 years ago • 24 comments

Category

  • [x] Bug

Describe the bug

A domain isolated web part does not render in a modern page configured as SingleWebPartAppPage. Instead, you get a nasty exception with the following error message:

**Error: *The value for "IFramedWebPartController is undefined" must not be undefined in t in t in o in t in t in t in t in t in t in section in div in div in t in Styledt in t in o in t in t in t

Steps to reproduce

  1. Create a new SPFx project (I'm using SPFx 1.10.0) with a Web Part and configure it to be domain isolated ("isDomainIsolated": true)
  2. Bundle and package the solution, and install the SPPKG into the AppCatalog
  3. Add the Web Part to a modern page
  4. Configure the page to have the SingleWebPartAppPage layout (https://docs.microsoft.com/en-us/sharepoint/dev/spfx/web-parts/single-part-app-pages#changing-page-layout-using-pnp-powershell)
  5. Reload the page and it will fail with the above error message

If I revert the page back to layout Article, the web part is back and fully functional.

Expected behavior

I should be able to see the web part, instead of the error message.

Developer environment

  • OS: Windows 10
  • Framework: SPFx 1.10.0
  • Browser(s): Chrome Version 80.0.3987.106 (Official Build) (64-bit)
  • Tooling: VSCode

Thanks!

PaoloPia avatar Feb 18 '20 16:02 PaoloPia

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

msft-github-bot avatar Feb 18 '20 16:02 msft-github-bot

i'm with the same error here, this is how i get the error:

  • publish an app with the option 'Tenant Deployed' unchecked (in my case i'm publish through ci/cd in Azure Dev Ops)
  • add the app to a site
  • add a app through the cog -> add page -> tab app

If i only add the app to a page, like any other app, it works fine!

giovanibm avatar Feb 27 '20 18:02 giovanibm

Hello,

The same error when I am updating a normal webpart to be a SharePoint full page in SharePoint Online.

Error: The value for "IFramedWebPartController is undefined" must not be undefined in t in t in o in t in t in t in t in t in t in section in div in div in t in Styledt in t in o in t in t in t

The version used is: "@pnp/spfx-controls-react": "1.16.0",

Thank you!

joselu1sc avatar Mar 15 '20 03:03 joselu1sc

Having the same problem

ABoedt avatar Mar 20 '20 09:03 ABoedt

Unfortunately I have the same problem with a React SharePointFullPage webpart. After a reload the page works.

TheHailender avatar Apr 06 '20 06:04 TheHailender

I'm having the same issue. Webpart used to work fine as a SingleWebPartAppPage, since some weeks ago it stopped working and keep getting the same error. Still works as normal WebPart inserted in a page though.

michelcarlo avatar Apr 27 '20 20:04 michelcarlo

I'm experiencing this bug as well. Is it forgotten about?

ghost avatar May 20 '20 20:05 ghost

Same problem here. Reloading the page does NOT help.

cwdata avatar May 22 '20 16:05 cwdata

Same issue here. Currently hosting the webparts on a different page (not maximized).

JeroenGMI avatar May 27 '20 08:05 JeroenGMI

Is there any sort of work around?

ghost avatar May 28 '20 19:05 ghost

I have the same issue. Created a web part with the generator, added the options to the manifest and deployed to SharePoint Online. "supportedHosts": ["SharePointWebPart", "SharePointFullPage", "TeamsTab"],

ozippy avatar Jun 02 '20 06:06 ozippy

Me too, have there any update about the issue?

iiunknown avatar Jul 02 '20 00:07 iiunknown

Is one possible reason this isn't getting any attention is that it's in the sp-dev-docs (documentation) repo for some reason?

ChrisRomp avatar Jul 10 '20 18:07 ChrisRomp

Will the components in the solution require permissions to access web APIs that are unique and not shared with other components in the tenant? (y/N) If you choose No to the above option while generating the project using yeoman scaffolding, I do not get the error.

However I am quite new to MS ecosystem and do not understand the implications of above choice. Either way this bug should be looked at.

rohanj1132 avatar Jul 22 '20 07:07 rohanj1132

@PaoloPia : i have found a solution for the same, basically we change page layout to "SingleWebPartAppPage" to add some webpart which should display on full page and gives us a cleaner look, so follow below steps ::

    1. Create a page
2. Edit page 
3. Add any custom/OOTB webpart 
4. publish it
5. and then change the layout of page 

that way you wont get that error.

sunnyEspireGit avatar Nov 19 '20 06:11 sunnyEspireGit

Also you can use below powershell script to do all at once ::

$siteURL = "siteUrl"

Connect-PnPOnline -Url $siteURL -UseWebLogin

#Create Site Page $page_name = Add-PnPClientSidePage -Name "pagename"

#Add a new sections to the page Add-PnPClientSidePageSection -Page $page_name -SectionTemplate OneColumnVerticalSection -Order 1

#Add Hero webpart to page Add-PnPClientSideWebPart -Page $page_name -Component "webpartName" -Section 1 -Column 1

Set-PnPClientSidePage -Identity $page_name -LayoutType "SingleWebPartAppPage"

Happy coding :)

sunnyEspireGit avatar Nov 19 '20 06:11 sunnyEspireGit

@PaoloPia - sorry for the long delay. Going through old issues and this one seems to be fixed for a while.

Could you please check it on your end?

AJIXuMuK avatar Oct 28 '21 22:10 AJIXuMuK

@AJIXuMuK Am facing the same issue today, I don't think its fixed yet,

Isolated web-parts does not work on the following:

  1. Chrome Incognito
  2. Safari
  3. Firefox

I hope it will be fixed soon, cause it's really important for securing API calls Thanks

ahmed-asiri avatar Nov 02 '21 07:11 ahmed-asiri

Hi @ahmed-asiri, I believe, it's a completely separate issue. In incognito mode iframe communications are blocked by default. If you enable cookies in Incognito - it will work.

AJIXuMuK avatar Nov 02 '21 14:11 AJIXuMuK

Thanks @AJIXuMuK for your response, your are right and That make sense, what about Safari and Firefox, is it the same issue?

ahmed-asiri avatar Nov 03 '21 05:11 ahmed-asiri