Open nickmeinhold opened 4 years ago
Hey
I've just checked out your repo and it runs just fine for me (iOS simulator) after changing the IP address. What flutter channel are you on? It's possible a recent change has caused the issue.
Cheers Michael
Also, what version of remotedev-server are you using? this exception may be caused by a change to the javascript package, not Flutter
Hey Michael, thanks for this!
I'm on the dev channel for flutter, remotedev-server@0.3.1
EDIT: I'm going to switch to stable and try
UPDATE:
Thanks very much for your help!
The only thing I can think of is the client is receiving the START
message twice. I'm not sure why that would happen but perhaps it's worth checking to see whether we think we are already started and ignoring subsequent messages. Let me know if you are able to reliably reproduce and I'll see what I can do.
Sweet thanks Michael! I followed your thought and added a check for status
already being STARTED
to _waitForStart
, which stopped the exception and the package still works.
My plan at this point will be to use this edited version of redux_remote_devtools
on my desktop and, given the problem seems to be something specific to this setup on my desktop, do a fresh install of the OS at some point (which I've been meaning to anyway). I'm happy to try and figure it out though if you want to try and get to the bottom of it.
Thanks again for your help.
The Completer docs say:
Calling complete or completeError must be done at most once.
So even if receiving the START message twice is an error in remotedev-server, we shouldn't be calling complete twice.
If you've already done the change I'd be happy to accept a PR for this. Would just need a test to verify the behaviour.
Thanks Michael, I had a go at writing a test but I haven't really worked with sockets before and I got a bit lost (even with plenty of your examples there). Also the exception has disappeared :-) I updated the OS, maybe that was it. I'd be happy to plough through if you think it's worth it but otherwise I'll leave it at that and be happy it's working for me again. Thanks for the great package!
I'm having the same issue. The error doesn't appear consistently though.
redux-devtools-cli
instead of remotedev-server
, since as I mentioned in https://github.com/MichaelMarner/dart-redux-remote-devtools/issues/29#issuecomment-671065150 it didn't work for me.
I've started getting this exception recently
[ERROR:flutter/lib/ui/ui_dart_state.cc(166)] Unhandled Exception: Bad state: Future already completed
Stack Trace
```sh #0 _AsyncCompleter.complete (dart:async/future_impl.dart:43:31) #1 RemoteDevToolsMiddleware._waitForStart.I made a minimal repro: https://github.com/nickmeinhold/test_rdt, it's just the starter project with the
redux_remote_devtools
package andadded to
main.dart
Thanks!