ionic-team / ionic-cli

The Ionic command-line interface
MIT License
2k stars 651 forks source link

[WDS] Disconnected! #3498

Open ionitron-bot[bot] opened 6 years ago

ionitron-bot[bot] commented 6 years ago

Bug Report

Ionic Info Run ionic info from a terminal/cmd prompt and paste the output below.

Ionic:

ionic (Ionic CLI) : 4.0.5 (/usr/lib/node_modules/ionic) Ionic Framework : @ionic/angular 4.0.0-beta.1 @angular-devkit/core : 0.7.2 @angular-devkit/schematics : 0.7.2 @angular/cli : 6.1.2 @ionic/ng-toolkit : 1.0.5 @ionic/schematics-angular : 1.0.4

Cordova:

cordova (Cordova CLI) : 8.0.0 Cordova Platforms : android 7.0.0

System:

Android SDK Tools : 26.1.1 NodeJS : v8.11.3 (/usr/bin/node) npm : 5.10.0 OS : Linux 4.4

Environment:

ANDROID_HOME : /home/woodz/Android/Sdk

Describe the Bug the browser sometimes show the content sometimes show totally the blank page when reload. Furthermore, the inspect error show: [WDS] Disconnected! vendor.js:91813:5 close http://localhost:8100/vendor.js:91813:5 onclose socket.js:17 ./node_modules/sockjs-client/dist/sockjs.js/</<[5]</EventTarget.prototype.dispatchEvent sockjs.js:170 ./node_modules/sockjs-client/dist/sockjs.js/</<[14]</</SockJS.prototype._close/< sockjs.js:969 ./node_modules/zone.js/dist/zone.js/</ZoneDelegate.prototype.invokeTask zone.js:421 ./node_modules/zone.js/dist/zone.js/</Zone.prototype.runTask zone.js:188 ./node_modules/zone.js/dist/zone.js/</ZoneTask.invokeTask zone.js:496 ZoneTask/this.invoke zone.js:485 timer zone.js:2054

Steps to Reproduce Steps to reproduce the behavior:

  1. start a new ionic v4 project by 'ionic start new_project blank --type=angular'
  2. cd into the project and run 'ionic serve'.
  3. reload and page without inspecting, and next reload the page with inspecting
imhoffd commented 6 years ago

This error is totally normal when you reload the page:

image

The webpack-dev-server has to re-establish the connection because it gets killed when the page refreshes.

imhoffd commented 6 years ago

@WoodzGoh As for your other issue about the page being blank, I'm not able to reproduce it.

WoodzGoh commented 6 years ago

@dwieeb ya, for the 'ionic serve' issue, you can try to reload multiple times, you will notice sometimes you saw the browser show the default text, sometimes show totally white blank page i just notice that this issue only exist in "Mozilla Firefox Browser" it works fine in "Google Chrome".

alitalaee commented 3 years ago

I Had this problem only in firefox today and fix it with this solution

The solution was to add the following line in angular.json under architect>serve>options:

"disableHostCheck": true

i hope it will help you