Giter Site home page Giter Site logo

Comments (9)

mfeckie avatar mfeckie commented on July 18, 2024

There's not enough information to figure out what the problem is here.

Please can you share what version of Phoenix you're trying to connect to? Also, does this only happen when connecting via Dart / Flutter, or does it affect you if you use the Phoenix.js client in a browser?

from phoenix_wings.

tmacLiu001 avatar tmacLiu001 commented on July 18, 2024

thank, you! I already fixed it . it just because of ...was not upgraded to websocket. phoenix version: "~> 1.4.3"

from phoenix_wings.

tblakey89 avatar tblakey89 commented on July 18, 2024

@fightingLT How did you fix it?

from phoenix_wings.

albydarned avatar albydarned commented on July 18, 2024

I'm also wondering how this was fixed @fightingLT

from phoenix_wings.

alexfilatov avatar alexfilatov commented on July 18, 2024

@tmacLiu001 care to share how exactly you fixed that? thanks

from phoenix_wings.

redDwarf03 avatar redDwarf03 commented on July 18, 2024

any update or info ?

from phoenix_wings.

albydarned avatar albydarned commented on July 18, 2024

I remember going through this and fixing it as well but can't quite remember... Heres my working code...

Map<String, String> params = {
  "token": token
};
PhoenixSocketOptions socketOptions = PhoenixSocketOptions(params: params);

_connectSocket("wss://app.url.com:443/socket/websocket", socketOptions)
  .then((PhoenixSocket socket) {
    _socket = socket;
    _channel = _socket.channel("my:channel");

    _channel.on("event", _function);

    _channel.join();
  });
});

from phoenix_wings.

redDwarf03 avatar redDwarf03 commented on July 18, 2024

I remember going through this and fixing it as well but can't quite remember... Heres my working code...

Map<String, String> params = {
  "token": token
};
PhoenixSocketOptions socketOptions = PhoenixSocketOptions(params: params);

_connectSocket("wss://app.url.com:443/socket/websocket", socketOptions)
  .then((PhoenixSocket socket) {
    _socket = socket;
    _channel = _socket.channel("my:channel");

    _channel.on("event", _function);

    _channel.join();
  });
});

Thank you but I use Absinthe on top of Phoenix so I'm not linking your example to mine. I hope it will help other developers though :)

from phoenix_wings.

redDwarf03 avatar redDwarf03 commented on July 18, 2024

I think I find
it doesn't work when I coded AbsintheSocket _socket = AbsintheSocket('ws://' + host + '/socket');
But then I added web socket, it worked better: AbsintheSocket _socket = AbsintheSocket('ws://' + host + '/socket/websocket');

from phoenix_wings.

Related Issues (14)

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.