SPFX webpart error for few users : Failed to load component ....

Sanju Varghese 6 Reputation points
2021-04-01T03:03:46.65+00:00

On a Sharepoint online webpage, I have setup few spfx webparts. These webparts load fine for few users. However some users in the organization are getting the error mentioned at https://learn.microsoft.com/en-us/answers/questions/226077/spfx-webpart-s-throwing-error.html

What could be the issue that it is throwing this error for some users and working for some.

  1. Both the category of users are using chrome
  2. The package was deployed to tenant app catalog
  3. gulp trust dev cert was done, gulp clean, gulp build, gulp bundle--ship, gulp package-solution --ship was done
Microsoft 365 and Office | SharePoint | For business | Windows
{count} votes

1 answer

Sort by: Most helpful
  1. ZhengyuGuo 10,586 Reputation points Moderator
    2021-04-01T05:53:17.433+00:00

    Hi @Anonymous ,

    I understand the SPFX Web Part is working for a few users but for some other users it's not working.

    I suggest you could check if the some users is external users ? As SPFX Web Part will need to assign permission to "All Users(membership)":

    1. Open SharePoint Management Online Shell and run below command. It prompts for SharePoint Online tenant URL, enter URL (for example, https://yourtenant-admin.sharepoint.com) and then it prompts for credentials. Enter SharePoint Admin or Global Admin credentials to connect to your tenant. Connect-SPOService
    2. Once the connection is done, run below command Set-SPOTenant -ShowAllUsersClaim $true
    3. Now, SharePoint allows resolving a new group named “All Users (membership)”. Grant “Read” permissions to this group on “Client Side Assets” library in App Catalog site as shown below (/sites/AppCatalogSite/ClientSideAssets/AllItems.aspx):

    83533-431-2.png

    Thanks
    Best Regards


    If the response is helpful, please click "Accept Answer" and upvote it.

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.