Websocket connection beeing terminated when following 'tel:' - links
Categories
(Core :: Networking: WebSockets, defect)
Tracking
()
People
(Reporter: michael, Unassigned)
Details
User Agent: Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:85.0) Gecko/20100101 Firefox/85.0
Steps to reproduce:
I'm using a (local) webpage containing customer contacts. It contains related phone numbers, formatted as 'tel:xxxxx' - links as a shortcut for initiating phone calls (runs on Windows).
The page also establishes a websocket-connection to the server for item updates.
The connection remains stable, only by using these 'tel:' links it's terminated.
Actual results:
Websocket connections are beeing closed when 'tel:'-links are clicked to initiate phone calls (for sure leaving the site is not intended).
The connection can be reestablished at once in the 'onclose'-event without problems.
Expected results:
I'd expect that websocket connections wouldn't be terminated, as they remain when following 'mailto:'-links...
Comment 1•4 years ago
|
||
Michael, are you seeing anything displayed in the web console or browser console? Did this ever worked for you in Firefox or is it a recent issue?
I'm going to assign this to the Networking: WebSockets component so that someone more experienced could take a look.
Reporter | ||
Comment 2•4 years ago
|
||
Helllo Simona,
I added the websocket-functionality only a few days ago, so I can't say if this would have happened with earlier versions of Firefox. In the 'onclose'-event of websockets I send the CloseEvent object to the console, the most interesting property I think is 'code' which says 1006.
There are no further errors or issues, I reopen the websocket connection every time it disconnects - without problems.
But I can't believe this is intended behaviour.
There are no other situations where websockets get disconnected (except when really leaving the page.... :-) so I think my websocket code should be ok.
Best regards,
Michael
Comment 4•4 years ago
|
||
Hi Michael,
Is it possible to provide us a simple test case for reproducing this issue?
Thanks.
Reporter | ||
Comment 5•4 years ago
|
||
Hello,
I found an example to test on the net. Try: https://medium.com/@cn007b/super-simple-php-websocket-example-ea2cd5893575
(only php-script is needed; I copied it to my testserver and started it there in a shell).
On the client side use this (it's the slightly modified example frop that page; I added the 'a'-element):
<html>
<body>
<div id="root"></div>
<a href="tel:1234" data-tel="1234" data-name="Example" data-protocol="tel">Example</a>
<script>
var host = 'ws://SERVER-IP-ADDRESS:12345/websockets.php';
var socket = new WebSocket(host);
socket.onmessage = function (e)
{
document.getElementById('root').innerHTML = e.data;
};
</script>
</body>
</html>
I was able to repeat the error with this example - when the connection to the php-server-script was established you can see the timestamp counting upwards in the top left corner. When the tel:-link is clicked it stops due to disconnecting the websocket connection.
I think this shouldn't happen until a link is clicked which refers to another page or when reloading the page...
Best regards,
Michael
Comment 6•4 years ago
•
|
||
It seems to me that the websocket is killed because we attempt to navigate the page to the tel: URL.
Seems like a dupe of bug 896666.
Comment 7•3 years ago
|
||
Any workaround? The issue has been known since 9 years, I don't want to hold my breath...
Description
•