On my SharePoint 2016 on-premise development site workbench, to load my SPFx webpart in the config\server.json
I have set the "https": false
. My development site loads on http
and in my browser console I can see request is sent to http://localhost:4321/temp/manifests.js
, it successfully resolved and I can add my webpart to the page to test it.
If I set "https": true
in config\server.json
request is made to https://localhost:4321/temp/manifests.js
(notice https). But the request returns error as
GET https://localhost:4321/temp/manifests.js net::ERR_SSL_PROTOCOL_ERROR
Failed to load debug manifests: Error: Error loading https://localhost:4321/temp/manifests.js
XHR error loading https://localhost:4321/temp/manifests.js
GET http://localhost:4321/temp/manifests.js net::ERR_INVALID_HTTP_RESPONSE
Uncaught (in promise) Error: Error loading http://localhost:4321/temp/manifests.js
XHR error loading http://localhost:4321/temp/manifests.js
at XMLHttpRequest.o (eval at <anonymous> (sp-webpart-workbench-assembly_en-us_1c43756ae201421249073388e4dea068.js:1171), <anonymous>:4:14084)
and the page shows:
Your web part will not appear in the toolbox. Please make sure "gulp serve" is running in a web part project. Please refresh the page once "gulp serve" is running.
When I try to run the webpart on my SharePoint Online workbench with either "https": true
OR "https": false
set in config\server.json
, I am unable to load the webpart with same error as above.
I have deleted the <homedir>/.gcb-serve-data
directory and run the gulp trust-dev-cert
again, but it has't worked.
How can I load /temp/manifests.js
on https
?