You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm trying to establish a websocket connection, through the following code:
final WebSocketChannel channel = WebSocketChannel.connect(
Uri.parse(
'wss://ws.mywsexample.com/?user=${user}&auth=${auth}'),
);
print('connecting...');
/// Await completion of the connection attempt
try {
await channel.ready;
} on SocketException catch (e) {
print(e.message);
} on WebSocketChannelException catch (e) {
print(StackTrace.current.toString());
print(e.inner!.toString());
print(e.message);
} catch (e) {
print(e.toString);
}
Whenever I run this code in an iOS simulator, I get that the second catch clause (WebSocketChannelException) is entered. But the problem is that I am unable to get any details / insight about the thrown error, e.g.:
print(e.message) simply gives Instance of 'WebSocketException'
print(e.inner.toString()) gives the same
The stack trace delivers the same, simply with the additional info of my function running the code above
This is not very helpful for debugging; how can I check the actual details of the thrown Exception? I can't even find any WebSocketException class in the package source?
The text was updated successfully, but these errors were encountered:
fulstadev
changed the title
Details of thrown WebsocketConnection unavailable
Details of thrown WebSocketEception unavailable
Dec 11, 2024
fulstadev
changed the title
Details of thrown WebSocketEception unavailable
Details of thrown WebSocketException unavailable
Dec 11, 2024
nixbin is host only accessible within my devices.
getting error
A Dart VM Service on sdk gphone64 x86 64 is available at: http://127.0.0.1:42239/JIgF40mnNsc=/E/flutter ( 7409): [ERROR:flutter/runtime/dart_vm_initializer.cc(41)] Unhandled Exception: WebSocketChannelException: Instance of 'WebSocketException'E/flutter ( 7409): The Flutter DevTools debugger and profiler on sdk gphone64 x86 64 is available at:http://127.0.0.1:9101?uri=http://127.0.0.1:42239/JIgF40mnNsc=/I/flutter ( 7409): Error: WebSocketChannelException: Instance of 'WebSocketException'I/flutter ( 7409): DoneE/flutter ( 7409): [ERROR:flutter/runtime/dart_vm_initializer.cc(41)] Unhandled Exception: WebSocketChannelException: Instance of 'WebSocketException'E/flutter ( 7409): D/ProfileInstaller( 7409): Installing profile for com.example.project01
Is there anything missing? is it a bug for self-hosted websockets.
I'm trying to establish a websocket connection, through the following code:
Whenever I run this code in an iOS simulator, I get that the second
catch
clause (WebSocketChannelException
) is entered. But the problem is that I am unable to get any details / insight about the thrown error, e.g.:print(e.message)
simply givesInstance of 'WebSocketException'
print(e.inner.toString())
gives the sameThis is not very helpful for debugging; how can I check the actual details of the thrown Exception? I can't even find any
WebSocketException
class in the package source?The text was updated successfully, but these errors were encountered: