-
-
Notifications
You must be signed in to change notification settings - Fork 21
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
Streaming output not receiving all input #85
Comments
Thanks for the report. In fact I'm using it for the exact same purpose but on Linux. I've never noticed that but I have never tried in another isolate neither so I'll try to reproduce your issue. If you can easily try, does it happen also (dropped lines) when not running in an isolate ? Also do you have a simple way to see the issue (my initial thinking: running logcat in a terminal and running it in another terminal with ShellLinesController and compare the results) ? Thanks ! |
So, I just went back to a non-isolate code sample and the output is still really different. |
Ok. Just wrote a command line sample with shell and it worked great. Not sure if there if Flutter is causing a delay in the stream? |
Puzzling indeed. I have added some tests for that here https://github.com/tekartik/process_run.dart/blob/master/test/shell_lines_controller_test.dart I also tried on flutter (macos and linux) and was able to stream in real time all the lines send by a fake logger. Of course using adb is a different context so I just wonder whether it is not adb that is removing/skipping some lines:
I don't know what else to try on my side, sorry. If you have a simple way for me to reproduce the issue, let me know ! |
I looked up my logcat buffer and it is much larger than those old posts. It must be a problem with trying to stream it to a TextField |
I'm using this package on a Flutter Mac app and am trying to stream Android adb logs.
When I run adb logcat from the terminal, I get different results than what I can in my app. I'm not sure if it just can't keep up with the stream or if it is skipping lines but there are lots of lines that are missing.
I'm using ShellLinesController and my shell looks like:
final shell =
Shell(throwOnError: false, stdout: controller.sink, verbose: false);
I then:
final args = shellArguments(arguments);
await shell.run(args);
My listen method is:
shellLinesController.stream.listen((event) {
sendPort.send(event);
});
(I am using an isolate)
The text was updated successfully, but these errors were encountered: