Skip to content

improve error message when gradlew assembledebug is used with -Pdart-defines that are not base64 encoded #95116

Closed

Description

@schilken

I propose a better error message when -Pdart-defines are not base64 encoded.

With Flutter 2.5 the following message is output:
"Error parsing assemble command: your generated configuration may be out of date. Try re-running 'flutter build ios' or the appropriate build command."

This message didn't help. Only a search for the message in the flutter_tools source revealed the true cause of the problem:

A message containing a hint about the required base64 encoding would be more helpful for many developers using integration tests with CI. They will probably use -Pdart-defines to add some parameters for their tests.

Steps to Reproduce

  1. in android folder of any project
  2. run ./gradlew app:assembleDebug -Pdart-defines=MY_ENV=whatever

Logs

./gradlew app:assembleDebug -Pdart-defines=MY_ENV=whatever
...

Task :app:compileFlutterBuildDebug FAILED
Error parsing assemble command: your generated configuration may be out of date. Try re-running 'flutter build ios' or the appropriate build command.

A gradlew task with correct base64 encoded dart-defines build without problem.

The issue is just the misleading error message.

./gradlew app:assembleDebug -Pdart-defines=TVlfRU5WPXdoYXRldmVy
...
BUILD SUCCESSFUL in 15s

Activity

  1. added
    in triagePresently being triaged by the triage team
    platform-androidAndroid applications specifically
    c: proposalA detailed proposal for a change to Flutter
    toolAffects the "flutter" command-line tool. See also t: labels.
    t: gradle"flutter build" and "flutter run" on Android
    and removed
    in triagePresently being triaged by the triage team
    on Dec 13, 2021
  2. darshankawar commented on Dec 13, 2021

    @darshankawar
    Member
    Task :app:compileFlutterBuildDebug FAILED
    Error parsing assemble command: your generated configuration may be out of date. Try re-running 'flutter build ios' or the appropriate build command.
    
    
  3. christopherfujino commented on Jan 28, 2022

    @christopherfujino
    Contributor

    @schilken is there a reason you are directly calling gradlew app:assembleDebug rather than calling it via the flutter tool?

  4. schilken commented on Jan 28, 2022

    @schilken
    Author

    @christopherfujino We build the apks to deploy them into perfecto, our test service provider, as it is described here for the Firebase Test Lab:
    https://github.com/flutter/flutter/tree/master/packages/integration_test#firebase-test-lab

  5. christopherfujino commented on Jan 28, 2022

    @christopherfujino
    Contributor

    @christopherfujino We build the apks to deploy them into perfecto, our test service provider, as it is described here for the Firebase Test Lab: https://github.com/flutter/flutter/tree/master/packages/integration_test#firebase-test-lab

    Ahh, I see, that seems a reasonable use case :)

  6. added
    P3Issues that are less important to the Flutter project
    on Jul 19, 2022
  7. added a commit that references this issue on Apr 1, 2026
    ec23add
  8. added a commit that references this issue on Apr 15, 2026
    afda6f0
  9. github-actions commented on Apr 15, 2026

    @github-actions

    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.

  10. locked as resolved and limited conversation to collaborators on Apr 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    P3Issues that are less important to the Flutter projectc: proposalA detailed proposal for a change to Flutterplatform-androidAndroid applications specificallyt: gradle"flutter build" and "flutter run" on Androidteam-androidOwned by Android platform teamtoolAffects the "flutter" command-line tool. See also t: labels.triaged-androidTriaged by Android platform team

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions