Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
Jon007 opened this issue Aug 10, 2018 — with docs.microsoft.com · 13 comments
Closed

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

Jon007 opened this issue Aug 10, 2018 — with docs.microsoft.com · 13 comments
Labels
area:docs Category: SharePoint developer/development documentation related area:tooling Category: Development tooling status:answered Answer to a question. type:bug-suspected Suspected bug (not working as designed/expected). See “type:bug-confirmed” for confirmed bugs.

Comments

Copy link

Jon007 commented Aug 10, 2018

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
Copy link
Author

Jon007 commented Aug 10, 2018

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.

@VesaJuvonen VesaJuvonen added type:bug-suspected Suspected bug (not working as designed/expected). See “type:bug-confirmed” for confirmed bugs. area:tooling Category: Development tooling labels Aug 13, 2018
@VesaJuvonen VesaJuvonen added area:docs Category: SharePoint developer/development documentation related status:waiting-for-clarification labels Aug 21, 2018
@VesaJuvonen
Copy link
Contributor

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.

@waldekmastykarz
Copy link
Collaborator

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.

@Jon007
Copy link
Author

Jon007 commented Aug 21, 2018

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.

@waldekmastykarz
Copy link
Collaborator

waldekmastykarz commented Aug 21, 2018

@Jon007 for more details see #1002. Instructions how to run it on Windows are in the thread

@VesaJuvonen
Copy link
Contributor

"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
Copy link
Contributor

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

@Jon007
Copy link
Author

Jon007 commented Aug 21, 2018

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
Copy link
Author

Jon007 commented Aug 21, 2018

@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

Copy link

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

@darkriderdesign
Copy link

darkriderdesign commented Nov 20, 2018

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/"
}
}

@michalhainc
Copy link

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

@msft-github-bot
Copy link
Collaborator

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

@SharePoint SharePoint locked as resolved and limited conversation to collaborators Jan 27, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area:docs Category: SharePoint developer/development documentation related area:tooling Category: Development tooling status:answered Answer to a question. type:bug-suspected Suspected bug (not working as designed/expected). See “type:bug-confirmed” for confirmed bugs.
Projects
None yet
Development

No branches or pull requests

8 participants