-
-
Notifications
You must be signed in to change notification settings - Fork 375
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
SockJS issue when port is different than 8080 #345
Comments
Your server is not actually running on |
Same here |
Yup - looks like we're not passing port correctly. |
hey all 👋, I tried to reproduce this bug but seems it is fixed on current stable version,
🐛 💥 🐞 [TEST SCENARIO]
const http = require('http');
const PORT = 8080;
const server = http.createServer((req, res) => {
res.end(`Hello http://localhost:${PORT}!`);
});
server.listen(PORT, () => {
console.log(`Running on`, server.address())
});
import "./style";
import { Component } from "preact";
export default class App extends Component {
componentDidMount() {
console.log(`fetch:start`);
fetch("https://dog.ceo/api/breeds/image/random")
.then(res => res.json())
.then(data => {
console.log(`fetch:done - .then`);
console.log(data);
})
.catch((err) => {
console.log(`fetch:done - .catch`);
console.log(err);
});
}
render() {
return (
<div>
<h1>Hello, World!</h1>
</div>
);
}
}
|
Do you want to request a feature or report a bug?
Bug
What is the current behavior?
After executing an AJAX request, this errors from sock start populating the console
If the current behavior is a bug, please provide the steps to reproduce.
What is the expected behavior?
I think sock should be mapped to the port were the app is running.
If this is a feature request, what is motivation or use case for changing the behavior?
Please mention other relevant information.
The text was updated successfully, but these errors were encountered: