Sp-dev-docs: SPFX workbench Err_connection_reset

Created on 1 Sep 2018  路  7Comments  路  Source: SharePoint/sp-dev-docs

Category

  • [ ] Question
  • [ ] Typo
  • [X ] Bug
  • [ ] Additional article idea

Expected or Desired Behavior
I have created a SPFX webpart as mentioned in the docs. Expected behaviour was to open the local workbench when I run gulp serve command. But Local workbench is not working.

Observed Behavior
Local workbench page is loaded with Site can't be reached error message. Err_connection_reset

Steps to Reproduce
Create a SPFX webpart
Run gulp trust-dev-cert
Run gulp serve

Node version
v8.11.4

spfx-general bug-suspected

Most helpful comment

I was able to resolve the issue by using the port 5433.it seem to be that gulp serve never throws an error if the port is already in use

All 7 comments

Which version of the SharePoint Framework are you using in your project?

@michalejoye its because of HTTP2 that latest spfx uses. before gulp serve use the command:

SET NODE_NO_HTTP2=1

then run gulp serve and it should work

Even running the SET NODE_NO_HTTP2=1 i still get the error ERR_CONNECTION_RESET

C:\code\sp\ScriptumWebPart>SET NODE_NO_HTTP2=1

C:\code\sp\ScriptumWebPart>gulp serve
Build target: DEBUG
[08:27:59] Using gulpfile C:\code\sp\ScriptumWebPart\gulpfile.js
[08:27:59] Starting gulp
[08:27:59] Starting 'serve'...
[08:27:59] Starting subtask 'configure-sp-build-rig'...
[08:27:59] Finished subtask 'configure-sp-build-rig' after 5.64 ms
[08:27:59] Starting subtask 'spfx-serve'...
[08:27:59] Starting server...
Starting api server on port 5432.
Registring api: /workbench
Registring api: /
[08:27:59] Finished subtask 'spfx-serve' after 343 ms
[08:27:59] Starting subtask 'pre-copy'...
[08:27:59] Finished subtask 'pre-copy' after 10 ms
[08:27:59] Starting subtask 'copy-static-assets'...
[08:27:59] Starting subtask 'sass'...
[08:28:00] Server started https://localhost:4321
[08:28:00] LiveReload started on port 35729
[08:28:00] Running server
[08:28:00] Opening https://localhost:5432/workbench using the default OS app
[08:28:01] Finished subtask 'sass' after 1.2 s
[08:28:01] Starting subtask 'tslint'...
[08:28:01] Starting subtask 'typescript'...
[08:28:01] [typescript] TypeScript version: 2.4.2
[08:28:01] Finished subtask 'copy-static-assets' after 1.94 s
Warning: no-duplicate-case rule is deprecated. Replace your usage with the TSLint no-duplicate-switch-case rule.
Warning: valid-typeof rule is deprecated. Replace your usage with the TSLint typeof-compare rule.
[08:28:03] Finished subtask 'tslint' after 2.07 s
[08:28:03] Finished subtask 'typescript' after 1.36 s
[08:28:03] Starting subtask 'ts-npm-lint'...
[08:28:03] Finished subtask 'ts-npm-lint' after 11 ms
[08:28:03] Starting subtask 'api-extractor'...
[08:28:03] Finished subtask 'api-extractor' after 932 渭s
[08:28:03] Starting subtask 'post-copy'...
[08:28:03] Finished subtask 'post-copy' after 501 渭s
[08:28:03] Starting subtask 'collectLocalizedResources'...
[08:28:03] Finished subtask 'collectLocalizedResources' after 3.88 ms
[08:28:03] Starting subtask 'configure-webpack'...
[08:28:03] Finished subtask 'configure-webpack' after 801 ms
[08:28:03] Starting subtask 'webpack'...
[08:28:04] Finished subtask 'webpack' after 792 ms
[08:28:04] Starting subtask 'configure-webpack-external-bundling'...
[08:28:04] Finished subtask 'configure-webpack-external-bundling' after 1.37 ms
[08:28:04] Starting subtask 'copy-assets'...
[08:28:04] Finished subtask 'copy-assets' after 15 ms
[08:28:04] Starting subtask 'write-manifests'...
[08:28:05] Finished subtask 'write-manifests' after 847 ms
[08:28:05] Starting subtask 'reload'...
[08:28:05] Finished subtask 'reload' after 1.2 ms

@waldekmastykarz i am running version 1.5.1 of the @microsoft/generator-sharepoint

I have tried and uninstalled v8.11.4 version of node and install version v6.14.4 but that does not solve the issue either

I was able to resolve the issue by using the port 5433.it seem to be that gulp serve never throws an error if the port is already in use

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

Was this page helpful?
0 / 5 - 0 ratings