[bug]: PhaseScriptExecution error on the iOS flavor with extra target+scheme+configuration within `firebase.json`
Closed this issue · 15 comments
Is there an existing issue for this?
- I have searched the existing issues.
CLI Version
1.0.0
Firebase Tools version
13.0.2
Flutter Doctor Output
[✓] Flutter (Channel stable, 3.19.5, on macOS 14.3.1 23D60 darwin-arm64, locale en-GB)
• Flutter version 3.19.5 on channel stable at /Users/heknt/development/flutter
• Upstream repository https://github.com/flutter/flutter.git
• Framework revision 300451adae (6 weeks ago), 2024-03-27 21:54:07 -0500
• Engine revision e76c956498
• Dart version 3.3.3
• DevTools version 2.31.1
[✓] Android toolchain - develop for Android devices (Android SDK version 32.0.0)
• Android SDK at /Users/user/Library/Android/sdk
• Platform android-34, build-tools 32.0.0
• ANDROID_HOME = /Users/user/Library/Android/sdk
• ANDROID_SDK_ROOT = /Users/user/Library/Android/sdk
• Java binary at: /Applications/Android Studio.app/Contents/jbr/Contents/Home/bin/java
• Java version OpenJDK Runtime Environment (build 17.0.9+0-17.0.9b1087.7-11185874)
• All Android licenses accepted.
[✓] Xcode - develop for iOS and macOS (Xcode 15.2)
• Xcode at /Applications/Xcode.app/Contents/Developer
• Build 15C500b
• CocoaPods version 1.15.2
[✓] Chrome - develop for the web
• Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome
[✓] Android Studio (version 2023.2)
• Android Studio at /Applications/Android Studio.app/Contents
• Flutter plugin can be installed from:
🔨 https://plugins.jetbrains.com/plugin/9212-flutter
• Dart plugin can be installed from:
🔨 https://plugins.jetbrains.com/plugin/6351-dart
• Java version OpenJDK Runtime Environment (build 17.0.9+0-17.0.9b1087.7-11185874)
[✓] VS Code (version 1.88.1)
• VS Code at /Applications/Visual Studio Code.app/Contents
• Flutter extension can be installed from:
🔨 https://marketplace.visualstudio.com/items?itemName=Dart-Code.flutter
[✓] Connected device (3 available)
• iPhone 15 Pro (mobile) • E5311B6B-0257-41C7-B107-471670430AD5 • ios •
com.apple.CoreSimulator.SimRuntime.iOS-17-2 (simulator)
• macOS (desktop) • macos • darwin-arm64 • macOS 14.3.1 23D60 darwin-arm64
• Chrome (web) • chrome • web-javascript • Google Chrome 122.0.6261.69
[✓] Network resources
• All expected network resources are available.
• No issues found!
Description
I try to run flutter with a FlutterFire build phase on a flavor with a different iOS target. There is an error:
#0 UploadCrashlyticsSymbols.run (package:flutterfire_cli/src/commands/upload_symbols.dart:406:7)
<asynchronous suspension>
#1 CommandRunner.runCommand (package:args/command_runner.dart:212:13)
<asynchronous suspension>
#2 main (file:///Users/user/.pub-cache/hosted/pub.dev/flutterfire_cli-1.0.0/bin/flutterfire.dart:63:5)
<asynchronous suspension>
Command PhaseScriptExecution failed with a nonzero exit code
BTW, on Runner target everything works fine. Also, w/o FlutterFire build phase it works fine on custom iOS target also.
Steps to reproduce
- run
flutterfire configure
for iOS, which setups config files, autocreates build phase flutter run
works fine- duplicate
Runner
target. It will beRunner copy
- copy-paste
target 'Runner' do .... end
for the newRunner copy
- copy-paste configuration
Debug
, set the name toDebug-Runner copy
flutter run --flavor "Runner copy"
gives an errorPhaseScriptExecution
- remove FlutterFire build phase for
Runner copy
flutter run --flavor "Runner copy"
works fine
Expected behavior
flutter run --flavor "Runner copy"
works fine within the FlutterFire build phase
Screenshots
No response
Additional context and comments
I need the extra target for integration testing. So currently I was needed to return the old firebase jsons: firebase_app_id_file.json
, and the old crashlytics build phase, just for that target.
Steps to reproduce
- run
flutterfire configure
for iOS, which setups config files, autocreates build phase
flutter run
works fine- duplicate
Runner
target. It will beRunner copy
- copy-paste
target 'Runner' do .... end
for the newRunner copy
- copy-paste configuration
Debug
, set the name toDebug-Runner copy
flutter run --flavor "Runner copy"
gives an errorPhaseScriptExecution
- remove FlutterFire build phase for
Runner copy
flutter run --flavor "Runner copy"
works fine
is step 5 copy-paste from firebase.json
? You shouldn't do that.
Please explain further exactly what you're doing as it isn't clear to me.
@russellwheatley I don't do anything with firebase.json
in this case.
The 5th step - I am copying the iOS Debug configuration from existing one. I need an extra configuration Debug-Runner copy
, so it will be used for flutter flavor Runner copy
Did you configure the additional target? If you create a new target, you would need to also run flutterfire configure
for it as well.
@russellwheatley I've just tried to configure by command
flutterfire configure --ios-target="Runner copy"
It's adding the firebase_options.dart, but it doesn't create the Build Phase FlutterFire: "flutterfire upload-crashlytics-symbols"
.
If I create this phase by myself, it won't work.
If you want to create a reproduction repo containing a stripped out version of your app, I can take a look. I can't really solve your issue without it as I have no idea why it isn't creating the script in your build phases.
Hi @russellwheatley!
I created the repo for that. Please take a chance to look into:
https://github.com/muknta/issue_flutterfire_ios_flavor
@muknta did you find any solution to this problem?
Hi, I'm facing the same problem I guess, it's quite hard to say since there is a lot of things involved and I don't understand everything.
I'm having the same error in the console and I noticed that the log output from the "flutterfire upload symbols" script prints a different path:
I'm having this log:
Exception: 2024-08-23 20:49:30.535 upload-symbols[75869:1599589] Unable to get file attributes for dSYM file at path "/Users/<redacted>/Development/Projects/<redacted>/build/ios/Debug-staging-iphonesimulator/MyAppName/Contents/Resources/DWARF"
Following the path, I notice it is slightly different:
/Users/<redacted>/Development/Projects/<redacted>/build/ios/Debug-staging-iphonesimulator/MyAppName Staging (Debug).app.dSYM/Contents/Resources/DWARF"
I notice that the app name is different. Could it be the issue that makes the dSYM file not accessible?
Maybe because of the spaces I used in the name?
On my side it turns out the problem was indeed the spaces that were included in my PRODUCT_NAME
variable. By replacing them with underscores, the "flutterfire upload symbols" script could successfully find the dSYM file it was looking for and keep processing.
I'm experiencing the same issue. If the PRODUCT_NAME variable from AppInfo.xcconfig has a space in it, I get the error. Removing the space solves the issue but I need a way to set the actual correct name of the app using space. Any workarounds until this gets fixed?
Hello 👋, to help manage issues we automatically close stale issues.
This issue has been automatically marked as stale because it has not had activity for quite some time.Has this issue been fixed, or does it still require attention?
This issue will be closed in 15 days if no further activity occurs.
Thank you for your contributions.
The issue seems to be resolved when using version 1.0.1-dev.4
I faced same issue. -dev.4 solved it for me.
@solshark - thank you for the confirmation 🙏