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

DynamicDataSharedDepth undefined in hosted workbench (SPFx 1.8.1) #3820

Closed
1 of 4 tasks
YannickRe opened this issue Apr 22, 2019 · 10 comments
Closed
1 of 4 tasks

DynamicDataSharedDepth undefined in hosted workbench (SPFx 1.8.1) #3820

YannickRe opened this issue Apr 22, 2019 · 10 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

@YannickRe
Copy link
Contributor

Category

  • Question
  • Typo
  • Bug
  • Additional article idea

Expected or Desired Behavior

When running an SPFx 1.8.1 solution that uses Dynamic Data with 'gulp serve', I expect it to work correctly in the local workbench, the hosted workbench and SharePoint pages.

Observed Behavior

Running the solution works without an issue in the local workbench and SharePoint pages, but in the hosted workbench it throws the following exception: "Cannot read property 'Source' of undefined". Issues occurs with DynamicDataSharedDepth.Source

HostedWorkbench181

The error doesn't occur when using SPFx 1.7.1. It starts occurring when I upgraded the solution to 1.8.1 with the guidance from the Office 365 CLI and only when opening the Property Pane.
Also occurs in a newly created solution. Tested on 3 different tenants, with Google Chrome.

Steps to Reproduce

  • Create new SPFx 1.8.1 solution, keep defaults and I based it on React
  • Put the following code in the existing groupFields array of the property pane (update the imports):
PropertyPaneDynamicFieldSet({
                  label: "Keywords",

                  fields: [
                      PropertyPaneDynamicField('queryKeywords', {
                          label: "Keywords"
                      })
                  ],
                  sharedConfiguration: {
                      depth: DynamicDataSharedDepth.Source,
                  },
                })
  • Run gulp serve.
  • Open the property pane of the webpart. In the local workbench, it works. In the hosted workbench, you will find the following error in the developer console:
Uncaught (in promise) TypeError: Cannot read property 'Source' of undefined
    at HelloWorldWebPart.getPropertyPaneConfiguration (HelloWorldWebPart.ts:65)
    at sp-webpart-workbench-assembly_en-us_adc4bc24c9e68c9e1b136ddf960e5a9d.js:605
@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 22, 2019
@patmill
Copy link
Contributor

patmill commented Apr 22, 2019

Just to clarify. The local workbench is the one served from localhost, the hosted workbench is the one in SPO. Is it the local workbench that is failing?

@YannickRe
Copy link
Contributor Author

@patmill no, it is the hosted one that fails. The local one AND the SharePoint pages work without issues.

@patmill
Copy link
Contributor

patmill commented Apr 22, 2019

So that's certainly strange. DynamicDataSharedDepth is undefined? That's an enum... What package are you importing it from? Can you make sure that it is sp-property-pane?

@YannickRe
Copy link
Contributor Author

YannickRe commented Apr 22, 2019

I tried both the old one (SP-webpart-base) and the new one (SP-property-pane), both resulting in the same behavior locally (works) and hosted (doesn’t work).

@patmill
Copy link
Contributor

patmill commented Apr 22, 2019

OK, so it is only 1.8.1 that does this, not 1.8.0. digging in more.

@patmill
Copy link
Contributor

patmill commented Apr 23, 2019

OK - figured it out. A seemingly innocuous change. We will work on getting a proper fix rolled out, and you won't need to modify your code. In the meantime, if you want to work around this, use a hard coded value (0,1,2) rather than the enum.

@YannickRe
Copy link
Contributor Author

Thank you for figuring it out! I’ll wait for the fix to roll out, it isn’t that pressing.

@VesaJuvonen VesaJuvonen added area:spfx Category: SharePoint Framework (not extensions related) status:fixed-next-drop Issue planned to be fixed in an upcoming release. 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
@GrahamMcMynn GrahamMcMynn added the status:tracked Currently tracked with Microsoft’s internal issue tracking system. DO NOT ADD/REMOVE (MSFT managed) label Apr 25, 2019
@YannickRe
Copy link
Contributor Author

This is fixed in my environments, so I'm closing this!

@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

5 participants