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

gulp serve ssl error #1008

Closed
michalhainc opened this issue Sep 26, 2019 · 8 comments
Closed

gulp serve ssl error #1008

michalhainc opened this issue Sep 26, 2019 · 8 comments

Comments

@michalhainc
Copy link

michalhainc commented Sep 26, 2019

Hi gulp serve gives me ssl error in browser... I tried workarounds with setting the node's http2 environment variable... however it doesnt resolve my issue.

image

my package json:

{
  "name": "helloworld-webpart",
  "version": "0.0.1",
  "private": true,
  "main": "lib/index.js",
  "engines": {
	"node": ">=0.10.0"
  },
  "scripts": {
	"build": "gulp bundle",
	"clean": "gulp clean",
	"test": "gulp test"
  },
  "dependencies": {
	"@microsoft/sp-core-library": "~1.1.0",
	"@microsoft/sp-webpart-base": "~1.1.0",
	"@microsoft/sp-lodash-subset": "~1.1.0",
	"@microsoft/sp-office-ui-fabric-core": "~1.4.0-0",
	"@types/webpack-env": "1.13.1",
	"@types/es6-promise": "0.0.33"
  },
  "devDependencies": {
	"@microsoft/sp-build-web": "~1.1.0",
	"@microsoft/sp-module-interfaces": "~1.1.0",
	"@microsoft/sp-webpart-workbench": "~1.1.0",
	"gulp": "~3.9.1",
	"@types/chai": "3.4.34",
	"@types/mocha": "2.2.38",
	"ajv": "~5.2.2"
  }
}

Originally posted by @michalhainc in #357 (comment)

@ghost
Copy link

ghost commented Sep 26, 2019

Thank you for reporting this issue. We will be triaging your incoming issue as soon as possible.

@ghost ghost added the Needs: Triage 🔍 label Sep 26, 2019
@dstretch
Copy link

I have the same issue with Node 10.16.3 and yo generator 3.1.1 (and earlier versions), but only if I select "SharePoint 2016 onwards..." from the generator menu; if I choose the "SharePoint Online only (latest)" option it works successfully.

The Gulp Serve output is considerably different for the two:

2016 onwards gulp serve:

[18:17:10] Using gulpfile C:\Dev\Projects\SPFx\MatterInfoWebPart\gulpfile.js
[18:17:10] Starting gulp
[18:17:10] Starting 'serve'...
[18:17:10] Starting subtask 'pre-copy'...
[18:17:10] Finished subtask 'pre-copy' after 27 ms
[18:17:10] Starting subtask 'copy-static-assets'...
[18:17:10] Starting subtask 'sass'...
[18:17:11] Finished subtask 'sass' after 1.15 s
[18:17:11] Starting subtask 'tslint'...
[18:17:11] Starting subtask 'typescript'...
[18:17:11] [typescript] TypeScript version: 2.2.2
[18:17:11] Finished subtask 'copy-static-assets' after 1.21 s
[18:17:13] Finished subtask 'tslint' after 1.51 s
[18:17:13] Finished subtask 'typescript' after 1.63 s
[18:17:13] Starting subtask 'ts-npm-lint'...
[18:17:13] Finished subtask 'ts-npm-lint' after 17 ms
[18:17:13] Starting subtask 'api-extractor'...
[18:17:13] Finished subtask 'api-extractor' after 1.64 ms
[18:17:13] Starting subtask 'post-copy'...
[18:17:13] Finished subtask 'post-copy' after 1 ms
[18:17:13] Starting subtask 'collectLocalizedResources'...
[18:17:13] Finished subtask 'collectLocalizedResources' after 5.24 ms
[18:17:13] Starting subtask 'configure-webpack'...
[18:17:14] Finished subtask 'configure-webpack' after 794 ms
[18:17:14] Starting subtask 'webpack'...
(node:37720) DeprecationWarning: loaderUtils.parseQuery() received a non-string value which can be problematic, see https://github.com/webpack/loader-utils/issues/56
parseQuery() will be replaced with getOptions() in the next major version of loader-utils.
[18:17:14] Finished subtask 'webpack' after 776 ms
[18:17:14] Starting subtask 'configure-webpack-external-bundling'...
[18:17:14] Finished subtask 'configure-webpack-external-bundling' after 1.49 ms
[18:17:14] Starting subtask 'copy-assets'...
[18:17:15] Finished subtask 'copy-assets' after 201 ms
[18:17:15] Starting subtask 'write-manifests'...
[18:17:15] Finished subtask 'write-manifests' after 782 ms
[18:17:15] Starting subtask 'serve'...
Starting api server on port 5432.
Registring api: /getwebparts
Registring api: /*.*
Registring api: /workbench
[18:17:16] Finished subtask 'serve' after 664 ms
[18:17:16] Finished 'serve' after 6.13 s
[18:17:16] Server started https://localhost:4321
[18:17:16] LiveReload started on port 35729
[18:17:16] Opening https://localhost:5432/workbench using the default OS app

SharePoint Online only gulp serve:

[18:14:34] Using gulpfile C:\Dev\Projects\SPFx\SPOTest\gulpfile.js
[18:14:34] Starting gulp
[18:14:34] Starting 'serve'...
[18:14:34] Starting subtask 'configure-sp-build-rig'...
[18:14:34] Finished subtask 'configure-sp-build-rig' after 6.77 ms
[18:14:34] Starting subtask 'spfx-serve'...
[18:14:35] Starting server...
Starting api server on port 5432.
Registring api: /workbench
Registring api: */*
[18:14:35] Finished subtask 'spfx-serve' after 406 ms
[18:14:35] Starting subtask 'pre-copy'...
[18:14:35] Finished subtask 'pre-copy' after 34 ms
[18:14:35] Starting subtask 'copy-static-assets'...
[18:14:35] Starting subtask 'sass'...
[18:14:35] Server started https://localhost:4321
[18:14:35] LiveReload started on port 35729
[18:14:35] Running server
[18:14:35] Opening https://localhost:5432/workbench using the default OS app

@flaviuc
Copy link

flaviuc commented Mar 5, 2020

Hello, any updates on this? I'm developing a SPFx web part for SharePoint 2016, using the Node 10.x version and seeing the same error as the one described here as well. Also NO_NODE_HTTP2 does not help. Thanks!

SPFx v. 1.1.0 here, no framework

@hugoabernier
Copy link
Collaborator

Hey @michalhainc did you ever solve this issue?

I'll mark it as closed as there hasn't been any activity on it for a while.

If you're still having this issue, please open a new one and we'll see if we can breathe some new life into this issue.

I encourage you to take the time to fill the issue template, as it helps route the issues to the right people and -- hopefully -- helps get you answers faster.

@michalhainc
Copy link
Author

michalhainc commented Apr 7, 2020

@hugoabernier no I didn't resolve this... I just wanted to learn SPFX... but didnt..

Is this a common practice to close unresolved issues?

Apparently I was not the only one affected by this.

This issue is already re-opened after a bot closed same issue which I referenced in my first post in this issue....

@flaviuc
Copy link

flaviuc commented Apr 7, 2020

@michalhainc I have the same issue, I noticed I need to NOT open my PowerShell or VSCode with RunAsAdmin.... if you do that something gets messed up and I had lots of issues. maybe give it a try... not saying it will solve THIS issue (which I also still have myself), however I went on along without it because of the need to progress with the webpart.

@michalhainc
Copy link
Author

@michalhainc I have the same issue, I noticed I need to NOT open my PowerShell or VSCode with RunAsAdmin.... if you do that something gets messed up and I had lots of issues. maybe give it a try... not saying it will solve THIS issue (which I also still have myself), however I went on along without it because of the need to progress with the webpart.

@flaviuc thanks for info, I will try, but I would say as I know myself, this is the general kind of stuff I have tried, but I don't remember exactly as it was 2 years ago...

@srinubhumadi
Copy link

Any perfecrt resolution for this error. Created a webpart using below example
https://global-sharepoint.com/sharepoint-2/sharepoint-online-crud-operations-using-spfx-and-pnp-js/

If I open the file :https://localhost:4321/temp/manifests.js
getting this error

This site can’t provide a secure connection
localhost sent an invalid response.
ERR_SSL_PROTOCOL_ERROR

Any one help me ,

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants