-
Notifications
You must be signed in to change notification settings - Fork 206
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
sometimes get an error : future was called on null at hubconnection.start(). In the line await _handshakeCompleter.future #6
Comments
We have the same problem (Version 0.1.5). I look at the code and see the following problem: |
I am getting the same issue, though it is intermittent, meaning, sometimes it throws the error (null _handshakeCompleter) and sometimes it works. I will post a separate issue on my overall issue (client and/or server not working). I cannot discern a pattern of failure. I would like to say that it 'usually' happens while my VS 2019 project is in run/debug mode, but I can't say exactly what percentage 'usually' is. It certainly fails when not debugging as well. The issue is not, at least for me, binary either - besides either connecting successfully or failing with a null _handshakeCompleter, I also get failures for 404 (remote server not found). This is with no changes to code. The same code that succeeds will then fail with a 404, which is somewhat hard to understand. I will also add however, that even when it does work, and I 'print' out the successful connected state, when I 'close' the Flutter screen (go back to a prior screen), I never get an 'immediate' print out of 'connection closed'. Instead I have added the dispose() method to my screen, and if the connection is 'Connected' then I issue a .stop() call. Seems to work. |
Same issue here. Following the exact instruction as the Example Project. |
I get same intermittent issue. To resolve (hub_connection line: 117): |
I've never worked with SignalR before but I'm curious, is this an issue to be solved, or does it only occur during flutter restart/hot reload? If it only happens during flutter restart/hot reload I'm not that worried, but if it will occur during production then I would like to know what the proper solution is. I am trying to evaluate @digitalkirkley 's solution but I'm not sure tampering with the source code is the right way. |
I got this error roughly 6 months ago and back then I quit using SignalR and started to build my own solution with basic socket programming. However, after a long while I decided to give an another chance to SignalR and now it's working like a charm. If this issue still occures, I think it doesn't related to this package at all. |
Adding support for flutter for web and fixing bug with connectionToken in url query
Some times get error in hubconnection.start() method with a message future was called on null .The error is exactly on _handshakeCompleter.future .How can resolve it ??
The text was updated successfully, but these errors were encountered: