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 proxy does not work with websockets #1639

Closed
gmarziou opened this issue Jun 24, 2015 · 10 comments
Closed

gulp proxy does not work with websockets #1639

gmarziou opened this issue Jun 24, 2015 · 10 comments

Comments

@gmarziou
Copy link
Contributor

First time, I use gulp and websockets and I got this error in Firefox console:

GET http://localhost:9000/websocket/tracker/726/qt_z_ydt/websocket [0ms]
00:28:39.417 Firefox can't establish a connection to the server at ws://localhost:9000/websocket/tracker/726/qt_z_ydt/websocket.1 sockjs.js:1213:0

So it would seem that gulp proxy cannot proxy ws protocol or maybe there is something to configure, I did not dig further.

@deepu105
Copy link
Member

could these be related?
#1555

@gmarziou
Copy link
Contributor Author

For PR #1508, I added /websocket/tracker to the URL to be proxied by gulp but this worked only for http not ws.
Since BrowserSync feature was added, our grunt file is different with regards to proxying, so maybe there's something to dig.

@deepu105
Copy link
Member

deepu105 commented Jul 3, 2015

@gmarziou did you check after latest release?

@deepu105
Copy link
Member

deepu105 commented Jul 8, 2015

@gmarziou @jdubois not just gulp proxy, websocket doesnt work for even browser sync in grunt setup

@gmarziou
Copy link
Contributor Author

gmarziou commented Jul 8, 2015

browser-sync is not a big win for me at least on Windows, sinc it was introduced I cannot just do server-less development I must run mvn spring-boot:run even if I don't use the backend. It also locks files.

I have started to use gulp on a mobile project because it's the default build tool for Ionic framework and frankly I would not mind switching to gulp also in JHipster if gulp was not using brower sync.

@gmarziou
Copy link
Contributor Author

It should be tested again since PR #1847 because it upgraded gulp proxy.

@jdubois
Copy link
Member

jdubois commented Sep 1, 2015

For me this doesn't work with BrowserSync, with Grunt, and I even documented here.

Shouldn't we add this to the documentation and close this? If BrowserSync doesn't support WebSockets, we can't do much about this.

@gmarziou
Copy link
Contributor Author

gmarziou commented Sep 1, 2015

Looks like it has been fixed in BS 2.8.1

BrowserSync/browser-sync#625
https://github.com/BrowserSync/browser-sync/releases

@PeterEltgroth
Copy link

Nice find @gmarziou

Last night I had found BrowserSync/browser-sync#611 which seemed to suggest it had worked with BrowserSync 2.6.0 and 2.7.1. Glad they have fixed it again.

@jdubois
Copy link
Member

jdubois commented Sep 2, 2015

And the issue still exists with Grunt, so if you solve this with Gulp.js that would be a huge advantage for using Gulp.js!! cc @PeterEltgroth @amr

PeterEltgroth pushed a commit to PeterEltgroth/generator-jhipster that referenced this issue Sep 10, 2015
updated to 2.9.1 and tested on MacOSX with Safari, FireFox, and Chrome

Fix jhipster#1639
@jdubois jdubois modified the milestone: 2.21.0 Sep 16, 2015
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

4 participants