这是indexloc提供的服务,不要输入任何密码
Skip to content

Conversation

@mboetger
Copy link
Contributor

@mboetger mboetger commented Aug 7, 2025

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: #172884

Pre-launch Checklist

  • I read the [Contributor Guide] and followed the process outlined there for submitting PRs.
  • I read the [Tree Hygiene] wiki page, which explains my responsibilities.
  • I read and followed the [Flutter Style Guide], including [Features we expect every widget to implement].
  • I signed the [CLA].
  • I listed at least one issue that this PR fixes in the description above.
  • I updated/added relevant documentation (doc comments with ///).
  • I added new tests to check the change I am making, or this PR is [test-exempt].
  • I followed the [breaking change policy] and added [Data Driven Fixes] where supported.
  • All existing and new tests are passing.

@mboetger mboetger requested a review from a team as a code owner August 7, 2025 20:39
@github-actions github-actions bot added the tool Affects the "flutter" command-line tool. See also t: labels. label Aug 7, 2025
Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a 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.

@reidbaker reidbaker marked this pull request as draft August 7, 2025 20:41
@flutter-dashboard
Copy link

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 package:flutter.

Reviewers: Read the Tree Hygiene page and make sure this patch meets those guidelines before LGTMing.

Copy link
Contributor

@reidbaker reidbaker left a 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.

@reidbaker reidbaker marked this pull request as ready for review August 8, 2025 12:58
@mboetger mboetger changed the title [WIP] Fix null value reference in flutter logs path Fix null value reference in flutter logs path Aug 8, 2025
@mboetger mboetger requested a review from bkonyi August 8, 2025 16:16
@reidbaker reidbaker added the autosubmit Merge PR when tree becomes green via auto submit App label Aug 8, 2025
@auto-submit auto-submit bot added this pull request to the merge queue Aug 8, 2025
Merged via the queue into flutter:master with commit e0660cf Aug 8, 2025
143 checks passed
@flutter-dashboard flutter-dashboard bot removed the autosubmit Merge PR when tree becomes green via auto submit App label Aug 8, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Aug 9, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Aug 9, 2025
auto-submit bot pushed a commit to flutter/packages that referenced this pull request Aug 9, 2025
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
SydneyBao pushed a commit to SydneyBao/flutter that referenced this pull request Aug 11, 2025
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>
ksokolovskyi pushed a commit to ksokolovskyi/flutter that referenced this pull request Aug 19, 2025
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>
mboetger added a commit to mboetger/flutter that referenced this pull request Sep 18, 2025
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>
korca0220 pushed a commit to korca0220/flutter that referenced this pull request Sep 22, 2025
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>
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Nov 12, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

tool Affects the "flutter" command-line tool. See also t: labels.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[tool_crash] _TypeError: (#0 AndroidApk.fromAndroidProject (package:flutter_tools/src/android/application_package.dart:122:61))

4 participants