sp-dev-docs icon indicating copy to clipboard operation
sp-dev-docs copied to clipboard

certificate errors in https://localhost:4321/temp/workbench.html

Open Jon007 opened this issue 8 years ago • 13 comments

on Windows, gulp trust-dev-cert and gulp-serve appear to run correctly, but https://localhost:4321/temp/workbench.html

results in certificate errors,

in Chrome This site can’t provide a secure connection localhost sent an invalid response. Try running Windows Network Diagnostics. ERR_SSL_PROTOCOL_ERROR

in IE: This page can’t be displayed Turn on TLS 1.0, TLS 1.1, and TLS 1.2 in Advanced settings and try connecting to https://localhost:4321 again. If this error persists, it is possible that this site uses an unsupported protocol or cipher suite such as RC4 (link for the details), which is not considered secure. Please contact your site administrator.

appears to be running successfully though: c:\dev\helloworld-webpart>gulp trust-dev-cert Build target: DEBUG [11:57:21] Using gulpfile c:\dev\helloworld-webpart\gulpfile.js [11:57:21] Starting gulp [11:57:21] Starting 'trust-dev-cert'... [11:57:21] Starting subtask 'trust-cert'... [11:57:24] [trust-cert] Attempting to trust a dev certificate. This self-signed certificate only points to localhost and will be stored in your local user profi le to be used by other instances of gulp-core-build-serve. If you do not consent to trust this certificate, click "NO" in the dialog. [11:57:34] Finished subtask 'trust-cert' after 13 s [11:57:34] Finished 'trust-dev-cert' after 13 s [11:57:35] ==================[ Finished ]================== [11:57:35] Project helloworld-webpart version: 0.0.1 [11:57:35] Build tools version: 2.5.3 [11:57:35] Node version: v8.11.3 [11:57:35] Total duration: 22 s

c:\dev\helloworld-webpart>gulp serve Build target: DEBUG [12:37:06] Using gulpfile c:\dev\helloworld-webpart\gulpfile.js [12:37:06] Starting gulp [12:37:06] Starting 'serve'... [12:37:06] Starting subtask 'pre-copy'... [12:37:06] Finished subtask 'pre-copy' after 86 ms [12:37:06] Starting subtask 'copy-static-assets'... [12:37:06] Starting subtask 'sass'... [12:37:12] Finished subtask 'copy-static-assets' after 5.73 s [12:37:12] Finished subtask 'sass' after 5.71 s [12:37:12] Starting subtask 'tslint'... [12:37:12] Starting subtask 'typescript'... [12:37:12] [typescript] TypeScript version: 2.2.2 [12:37:15] Finished subtask 'tslint' after 3.04 s [12:37:15] Finished subtask 'typescript' after 3.02 s [12:37:15] Starting subtask 'ts-npm-lint'... [12:37:15] Finished subtask 'ts-npm-lint' after 31 ms [12:37:15] Starting subtask 'api-extractor'... [12:37:15] Finished subtask 'api-extractor' after 2.49 ms [12:37:15] Starting subtask 'post-copy'... [12:37:15] Finished subtask 'post-copy' after 2.59 ms [12:37:15] Starting subtask 'collectLocalizedResources'... [12:37:15] Finished subtask 'collectLocalizedResources' after 8.28 ms [12:37:15] Starting subtask 'configure-webpack'... [12:37:17] Finished subtask 'configure-webpack' after 1.82 s [12:37:17] Starting subtask 'webpack'... (node:15400) DeprecationWarning: loaderUtils.parseQuery() received a non-string value which can be problematic, see https://github.com/webpack/loader-utils/issu es/56 parseQuery() will be replaced with getOptions() in the next major version of loa der-utils. [12:37:20] Finished subtask 'webpack' after 3.58 s [12:37:20] Starting subtask 'configure-webpack-external-bundling'... [12:37:20] Finished subtask 'configure-webpack-external-bundling' after 3.76 ms [12:37:20] Starting subtask 'copy-assets'... [12:37:20] Finished subtask 'copy-assets' after 110 ms [12:37:20] Starting subtask 'write-manifests'... [12:37:21] Finished subtask 'write-manifests' after 743 ms [12:37:21] Starting subtask 'serve'... Starting api server on port 5432. Registring api: /getwebparts Registring api: /. Registring api: /workbench [12:37:24] Finished subtask 'serve' after 3.42 s [12:37:24] Finished 'serve' after 19 s (node:15400) ExperimentalWarning: The http2 module is an experimental API. [12:37:24] Server started https://localhost:4321 [12:37:25] LiveReload started on port 35729 [12:37:25] Opening https://localhost:5432/workbench using the default OS app [12:37:25] ==================[ Finished ]================== [12:37:25] Project helloworld-webpart version: 0.0.1 [12:37:26] Build tools version: 2.5.3 [12:37:26] Node version: v8.11.3 [12:37:26] Total duration: 24 s Request: [::1] '/workbench'


Document Details

⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

Jon007 avatar Aug 10 '18 11:08 Jon007

retested new install on a windows 2016 server, same results:

  • I can see in mmc Certificates that the localhost certificate gulp-core-build-serve Development Certificate is installed,
  • gulp serve appears to be working,
  • Internet Explorer refuses to display https://localhost:4321/temp/workbench.html for the same errors reported above.

Jon007 avatar Aug 10 '18 14:08 Jon007

Hi Jonathan, just double checking your environment details here. Are you using IE 11 for both of the environments? Have you tested the localhost with Edge and what's the status with that?

I just tested this with my Win 10 and can see indeed the challenge with the IE11, but Chrome, Edge, and FireFox are all working without an issue. Just want to ensure that you have exactly the same status. Thanks for confirming as that helps on us moving forward with this.

VesaJuvonen avatar Aug 21 '18 08:08 VesaJuvonen

Which version of the SharePoint Framework do you use? There was an issue with earlier versions and Node v8 where you had to explicitly disable Node's HTTP2 support that prevented the local workbench from loading.

waldekmastykarz avatar Aug 21 '18 10:08 waldekmastykarz

This was with fully patched up to date Sharepoint 2016. Tested on a Win7 desktop and a Win2016 server.

@waldekmastykarz how do I test explicitly disable Node's HTTP2 support? @VesaJuvonen Not reconfirmed all the other browsers as yet as have restrictions in corporate environment, will have another go later.

Jon007 avatar Aug 21 '18 11:08 Jon007

@Jon007 for more details see https://github.com/SharePoint/sp-dev-docs/issues/1002. Instructions how to run it on Windows are in the thread

waldekmastykarz avatar Aug 21 '18 11:08 waldekmastykarz

"This was with fully patched up to date Sharepoint 2016." - Key here was following. SP2016 is using SharePoint Framework 1.1, where the needed workaround is required if you are using new node and npm versions. This does clarify the issue. Instructions are in the #1002 as noted by @waldekmastykarz.

VesaJuvonen avatar Aug 21 '18 14:08 VesaJuvonen

Let's keep this open as long as @Jon007 can confirm, but I think we got this one sorted out.

VesaJuvonen avatar Aug 21 '18 14:08 VesaJuvonen

Hi, I will retest within the next 24 hours, but before closing, please bear in mind that the issue is raised against the getting started guide at: https://docs.microsoft.com/en-us/sharepoint/dev/spfx/web-parts/get-started/build-a-hello-world-web-part

If your diagnosis is correct, anyone attempting to follow the getting started guide with the latest node and the latest Sharepoint 2016 patches will hit the same problem and be unable to complete the getting started guide, so to close the issue a helpful note should be added to the guide.

Jon007 avatar Aug 21 '18 14:08 Jon007

@VesaJuvonen I confirm this solves the problem. re-reading the documentation, it looks like the note should be added to the known issues page: https://docs.microsoft.com/en-us/sharepoint/dev/spfx/known-issues-and-common-questions which is linked from: https://docs.microsoft.com/en-us/sharepoint/dev/spfx/web-parts/get-started/build-a-hello-world-web-part

Jon007 avatar Aug 21 '18 16:08 Jon007

I was getting these same errors - then someone suggested I update port 5432 info to 8080 (in config/serve.json) and it worked! Don't know enough to know why....but that's the only solution that actually got things moving for me

cassandradanger avatar Nov 09 '18 04:11 cassandradanger

Hey I hope this helps solve the issue for FireFox developers... it was hard to spot this: FireFox certificate ERROR was being caused by: ----- serve.json setting "https" to false...... but also setting "https://localhost: ..." to "http://

{ "$schema": "https://developer.microsoft.com/json-schemas/core-build/serve.schema.json", "port": 4321, "https": false, "initialPage": "http://localhost:5432/workbench", "api": { "port": 5432, "entryPath": "node_modules/@microsoft/sp-webpart-workbench/lib/api/" } }

darkriderdesign avatar Nov 20 '18 16:11 darkriderdesign

neither changing the port, nor disabling http2 via en variable didnt help me on this one... still having ssl error

michalhainc avatar Sep 26 '19 10:09 michalhainc

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

msft-github-bot avatar Jan 27 '20 00:01 msft-github-bot