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

404 with https://myapp.com:9000/sockjs-node/info?xxxx related to HMR when the base url for vue is changed to "/xxxx" instead of "/" #11370

Closed
hemanthgk10 opened this issue May 3, 2020 · 2 comments

Comments

@hemanthgk10
Copy link

Version

2.6.11

Reproduction link

https://github.com/hemanthgk10/dummy-dashboard

Steps to reproduce

  1. Create a vue-app with command vue create myapp.
  2. Add an nginx infront of it and have a config routing traffic to vue app on "/xxxx" anything apart from default "/". Nginx have certs created to run on https on port 5443.
  3. Change the baseUrl / Publicpath to "/xxx/" , have https enabled in the config and public set to https://myapp.com:5443 in vue.config.js
  4. As soon as the app launches it the browser throws the error in the console logs about the sockjs-node 404 error fetch the hot reload status failing as it is looking at path "/" instead of "/xxxx".

What is expected?

Expected that by default the HMR should be checking on "/xxx" instead of "/"

What is actually happening?

websocket connecting is trying to fetch the HMR status on "/" and fails with 404


I see that react has a refresh webpack plugin
pmmmwh/react-refresh-webpack-plugin#43
webpack/webpack-dev-server#1385

I know this is not an issue with Vue but, is there a way to workaround this issue in vue app. I do have the hot: false in vue.config.js but that didn't help from this error.

sockjs.js?9be2:1606 POST https://myapp.com:5443/sockjs-node/112/toqico1s/xhr_streaming?t=1588543366318 404 (Not Found)
GET https://myapp.com:5443/sockjs-node/498/k1oc5slc/eventsource 404 ( Not Found )
@hemanthgk10 hemanthgk10 changed the title 404 with https://localhost:9000/sockjs-node/info?xxxx related to HMR when the base url for vue is changed to "/admin" 404 with https://localhost:9000/sockjs-node/info?xxxx related to HMR when the base url for vue is changed to "/xxxx" instead of "/" May 3, 2020
@hemanthgk10 hemanthgk10 changed the title 404 with https://localhost:9000/sockjs-node/info?xxxx related to HMR when the base url for vue is changed to "/xxxx" instead of "/" 404 with https://myapp.com:9000/sockjs-node/info?xxxx related to HMR when the base url for vue is changed to "/xxxx" instead of "/" May 4, 2020
@posva
Copy link
Member

posva commented May 4, 2020

Hi, thanks for your interest but Github issues are for bug reports and feature requests only. You can ask questions on the forum, the Discord server or StackOverflow.


As you pointed out yourself, this is not directly related to Vue

@posva posva closed this as completed May 4, 2020
@hemanthgk10
Copy link
Author

@posva thanks for looking into it. But there should be a way to avoid this error in vue.js as it is coming from Vue HMR, as you can see my project is not using webpack directly.

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

No branches or pull requests

2 participants