Comments (9)
Yes, annoying error indeed but yes.
It's not exactly when you use websockets, but when it closes because you navigate from one page to another.
from drab.
With Safari Console enable just change from https://tg.pl/drab to https://tg.pl/drab/docs#drab and you'll get
WebSocket connection to 'wss://tg.pl/drab/socket/websocket?__drab_return=SFMyNTY.g3QAAAACZAAEZGF0YWwAAAADaAJkAAxfX2NvbnRyb2xsZXJkAB1FbGl4aXIuRHJhYlBvYy5QYWdlQ29udHJvbGxlcmgCZAAIX19hY3Rpb25kAAVpbmRleGgCZAAJX19hc3NpZ25zbAAAAAJoAmQAB3VzZXJfaWRhBGgCZAAJYW55X290aGVybQAAAAR0ZXN0ampkAAZzaWduZWRuBgBPIwcgWwE.aWFZb6pUdohLzZ0BQzTFe9ZoAzzNDn3w3y5xDAPBKJo&vsn=1.0.0' failed: WebSocket is closed due to suspension.
from drab.
I can't reproduce this error on my Safaris.
What is the version of Safari you are using? Is it going through a proxy or direct?
from drab.
Umm this is weird.
On Mac Os Sierra 10.12.3 (16D32) Safari Version 10.0.3 (12602.4.8)
On iOs version is 9.3.5 (same excepcion and always crashes)
I can record a video or take some screenshots to show you what happen.
I got another Mac I'll test it later and give you feed back.
Thnx
from drab.
The issue is not only the Drab problem, as you have the same message in live_reload
socket - it is a general websocket problem (Drab uses standard Phoenix sockets). Anyway we need to debug it somehow.
I have exactly the same versions of Safari on Sierra. I've also check on iPhone and iPad simulators, no issue.
Are you connection through any proxy? Transparent proxy? 3G provider? But it would be strange, as you have the same issue while connecting to localhost.
from drab.
Yes, I do agree with you, it seems something more general and we have somehow to work it out .
Because first step to solve a problem is to reproduce it, I've recorded a video to show you the error just with your demo website.
Be sure you've activated Safari's console feature "Keep Log on Navigation" because the when you have it deactivated the error just appears for a second and just disappears in a blink.
I've also test it with another Mac OS (Yosemite) and found same excepction.
Hope this could help you.
from drab.
Thanks a lot,
I can see it now (after enabling "keep log on navigation"), and I don't think it is an issue! When you navigate away from the page, it breaks the websocket connection. And it supposed to be like that - on the server side, Drab GenServer dies as well.
Please notice that event with this message, all websocket functionality works correctly on Safari. Isn't it?
I replicated the same behaviour on pure, new phoenix project (mix phoenix.new test --no-ecto
), and have the same message ([Error] WebSocket connection to 'ws://localhost:4000/phoenix/live_reload/socket/websocket?vsn=1.0.0' failed: WebSocket is closed due to suspension.
) when navigating away. So if you still find is as a bug, please report it to the phoenix project team.
from drab.
Great,
Yes I'm going to report it to Phoenix team, because on iOS it crashes Safari, and also it doesn`t seem right way to manage websockets when you navigate from one page to another.
from drab.
Uh, Safari crashing when using websockets would in no possible way be a server (phoenix) issue at all, that would purely be a browser issue...
from drab.
Related Issues (20)
- Drab resets scroll position when updating DOM HOT 1
- Unable to join the Drab Channel {reason: "join crashed"} HOT 2
- Does `broadcast_poke` pass "origin" socket's assigns to all browers? HOT 4
- sender always return true for checkbox
- function Phoenix.HTML.Engine.fetch_assign/2 is undefined or private HOT 17
- (ArgumentError) assign @xxx not available in eex template. HOT 7
- Compact log message HOT 13
- Important information about Tomasz (I am his colleague) HOT 4
- ReferenceError: event is not defined in FireFox HOT 9
- Cohabitation with LiveView
- Drab is unable to find the endpoint of ':cool_interface'. HOT 6
- this.Socket is not a constructor HOT 3
- Support for hot code upgrade in production HOT 1
- Browser Support HOT 6
- exec_js return type unmatched when using dialyzer HOT 2
- partials do not work HOT 6
- mismatch template HOT 7
- drab-click in nested templates HOT 10
- Support Phoenix 1.5 HOT 3
- Is it possible to use drab without elixir? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from drab.