SharePoint / sp-dev-docs

SharePoint & Viva Connections Developer Documentation
https://docs.microsoft.com/en-us/sharepoint/dev/
Creative Commons Attribution 4.0 International
1.25k stars 1.02k forks source link

Can't debug ListView Command Set extensions in SharePoint Subscription Edition #8721

Open yungdeni opened 1 year ago

yungdeni commented 1 year ago

Target SharePoint environment

other (enter in the "Additional environment details" area below)

What SharePoint development model, framework, SDK or API is this about?

💥 SharePoint Framework

Developer environment

Windows

What browser(s) / client(s) have you tested

Additional environment details

Describe the bug / error

I am getting the following error when debugging a ListView Command set extension against a SharePoint SE list.

   at t [as constructor] (listview-host-assembly.js?uniqueId=yhXrt:92) 
   at new t (listview-host-assembly.js?uniqueId=yhXrt:652) 
   at e.buildErrorWithVerboseLog (listview-host-assembly.js?uniqueId=yhXrt:652) 
   at e.buildLoadComponentError (listview-host-assembly.js?uniqueId=yhXrt:652) 
   at listview-host-assembly.js?uniqueId=yhXrt:652 

The same project works as expected on my SP 2019 environment served from the same dev machine. The SPFx developer dashboard shows errors loading manifests

 Manifest not found for component id "8217e442-8ed3-41fd-957d-b11e841286a" and version "0.2.2"

This manifest is for the "@ms/sp-telemetry.js" library and looking at the manifests tab in the dashboard the version in SE is 1.0.0 while it's 0.2.2 in 19. In the project's ./temp/manifests file the sp-telemetry package has the version 0.2.2. I tried manually replacing the version numbers in the project's ./temp/manifests.json and .js files and the extension loads. However this is cumbersome and I had issues getting a dialog to display. I am not sure what other packages could have a mismatch in versions.

Steps to reproduce

Minimal repro:

  1. Generate a new ListView extension with yeoman for SharePoint 2019
  2. gulp serve it against a list in SharePoint SE
  3. The extension doesn't load and there are errors in the console/dashboard

Workaround:

  1. Change the references in the manifests files under the temp folder for "@ms/sp-telemetry" to version 1.0.0
  2. It now loads and the example buttons show up in the command bar

Expected behavior

The extension to load and the example projects buttons to appear in the command bar on a list in SharePoint Server Subscription Edition

ghost commented 1 year ago

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

liuqingbo commented 12 months ago

Thanks for triggering bug. The fix will be available in March PU of 2024.

wissam-coder commented 4 months ago

what is the solution for this Problem. I have the same problem exactly