Skip to content

[CP] Catch more general XmlException in tool #108840

@christopherfujino

Description

@christopherfujino

issue_link

#106365

Commit Hash

cadb264

Target

beta

pr_link

#108839

Impacted Users

Flutter devs targeting android who have malformed XML config files, such as their manifest

Impact Description

When the tool fails to parse a malformed XML config file, rather than showing a user friendly tool exit with the absolute path to the file that the user must fix, the exception will bubble up and the user will have to check the source code to determine what the tool was trying to parse.

Workaround

The user would have to know to check their app's manifest file.

Risk

low

Test Coverage

yes

Validation Steps

  1. Create a new flutter app: flutter create test_bad_xml
  2. edit the contents of test_bad_xml/android/app/src/debug/AndroidManifest.xml to have invalid XML, such as <manifest></application>
  3. build the app in debug mode: flutter build apk --debug; verify that there is a tool exit with the path to the bad file.

Metadata

Metadata

Assignees

No one assigned

    Labels

    cp: approvedApproved cherry-pick request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions