Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[bug]: Using latest flutterfire_cli makes build fail. #366

Open
1 task done
jtdLab opened this issue Jan 18, 2025 · 4 comments
Open
1 task done

[bug]: Using latest flutterfire_cli makes build fail. #366

jtdLab opened this issue Jan 18, 2025 · 4 comments
Labels
blocked: customer-response Waiting for customer response, e.g. more information was requested. bug Something isn't working Needs Attention OP created or responded to issue and it needs attention.

Comments

@jtdLab
Copy link

jtdLab commented Jan 18, 2025

Is there an existing issue for this?

  • I have searched the existing issues.

CLI Version

1.0.1

Firebase Tools version

13.29.1

Flutter Doctor Output

[✓] Flutter (Channel stable, 3.27.1, on macOS 14.6.1 23G93 darwin-arm64, locale de-DE)
• Flutter version 3.27.1 on channel stable at /Users/foo/fvm/versions/stable
• Upstream repository https://github.com/flutter/flutter.git
• Framework revision 17025dd882 (5 weeks ago), 2024-12-17 03:23:09 +0900
• Engine revision cb4b5fff73
• Dart version 3.6.0
• DevTools version 2.40.2

[✓] Android toolchain - develop for Android devices (Android SDK version 35.0.0)
• Android SDK at /Users/jonasschlauch/Library/Android/sdk
• Platform android-35, build-tools 35.0.0
• Java binary at: /opt/homebrew/Cellar/openjdk@17/17.0.13/libexec/openjdk.jdk/Contents/Home/bin/java
• Java version OpenJDK Runtime Environment Homebrew (build 17.0.13+0)
• All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 15.4)
• Xcode at /Applications/Xcode-15.4.app/Contents/Developer
• Build 15F31d
• CocoaPods version 1.16.2

[✓] Chrome - develop for the web
• Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

[✓] Android Studio (version 2024.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 21.0.3+-79915917-b509.11)

[✓] VS Code (version 1.96.2)
• VS Code at /Applications/Visual Studio Code.app/Contents
• Flutter extension version 3.102.0

[✓] Connected device (4 available)
• iPhone 15 (mobile) • 5AD740A0-D613-4D18-ADAC-E1357081A248 • ios •
com.apple.CoreSimulator.SimRuntime.iOS-17-5 (simulator)
• macOS (desktop) • macos • darwin-arm64 • macOS 14.6.1 23G93 darwin-arm64
• Mac Designed for iPad (desktop) • mac-designed-for-ipad • darwin • macOS 14.6.1 23G93 darwin-arm64
• Chrome (web) • chrome • web-javascript • Google Chrome 131.0.6778.266

[✓] Network resources
• All expected network resources are available.

• No issues found!

Description

When running my flutter app with flavors on iOS i get the following output:

 FlutterAppRequiredException: The current directory does not appear to be a Flutter application project.
 Unhandled exception:
    type 'Null' is not a subtype of type 'String' in type cast
    #0      UploadCrashlyticsSymbols.envBuildProductsDir (package:flutterfire_cli/src/commands/upload_symbols.dart:171:50)
    #1      UploadCrashlyticsSymbols.run (package:flutterfire_cli/src/commands/upload_symbols.dart:354:7)
    <asynchronous suspension>
    #2      CommandRunner.runCommand (package:args/command_runner.dart:212:13)
    <asynchronous suspension>
    #3      main (file:///Users/foo/.pub-cache/hosted/pub.dev/flutterfire_cli-1.0.1/bin/flutterfire.dart:63:5)
    <asynchronous suspension>
    Command PhaseScriptExecution failed with a nonzero exit code

Steps to reproduce

  1. flutter run

Expected behavior

The app should build.

Screenshots

No response

Additional context and comments

The app does build with flutterfire_cli 0.3.0-dev.18 but not with >=0.3.0-dev.19

@jtdLab jtdLab added bug Something isn't working triage labels Jan 18, 2025
@russellwheatley
Copy link
Member

russellwheatley commented Jan 24, 2025

This means you're not running from Flutter app:

 FlutterAppRequiredException: The current directory does not appear to be a Flutter application project.

This means you're running the previous version:

#3      main (file:///Users/foo/.pub-cache/hosted/pub.dev/flutterfire_cli-1.0.0/bin/flutterfire.dart:63:5)

Note flutterfire_cli-1.0.0.

It is saying the Xcode environment variable BUILT_PRODUCTS_DIR is null which is abnormal and suggests something wrong with your setup, possibly linked to FlutterAppRequiredException.

This is the script written into build phases run scripts:

https://github.com/invertase/flutterfire_cli/blob/main/packages/flutterfire_cli/lib/src/firebase/firebase_apple_writes.dart#L404

@russellwheatley russellwheatley added blocked: customer-response Waiting for customer response, e.g. more information was requested. and removed triage labels Jan 24, 2025
@github-actions github-actions bot added the Needs Attention OP created or responded to issue and it needs attention. label Jan 24, 2025
@russellwheatley russellwheatley removed the Needs Attention OP created or responded to issue and it needs attention. label Jan 24, 2025
@jtdLab
Copy link
Author

jtdLab commented Jan 25, 2025

Okay but why is it working with flutterfire_cli 0.3.0-dev.18 but not later versions?

@github-actions github-actions bot added Needs Attention OP created or responded to issue and it needs attention. and removed blocked: customer-response Waiting for customer response, e.g. more information was requested. labels Jan 25, 2025
@russellwheatley
Copy link
Member

Not sure I'm afraid. Are you running the command from flutter app root?

@russellwheatley russellwheatley added blocked: customer-response Waiting for customer response, e.g. more information was requested. and removed Needs Attention OP created or responded to issue and it needs attention. labels Jan 30, 2025
@github-actions github-actions bot added the Needs Attention OP created or responded to issue and it needs attention. label Jan 30, 2025
@haoyuant
Copy link

haoyuant commented Feb 21, 2025

Having the same issue, but I am using 1.1.0.

Unhandled exception:
type 'Null' is not a subtype of type 'String' in type cast
#0      UploadCrashlyticsSymbols.appleProjectPath (package:flutterfire_cli/src/commands/upload_symbols.dart:199:46)
#1      UploadCrashlyticsSymbols._getConfigurationFromFirebaseJsonFile (package:flutterfire_cli/src/commands/upload_symbols.dart:278:43)
#2      UploadCrashlyticsSymbols.run (package:flutterfire_cli/src/commands/upload_symbols.dart:334:40)
#3      CommandRunner.runCommand (package:args/command_runner.dart:212:27)
#4      CommandRunner.run.<anonymous closure> (package:args/command_runner.dart:122:25)
#5      new Future.sync (dart:async/future.dart:313:27)
#6      CommandRunner.run (package:args/command_runner.dart:122:14)
#7      main (file:///Users/haoyuant/.pub-cache/hosted/pub.dev/flutterfire_cli-1.1.0/bin/flutterfire.dart:63:48)
#8      _delayEntrypointInvocation.<anonymous closure> (dart:isolate-patch/isolate_patch.dart:295:33)
#9      _RawReceivePort._handleMessage (dart:isolate-patch/isolate_patch.dart:184:12)

[edited] actually rolling back to 1.0.1 works for me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
blocked: customer-response Waiting for customer response, e.g. more information was requested. bug Something isn't working Needs Attention OP created or responded to issue and it needs attention.
Projects
None yet
Development

No branches or pull requests

3 participants