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

flutter run --machine outputs "event sent after app closed" #61361

Closed
DanTup opened this issue Jul 13, 2020 · 10 comments
Closed

flutter run --machine outputs "event sent after app closed" #61361

DanTup opened this issue Jul 13, 2020 · 10 comments
Labels
tool Affects the "flutter" command-line tool. See also t: labels.

Comments

@DanTup
Copy link
Contributor

DanTup commented Jul 13, 2020

When running flutter run --machine, initial progress messages (if pub get runs) are output with an error:

danny@Dannys-MBP flutter_hello_world % /Users/danny/Dev/Google/flutter/bin/flutter --suppress-analytics run --machine --target lib/broken.dart -d flutter-tester --track-widget-creation --dart-define=flutter.inspector.structuredErrors=true --start-paused --web-server-debug-protocol ws --web-allow-expose-url 

event sent after app closed: {id: 0, progressId: null, message: Running "flutter pub get" in flutter_hello_world...}
event sent after app closed: {id: 0, progressId: null, finished: true}
[{"event":"daemon.connected","params":{"version":"0.5.3","pid":20044}}]

Because this isn't valid JSON, in VS Code we assume this is a message for the user and show it in the debug console (rather than showing a progress indicator).

Screenshot 2020-07-14 at 10 50 25

(@jonahwilliams sorry! 😬)

@DanTup DanTup added the tool Affects the "flutter" command-line tool. See also t: labels. label Jul 13, 2020
@jonahwilliams jonahwilliams added this to Awaiting triage in Tools - Dart and pub review via automation Jul 13, 2020
@jonahwilliams jonahwilliams moved this from Awaiting triage to Engineer reviewed in Tools - Dart and pub review Jul 13, 2020
@guidezpl
Copy link
Member

Also seeing this in Android Studio

@yvngaayush
Copy link

yvngaayush commented Aug 20, 2020

I also saw it on Android Studio. I think updating dart and flutter fixed it, but not sure

@devoncarew
Copy link
Member

Yes, we're seeing this in IntelliJ as well:

Screen Shot 2020-09-08 at 8 20 26 PM

I believe some refactoring of the logging meant that we can no longer send progress events from the flutter tool early in the app's lifecycle. I have a local change which largely addresses this (but am not certain where the best place is to put a test). I'll follow up with a PR.

@devoncarew
Copy link
Member

fixed by #65508

@Ayan4044
Copy link

Ayan4044 commented Dec 3, 2020

I got this error too. Need to kill the dart.exe and then close the editor and reopen it

@zionnite
Copy link

internet connection make me received that error

@KookaburraCoder
Copy link

KookaburraCoder commented Dec 20, 2020

I use a Mac and I found that the problem was linked to the location I had the flutter SDK installed.

I had it installed in Applications and usr/local/bin which seemed to require authentication/sudo to modify. So, I created a new folder in the home directory called ~/Developer/Resources and unzipped the file there, updated the path in the terminal profile and when I ran it again from android studio / vscode / terminal it downloaded the iOS tools, and worked.

Here are the updated steps for you:

  1. Download flutter zip
  2. mkdir ~/Developer
  3. mkdir ~/Developer/Resources
  4. cd ~/Developer/Resources
  5. unzip ~/Downloads/flutter_macos_1.22.5-stable.zip
  6. nano ~/.zshrc
  7. Add export PATH=$PATH:~/Developer/Resources/flutter/bin
  8. source ~/.zshrc

Then open project and run.

@stock-dd
Copy link

Why can't it be installed through Homebrew, automatically setting PATH variables correctly etc like normal software does.

@guidezpl
Copy link
Member

@stock-dd Have a look at #14050 for discussion on that topic

@github-actions
Copy link

github-actions bot commented Aug 8, 2021

This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of flutter doctor -v and a minimal reproduction of the issue.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 8, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
tool Affects the "flutter" command-line tool. See also t: labels.
Projects
Tools - Dart and pub review
  
Engineer reviewed
Development

No branches or pull requests

8 participants