How to resolve certificate issue in SharePoint Framework Solution

Hi Friends,

Today i will be discussing about the certificate issue when we run the gulp command and try to run the SharePoint Framework Solution in local workbench.

https://www.sharepointwidgets.com

Issue:

Warning - [spfx-serve] When serving in HTTPS mode, a PFX cert path or a cert path and a key path must be provided, or a dev certificate must
be generated and trusted. If a SSL certificate isn't provided, a default, self-signed certificate will be used. Expect browser security warnings.

If you read the issue , the issue is that it does not find the certificate that shows trust in the URL you are accessing, because of which you see the following message on the screen.

http://www.sharepointwidgets.com/ - Certificate issue in SharePoint Framework Solution


Solution:

So here is the simple solution and you won’t experience this issue any more.

In your solution open the node command prompt.
If you are working in Visual code then open the solution and then press the ~ + Cntrl.

Now follow the 2 steps:
  1. Execute the command
gulp trust-dev-cert

  1. Click Yes button to install the certificate

http://www.sharepointwidgets.com/ - Certificate Issue in SharePoint Framework Solution


This command will install the required certificate and you won’t be having the issue again

Happy Coding
Sumit Kanchan

Comments

Popular posts from this blog

SharePoint Image Gallery

SharePoint Framework (SPFx) : Cascade dropdown in webpart properties

Checking user permission in SharePoint Framework (SPFx) webpart