-
Notifications
You must be signed in to change notification settings - Fork 10.1k
In Firefox, connection .... was interrupted while the page was loading #2016
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
Comments
Same here, random disconnect on firefox, not on chrome. I can't understand what is the problem. |
It still happens on the latest version 1.3.6 |
There's an open ticket for this on Bugzilla. The "workaround" doesn't work for me. |
This will fix it |
Issue is still alive apparently getting the exact same error, I've tried both versions 1.2.0 I believe and the one that comes with the latest NPM package. Any workarounds? |
I too am getting the same error in Firefox. Can't seem to find a fix anywhere. |
I'm getting this error in FF 45 and my websocket connection times out. |
I am getting this error on FF 46 + Mac, FF 45 + Windows 10. |
For us the problem was the version of the net scaler we used |
Are you referring to the python script net scaler? I am not using it and still getting this error on socket.io |
Had the same issue on OS X 10.11.5 and Firefox 47. With the following configuration it works without errors for me on Firefox 47 and Chrome 51.0.2704.103.
{
"name": "socket-io-test",
"version": "1.0.0",
"description": "socket io test",
"main": "app.js",
"scripts": {
"start": "node app.js"
},
"repository": {
"type": "git",
"url": ""
},
"keywords": [],
"author": "Aleksandar Gotev",
"license": "ISC",
"homepage": "",
"dependencies": {
"express": "^4.14.0",
"socket.io": "^1.4.8"
}
}
{
"process_title": "wstest",
"web_server_port": 3000,
"max_seconds_to_wait_on_kill": 3
}
var expressFramework = require('express');
var express = expressFramework();
var fs = require('fs');
//read configuration
var configuration = JSON.parse(fs.readFileSync('config.json', "utf8"));
//setup express
express.set('json spaces', 2);
express.disable('x-powered-by'); //disable express framework credits
express.use("/", expressFramework.static(__dirname + "/static")); //serve static files
//start web server
var webServer = express.listen(configuration.web_server_port, function () {
console.log("Web server listening on port " + configuration.web_server_port);
});
//setup socket.io
var io = require('socket.io')(webServer);
io.on('connection', function (socket) {
socket.emit('hello', {
msg: "hello"
});
});
//setup process
var killHook = function killHook() {
console.log("Detected kill signal");
webServer.close(function() {
console.log("Graceful shutdown");
process.exit(0);
});
setTimeout(function () {
console.log("Waited for " + configuration.max_seconds_to_wait_on_kill + " seconds. Force kill.");
process.exit(0);
}, configuration.max_seconds_to_wait_on_kill * 1000);
};
process.title = configuration.process_title;
process.on('SIGTERM', killHook);
process.on('SIGINT', killHook);
<html>
<head>
<title>WS Test</title>
</head>
<body>
<script src="/socket.io/socket.io.js"></script>
<script>
window.onload = function() {
var socket = io.connect('http://localhost:3000');
socket.on('hello', function (data) {
document.write("<p> Hello message: " + JSON.stringify(data) + "</p>");
});
window.addEventListener("beforeunload", function() {
console.log("Close web socket");
socket.close();
});
};
</script>
</body>
</html> Just recreate the files in a directory and then execute: npm install
npm start And head your browser to http://localhost:3000 |
Hi all, |
Any updates on this? Because this is issue also affects Firefox 51.0.1 |
I get the same error but the connection works perfectly, strange... |
Set network.notify.ipv6 to false. |
still an issue on firefox quantum release |
@nagarjunbn and the below issue is gone: |
Still getting this error with
|
FF Quantum is sending a PING. Is there a socket.io handler implementation for WebSocket ping/pong? Could this be the issue? |
This error suddenly popped up in my Vue project when starting to use vuetify. |
have this same issue using gatsby static site generator for react, issue only occurs in FF... I noticed it because my fonts render everywhere but FF. |
have this same exact issue using Firefox Developer edition version 60.0b16. |
@ferdinandosp @tetreault which version of socket.io are you using? Does it still happen with version 2.1.0? |
@darrachequesne I'm using socket.io v2.1.0 and still getting that error, also using Reactjs in Firefox |
[email protected] : |
Maybe it helps anyone...
|
I am getting this warning too. Im using Vue-CLI with laravel and tried to run npm serve. The warning shows only in firefox. |
@princeivankent There is definitely a difference. Just to be clear, I don't see any warning but the handler behavior on the client side is different in Firefox. Before we compare our implementations let's do some discovery. In chrome my socket joins the lobby. In Firefox my socket closes, reconnects and then joins the lobby. People are suggesting that operations based on window events are a workaround which may help with edge cases but does not speak for WHAT is actually the problem. I've suggested in the linked issue above 1436, that you need to implement PING -> PONG on your server side. But the problem I'm seeing suggests that the event pipeline in Mozilla still has a flaw in Quantum which is at 65.0.1. But I'll report back with more. I'm going to try connecting after the DOM loads. I don't see that suggestion yet. |
So in this case I've confirmed for myself that the issue I see only occurs on "beforeunload" like @PopovMaxim has pointed out. Things happen faster or are actually being reported in Firebug but not Chrome's inspector. But again something has variance in their event handling pipeline when transitioning pages. I'm going to wager that all server side implementations that are dealing with random disconnects are just not replying with a pong respective to ping. Also @princeivankent you are more likely dealing with race conditions in "front end world". You would need to elaborate more about the problem but I suspect that your websocket connection does persist after the page loads but you are seeing warnings when it unloads. |
I still don't think this problem can mitigated within the socket.io lib. I suspect that this is a race condition due to concurrent processing in FFQ browser and that's why the "beforeunload" workaround is effective. It provides a means to close the socket when the browser is doing whatever it is doing. Why is this still open? |
This have to be a Firefox bug. I used my dev-server for months without this issue (SSE). The only workaround I find, is to reconnect (create new connection) when the error occurs. |
Just did an update and now I am getting this too FFS :( |
I forgot to write 'export default{}' in nuxt layouts. I did that and reconnect fixed the problem. |
Getting this on Firefox 69.0.1 (64-bit) on Mac OSX Mojave 10.14.6 |
Getting this error using Firefox 69.0.2 (64-bit) on Ubuntu 18.04. I'm using the dojo 6 framework I used dojo/cli-create-app version 6.0.0 to create the project. The error specifically is: |
fyi, Over at webpack-hot-middleware/issues/265 @pstadler wrote (2017)
|
Hi i created connect with server side events. In chrome this working. Server side events: open |
i was getting this with Firefox 79. since it isn't very obvious what to do the solution is to upgrade package |
I've added a note here: https://socket.io/docs/v3/logging-and-debugging/#Error-logs-in-the-browser-console I'm not sure there is something to fix at the Socket.IO level. Please reopen if needed. |
I'm getting this error in firefox (when using mercure-hub to subscribe ) window.addEventListener('beforeunload', function () { |
Does anyone have steps for how to replicate this? We have some customers reporting this issue in Firefox but I've been unable to replicate it. Does this happen when Firefox runs out of memory or something? |
Currently experiencing this issue when developing a React Native app with Expo, using |
Hi,
it shows connection to ws:..... was interrupted while the page was loading in Firefox but works.
I saw many possible fix suggestions on different sites but none of them work now.
It works fine in other browsers without any error/warning in the console.
I am using socket.io 1.3.4 and firefox latest version 35.0.1.
The text was updated successfully, but these errors were encountered: