infitio / flutter_socket_io Goto Github PK
View Code? Open in Web Editor NEWSocket IO supprt for flutter. Looking for contributors Swift and Java.
License: Other
Socket IO supprt for flutter. Looking for contributors Swift and Java.
License: Other
Describe the bug
use android studio run ios-Simulator on error:
[VERBOSE-2:ui_dart_state.cc(148)] Unhandled Exception: MissingPluginException(No implementation found for method newInstance on channel adhara_socket_io)
#0 MethodChannel.invokeMethod (package:flutter/src/services/platform_channel.dart:314:7)
<asynchronous suspension>
#1 SocketIOManager.createInstance (package:adhara_socket_io/manager.dart:16:32)
<asynchronous suspension>
#2 SocketUtils.socketTo (package:flutter_socket_io_demo/socket_utils.dart:24:28)
<asynchronous suspension>
#3 _MyHomePageState._incrementCounter (package:flutter_socket_io_demo/main.dart:58:17)
#4 _InkResponseState._handleTap (package:flutter/src/material/ink_well.dart:635:14)
#5 _InkResponseState.build.<anonymous closure> (package:flutter/src/material/ink_well.dart:711:32)
#6 GestureRecognizer.invokeCallback (package:flutter/src/gestures/recognizer.dart:182:24)
#7 TapGestureRecognizer._checkUp (package:flutter/src/gestures/tap.dart:365:11)
#8 TapGestureRecognizer.acceptGesture (package:f<…>
use x-code run ios-Simulator on error:
fatal error: module map file '/Users/apple/Documents/project/public/flutter_socket_io_demo/build/ios/Debug-iphonesimulator/Socket.IO-Client-Swift/SocketIO.modulemap' not found
1 error generated.
Device details:
My Code
class SocketUtils {
static SocketIOManager manager;
static SocketIO socket;
static Future socketTo() async {
manager =new SocketIOManager();
//配置socket链接信息
SocketOptions socketOptions = new SocketOptions(
'https://ci.icxinli.com',
query: {
'token': testToken,
'source': 'CONSULTANT',
},
transports: [Transports.WEB_SOCKET, Transports.POLLING],
enableLogging: true,
);
socket = await manager.createInstance(socketOptions);
socket.onConnect((res) {
// socket.emit('rooms', []);
print('onConnect--------' + res);
});
socket.on('rooms', (rooms) {
print('rooms1111========' + rooms.toString());
print('rooms2222========' + rooms[0].nickName);
print('rooms3333========' + rooms.toString());
});
socket.connect();
}
}
When I try running the app using the example code from the adhara socket plugin on iOS, nothing happens. It neither connects, emits a message or even throw an error.
Runs as expected on Android and the mobile browser.
Expected behavior
Should display, connected and message received from the socket server.
Device details:
unable to disconnect either via kManager and manager. any problem?
SocketIOManager manager = SocketIOManager();
SocketIO socket = await manager.createInstance(SocketOptions('http://********/', enableLogging: false));
global.kManager = manager;
global.kSocket = socket;
.
.
.
await kManager.clearInstance(kSocket);
How to disable log of socket echo?
I'm trying to move SocketIO instance to this page:
import 'dart:async';
import 'package:adhara_socket_io/adhara_socket_io.dart';
import 'package:flutter/material.dart';
class MyPage extends StatefulWidget {
final String groupID;
final Color groupColor;
final SocketIO socket;
static final String routeName = '/my_page';
MyPage({ @required this.groupID, @required this.socket, Key key, this.groupColor }) : super(key: key);
@override
_MyPageState createState() => new _MyPageState();
}
And I'm calling it like this:
SocketIO socketObj = await new SocketIOManager().createInstance(
HttpMGR.getServerURL(),
query: {
'Authorization': ACCESS_TOKEN,
'groupID': ''**********GROUP_ID********'
}
);
socketObj.connect();
Navigator.of(context).push(
MaterialPageRoute(
builder: (BuildContext context) => new MyPage(
groupID: '**********GROUP_ID********',
socket: socketObj
)
)
);
But instead this class throws this exception and the page don't load:
I/flutter ( 6901): The following NoSuchMethodError was thrown building Builder:
I/flutter ( 6901): The getter 'socket' was called on null.
I/flutter ( 6901): Receiver: null
I/flutter ( 6901): Tried calling: socket
How to disconnect with server?
SocketIOManager().clearInstance(socket);
doesnt work
manager = SocketIOManager();
setState(() => isProbablyConnected = true);
socket =
await manager.createInstance(socketUrl, query: {}, enableLogging: true);
socket.onConnect((data) {
print("connected...$data");
socket.emit("message", ["Hello World"]);
});
socket.onConnectError(pprint);
socket.onConnectTimeout(pprint);
socket.onError(pprint);
socket.onDisconnect(pprint);
socket.on('news', (data) {
print("hi" + data);
});
socket.connect();
I am running flutter app on real device and trying to connect socket on my server IP but it failed to connect.
Describe the bug
:0: error: could not build Objective-C module 'Starscream'
umbrella header "Starscream-umbrella.h"
To Reproduce
My proj is objc language, i have integrate it and change config to support swift . when i build show this error.
Launching lib\main.dart on MI 9 in debug mode...
Initializing gradle...
Resolving dependencies...
Running Gradle task 'assembleDebug'...
Built build\app\outputs\apk\debug\app-debug.apk.
Installing build\app\outputs\apk\app.apk...
Syncing files to device MI 9...
D/NetworkSecurityConfig(25663): No Network Security Config specified, using platform default
W/tobiagib.asio0(25663): Accessing hidden method Ldalvik/system/CloseGuard;->get()Ldalvik/system/CloseGuard; (light greylist, reflection)
W/tobiagib.asio0(25663): Accessing hidden method Ldalvik/system/CloseGuard;->open(Ljava/lang/String;)V (light greylist, reflection)
W/tobiagib.asio0(25663): Accessing hidden method Ldalvik/system/CloseGuard;->warnIfOpen()V (light greylist, reflection)
E/EventThread(25663): Task threw exception
E/EventThread(25663): java.lang.RuntimeException: Methods marked with @UiThread must be executed on the main thread. Current thread: EventThread
E/EventThread(25663): at io.flutter.embedding.engine.FlutterJNI.ensureRunningOnMainThread(FlutterJNI.java:605)
E/EventThread(25663): at io.flutter.embedding.engine.FlutterJNI.dispatchPlatformMessage(FlutterJNI.java:515)
E/EventThread(25663): at io.flutter.embedding.engine.dart.DartMessenger.send(DartMessenger.java:76)
E/EventThread(25663): at io.flutter.embedding.engine.dart.DartExecutor.send(DartExecutor.java:166)
E/EventThread(25663): at io.flutter.view.FlutterNativeView.send(FlutterNativeView.java:155)
E/EventThread(25663): at io.flutter.plugin.common.MethodChannel.invokeMethod(MethodChannel.java:98)
E/EventThread(25663): at io.flutter.plugin.common.MethodChannel.invokeMethod(MethodChannel.java:84)
E/EventThread(25663): at com.infitio.adharasocketio.AdharaSocket$1.call(AdharaSocket.java:81)
E/EventThread(25663): at io.socket.emitter.Emitter.emit(Emitter.java:117)
E/EventThread(25663): at io.socket.client.Socket.access$601(Socket.java:24)
E/EventThread(25663): at io.socket.client.Socket$5.run(Socket.java:186)
E/EventThread(25663): at io.socket.thread.EventThread.exec(EventThread.java:55)
E/EventThread(25663): at io.socket.client.Socket.emit(Socket.java:182)
E/EventThread(25663): at io.socket.client.Socket.onconnect(Socket.java:389)
E/EventThread(25663): at io.socket.client.Socket.onpacket(Socket.java:283)
E/EventThread(25663): at io.socket.client.Socket.access$100(Socket.java:24)
E/EventThread(25663): at io.socket.client.Socket$2$2.call(Socket.java:120)
E/EventThread(25663): at io.socket.emitter.Emitter.emit(Emitter.java:117)
E/EventThread(25663): at io.socket.client.Manager.ondecoded(Manager.java:427)
E/EventThread(25663): at io.socket.client.Manager.access$1600(Manager.java:30)
E/EventThread(25663): at io.socket.client.Manager$7.call(Manager.java:403)
E/EventThread(25663): at io.socket.parser.IOParser$Decoder.add(IOParser.java:105)
E/EventThread(25663): at io.socket.client.Manager.ondata(Manager.java:419)
E/EventThread(25663): at io.socket.client.Manager.access$1000(Manager.java:30)
E/EventThread(25663): at io.socket.client.Manager$2.call(Manager.java:370)
E/EventThread(25663): at io.socket.emitter.Emitter.emit(Emitter.java:117)
E/EventThread(25663): at io.socket.engineio.client.Socket.onPacket(Socket.java:551)
E/EventThread(25663): at io.socket.engineio.client.Socket.access$1000(Socket.java:36)
E/EventThread(25663): at io.socket.engineio.client.Socket$5.call(Socket.java:335)
E/EventThread(25663): at io.socket.emitter.Emitter.emit(Emitter.java:117)
E/EventThread(25663): at io.socket.engineio.client.Transport.onPacket(Transport.java:126)
E/EventThread(25663): at io.socket.engineio.client.transports.Polling.access$700(Polling.java:18)
E/EventThread(25663): at io.socket.engineio.client.transports.Polling$2.call(Polling.java:127)
E/EventThread(25663): at io.socket.engineio.parser.Parser.decodePayload(Parser.java:241)
E/EventThread(25663): at io.socket.engineio.client.transports.Polling._onData(Polling.java:135)
E/EventThread(25663): at io.socket.engineio.client.transports.Polling.onData(Polling.java:102)
E/EventThread(25663): at io.socket.engineio.client.transports.PollingXHR$5$1.run(PollingXHR.java:125)
E/EventThread(25663): at io.socket.thread.EventThread$2.run(EventThread.java:80)
E/EventThread(25663): at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
E/EventThread(25663): at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
E/EventThread(25663): at java.lang.Thread.run(Thread.java:764)
E/AndroidRuntime(25663): FATAL EXCEPTION: EventThread
E/AndroidRuntime(25663): Process: com.tobiagib.asio01, PID: 25663
E/AndroidRuntime(25663): java.lang.RuntimeException: Methods marked with @UiThread must be executed on the main thread. Current thread: EventThread
E/AndroidRuntime(25663): at io.flutter.embedding.engine.FlutterJNI.ensureRunningOnMainThread(FlutterJNI.java:605)
E/AndroidRuntime(25663): at io.flutter.embedding.engine.FlutterJNI.dispatchPlatformMessage(FlutterJNI.java:515)
E/AndroidRuntime(25663): at io.flutter.embedding.engine.dart.DartMessenger.send(DartMessenger.java:76)
E/AndroidRuntime(25663): at io.flutter.embedding.engine.dart.DartExecutor.send(DartExecutor.java:166)
E/AndroidRuntime(25663): at io.flutter.view.FlutterNativeView.send(FlutterNativeView.java:155)
E/AndroidRuntime(25663): at io.flutter.plugin.common.MethodChannel.invokeMethod(MethodChannel.java:98)
E/AndroidRuntime(25663): at io.flutter.plugin.common.MethodChannel.invokeMethod(MethodChannel.java:84)
E/AndroidRuntime(25663): at com.infitio.adharasocketio.AdharaSocket$1.call(AdharaSocket.java:81)
E/AndroidRuntime(25663): at io.socket.emitter.Emitter.emit(Emitter.java:117)
E/AndroidRuntime(25663): at io.socket.client.Socket.access$601(Socket.java:24)
E/AndroidRuntime(25663): at io.socket.client.Socket$5.run(Socket.java:186)
E/AndroidRuntime(25663): at io.socket.thread.EventThread.exec(EventThread.java:55)
E/AndroidRuntime(25663): at io.socket.client.Socket.emit(Socket.java:182)
E/AndroidRuntime(25663): at io.socket.client.Socket.onconnect(Socket.java:389)
E/AndroidRuntime(25663): at io.socket.client.Socket.onpacket(Socket.java:283)
E/AndroidRuntime(25663): at io.socket.client.Socket.access$100(Socket.java:24)
E/AndroidRuntime(25663): at io.socket.client.Socket$2$2.call(Socket.java:120)
E/AndroidRuntime(25663): at io.socket.emitter.Emitter.emit(Emitter.java:117)
E/AndroidRuntime(25663): at io.socket.client.Manager.ondecoded(Manager.java:427)
E/AndroidRuntime(25663): at io.socket.client.Manager.access$1600(Manager.java:30)
E/AndroidRuntime(25663): at io.socket.client.Manager$7.call(Manager.java:403)
E/AndroidRuntime(25663): at io.socket.parser.IOParser$Decoder.add(IOParser.java:105)
E/AndroidRuntime(25663): at io.socket.client.Manager.ondata(Manager.java:419)
E/AndroidRuntime(25663): at io.socket.client.Manager.access$1000(Manager.java:30)
E/AndroidRuntime(25663): at io.socket.client.Manager$2.call(Manager.java:370)
E/AndroidRuntime(25663): at io.socket.emitter.Emitter.emit(Emitter.java:117)
E/AndroidRuntime(25663): at io.socket.engineio.client.Socket.onPacket(Socket.java:551)
E/AndroidRuntime(25663): at io.socket.engineio.client.Socket.access$1000(Socket.java:36)
E/AndroidRuntime(25663): at io.socket.engineio.client.Socket$5.call(Socket.java:335)
E/AndroidRuntime(25663): at io.socket.emitter.Emitter.emit(Emitter.java:117)
E/AndroidRuntime(25663): at io.socket.engineio.client.Transport.onPacket(Transport.java:126)
E/AndroidRuntime(25663): at io.socket.engineio.client.transports.Polling.access$700(Polling.java:18)
E/AndroidRuntime(25663): at io.socket.engineio.client.transports.Polling$2.call(Polling.java:127)
E/AndroidRuntime(25663): at io.socket.engineio.parser.Parser.decodePayload(Parser.java:241)
E/AndroidRuntime(25663): at io.socket.engineio.client.transports.Polling._onData(Polling.java:135)
E/AndroidRuntime(25663): at io.socket.engineio.client.transports.Polling.onData(Polling.java:102)
E/AndroidRuntime(25663): at io.socket.engineio.client.transports.PollingXHR$5$1.run(PollingXHR.java:125)
E/AndroidRuntime(25663): at io.socket.thread.EventThread$2.run(EventThread.java:80)
E/AndroidRuntime(25663): at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
E/AndroidRuntime(25663): at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
E/AndroidRuntime(25663): at java.lang.Thread.run(Thread.java:764)
I/Process (25663): Sending signal. PID: 25663 SIG: 9
Lost connection to device.
switch to either channel master or channel beta by:
flutter channel master
or
flutter channel beta
run the example adhara_socket_io app in Android device or emulator (I did not check IOS).
E/EventThread(25663): java.lang.RuntimeException: Methods marked with @UiThread must be executed on the main thread. Current thread: EventThread
The Android embedder is now checking that platform->Dart messages are sent from the platform thread.
Pls. take a look at here:
Other flutter package (the image_picker) that has the same problem
and here:
use channel stable by the command:
flutter channel stable
I ran the example on IOS with this URI const String URI = "http://192.168.1.100:7000?auth=12345";
. I got socket.request._query
on the server to be { b64: '1', transport: 'polling' }
but on Android, I got { auth: '12345', EIO: '3', transport: 'polling' }
which is the expected data.
Secondly, how do I change transport from polling to websocket?
On my Widget I run the following "initSockets" method to initiate the connection to socket.io:
@override
void initState() {
super.initState();
initSockets();
}
@override
void dispose() {
subscription.cancel();
socketIOManager.clearInstance(socket);
super.dispose();
}
void initSockets() async {
print('initSockets');
socket = await socketIOManager.createInstance(localServerAddress());
socket.onConnect((data){
print("connected...");
});
socket.on("top_events", (data){
print("top_events");
});
socket.onDisconnect((data){
print('disconnected from socket.io');
});
socket.onReconnect((data){
print('reconnected to socket.io');
});
socket.connect();
}
If I do a Hot Restart a new connection is created without disposing of the old one. I have to Terminate the app and start it again, and only when the app terminates do the web socket connections get disconnected.
(This is one continuous log without restarts. It's separated into chunks to mention what is being done on the Flutter App.)
listening on *:3003
User connected
iZguUkmta-LEqu5DAAAA joined top_events.
Hot Restart Flutter App
User connected
XY-djcCpulwsluHWAAAB joined top_events.
Hot Restart Flutter App
User connected
ZhFEKkq9kzsv9duuAAAC joined top_events.
Hot Restart Flutter App
User connected
pEyRC6IZ4utNzr0RAAAD joined top_events.
Terminated Flutter App
User pEyRC6IZ4utNzr0RAAAD disconnected
User iZguUkmta-LEqu5DAAAA disconnected
User XY-djcCpulwsluHWAAAB disconnected
User ZhFEKkq9kzsv9duuAAAC disconnected
Built Flutter App
User connected
LffWd5d2YU3haGF9AAAE joined top_events.
Hot Restart Flutter App
User connected
kPtgi5YNkujpp59CAAAF joined top_events.
Hot Restart Flutter App
User connected
HLJcRi2Q8ZdpxSTdAAAG joined top_events.
How can I make sure the old connection is disconnected on Hot Restart?
Does this plugin work with socket.io server using HTTPS?
I have implemented the adhara socket.
i have successfully emitted and received the message from server side but the problem is the socket is again connecting and sending the request indefinitely.
how to stop this?
Latest flutter update seems to have complications with this package
flutter/engine@904cfc4#diff-1fa18ffd4ca48402f3b9437b82337f31
Describe the bug
I tried connecting to my socket.io using the example code and trying to connect to my local socket.io server. But it doesn't connect and when I enable the onConnectError listener I get the following error
onConnectErrorio.socket.engineio.client.EngineIOException: xhr poll error
Expected behavior
The app should be able to connect to the socket after a button click.
Device details:
Launching lib/main.dart on iPhone 6s in debug mode...
Starting Xcode build...
Xcode build done. 1.5s
Failed to build iOS app
Error output from Xcode build:
↳
** BUILD FAILED **
Xcode's output:
↳
=== BUILD TARGET adhara_socket_io OF PROJECT Pods WITH CONFIGURATION Debug ===
/Users/********/Projects/flutter/.pub-cache/hosted/pub.dartlang.org/adhara_socket_io-0.1.6/ios/Classes/AdharaSocketIoPlugin.m:2:9: fatal error: 'adhara_socket_io/adhara_socket_io-Swift.h' file not found
#import <adhara_socket_io/adhara_socket_io-Swift.h>
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 error generated.
Could not build the application for the simulator.
Error launching application on iPhone 6s.
I cannot find the adhara_socket_io/adhara_socket_io-Swift.h file anywhere.
Everything is in the title. To install the latest version, I had to put this in my pubspec.yaml
file.
adhara_socket_io:
git:
url: git://github.com/infitio/flutter_socket_io.git
socket.emit("start_session", xxxx...);
- does not workThe emit command does not work on iOS, on Android everything works fine..?
Is it possible to send data as Map directly for example socket.emit("msg", {'key': 'value'});
instead of socket.emit("msg", [{'key': 'value'}]);
?
Sorry it's kinda a feature request.
Describe the bug
Unable to receive updates from the socket server on the client. I am able to create a successful connection and emit messages too. However, I am not receiving any updates in the event callback.
Version used : adhara_socket_io: ^0.1.11
To Reproduce
Below is the code used to connect:
socket.on("connect", (response) {
print(response);
socket.emit("join", [{
"channelName": channelName }]);
`socket.on("event_name", (data) {
print(data);
});`
}); socket.connect();
I receive emitted message on the server successfully using socket.emit.
Expected behavior
Data received in the socket.on callback.
Adhara_socket_io doesn't specify a Swift version and none of the targets integrating it have the 'SWIFT_VERSION' attribute set.
wss://? not support
Client receive it 4 times ( Ordinary emit work fine
Running Xcode build...
Xcode build done. 13.6s
Failed to build iOS app
Error output from Xcode build:
↳
** BUILD FAILED **
Xcode's output:
↳
/Users/rajeshkumar/Desktop/loop/ios/Pods/FMDB/src/fmdb/FMDatabase.m:1486:15: warning: 'sqlite3_wal_checkpoint_v2' is only available on iOS 5.0 or newer [-Wunguarded-availability]
int err = sqlite3_wal_checkpoint_v2(_db, dbName, checkpointMode, logFrameCount, checkpointCount);
^~~~~~~~~~~~~~~~~~~~~~~~~
In module 'SQLite3' imported from /Users/rajeshkumar/Desktop/loop/ios/Pods/FMDB/src/fmdb/FMDatabase.m:8:
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.2.sdk/usr/include/sqlite3.h:8245:16: note: 'sqlite3_wal_checkpoint_v2' has been marked as
being introduced in iOS 5.0 here, but the deployment target is iOS 4.3.0
SQLITE_API int sqlite3_wal_checkpoint_v2(
^
/Users/rajeshkumar/Desktop/loop/ios/Pods/FMDB/src/fmdb/FMDatabase.m:1486:15: note: enclose 'sqlite3_wal_checkpoint_v2' in an @available check to silence this warning
int err = sqlite3_wal_checkpoint_v2(_db, dbName, checkpointMode, logFrameCount, checkpointCount);
^~~~~~~~~~~~~~~~~~~~~~~~~
1 warning generated.
/Users/rajeshkumar/Desktop/loop/ios/Pods/FMDB/src/fmdb/FMDatabaseQueue.m:101:9: warning: 'dispatch_queue_set_specific' is only available on iOS 5.0 or newer [-Wunguarded-availability]
dispatch_queue_set_specific(_queue, kDispatchQueueSpecificKey, (__bridge void *)self, NULL);
^~~~~~~~~~~~~~~~~~~~~~~~~~~
In module 'Foundation' imported from /Users/rajeshkumar/Desktop/loop/ios/Pods/FMDB/src/fmdb/FMDatabaseQueue.h:9:
In module 'CoreFoundation' imported from
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.2.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h:6:
In module 'Dispatch' imported from
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.2.sdk/System/Library/Frameworks/CoreFoundation.framework/Headers/CFStream.h:20:
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.2.sdk/usr/include/dispatch/queue.h:1352:1: note: 'dispatch_queue_set_specific' has been
marked as being introduced in iOS 5.0 here, but the deployment target is iOS 4.3.0
dispatch_queue_set_specific(dispatch_queue_t queue, const void *key,
^
/Users/rajeshkumar/Desktop/loop/ios/Pods/FMDB/src/fmdb/FMDatabaseQueue.m:101:9: note: enclose 'dispatch_queue_set_specific' in an @available check to silence this warning
dispatch_queue_set_specific(_queue, kDispatchQueueSpecificKey, (__bridge void *)self, NULL);
^~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/rajeshkumar/Desktop/loop/ios/Pods/FMDB/src/fmdb/FMDatabaseQueue.m:184:54: warning: 'dispatch_get_specific' is only available on iOS 5.0 or newer [-Wunguarded-availability]
FMDatabaseQueue *currentSyncQueue = (__bridge id)dispatch_get_specific(kDispatchQueueSpecificKey);
^~~~~~~~~~~~~~~~~~~~~
In module 'Foundation' imported from /Users/rajeshkumar/Desktop/loop/ios/Pods/FMDB/src/fmdb/FMDatabaseQueue.h:9:
In module 'CoreFoundation' imported from
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.2.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h:6:
In module 'Dispatch' imported from
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.2.sdk/System/Library/Frameworks/CoreFoundation.framework/Headers/CFStream.h:20:
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.2.sdk/usr/include/dispatch/queue.h:1408:1: note: 'dispatch_get_specific' has been marked as
being introduced in iOS 5.0 here, but the deployment target is iOS 4.3.0
dispatch_get_specific(const void *key);
^
/Users/rajeshkumar/Desktop/loop/ios/Pods/FMDB/src/fmdb/FMDatabaseQueue.m:184:54: note: enclose 'dispatch_get_specific' in an @available check to silence this warning
FMDatabaseQueue *currentSyncQueue = (__bridge id)dispatch_get_specific(kDispatchQueueSpecificKey);
^~~~~~~~~~~~~~~~~~~~~
2 warnings generated.
/Users/rajeshkumar/.pub-cache/hosted/pub.dartlang.org/local_auth-0.4.0+1/ios/Classes/LocalAuthPlugin.m:115:33: warning: block implicitly retains 'self'; explicitly mention 'self' to indicate
this is intended behavior [-Wimplicit-retain-self]
lastCallArgs = arguments;
^
self->
/Users/rajeshkumar/.pub-cache/hosted/pub.dartlang.org/local_auth-0.4.0+1/ios/Classes/LocalAuthPlugin.m:116:33: warning: block implicitly retains 'self'; explicitly mention 'self' to indicate
this is intended behavior [-Wimplicit-retain-self]
lastResult = result;
^
self->
2 warnings generated.
=== BUILD TARGET Socket.IO-Client-Swift OF PROJECT Pods WITH CONFIGURATION Debug ===
/Users/rajeshkumar/Desktop/loop/ios/Pods/Socket.IO-Client-Swift/Source/SocketIO/Ack/SocketAckManager.swift:39:9: warning: 'Hashable.hashValue' is deprecated as a protocol requirement;
conform type 'SocketAck' to 'Hashable' by implementing 'hash(into:)' instead
var hashValue: Int {
^
/Users/rajeshkumar/Desktop/loop/ios/Pods/Socket.IO-Client-Swift/Source/SocketIO/Client/SocketIOClientSpec.swift:239:5: warning: 'public' modifier is redundant for instance method declared in
a public extension
public func didError(reason: String) {
^~~~~~~
/Users/rajeshkumar/Desktop/loop/ios/Pods/Socket.IO-Client-Swift/Source/SocketIO/Parse/SocketPacket.swift:161:5: warning: 'public' modifier is redundant for enum declared in a public
extension
public enum PacketType: Int {
^~~~~~~
/Users/rajeshkumar/Desktop/loop/ios/Pods/Socket.IO-Client-Swift/Source/SocketIO/Parse/SocketParsable.swift:146:5: warning: 'public' modifier is redundant for instance method declared in a
public extension
public func parseSocketMessage(_ message: String) -> SocketPacket? {
^~~~~~~
/Users/rajeshkumar/Desktop/loop/ios/Pods/Socket.IO-Client-Swift/Source/SocketIO/Parse/SocketParsable.swift:172:5: warning: 'public' modifier is redundant for instance method declared in a
public extension
public func parseBinaryData(_ data: Data) -> SocketPacket? {
^~~~~~~
/Users/rajeshkumar/Desktop/loop/ios/Pods/Socket.IO-Client-Swift/Source/SocketIO/Ack/SocketAckManager.swift:39:9: warning: 'Hashable.hashValue' is deprecated as a protocol requirement;
conform type 'SocketAck' to 'Hashable' by implementing 'hash(into:)' instead
var hashValue: Int {
^
/Users/rajeshkumar/Desktop/loop/ios/Pods/Socket.IO-Client-Swift/Source/SocketIO/Parse/SocketPacket.swift:161:5: warning: 'public' modifier is redundant for enum declared in a public
extension
public enum PacketType: Int {
^~~~~~~
/Users/rajeshkumar/Desktop/loop/ios/Pods/Socket.IO-Client-Swift/Source/SocketIO/Parse/SocketParsable.swift:146:5: warning: 'public' modifier is redundant for instance method declared in a
public extension
public func parseSocketMessage(_ message: String) -> SocketPacket? {
^~~~~~~
/Users/rajeshkumar/Desktop/loop/ios/Pods/Socket.IO-Client-Swift/Source/SocketIO/Parse/SocketParsable.swift:172:5: warning: 'public' modifier is redundant for instance method declared in a
public extension
public func parseBinaryData(_ data: Data) -> SocketPacket? {
^~~~~~~
/Users/rajeshkumar/Desktop/loop/ios/Pods/Socket.IO-Client-Swift/Source/SocketIO/Ack/SocketAckManager.swift:39:9: warning: 'Hashable.hashValue' is deprecated as a protocol requirement;
conform type 'SocketAck' to 'Hashable' by implementing 'hash(into:)' instead
var hashValue: Int {
^
=== BUILD TARGET adhara_socket_io OF PROJECT Pods WITH CONFIGURATION Debug ===
<module-includes>:1:9: note: in file included from <module-includes>:1:
#import "adhara_socket_io-umbrella.h"
^
/Users/rajeshkumar/Desktop/loop/ios/Pods/Headers/Public/adhara_socket_io/adhara_socket_io-umbrella.h:13:9: note: in file included from
/Users/rajeshkumar/Desktop/loop/ios/Pods/Headers/Public/adhara_socket_io/adhara_socket_io-umbrella.h:13:
#import "AdharaSocketIoPlugin.h"
^
/Users/rajeshkumar/Desktop/loop/ios/Pods/Headers/Public/adhara_socket_io/AdharaSocketIoPlugin.h:1:9: error: 'Flutter/Flutter.h' file not found
#import <Flutter/Flutter.h>
^
<unknown>:0: error: could not build Objective-C module 'adhara_socket_io'
=== BUILD TARGET adhara_socket_io OF PROJECT Pods WITH CONFIGURATION Debug ===
<module-includes>:1:9: note: in file included from <module-includes>:1:
#import "adhara_socket_io-umbrella.h"
^
/Users/rajeshkumar/Desktop/loop/ios/Pods/Headers/Public/adhara_socket_io/adhara_socket_io-umbrella.h:13:9: note: in file included from
/Users/rajeshkumar/Desktop/loop/ios/Pods/Headers/Public/adhara_socket_io/adhara_socket_io-umbrella.h:13:
#import "AdharaSocketIoPlugin.h"
^
/Users/rajeshkumar/Desktop/loop/ios/Pods/Headers/Public/adhara_socket_io/AdharaSocketIoPlugin.h:1:9: error: 'Flutter/Flutter.h' file not found
#import <Flutter/Flutter.h>
^
<unknown>:0: error: could not build Objective-C module 'adhara_socket_io'
Could not build the precompiled application for the device.
Error launching application on HighPeaksw iPhone X.
I am trying to run on ios simulator and during the build process I get the following error:
Unable to determine Swift version for the following pods:
- adhara_socket_io
does not specify a Swift version and none of the targets (Runner
) integrating it have the SWIFT_VERSION
attribute set. Please contact the author or set the SWIFT_VERSION
attribute in at least one of the targets that integrate this pod.
Describe the bug
the reqId must be marked as an optional variable, on line 77
Expected behavior
let reqId: String? = arguments["reqId"] as? String
// Client
socket.emit('my event name', ['my first param', (message) {
print(message);
} ] );
// Server [Node]
socket.on('my event name', (data, callback) => {
return callback('Success');
} ] )
When I run the function, I got an error "Invalid argument: Closure: (dynamic) => Null"
Socket not working on iOS because of namespace issue.
https://github.com/infitio/flutter_socket_io/blob/master/ios/Classes/AdharaSocket.swift
Above file doesn't have any code for namespace.
It should be like this.
let manager = SocketManager(socketURL: URL(string:"http://localhost:8080/")!)
let defaultNamespaceSocket = manager.defaultSocket
let swiftSocket = manager.socket(forNamespace: "/swift")
Describe the bug
If the event data received from the server is not formatted as JSON an exception is thrown.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
The .on event should support strings or ignore the data.
Device details:
Relevant Logs
Are there any ideas floating around to support web / upcoming desktop clients?
Complexity to support would be good to know as well.
these are my dependences
dependencies:
flutter:
sdk: flutter
# The following adds the Cupertino Icons font to your application.
# Use with the CupertinoIcons class for iOS style icons.
google_maps_flutter: ^0.5.15
cupertino_icons: ^0.1.2
http: ^0.12.0+2
json_annotation: ^2.0.0
flutter_spinkit: "^3.1.0"
firebase_core: ^0.4.0
firebase_auth: ^0.11.0
google_sign_in: ^4.0.1+3
pointycastle: ^1.0.1
flutter_svg: ^0.12.0
flutter_secure_storage: ^3.2.1+1
adhara_socket_io: 0.1.9
and this is the output log
=== BUILD TARGET firebase_auth OF PROJECT Pods WITH CONFIGURATION Debug ===
/Users/macboookpro/Documents/flutter/boton_pas/ios/Pods/Socket.IO-Client-Swift/Source/SocketIO/Engine/SocketEngine.swift:316:11: error: value of type 'WebSocket' has no member 'onHttpResponseHeaders'
ws?.onHttpResponseHeaders = {[weak self] headers in
~~^ ~~~~~~~~~~~~~~~~~~~~~
[✓] Flutter (Channel stable, v1.7.8+hotfix.3, on Mac OS X 10.14.3 18D109, locale en-IN)
[✓] Android toolchain - develop for Android devices (Android SDK version 28.0.3)
[✓] Xcode - develop for iOS and macOS (Xcode 10.2.1)
[✓] iOS tools - develop for iOS devices
[✓] Android Studio (version 3.3)
[✓] IntelliJ IDEA Community Edition (version 2017.3.5)
[✓] VS Code (version 1.36.1)
[✓] Connected device (1 available)
• No issues found!
while running pod install
i get this error
[!] Unable to determine Swift version for the following pods:
adhara_socket_io
does not specify a Swift version and none of the targets (Runner
) integrating it have the SWIFT_VERSION
attribute set. Please contact the author or set the SWIFT_VERSION
attribute in at least one of the targets that integrate this pod.Describe the bug
A clear and concise description of what the bug is.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
A clear and concise description of what you expected to happen.
Device details:
Relevant Logs
Add any relevant logs about the problem here.
Describe the bug
I get this error when I try to run the example project on my computer (see logs).
As I get this issue with the example project it seems to be related to my flutter setup but I don't see what I did wrong since I don't get any error when running flutter doctor
.
To Reproduce
Steps to reproduce the behavior:
flutter run
Device details:
Relevant Logs
Running "flutter pub get" in example... 4.2s
Launching lib/main.dart on iPhone Xʀ in debug mode...
Removing obsolete reference to flutter_assets from Runner.app
Running pod install... 0.6s
CocoaPods' output:
↳
Preparing
Analyzing dependencies
Inspecting targets to integrate
Using `ARCHS` setting to build architectures of target `Pods-Runner`: (``)
Fetching external sources
-> Fetching podspec for `Flutter` from `.symlinks/flutter/ios`
-> Fetching podspec for `adhara_socket_io` from `.symlinks/plugins/adhara_socket_io/ios`
Resolving dependencies of `Podfile`
[!] CocoaPods could not find compatible versions for pod "adhara_socket_io":
In Podfile:
adhara_socket_io (from `.symlinks/plugins/adhara_socket_io/ios`)
Specs satisfying the `adhara_socket_io (from `.symlinks/plugins/adhara_socket_io/ios`)` dependency were found, but they required a
higher minimum deployment target.
/usr/local/Cellar/cocoapods/1.7.5/libexec/gems/molinillo-0.6.6/lib/molinillo/resolution.rb:328:in `raise_error_unless_state'
/usr/local/Cellar/cocoapods/1.7.5/libexec/gems/molinillo-0.6.6/lib/molinillo/resolution.rb:310:in `block in unwind_for_conflict'
/usr/local/Cellar/cocoapods/1.7.5/libexec/gems/molinillo-0.6.6/lib/molinillo/resolution.rb:308:in `tap'
/usr/local/Cellar/cocoapods/1.7.5/libexec/gems/molinillo-0.6.6/lib/molinillo/resolution.rb:308:in `unwind_for_conflict'
/usr/local/Cellar/cocoapods/1.7.5/libexec/gems/molinillo-0.6.6/lib/molinillo/resolution.rb:684:in `attempt_to_activate'
/usr/local/Cellar/cocoapods/1.7.5/libexec/gems/molinillo-0.6.6/lib/molinillo/resolution.rb:254:in `process_topmost_state'
/usr/local/Cellar/cocoapods/1.7.5/libexec/gems/molinillo-0.6.6/lib/molinillo/resolution.rb:182:in `resolve'
/usr/local/Cellar/cocoapods/1.7.5/libexec/gems/molinillo-0.6.6/lib/molinillo/resolver.rb:43:in `resolve'
/usr/local/Cellar/cocoapods/1.7.5/libexec/gems/cocoapods-1.7.5/lib/cocoapods/resolver.rb:88:in `resolve'
/usr/local/Cellar/cocoapods/1.7.5/libexec/gems/cocoapods-1.7.5/lib/cocoapods/installer/analyzer.rb:939:in `block in
resolve_dependencies'
/usr/local/Cellar/cocoapods/1.7.5/libexec/gems/cocoapods-1.7.5/lib/cocoapods/user_interface.rb:64:in `section'
/usr/local/Cellar/cocoapods/1.7.5/libexec/gems/cocoapods-1.7.5/lib/cocoapods/installer/analyzer.rb:937:in `resolve_dependencies'
/usr/local/Cellar/cocoapods/1.7.5/libexec/gems/cocoapods-1.7.5/lib/cocoapods/installer/analyzer.rb:118:in `analyze'
/usr/local/Cellar/cocoapods/1.7.5/libexec/gems/cocoapods-1.7.5/lib/cocoapods/installer.rb:398:in `analyze'
/usr/local/Cellar/cocoapods/1.7.5/libexec/gems/cocoapods-1.7.5/lib/cocoapods/installer.rb:221:in `block in resolve_dependencies'
/usr/local/Cellar/cocoapods/1.7.5/libexec/gems/cocoapods-1.7.5/lib/cocoapods/user_interface.rb:64:in `section'
/usr/local/Cellar/cocoapods/1.7.5/libexec/gems/cocoapods-1.7.5/lib/cocoapods/installer.rb:220:in `resolve_dependencies'
/usr/local/Cellar/cocoapods/1.7.5/libexec/gems/cocoapods-1.7.5/lib/cocoapods/installer.rb:156:in `install!'
/usr/local/Cellar/cocoapods/1.7.5/libexec/gems/cocoapods-1.7.5/lib/cocoapods/command/install.rb:51:in `run'
/usr/local/Cellar/cocoapods/1.7.5/libexec/gems/claide-1.0.2/lib/claide/command.rb:334:in `run'
/usr/local/Cellar/cocoapods/1.7.5/libexec/gems/cocoapods-1.7.5/lib/cocoapods/command.rb:52:in `run'
/usr/local/Cellar/cocoapods/1.7.5/libexec/gems/cocoapods-1.7.5/bin/pod:55:in `<top (required)>'
/usr/local/Cellar/cocoapods/1.7.5/libexec/bin/pod:22:in `load'
/usr/local/Cellar/cocoapods/1.7.5/libexec/bin/pod:22:in `<main>'
Error output from CocoaPods:
↳
[!] Automatically assigning platform `ios` with version `8.0` on target `Runner` because no platform was specified. Please specify a
platform for this target in your Podfile. See `https://guides.cocoapods.org/syntax/podfile.html#platform`.
Error running pod install
Error launching application on iPhone Xʀ.
How to listen messages from server?
I use socket.on for do that, is there another way?
Ty
How do one get responses from emitting events? I did
dynamic res = socket.emit("messages", [{"userId": "1223"}]);
But doesn't return anything. Any other way for this?
Xcode's output:
↳
/Users/yonathanmichalsky/Desktop/RemoteWorker-App/ios/Pods/Socket.IO-Client-Swift/Source/SocketIO/Engine/SocketEngine.swift:316:11: error: value of type 'WebSocket' has no member
'onHttpResponseHeaders'
ws?.onHttpResponseHeaders = {[weak self] headers in
Version: 0.1.9
It is not possible to send Characters like : = or .
I am using a backend that has a socket.io server. To connect, I need to send authentication headers. There doesn't seem to be a way to set it.
How can I pass the authorization headers (Authorization: ${Token}).
Version 0.3.3 is not working onSending Data... is not working nothing...
just work in 0.2.0
i will stay 0.2.0
Android
E/EventThread(17866): Task threw exception
E/EventThread(17866): java.lang.RuntimeException: Methods marked with @UiThread must be executed on the main thread. Current thread: EventThread
E/EventThread(17866): at io.flutter.embedding.engine.FlutterJNI.ensureRunningOnMainThread(FlutterJNI.java:605)
E/EventThread(17866): at io.flutter.embedding.engine.FlutterJNI.dispatchPlatformMessage(FlutterJNI.java:515)
E/EventThread(17866): at io.flutter.embedding.engine.dart.DartMessenger.send(DartMessenger.java:74)
E/EventThread(17866): at io.flutter.embedding.engine.dart.DartExecutor.send(DartExecutor.java:163)
E/EventThread(17866): at io.flutter.view.FlutterNativeView.send(FlutterNativeView.java:152)
E/EventThread(17866): at io.flutter.plugin.common.MethodChannel.invokeMethod(MethodChannel.java:95)
E/EventThread(17866): at io.flutter.plugin.common.MethodChannel.invokeMethod(MethodChannel.java:82)
E/EventThread(17866): at com.infitio.adharasocketio.AdharaSocket$1.call(AdharaSocket.java:81)
E/EventThread(17866): at io.socket.emitter.Emitter.emit(Emitter.java:117)
E/EventThread(17866): at io.socket.client.Socket.access$601(Socket.java:24)
E/EventThread(17866): at io.socket.client.Socket$5.run(Socket.java:186)
E/EventThread(17866): at io.socket.thread.EventThread.exec(EventThread.java:55)
E/EventThread(17866): at io.socket.client.Socket.emit(Socket.java:182)
E/EventThread(17866): at io.socket.client.Socket.onconnect(Socket.java:389)
E/EventThread(17866): at io.socket.client.Socket.onpacket(Socket.java:283)
E/EventThread(17866): at io.socket.client.Socket.access$100(Socket.java:24)
E/EventThread(17866): at io.socket.client.Socket$2$2.call(Socket.java:120)
E/EventThread(17866): at io.socket.emitter.Emitter.emit(Emitter.java:117)
E/EventThread(17866): at io.socket.client.Manager.ondecoded(Manager.java:427)
E/EventThread(17866): at io.socket.client.Manager.access$1600(Manager.java:30)
E/EventThread(17866): at io.socket.client.Manager$7.call(Manager.java:403)
E/EventThread(17866): at io.socket.parser.IOParser$Decoder.add(IOParser.java:105)
E/EventThread(17866): at io.socket.client.Manager.ondata(Manager.java:419)
E/EventThread(17866): at io.socket.client.Manager.access$1000(Manager.java:30)
E/EventThread(17866): at io.socket.client.Manager$2.call(Manager.java:370)
E/EventThread(17866): at io.socket.emitter.Emitter.emit(Emitter.java:117)
E/EventThread(17866): at io.socket.engineio.client.Socket.onPacket(Socket.java:551)
E/EventThread(17866): at io.socket.engineio.client.Socket.access$1000(Socket.java:36)
E/EventThread(17866): at io.socket.engineio.client.Socket$5.call(Socket.java:335)
E/EventThread(17866): at io.socket.emitter.Emitter.emit(Emitter.java:117)
E/EventThread(17866): at io.socket.engineio.client.Transport.onPacket(Transport.java:126)
E/EventThread(17866): at io.socket.engineio.client.transports.Polling.access$700(Polling.java:18)
Describe the bug
When I try to use this package with Android SDK 28, I get spammed with "web socket error" in the debug console and the socket can't connect. After multiple hours of work trying to merge my application with the example I found out that it worked by replacing compileSdkVersion
and targetSdkVersion
from 28 to 27 in android/app/build.gradle
.
To Reproduce
Update the example to Android SDK 28
Expected behavior
The socket should connect normally.
When i tried to connect to my domain https://iportao.com I got untrusted chain error... but the SSL is ok because I use socket.io on other projects using this domain.
SocketIO socket = await manager.createInstance(server, query: {}, enableLogging: true);
socket.onConnect((data){
print("connected...");
print(data);
socket.emit("sendMessage", ["Hello world!"]);
});
socket.on("receiveMessage", (data){ //sample event
print("receiveMessage");
print(data);
});
socket.onConnectError((error){
print('connection error');
print(error);
});
socket.connect();
Device details:
Relevant Logs
D/Adhara:Socket(20370): Connecting to... https://iportao.com
D/Adhara:Socket(20370): registering::connect
D/Adhara:Socket(20370): registering::receiveMessage
D/Adhara:Socket(20370): registering::connect_error
D/Adhara:Socket(20370): Connecting....
D/NetworkManagementSocketTagger(20370): tagSocket(54) with statsTag=0xffffffff, statsUid=-1
E/CONSCRYPT(20370): ------------------Untrusted chain: ----------------------
E/CONSCRYPT(20370): == Chain0 ==
E/CONSCRYPT(20370): Version: 3
E/CONSCRYPT(20370): AuthorityKeyIdentifier: 4183016801440c2bd278ecc348330a233d7fb6cb3f0b42c80ce
E/CONSCRYPT(20370): SubjectKeyIdentifier: 4160414c815abb31fc5a1efbd9ca53363090898a47161eb
E/CONSCRYPT(20370): Serial Number: f4de984541ebecb0
E/CONSCRYPT(20370): SubjectDN: CN=iportao.com, OU=Domain Control Validated
E/CONSCRYPT(20370): IssuerDN: CN=Go Daddy Secure Certificate Authority - G2, OU=http://certs.godaddy.com/repository/, O="GoDaddy.com, Inc.", L=Scottsdale, ST=Arizona, C=US
E/CONSCRYPT(20370): Get not before: Mon May 20 22:40:21 GMT-03:00 2019
E/CONSCRYPT(20370): Get not after: Wed May 19 18:08:01 GMT-03:00 2021
E/CONSCRYPT(20370): Sig ALG name: SHA256withRSA
E/CONSCRYPT(20370): Signature: -5e3b0f69ba73755afc1c579858950ab9bb5bf7ce69cd839404693efb6d29d436098d599987172febd05072c5492490a189c4cd69cad33c6159f2c3d1f5d89772aa9a40e5c534ab71bfe514fb08ee6ed44af35ab0b31e5086fe9a387d3e14b616bbc5d77e9ed4eb27882d0bfb7aa558e2ce977ea970abd1f54d549d0d0eadd146bdb20ce5443a911229a37912ed38c80c7b401a6aa2201a62a15d5e42c9df8999d48f61711f91d54f34252064121dd9f9bc69f49eb45b4210cb9b109d8591921289bdff9c2faeefc4ae64f7a182224c07ba897d3b74e49e05119002db6ee69662047be87b4288907c2fc880ff3ffe194a28544231ec7d4e526d953af63a322512
E/CONSCRYPT(20370): Public key:
E/CONSCRYPT(20370):
E/CONSCRYPT(20370): 30 82 01 22 30 0d 06 09 2a 86 48 86 f7 0d 01 01 01 05 00 03
E/CONSCRYPT(20370): 82 01 0f 00 30 82 01 0a 02 82 01 01 00 9f db cc f0 91 57 da
E/CONSCRYPT(20370): 52 b2 c8 68 45 ab db 33 8e ed da 6a e8 a8 df 0e 97 c8 f7 62
E/CONSCRYPT(20370): 7f c5 69 a9 46 2a 59 33 75 51 b4 3c b7 d3 b0 a0 31 1e fe c1
E/CONSCRYPT(20370): af 5b 49 a8 39 e9 6b 11 56 9b f8 6b 55 1b d7 7b af 6a 11 c9
E/CONSCRYPT(20370): d1 d7 40 51 5a 2a 43 cb 34 3b 0e c9 ff aa a8 f5 ca a8 c3 36
E/CONSCRYPT(20370): 64 b1 79 5f 6d a3 dd d8 6b ba 75 6e 31 61 1a 42 f8 c1 70 f4
E/CONSCRYPT(20370): 8d 59 3e a2 39 b0 a8 fa 52 43 21 e7 f5 e7 6a 58 eb 7a ed 3b
E/CONSCRYPT(20370): 4b 83 1a 3f ab eb eb 57 3d 09 89 87 cb 5f d0 fd 97 56 3b dc
E/CONSCRYPT(20370): aa 1d e9 fc e2 02 69 ea ed 54 38 08 8a fb d4 a5 5f 91 51 89
E/CONSCRYPT(20370): 07 00 3e 0b eb 59 b9 87 09 0a af
///Disconnect a socket instance and remove from stored sockets list
Future clearInstance(SocketIO socket) async {
await _channel.invokeMethod('clearInstance', {'id': socket.id});
_sockets.remove(socket.id);
}
case "clearInstance":
if(arguments["index"] == nil){
result(FlutterError(code: "400", message: "Invalid instance identifier provided", details: nil))
}
the "index" should be "id"
Console returns me this errors:
I/flutter (10845): On error: io.socket.engineio.client.EngineIOException: xhr poll error
I/flutter (10845): Disconected: transport error
Is this problem on Flutter app or in server configuration?
I hosting sockets on AWS.
Thanks for help.
eu estou com esse erro quando tento rodar o exemple no IOS:
Launching lib/main.dart on iPhone 6 in debug mode...
Running pod install...
Starting Xcode build...
Xcode build done. 7,3s
Failed to build iOS app
Error output from Xcode build:
↳
** BUILD FAILED **
Xcode's output:
↳
=== BUILD AGGREGATE TARGET Flutter OF PROJECT Pods WITH CONFIGURATION Debug ===
/Users/jcarvalho/Desktop/flutter_socket_io/example/ios/Pods/Starscream/Sources/Starscream/WebSocket.swift:24:8: error: no such module 'CommonCrypto'
import CommonCrypto
^
=== BUILD AGGREGATE TARGET Flutter OF PROJECT Pods WITH CONFIGURATION Debug ===
/Users/jcarvalho/Desktop/flutter_socket_io/example/ios/Pods/Starscream/Sources/Starscream/WebSocket.swift:24:8: error: no such module 'CommonCrypto'
import CommonCrypto
^
=== BUILD AGGREGATE TARGET Flutter OF PROJECT Pods WITH CONFIGURATION Debug ===
/Users/jcarvalho/Desktop/flutter_socket_io/example/ios/Pods/Starscream/Sources/Starscream/WebSocket.swift:24:8: error: no such module 'CommonCrypto'
import CommonCrypto
^
=== BUILD AGGREGATE TARGET Flutter OF PROJECT Pods WITH CONFIGURATION Debug ===
/Users/jcarvalho/Desktop/flutter_socket_io/example/ios/Pods/Starscream/Sources/Starscream/WebSocket.swift:24:8: error: no such module 'CommonCrypto'
import CommonCrypto
^
Could not build the application for the simulator.
Error launching application on iPhone 6.
I can connect to the socketIO server with Simulator of Android or Iphone,or MI and VIVO (mobil with android system).But can not connect the server with the HUA WEI mobil(my phone version is Mate 9 Pro).
Are there anyone meet the same question?
(I use the adhara_socket_io version is 0.3.4)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.