#Build Patch Fail

1 messages · Page 1 of 1 (latest)

ember plaza
#

After upgrading to Shorebird 1.0.1 and publishing the release using Flutter version 3.13.9, I'm encountering an error when attempting to do a patch update.

Following Error found: 👇

✗ Failed to build: You are applying Flutter's app_plugin_loader Gradle plugin imperatively using the apply script method, which is deprecated and will be removed in a future release. Migrate to applying Gradle plugins with the declarative plugins block: https://flutter.dev/go/flutter-gradle-plugin-apply

You are applying Flutter's main Gradle plugin imperatively using the apply script method, which is deprecated and will be removed in a future release. Migrate to applying Gradle plugins with the declarative plugins block: https://flutter.dev/go/flutter-gradle-plugin-apply

FAILURE: Build failed with an exception.

  • What went wrong:
    Execution failed for task ':app:signProdReleaseBundle'.

A failure occurred while executing com.android.build.gradle.internal.tasks.FinalizeBundleTask$BundleToolRunnable
java.lang.NullPointerException (no error message)

How to migrate your Flutter app's Android Gradle build files to the new, declarative format.

vale coyote
#

Hey, this looks like that the patch command is trying to user a newer version, but patches are tied to the flutter version of their release. Can you share the full verbose log of the command you are running to do the patch?

ember plaza
#

In between, I switched to a newer version after logging into another account of mine.

ember plaza
#

Hi, have you checked?

vale coyote
#

Hey, sorry for not getting back to you, we are still investigating

woeful cradle
#

If you run flutter build appbundle --release --flavor=prod --target=lib/main_prod.dart --verbose with your system flutter (on version 3.19.5), does this command complete successfully?

ember plaza
woeful cradle
#

Can you share the command you're running?

#

I suspect you'll need to tell shorebird which release version you're patching

#

AFK at the moment, but you can use the help flag or check the docs to see how to do this

ember plaza
# woeful cradle I suspect you'll need to tell shorebird which release version you're patching

I had assumed that the required version would be picked up automatically from pubspec file. The original command that I was trying to run was:

shorebird patch android --flavor prod -t lib/main_prod.dart

Following your suggestion, I tried specifying the release version same as it is in the pubspec file.

shorebird patch android --flavor prod -t lib/main_prod.dart --release-version 8.3.4+302

And again it failed. Following is output :

✓ Fetching apps (0.6s)
✓ Fetching releases (0.4s)

The release you are trying to patch was built with a different version of Flutter.

Release Flutter Revision: a3d5f7c614aa1cc4d6cb1506e74fd1c81678e68e
Current Flutter Revision: 47571af6a3acdebedf88255099ff1de1c3324049

✗ Failed to build: 
FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:signProdReleaseBundle'.
> A failure occurred while executing com.android.build.gradle.internal.tasks.FinalizeBundleTask$BundleToolRunnable
   > java.lang.NullPointerException (no error message)

* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.

* Get more help at https://help.gradle.org

BUILD FAILED in 27s
Gradle task bundleProdRelease failed with exit code 1
 (32.5s)

If you aren't sure why this command failed, re-run with the --verbose flag to see more information.
chetan@Chetans-MacBook-Air apnaklub-flutter % 
woeful cradle
#

We don't use the version from the pubspec file because it may not actually be the version reported by the compiled app

#

Can you share your app id?

ember plaza
#

sure
0a08c1df-3a32-4d30-b8ce-40d62ef55c8f

woeful cradle
#

Would you mind sharing verbose logs from the failure when you specified the release version?

ember plaza
woeful cradle
#

Hmm, so that suggests it's not a flutter version issue.

#
[   +1 ms] FAILURE: Build failed with an exception.
[   +1 ms] * What went wrong:
[        ] Execution failed for task ':app:signProdReleaseBundle'.
[        ] > A failure occurred while executing com.android.build.gradle.internal.tasks.FinalizeBundleTask$BundleToolRunnable
[        ]    > java.lang.NullPointerException (no error message)
[        ] * Try:

The fact that it's failing on signing suggests that maybe your keystore is not properly configured?

ember plaza
#

Sorry about that, the file was missing. After adding it, the patch was successfully built and uploaded. Thank you so much, guys! @woeful cradle @vale coyote .

vale coyote
#

I am glad it got solved 🙌