-
Notifications
You must be signed in to change notification settings - Fork 29.5k
Fix null value reference in flutter logs path
#173437
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
Conversation
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.
Code Review
This pull request correctly fixes a potential null reference exception in AndroidApk.fromAndroidProject when it's called for a module project without BuildInfo. The change is simple and effective. However, the new test case added to verify this fix is flawed: it has a misleading name, uses an incorrect test setup, and contains logic that will cause it to fail. I've provided a detailed comment on the test file with suggestions for how to correct it.
packages/flutter_tools/test/general.shard/application_package_test.dart
Outdated
Show resolved
Hide resolved
|
This pull request has been changed to a draft. The currently pending flutter-gold status will not be able to resolve until a new commit is pushed or the change is marked ready for review again. For more guidance, visit Writing a golden file test for Reviewers: Read the Tree Hygiene page and make sure this patch meets those guidelines before LGTMing. |
reidbaker
left a comment
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.
Approved but I authored the test so lets get a +1 from someone else.
flutter logs pathflutter logs path
flutter/flutter@3821790...1590543 2025-08-09 jessy.yameogo@gmail.com Make device debuggable if useDwdsWebSocketConnection is true and added simple test case (flutter/flutter#171648) 2025-08-09 engine-flutter-autoroll@skia.org Roll Dart SDK from 91cbf6d7563a to 6a7ae1ffd1c9 (1 revision) (flutter/flutter#173487) 2025-08-09 41930132+hellohuanlin@users.noreply.github.com add `--variance host_debug_unopt_arm64` for apple chip simulator (flutter/flutter#173475) 2025-08-08 mdebbar@google.com [WebParagraph] Fix a property name on newer Chrome versions (flutter/flutter#173477) 2025-08-08 ahmedsameha1@gmail.com Make sure that a Checkbox doesn't crash in 0x0 environment (flutter/flutter#173178) 2025-08-08 ahmedsameha1@gmail.com Make sure that a RawChip doesn't crash in 0x0 environment (flutter/flutter#173265) 2025-08-08 victorsanniay@gmail.com Fix tooltip crash when route has secondary animation (flutter/flutter#172678) 2025-08-08 engine-flutter-autoroll@skia.org Roll Skia from 86824ed582be to 44bb9d908ee4 (3 revisions) (flutter/flutter#173476) 2025-08-08 matt.boetger@gmail.com Fix null value reference in `flutter logs` path (flutter/flutter#173437) 2025-08-08 1063596+reidbaker@users.noreply.github.com Remove jetifier usages from framework and engine (flutter/flutter#173459) 2025-08-08 jhy03261997@gmail.com [a11y] Textfield has flag `isFocusable` set to true (flutter/flutter#173235) 2025-08-08 engine-flutter-autoroll@skia.org Roll Dart SDK from 4b7b565eb468 to 91cbf6d7563a (1 revision) (flutter/flutter#173469) 2025-08-08 engine-flutter-autoroll@skia.org Roll Packages from 6efb759 to 34948d1 (4 revisions) (flutter/flutter#173470) 2025-08-08 engine-flutter-autoroll@skia.org Roll Skia from a6ccfeafbfba to 86824ed582be (20 revisions) (flutter/flutter#173468) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/flutter-packages Please CC stuartmorgan@google.com,tarrinneal@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Packages: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://issues.skia.org/issues/new?component=1389291&template=1850622 Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
The `flutter logs` path for a module does not pass the buildInfo to the `fromAndroidProject` function. This will cause an exception to be thrown when `buildInfo!` is invoked. Instead, just allow the buildInfo to be null and check for the manifest with the code that already exists. Fixes: flutter#172884 ## Pre-launch Checklist - [X] I read the [Contributor Guide] and followed the process outlined there for submitting PRs. - [X] I read the [Tree Hygiene] wiki page, which explains my responsibilities. - [X] I read and followed the [Flutter Style Guide], including [Features we expect every widget to implement]. - [X] I signed the [CLA]. - [X] I listed at least one issue that this PR fixes in the description above. - [ ] I updated/added relevant documentation (doc comments with `///`). - [X] I added new tests to check the change I am making, or this PR is [test-exempt]. - [X] I followed the [breaking change policy] and added [Data Driven Fixes] where supported. - [X] All existing and new tests are passing. --------- Co-authored-by: Reid Baker <reidbaker@google.com>
The `flutter logs` path for a module does not pass the buildInfo to the `fromAndroidProject` function. This will cause an exception to be thrown when `buildInfo!` is invoked. Instead, just allow the buildInfo to be null and check for the manifest with the code that already exists. Fixes: flutter#172884 ## Pre-launch Checklist - [X] I read the [Contributor Guide] and followed the process outlined there for submitting PRs. - [X] I read the [Tree Hygiene] wiki page, which explains my responsibilities. - [X] I read and followed the [Flutter Style Guide], including [Features we expect every widget to implement]. - [X] I signed the [CLA]. - [X] I listed at least one issue that this PR fixes in the description above. - [ ] I updated/added relevant documentation (doc comments with `///`). - [X] I added new tests to check the change I am making, or this PR is [test-exempt]. - [X] I followed the [breaking change policy] and added [Data Driven Fixes] where supported. - [X] All existing and new tests are passing. --------- Co-authored-by: Reid Baker <reidbaker@google.com>
The `flutter logs` path for a module does not pass the buildInfo to the `fromAndroidProject` function. This will cause an exception to be thrown when `buildInfo!` is invoked. Instead, just allow the buildInfo to be null and check for the manifest with the code that already exists. Fixes: flutter#172884 ## Pre-launch Checklist - [X] I read the [Contributor Guide] and followed the process outlined there for submitting PRs. - [X] I read the [Tree Hygiene] wiki page, which explains my responsibilities. - [X] I read and followed the [Flutter Style Guide], including [Features we expect every widget to implement]. - [X] I signed the [CLA]. - [X] I listed at least one issue that this PR fixes in the description above. - [ ] I updated/added relevant documentation (doc comments with `///`). - [X] I added new tests to check the change I am making, or this PR is [test-exempt]. - [X] I followed the [breaking change policy] and added [Data Driven Fixes] where supported. - [X] All existing and new tests are passing. --------- Co-authored-by: Reid Baker <reidbaker@google.com>
The `flutter logs` path for a module does not pass the buildInfo to the `fromAndroidProject` function. This will cause an exception to be thrown when `buildInfo!` is invoked. Instead, just allow the buildInfo to be null and check for the manifest with the code that already exists. Fixes: flutter#172884 ## Pre-launch Checklist - [X] I read the [Contributor Guide] and followed the process outlined there for submitting PRs. - [X] I read the [Tree Hygiene] wiki page, which explains my responsibilities. - [X] I read and followed the [Flutter Style Guide], including [Features we expect every widget to implement]. - [X] I signed the [CLA]. - [X] I listed at least one issue that this PR fixes in the description above. - [ ] I updated/added relevant documentation (doc comments with `///`). - [X] I added new tests to check the change I am making, or this PR is [test-exempt]. - [X] I followed the [breaking change policy] and added [Data Driven Fixes] where supported. - [X] All existing and new tests are passing. --------- Co-authored-by: Reid Baker <reidbaker@google.com>
The
flutter logspath for a module does not pass the buildInfo to thefromAndroidProjectfunction. This will cause an exception to be thrown whenbuildInfo!is invoked. Instead, just allow the buildInfo to be null and check for the manifest with the code that already exists.Fixes: #172884
Pre-launch Checklist
///).