shorebird icon indicating copy to clipboard operation
shorebird copied to clipboard

fix: Changed files:base/dex/classes.dex ,base/dex/classes2.dex

Open afifShyam opened this issue 7 months ago • 1 comments

App ID:4839aabe-d975-4750-bc8e-4f3407ff5553

Description

run the patch using shorebird, change dart code only and didn't touch any native code and pubspec. but when it successful build but unfortunately it show this:

Running Gradle task 'bundleProductionRelease'...                   44.4s
✓ Built build/app/outputs/bundle/productionRelease/app-production-release.aab (190.7MB)
⠋ Verifying patch can be applied to release...
✓ Verifying patch can be applied to release (53ms)
[WARN] Your app contains native changes, which cannot be applied with a patch.
    Changed files:
        base/dex/classes.dex
        base/dex/classes2.dex

If you don't know why you're seeing this error, visit our troubleshooting page at https://docs.shorebird.dev/faq
Instance of 'UnpatchableChangeException'

If you aren't sure why this command failed, re-run with the --verbose flag to see more information.

it issues that there is changes in classes.dex instead i dont change any native or upgrade any packages

Steps To Reproduce

  1. Run shorebird patch android
  2. See error

Expected Behavior

no changes to classes.dex and it successful to patch the code

Screenshots

⠦ Downloading aab (97%)... (11.7s)
⠧ Downloading aab (100%)... (11.9s)
✓ Downloading aab (100%) (11.9s)
Building patch with Flutter *** (8c1a3ee6d9)


Running Gradle task 'bundleProductionRelease'...                   44.4s
✓ Built build/app/outputs/bundle/productionRelease/app-production-release.aab (190.7MB)
⠋ Verifying patch can be applied to release...
✓ Verifying patch can be applied to release (53ms)
[WARN] Your app contains native changes, which cannot be applied with a patch.
    Changed files:
        base/dex/classes.dex
        base/dex/classes2.dex

If you don't know why you're seeing this error, visit our troubleshooting page at https://docs.shorebird.dev/faq
Instance of 'UnpatchableChangeException'

If you aren't sure why this command failed, re-run with the --verbose flag to see more information.

You can also [file an issue](https://github.com/shorebirdtech/shorebird/issues/new/choose) if you think this is a bug. Please include the following log file in your report:
/Users/rfinfinite/Library/Application Support/shorebird/logs/1746173174132_shorebird.log

Error: Process completed with exit code 70.

Additional Context

Shorebird Doctor:

Shorebird 1.6.36 • [email protected]:shorebirdtech/shorebird.git
Flutter 3.29.3 • revision 7c1c25e48e6dd849c3264588346aa63652d5e426
Engine • revision 59f6f7280ef9296791857b608b93d3a2c020d477

URL Reachability
✓ https://api.shorebird.dev OK (0.3s)
✓ https://console.shorebird.dev OK (0.6s)
✓ https://oauth2.googleapis.com OK (70ms)
✓ https://storage.googleapis.com OK (92ms)
✓ https://cdn.shorebird.cloud OK (0.2s)

✓ Shorebird is up-to-date (2.0s)

No issues detected!

afifShyam avatar May 05 '25 02:05 afifShyam

I'm facing the same issue to run a patch using github actions pipeline.

Run shorebird patch android
⠋ Downloading patch......
✓ Downloading patch... (82ms)
⠋ Extracting patch......
✓ Extracting patch... (0.2s)
⠋ Downloading bundletool.jar......
✓ Downloading bundletool.jar... (0.2s)
⠋ Extracting bundletool.jar......
✓ Extracting bundletool.jar... (1.4s)
⠋ Downloading aot-tools.dill......
✓ Downloading aot-tools.dill... (62ms)
⠋ Extracting aot-tools.dill......
✓ Extracting aot-tools.dill... (0.7s)
⠋ Fetching apps...
✓ Fetching apps (0.3s)
[WARN] The release version to patch was not specified.
Building with Flutter 3.29.3 (7c1c25e48e) to determine the release version...
+-------------------------------------------------------------------------------+
| Specify a release version (e.g. --release-version=1.0.0+1)                    |
| to avoid a speculative build with the latest Flutter version.                 |
| Tip: Use --release-version=latest to target the most recent release.          |
+-------------------------------------------------------------------------------+


  ╔════════════════════════════════════════════════════════════════════════════╗
  ║                 Welcome to Flutter! - https://flutter.dev                  ║
  ║                                                                            ║
  ║ The Flutter tool uses Google Analytics to anonymously report feature usage ║
  ║ statistics and basic crash reports. This data is used to help improve      ║
  ║ Flutter tools over time.                                                   ║
  ║                                                                            ║
  ║ Flutter tool analytics are not sent on the very first run. To disable      ║
  ║ reporting, type 'flutter config --no-analytics'. To display the current    ║
  ║ setting, type 'flutter config'. If you opt out of analytics, an opt-out    ║
  ║ event will be sent, and then no further information will be sent by the    ║
  ║ Flutter tool.                                                              ║
  ║                                                                            ║
  ║ By downloading the Flutter SDK, you agree to the Google Terms of Service.  ║
  ║ The Google Privacy Policy describes how data is handled in this service.   ║
  ║                                                                            ║
  ║ Moreover, Flutter includes the Dart SDK, which may send usage metrics and  ║
  ║ crash reports to Google.                                                   ║
  ║                                                                            ║
  ║ Read about data we send with crash reports:                                ║
  ║ https://flutter.dev/to/crash-reporting                                     ║
  ║                                                                            ║
  ║ See Google's privacy policy:                                               ║
  ║ https://policies.google.com/privacy                                        ║
  ║                                                                            ║
  ║ To disable animations in this tool, use                                    ║
  ║ 'flutter config --no-cli-animations'.                                      ║
  ╚════════════════════════════════════════════════════════════════════════════╝

Downloading Material fonts...                                      334ms
Downloading Gradle Wrapper...                                       35ms
Downloading package sky_engine...                                  184ms
Downloading package flutter_gpu...                                  68ms
Downloading flutter_patched_sdk tools...                           261ms
Downloading flutter_patched_sdk_product tools...                   275ms
Downloading linux-x64 tools...                                   1,335ms
Downloading linux-x64/font-subset tools...                         165ms
Downloading android-arm-profile/linux-x64 tools...                 164ms
Downloading android-arm-release/linux-x64 tools...                 196ms
Downloading android-arm64-profile/linux-x64 tools...               192ms
Downloading android-arm64-release/linux-x64 tools...               200ms
Downloading android-x64-profile/linux-x64 tools...                 197ms
Downloading android-x64-release/linux-x64 tools...                 291ms
Resolving dependencies...
Downloading packages...
  archive 4.0.2 (4.0.7 available)
  args 2.6.0 (2.7.0 available)
  async 2.12.0 (2.13.0 available)
  cloud_firestore 5.6.2 (5.6.7 available)
  cloud_firestore_platform_interface 6.6.2 (6.6.7 available)
  cloud_firestore_web 4.4.2 (4.4.7 available)
  connectivity_plus 6.1.3 (6.1.4 available)
  fake_async 1.3.2 (1.3.3 available)
  ffi 2.1.3 (2.1.4 available)
  firebase_auth 5.4.1 (5.5.3 available)
  firebase_auth_platform_interface 7.5.1 (7.6.2 available)
  firebase_auth_web 5.13.7 (5.14.2 available)
  firebase_database [11](https://github.com/ProgramacaoEco/eco-delivery-app/actions/runs/15027651871/job/42232284451#step:10:12).3.1 (11.3.5 available)
  firebase_database_platform_interface 0.2.6+1 (0.2.6+5 available)
  firebase_database_web 0.2.6+7 (0.2.6+11 available)
  firebase_storage [12](https://github.com/ProgramacaoEco/eco-delivery-app/actions/runs/15027651871/job/42232284451#step:10:13).4.4 (12.4.5 available)
  firebase_storage_platform_interface 5.2.4 (5.2.5 available)
  firebase_storage_web 3.10.11 (3.10.12 available)
  flutter_lints 4.0.0 (5.0.0 available)
  flutter_svg 2.0.17 (2.1.0 available)
  go_router [14](https://github.com/ProgramacaoEco/eco-delivery-app/actions/runs/15027651871/job/42232284451#step:10:15).7.1 (15.1.2 available)
  google_identity_services_web 0.3.3 (0.3.3+1 available)
  google_sign_in 6.2.2 (6.3.0 available)
  google_sign_in_android 6.1.34 (6.2.1 available)
  google_sign_in_ios 5.7.8 (5.9.0 available)
  google_sign_in_platform_interface 2.4.5 (2.5.0 available)
  google_sign_in_web 0.12.4+3 (0.12.4+4 available)
  html 0.[15](https://github.com/ProgramacaoEco/eco-delivery-app/actions/runs/15027651871/job/42232284451#step:10:16).5 (0.15.6 available)
  http 1.3.0 (1.4.0 available)
  intl 0.18.1 (0.20.2 available)
  leak_tracker 10.0.8 (11.0.1 available)
  leak_tracker_flutter_testing 3.0.9 (3.0.10 available)
  leak_tracker_testing 3.0.1 (3.0.2 available)
  lints 4.0.0 (6.0.0 available)
  material_color_utilities 0.11.1 (0.12.0 available)
  package_rename 1.9.0 (1.10.0 available)
  path_provider_android 2.2.15 (2.2.17 available)
  petitparser 6.0.2 (6.1.0 available)
  posix 6.0.1 (6.0.2 available)
  provider 6.1.2 (6.1.5 available)
  rename_app 1.6.2 (1.6.3 available)
  shared_preferences 2.4.0 (2.5.3 available)
  shared_preferences_android 2.4.3 (2.4.10 available)
  shared_preferences_web 2.4.2 (2.4.3 available)
  sqflite 2.4.1 (2.4.2 available)
  sqflite_android 2.4.0 (2.4.1 available)
  sqflite_common 2.5.4+6 (2.5.5 available)
  sqflite_darwin 2.4.1+1 (2.4.2 available)
  synchronized 3.3.0+3 (3.3.1 available)
  test_api 0.7.4 (0.7.5 available)
  toastification 2.3.0 (3.0.2 available)
  url_launcher_android 6.3.15 (6.3.[16](https://github.com/ProgramacaoEco/eco-delivery-app/actions/runs/15027651871/job/42232284451#step:10:17) available)
  url_launcher_ios 6.3.2 (6.3.3 available)
  url_launcher_web 2.4.0 (2.4.1 available)
  vector_graphics 1.1.16 (1.1.18 available)
  vector_math 2.1.4 (2.1.5 available)
  vm_service 14.3.1 (15.0.0 available)
  web 1.1.0 (1.1.1 available)
Got dependencies!
58 packages have newer versions incompatible with dependency constraints.
Try `flutter pub outdated` for more information.

Running Gradle task 'bundleRelease'...                          
e: The daemon has terminated unexpectedly on startup attempt #1 with error code: 0. The daemon process output:
    1. Kotlin compile daemon is ready
Checking the license for package NDK (Side by side) 27.0.12077973 in /usr/local/lib/android/sdk/licenses
License for package NDK (Side by side) 27.0.12077973 accepted.
Preparing "Install NDK (Side by side) 27.0.12077973 v.27.0.12077973".
"Install NDK (Side by side) 27.0.12077973 v.27.0.12077973" ready.
Installing NDK (Side by side) 27.0.12077973 in /usr/local/lib/android/sdk/ndk/27.0.12077973
"Install NDK (Side by side) 27.0.12077973 v.27.0.12077973" complete.
"Install NDK (Side by side) 27.0.12077973 v.27.0.12077973" finished.
Checking the license for package Android SDK Platform 31 in /usr/local/lib/android/sdk/licenses
License for package Android SDK Platform 31 accepted.
Preparing "Install Android SDK Platform 31 (revision 1)".
"Install Android SDK Platform 31 (revision 1)" ready.
Installing Android SDK Platform 31 in /usr/local/lib/android/sdk/platforms/android-31
"Install Android SDK Platform 31 (revision 1)" complete.
"Install Android SDK Platform 31 (revision 1)" finished.
[=========                              ] 25%                                   
[=========                              ] 25% Fetch remote repository...        
[=======================================] 100% Fetch remote repository...       
Font asset "CupertinoIcons.ttf" was tree-shaken, reducing it from 257628 to 848 bytes (99.7% reduction). Tree-shaking can be disabled by providing the --no-tree-shake-icons flag when building your app.
Font asset "FlutterIconsax.ttf" was tree-shaken, reducing it from 670228 to 1924 bytes (99.7% reduction). Tree-shaking can be disabled by providing the --no-tree-shake-icons flag when building your app.
Font asset "MaterialIcons-Regular.otf" was tree-shaken, reducing it from 1645184 to 2724 bytes (99.8% reduction). Tree-shaking can be disabled by providing the --no-tree-shake-icons flag when building your app.
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Checking the license for package CMake 3.22.1 in /usr/local/lib/android/sdk/licenses
License for package CMake 3.22.1 accepted.
Preparing "Install CMake 3.22.1 v.3.22.1".
"Install CMake 3.22.1 v.3.22.1" ready.
Installing CMake 3.22.1 in /usr/local/lib/android/sdk/cmake/3.22.1
"Install CMake 3.22.1 v.3.22.1" complete.
"Install CMake 3.22.1 v.3.22.1" finished.
Running Gradle task 'bundleRelease'...                            616.8s
✓ Built build/app/outputs/bundle/release/app-release.aab (37.9MB)
⠋ Fetching releases...
✓ Fetching releases (0.1s)
⠋ Fetching aab artifact...
✓ Fetching aab artifact (0.1s)
⠋ Downloading aab...
⠙ Downloading aab (0%)... (0.1s)
⠹ Downloading aab (11%)... (0.4s)
⠸ Downloading aab (32%)... (0.6s)
⠼ Downloading aab (54%)... (0.9s)
⠴ Downloading aab (76%)... (1.1s)
⠦ Downloading aab (99%)... (1.4s)
✓ Downloading aab (100%) (1.4s)
⠋ Verifying patch can be applied to release...
**✓ Verifying patch can be applied to release (36ms)
[WARN] Your app contains native changes, which cannot be applied with a patch.
    Changed files:
        base/dex/classes3.dex

If you don't know why you're seeing this error, visit our troubleshooting page at https://docs.shorebird.dev/faq
Instance of 'UnpatchableChangeException'

If you aren't sure why this command failed, re-run with the --verbose flag to see more information.**

You can also [file an issue](https://github.com/shorebirdtech/shorebird/issues/new/choose) if you think this is a bug. Please include the following log file in your report:
/home/runner/.config/shorebird/logs/[17](https://github.com/ProgramacaoEco/eco-delivery-app/actions/runs/15027651871/job/42232284451#step:10:18)47245500533_shorebird.log

Leomhl avatar May 14 '25 18:05 Leomhl

This usually means one of two things:

  1. A plugin version was updated between the release and the patch. This can happen unexpectedly as a result of running flutter pub get if you aren't tracking your pubspec.lock in version control. This is the mostly likely cause.
  2. A dependency does not produce a stable build, i.e., building with the same input produces a different output. This is a lot more rare, but we've seen a couple dependencies that timestamp their builds.

If you create a release and immediately patch it, do you see this warning?

bryanoltman avatar Jun 02 '25 14:06 bryanoltman

Let us know if we can be of further help!

eseidel avatar Nov 20 '25 19:11 eseidel