Giter VIP home page Giter VIP logo

Comments (9)

taorg avatar taorg commented on September 15, 2024 1

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.

taorg avatar taorg commented on September 15, 2024

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.

grych avatar grych commented on September 15, 2024

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.

taorg avatar taorg commented on September 15, 2024

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.

grych avatar grych commented on September 15, 2024

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.

taorg avatar taorg commented on September 15, 2024

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.

grych avatar grych commented on September 15, 2024

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.

taorg avatar taorg commented on September 15, 2024

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.

OvermindDL1 avatar OvermindDL1 commented on September 15, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.