-
Notifications
You must be signed in to change notification settings - Fork 28.7k
[flutter_tools] handle further devtools NPE #74764
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_tools] handle further devtools NPE #74764
Conversation
It looks like this pull request may not have tests. Please make sure to add tests before merging. If you need an exemption to this rule, contact Hixie on the #hackers channel in Chat. If you are not sure if you need tests, consider this rule of thumb: the purpose of a test is to make sure someone doesn't accidentally revert the fix. Ask yourself, is there anything in your PR that you feel it is important we not accidentally revert back to how it was before your fix? Reviewers: Read the Tree Hygiene page and make sure this patch meets those guidelines before LGTMing. |
@@ -1304,6 +1304,9 @@ abstract class ResidentRunner { | |||
} | |||
await waitForExtension(device.vmService, 'ext.flutter.activeDevToolsServerAddress'); | |||
try { | |||
if (_devToolsLauncher == null) { | |||
return; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this print an error like the one below in the catch block?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no, this indicates that the app started closing before we finished this block. so perhaps the app crashed and we already printed a message?
…#75804) * Added a ReorderableListView.builder constructor (#74697) Added constructor parameters to the ReorderableList that were missing from ScrollView. Also replace a lot of doc comments with macro templates to reduce duplication. * [flutter_tools] handle further devtools NPE (#74764) * [flutter_tools] skip web renderer defines unless web target is picked (#75160) * Catch VM Service disappearance from run/attach handler code (#75298) * [flutter_tools] handle null package (#75336) * Return an empty FlutterViews list when the service disappears (#75301) * fix analyzer * Apply Engine Cherrypicks Co-authored-by: Darren Austin <darrenaustin@google.com> Co-authored-by: Jonah Williams <jonahwilliams@google.com> Co-authored-by: Jenn Magder <magder@google.com>
I've tried and failed to write a test for the timing issue here.
I think we could add a
postAttach
hook, and then invoke the unawaited calls in that method. That would give us a chance to override in the right way to allow unit testing, but I'm worried that will be extremely synthetic.