fix: `shorebird patch ios` fails with space in path name
I'm not sure if the space is the cause, but it seems likely:
From the customer:
⠸ Linking AOT files... (0.2s)Exited with code 0
stdout:
0.0.1
[Process.run] /Users/eric.taix/.shorebird/bin/cache/flutter/aee5222c0d52012f089564a8395826d56e7c2fe8/bin/dart run /Users/eric.taix/.shorebird/bin/cache/artifacts/aot-tools/e4434d7a212b29a8ee8ffaf8e2c453c753904933/aot-tools.dill link --base=/var/folders/qn/n44nhjdd78l4d70bp6kv3dtmypmhkp/T/Anl7ys/Products/Applications/Runner.app/Frameworks/App.framework/App --patch=/Users/eric.taix/Projects/digitre/Espace%20Conseiller/build/out.aot --analyze-snapshot=/Users/eric.taix/.shorebird/bin/cache/flutter/aee5222c0d52012f089564a8395826d56e7c2fe8/bin/cache/artifacts/engine/ios-release/analyze_snapshot_arm64 --output=/Users/eric.taix/Projects/digitre/Espace%20Conseiller/build/out.vmcode --gen-snapshot=/Users/eric.taix/.shorebird/bin/cache/flutter/aee5222c0d52012f089564a8395826d56e7c2fe8/bin/cache/artifacts/engine/ios-release/gen_snapshot_arm64 --kernel=/Users/eric.taix/Projects/digitre/Espace%20Conseiller/.dart_tool/flutter_build/eb3a6b68351113c9dc99ac61add4a268/app.dill --reporter=json --redirect-to=/Users/eric.taix/Projects/digitre/Espace%20Conseiller/build/link.jsonl (in /Users/eric.taix/Projects/digitre/Espace%20Conseiller/build)
⠼ Linking AOT files... (2.7s)Exited with code 255
stderr:
/Users/eric.taix/.shorebird/bin/cache/flutter/aee5222c0d52012f089564a8395826d56e7c2fe8/bin/cache/artifacts/engine/ios-release/analyze_snapshot_arm64 --dump_link_data --out=/Users/eric.taix/Projects/digitre/Espace%20Conseiller/build/out.link /Users/eric.taix/Projects/digitre/Espace%20Conseiller/build/out.aot
Failure reading snapshot
Unhandled exception:
Exception: analyze_snapshot failed
#0 SnapshotAnalyzer._run (package:aot_tools/src/snapshot_analyzer.dart:61:7)
#1 SnapshotAnalyzer.dumpLinkData (package:aot_tools/src/snapshot_analyzer.dart:112:5)
#2 LinkCommand._generateOptimizedPatchSnapshot (package:aot_tools/src/commands/link_command.dart:260:23)
#3 LinkCommand.run (package:aot_tools/src/commands/link_command.dart:141:40)
#4 CommandRunner.runCommand (package:args/command_runner.dart:212:27)
#5 CommandRunner.run.<anonymous closure> (package:args/command_runner.dart:122:25)
#6 new Future.sync (dart:async/future.dart:305:31)
#7 CommandRunner.run (package:args/command_runner.dart:122:14)
#8 main.<anonymous closure> (file:///home/gha/.engine_checkout/engine/src/third_party/dart/pkg/aot_tools/bin/aot_tools.dart:9:57)
#9 _rootRun (dart:async/zone.dart:1399:13)
#10 _CustomZone.run (dart:async/zone.dart:1301:19)
#11 _runZoned (dart:async/zone.dart:1804:10)
#12 runZoned (dart:async/zone.dart:1747:10)
#13 LoggerOverrides.runZoned (package:aot_tools/src/logger.dart:28:18)
#14 runWithLogger (package:aot_tools/src/logger.dart:18:26)
#15 main (file:///home/gha/.engine_checkout/engine/src/third_party/dart/pkg/aot_tools/bin/aot_tools.dart:9:26)
#16 _delayEntrypointInvocation.<anonymous closure> (dart:isolate-patch/isolate_patch.dart:295:33)
#17 _RawReceivePort._handleMessage (dart:isolate-patch/isolate_patch.dart:184:12)
✗ Failed to link AOT files: Exception: Failed to link: /Users/eric.taix/.shorebird/bin/cache/flutter/aee5222c0d52012f089564a8395826d56e7c2fe8/bin/cache/artifacts/engine/ios-release/analyze_snapshot_arm64 --dump_link_data --out=/Users/eric.taix/Projects/digitre/Espace%20Conseiller/build/out.link /Users/eric.taix/Projects/digitre/Espace%20Conseiller/build/out.aot
Failure reading snapshot
Unhandled exception:
Exception: analyze_snapshot failed
#0 SnapshotAnalyzer._run (package:aot_tools/src/snapshot_analyzer.dart:61:7)
#1 SnapshotAnalyzer.dumpLinkData (package:aot_tools/src/snapshot_analyzer.dart:112:5)
#2 LinkCommand._generateOptimizedPatchSnapshot (package:aot_tools/src/commands/link_command.dart:260:23)
#3 LinkCommand.run (package:aot_tools/src/commands/link_command.dart:141:40)
#4 CommandRunner.runCommand (package:args/command_runner.dart:212:27)
#5 CommandRunner.run.<anonymous closure> (package:args/command_runner.dart:122:25)
#6 new Future.sync (dart:async/future.dart:305:31)
#7 CommandRunner.run (package:args/command_runner.dart:122:14)
#8 main.<anonymous closure> (file:///home/gha/.engine_checkout/engine/src/third_party/dart/pkg/aot_tools/bin/aot_tools.dart:9:57)
#9 _rootRun (dart:async/zone.dart:1399:13)
#10 _CustomZone.run (dart:async/zone.dart:1301:19)
#11 _runZoned (dart:async/zone.dart:1804:10)
#12 runZoned (dart:async/zone.dart:1747:10)
#13 LoggerOverrides.runZoned (package:aot_tools/src/logger.dart:28:18)
#14 runWithLogger (package:aot_tools/src/logger.dart:18:26)
#15 main (file:///home/gha/.engine_checkout/engine/src/third_party/dart/pkg/aot_tools/bin/aot_tools.dart:9:26)
#16 _delayEntrypointInvocation.<anonymous closure> (dart:isolate-patch/isolate_patch.dart:295:33)
#17 _RawReceivePort._handleMessage (dart:isolate-patch/isolate_patch.dart:184:12)
https://discord.com/channels/1030243211995791380/1236982695389564981/1237062586965430272
Customer confirmed removing the space fixed the issue.
The fix here is for us to fix our bots to use spaces in the path when testing. Then we'll never have this issue again.
@eseidel I don't think non ASCII chars affects mac os or linux, just windows, I did several tests, and it works correctly.
Was this reopen just because of #2140? Or is there anything else? If not, I feel we can close this.
I can't reproduce this (I believe it might've been fixed). Closing, please reopen if you experience this again.
this issue persists, as I've run shorebird cache clean and then shorebird patch ios.
[Process.run] /Users/[user]/.shorebird/bin/cache/flutter/009d947deb3a58d8801dbc995667e87523c7f08c/bin/cache/artifacts/engine/ios-release/gen_snapshot_arm64 --l
⠴ Building patch with Flutter 3.27.3 (009d947deb)... (320.9s)Exited with code 0
✓ Building patch with Flutter 3.27.3 (009d947deb) (321.0s)
✓ Verifying patch can be applied to release (2.5s)
✓ Extracting release artifact (2.7s)
Unable to find analyze_snapshot at /Users/[user]/.shorebird/bin/cache/flutter/009d947deb3a58d8801dbc995667e87523c7f08c/bin/cache/artifacts/engine/ios-release/analyze_snapshot_arm64
[Process.run] git symbolic-ref HEAD (in /Users/[user]/.shorebird/bin/cache)
Exited with code 0
this issue persists, as I've run
shorebird cache cleanand thenshorebird patch ios.[Process.run] /Users/[user]/.shorebird/bin/cache/flutter/009d947deb3a58d8801dbc995667e87523c7f08c/bin/cache/artifacts/engine/ios-release/gen_snapshot_arm64 --l ⠴ Building patch with Flutter 3.27.3 (009d947deb)... (320.9s)Exited with code 0 ✓ Building patch with Flutter 3.27.3 (009d947deb) (321.0s) ✓ Verifying patch can be applied to release (2.5s) ✓ Extracting release artifact (2.7s) Unable to find analyze_snapshot at /Users/[user]/.shorebird/bin/cache/flutter/009d947deb3a58d8801dbc995667e87523c7f08c/bin/cache/artifacts/engine/ios-release/analyze_snapshot_arm64 [Process.run] git symbolic-ref HEAD (in /Users/[user]/.shorebird/bin/cache) Exited with code 0
This is a new issue from yesterday. Was mistakenly didn't include analyze_snapshot_arm64 in our Flutter 3.27.3 release, by accident, but fixed it soon after. I would expect shorebird upgrade; shorebird cache clear to fix it.
Please let us know if it does not! (Ideally by opening a new issue since this is long-closed and about a different thing).