Comments (9)
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.
thank, you! I already fixed it . it just because of ...was not upgraded to websocket
. phoenix version: "~> 1.4.3"
from phoenix_wings.
@fightingLT How did you fix it?
from phoenix_wings.
I'm also wondering how this was fixed @fightingLT
from phoenix_wings.
@tmacLiu001 care to share how exactly you fixed that? thanks
from phoenix_wings.
any update or info ?
from phoenix_wings.
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.
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.
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)
- Add Phoenix.Presence HOT 6
- Heartbeat HOT 3
- StreamSink is closed HOT 3
- Does not support flutter web. HOT 4
- Null Safety HOT 5
- Unhandled Exception HOT 4
- Channel off wrong event
- PhoenixChannel causing Unhandled Exception
- socketOptions won't accept more than 1 param
- Dart 2 compability
- Possible incompatibility with phoenix.js HOT 9
- socket.disconnect does not stop the connect loop HOT 4
- onClose was called on null HOT 2
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 phoenix_wings.