shorebirdtech / shorebird

Code Push for Flutter and other tools for Flutter businesses.
https://shorebird.dev
Other
2.31k stars 140 forks source link

fix: Could not find an option named "dump-debug-info" #2089

Closed ismail-mufin closed 5 months ago

ismail-mufin commented 5 months ago

App ID: 5be7858a-e211-44f2-8120-5d21ce6bf5eb

Description

We get error with the Shorebird patch command (only iOS).

⠋ Linking AOT files...
✗ Failed to link AOT files: Exception: Failed to link: Unhandled exception:
Could not find an option named "dump-debug-info".
Usage: aot_tools link [arguments]
-h, --help                            Print this usage information.
    --base (mandatory)                Path to the base snapshot to link against.
    --patch (mandatory)               Path to the patch snapshot to link.
    --analyze-snapshot (mandatory)    Path to analyze_snapshot binary.
    --gen-snapshot (mandatory)        Path to gen_snapshot binary.
    --kernel (mandatory)              Path to the patch kernel (.dill) file.
    --output (mandatory)              Path to the output vmcode file.
    --enable-asserts                  Whether to enable asserts.
    --linker-overrides                Path to the linker overrides json file.
    --reporter                        Set how to print link results.
          [json]                      Prints the results in json format.
          [pretty] (default)          Prints the results in a human readable format.
    --redirect-to                     Redirect output to a file.
Run "aot_tools help" to see global options.
#0      Command.usageException (package:args/command_runner.dart:466:7)
#1      CommandRunner.parse (package:args/command_runner.dart:140:15)
#2      CommandRunner.run.<anonymous closure> (package:args/command_runner.dart:122:36)
#3      new Future.sync (dart:async/future.dart:305:31)
#4      CommandRunner.run (package:args/command_runner.dart:122:14)
#5      main.<anonymous closure> (file:***home/gha/.engine_checkout/engine/src/third_party/dart/pkg/aot_tools/bin/aot_tools.dart:9:57)
#6      _rootRun (dart:async/zone.dart:1[39](https://github.com/globalmsq/msquare-market-wallet-mobile-app/actions/runs/9069983805/job/24920772732#step:11:40)9:13)
#7      _CustomZone.run (dart:async/zone.dart:1301:19)
#8      _runZoned (dart:async/zone.dart:1804:10)
#9      runZoned (dart:async/zone.dart:1747:10)
#10     LoggerOverrides.runZoned (package:aot_tools/src/logger.dart:28:18)
#11     runWithLogger (package:aot_tools/src/logger.dart:18:26)
#12     main (file:***home/gha/.engine_checkout/engine/src/third_party/dart/pkg/aot_tools/bin/aot_tools.dart:9:26)
#13     _delayEntrypointInvocation.<anonymous closure> (dart:isolate-patch/isolate_patch.dart:295:33)
#14     _RawReceivePort._handleMessage (dart:isolate-patch/isolate_patch.dart:184:12)
 (0.6s)
Error: Process completed with exit code 70.

Expected Behavior

Fixing the error in the patch command.

Additional Context

Flutter version v3.19.5

bryanoltman commented 5 months ago

Can you share the command you ran and the full output?

ismail-mufin commented 5 months ago

@bryanoltman we are using Github Actions. Android patch is working fine after #2079 but now iOS giving this. Btw, we didn't have any issue before v1.1.0 refactor.


IOS_EXPORT_OPTIONS_PATH=$RUNNER_TEMP/exportOptions.plist
  shorebird patch ios --release-version 1.6.7+98 --allow-native-diffs --allow-asset-diffs --flavor prod --target lib/target/prod_main.dart -- --release --no-tree-shake-icons --export-options-plist $IOS_EXPORT_OPTIONS_PATH
  shell: /bin/bash -e {0***
  env:
    REGION: ap-northeast-2
    JAVA_HOME: /Users/runner/hostedtoolcache/Java_Zulu_jdk/17.0.11-9/arm64
    JAVA_HOME_17_ARM64: /Users/runner/hostedtoolcache/Java_Zulu_jdk/17.0.11-9/arm64
    SHOREBIRD_TOKEN: ***

⠋ Fetching apps...
✓ Fetching apps (0.5s)
⠋ Fetching releases...
✓ Fetching releases (0.1s)
⠋ Installing Flutter [3](https://github.com/XXX/XXX/actions/runs/9069983805/job/24920772732#step:11:3).19.5 (47571af6a3)...
✓ Installing Flutter 3.19.5 (47571af6a3) (9.6s)
⠋ Fetching xcarchive artifact...
✓ Fetching xcarchive artifact (0.1s)
⠋ Downloading xcarchive...
✓ Downloading xcarchive (2.9s)
⠋ Building patch with Flutter 3.19.5 ([4](https://github.com/XXX/XXX/actions/runs/9069983805/job/24920772732#step:11:4)7571af6a3)...
✓ Building patch with Flutter 3.19.[5](https://github.com/XXX/XXX/actions/runs/9069983805/job/24920772732#step:11:5) (47571af[6](https://github.com/XXX/XXX/actions/runs/9069983805/job/24920772732#step:11:6)a3) (561.0s)
⠋ Verifying patch can be applied to release...
✓ Verifying patch can be applied to release (3.1s)
[WARN] Your app contains native changes, which cannot be applied with a patch.
    Changed files:
        Products/Applications/XXX.app/XXX
If you don't know why you're seeing this error, visit our troublshooting page at ]8;;https://docs.shorebird.dev/troubleshooting#unexpected-native-changes\https://docs.shorebird.dev/troubleshooting#unexpected-native-changes]8;;\
[WARN] Your app contains asset changes, which will not be included in the patch.
    Changed files:
        Products/Applications/XXX.app/Frameworks/App.framework/flutter_assets/assets/products/10.png
⠋ Fetching xcarchive artifact...
✓ Fetching xcarchive artifact (0.8s)
⠋ Downloading release artifact...
✓ Downloading release artifact (4.5s)
⠋ Extracting release artifact...
✓ Extracting release artifact (1.4s)
⠋ Linking AOT files...
✗ Failed to link AOT files: Exception: Failed to link: Unhandled exception:
Could not find an option named "dump-debug-info".
Usage: aot_tools link [arguments]
-h, --help                            Print this usage information.
    --base (mandatory)                Path to the base snapshot to link against.
    --patch (mandatory)               Path to the patch snapshot to link.
    --analyze-snapshot (mandatory)    Path to analyze_snapshot binary.
    --gen-snapshot (mandatory)        Path to gen_snapshot binary.
    --kernel (mandatory)              Path to the patch kernel (.dill) file.
    --output (mandatory)              Path to the output vmcode file.
    --enable-asserts                  Whether to enable asserts.
    --linker-overrides                Path to the linker overrides json file.
    --reporter                        Set how to print link results.
          [json]                      Prints the results in json format.
          [pretty] (default)          Prints the results in a human readable format.
    --redirect-to                     Redirect output to a file.
Run "aot_tools help" to see global options.
#0      Command.usageException (package:args/command_runner.dart:466:[7](https://github.com/XXX/XXX/actions/runs/9069983805/job/24920772732#step:11:7))
#1      CommandRunner.parse (package:args/command_runner.dart:140:15)
#2      CommandRunner.run.<anonymous closure> (package:args/command_runner.dart:122:36)
#3      new Future.sync (dart:async/future.dart:305:31)
#4      CommandRunner.run (package:args/command_runner.dart:122:14)
#5      main.<anonymous closure> (file:***home/gha/.engine_checkout/engine/src/third_party/dart/pkg/aot_tools/bin/aot_tools.dart:9:57)
#6      _rootRun (dart:async/zone.dart:1399:13)
#7      _CustomZone.run (dart:async/zone.dart:1301:19)
#[8](https://github.com/XXX/XXX/actions/runs/9069983805/job/24920772732#step:11:8)      _runZoned (dart:async/zone.dart:1804:10)
#9      runZoned (dart:async/zone.dart:1747:10)
#10     LoggerOverrides.runZoned (package:aot_tools/src/logger.dart:28:18)
#11     runWithLogger (package:aot_tools/src/logger.dart:18:26)
#12     main (file:***home/gha/.engine_checkout/engine/src/third_party/dart/pkg/aot_tools/bin/aot_tools.dart:[9](https://github.com/XXX/XXX/actions/runs/9069983805/job/24920772732#step:11:9):26)
#13     _delayEntrypointInvocation.<anonymous closure> (dart:isolate-patch/isolate_patch.dart:295:33)
#14     _RawReceivePort._handleMessage (dart:isolate-patch/isolate_patch.dart:184:[12](https://github.com/XXX/XXX/actions/runs/9069983805/job/24920772732#step:11:13))
 (0.6s)
Error: Process completed with exit code 70.