Skip to content
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

Having issue running "melos bs" #216

Closed
sanihaq opened this issue Dec 30, 2021 · 5 comments · Fixed by #240
Closed

Having issue running "melos bs" #216

sanihaq opened this issue Dec 30, 2021 · 5 comments · Fixed by #240

Comments

@sanihaq
Copy link

sanihaq commented Dec 30, 2021

Unhandled exception:
Bad state: Stream has already been listened to.
#0 _StreamController._subscribe (dart:async/stream_controller.dart:635:7)
#1 _ControllerStream._createSubscription (dart:async/stream_controller.dart:786:19)
#2 _StreamImpl.listen (dart:async/stream_impl.dart:473:9)
#3 _Socket.listen (dart:io-patch/socket_patch.dart:2162:31)
#4 _StdStream.listen (dart:io/stdio.dart:22:20)
#5 Stream.reduce (dart:async/stream.dart:821:14)
#6 _BootstrapMixin._logPubGetFailed (package:melos/src/commands/bootstrap.dart:79:12)
#7 _BootstrapMixin.bootstrap. (package:melos/src/commands/bootstrap.dart:40:19)

#8 _Melos._runLifecycle (package:melos/src/commands/runner.dart:119:7)

#9 CommandRunner.runCommand (package:args/command_runner.dart:209:13)

#10 MelosCommandRunner.runCommand (package:melos/src/command_runner.dart:82:5)

#11 main (file:///C:/Users/Sani/AppData/Local/Pub/Cache/hosted/pub.dartlang.org/melos-1.0.0/bin/melos.dart:10:5)

@smiLLe
Copy link

smiLLe commented Dec 31, 2021

Happens to me as well. @sanihaq Did you solve the issue?

@sanihaq
Copy link
Author

sanihaq commented Dec 31, 2021

@smiLLe not really, using path like this for now

common_utils:
   	path: ../common_utils

waiting for a fix...

@blaugold
Copy link
Collaborator

blaugold commented Jan 1, 2022

This hack prevents _logPubGetFailed from reading stdout of the process in case of an error:

// TODO This is a hack. Windows will not exit unless we do this.
if (currentPlatform.isWindows) {
pubGet.process.stdout.listen((testing) {
// Do nothing
});
}

A fix would need to ensure that process.stdout is always listened to exactly once.

@bare-metal-gpu
Copy link

any update or temporary workaround on this?

@smiLLe
Copy link

smiLLe commented Jan 25, 2022

I had to downgrade to 0.4.11+2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants
@smiLLe @blaugold @bare-metal-gpu @sanihaq and others