invertase / flutterfire_cli

A CLI to help with using FlutterFire in your Flutter applications.
Apache License 2.0
171 stars 47 forks source link

[bug]: Unable to open `.../ios/Runner.xcodeproj` because it doesn't exist. #217

Open dario-digregorio opened 1 year ago

dario-digregorio commented 1 year ago

Is there an existing issue for this?

CLI Version

0.3.0-dev.18

Firebase Tools version

12.5.4

Flutter Doctor Output

[✓] Flutter (Channel stable, 3.13.4, on macOS 13.5 22G74 darwin-arm64, locale en-DE) • Flutter version 3.13.4 on channel stable at /Users/dario/development/flutter • Upstream repository https://github.com/flutter/flutter.git • Framework revision 367f9ea16b (5 days ago), 2023-09-12 23:27:53 -0500 • Engine revision 9064459a8b • Dart version 3.1.2 • DevTools version 2.25.0

[✓] Android toolchain - develop for Android devices (Android SDK version 33.0.1) • Android SDK at /Users/dario/Library/Android/sdk • Platform android-33, build-tools 33.0.1 • Java binary at: /Applications/Android Studio.app/Contents/jbr/Contents/Home/bin/java • Java version OpenJDK Runtime Environment (build 17.0.6+0-17.0.6b829.9-10027231) • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 14.3.1) • Xcode at /Applications/Xcode.app/Contents/Developer • Build 14E300c • CocoaPods version 1.12.1

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

[✓] Android Studio (version 2022.3) • 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.6+0-17.0.6b829.9-10027231)

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

[✓] Connected device (2 available) • macOS (desktop) • macos • darwin-arm64 • macOS 13.5 22G74 darwin-arm64 • Chrome (web) • chrome • web-javascript • Google Chrome 116.0.5845.187

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

• No issues found!

Description

Hi I have used flutterfire configure but I get following error. I think it is because I renamed the Xcode Runner Project which is possible since Flutter 3.13.

Unhandled exception:
Exception: /opt/homebrew/lib/ruby/gems/3.2.0/gems/xcodeproj-1.22.0/lib/xcodeproj/project.rb:110:in `open': [Xcodeproj] Unable to open `.../ios/Runner.xcodeproj` because it doesn't exist. (RuntimeError)
        from -e:4:in `<main>'

#0      findBuildConfigurationsAvailable (package:flutterfire_cli/src/common/utils.dart:484:5)
<asynchronous suspension>
#1      promptCheckBuildConfiguration (package:flutterfire_cli/src/common/prompts/apple_prompts.dart:47:31)
<asynchronous suspension>
#2      appleValidation (package:flutterfire_cli/src/common/validation.dart:85:34)
<asynchronous suspension>
#3      ConfigCommand.run (package:flutterfire_cli/src/commands/config.dart:562:21)
<asynchronous suspension>
#4      CommandRunner.runCommand (package:args/command_runner.dart:212:13)
<asynchronous suspension>
#5      main (.../.pub-cache/hosted/pub.dev/flutterfire_cli-0.3.0-dev.18/bin/flutterfire.dart:63:5)
<asynchronous suspension>

Steps to reproduce

  1. Rename Xcode Runner Project
  2. Run command flutterfire configure

Expected behavior

Cli should work with renamed project

Screenshots

No response

Additional context and comments

No response

jackwill99 commented 1 year ago

I'm also facing the same issue after renaming the Runner Project in iOS.

flutter doctor -v

[✓] Flutter (Channel stable, 3.13.0, on macOS 13.4.1 22F82 darwin-arm64, locale en-US)
    • Flutter version 3.13.0 on channel stable at /Users/tensor_lab/Documents/developer/flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision efbf63d9c6 (5 weeks ago), 2023-08-15 21:05:06 -0500
    • Engine revision 1ac611c64e
    • Dart version 3.1.0
    • DevTools version 2.25.0

[✓] Android toolchain - develop for Android devices (Android SDK version 34.0.0)
    • Android SDK at /Users/tensor_lab/Library/Android/sdk
    • Platform android-34, build-tools 34.0.0
    • ANDROID_HOME =
      /Users/tensor_lab/.gem/bin:/Users/tensor_lab/Downloads/apache-maven-3.9.2/bin:/opt/homebrew/bin:/opt/homebrew/bin:/opt/homebrew/sb
      in:/usr/local/bin:/System/Cryptexes/App/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/share/dotnet:~/.dotnet/tools:/Library/App
      le/usr/bin:/Library/Frameworks/Mono.framework/Versions/Current/Commands:/var/run/com.apple.security.cryptexd/codex.system/bootstra
      p/usr/local/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/bin:/var/run/com.apple.security.cryptexd/codex.sys
      tem/bootstrap/usr/appleinternal/bin:/Users/tensor_lab/Library/Application
      Support/JetBrains/Toolbox/scripts:/Users/tensor_lab/Documents/developer/flutter/bin:/Users/tensor_lab/.pub-cache/bin:/Users/tensor
      _lab/Library/Android/sdk
    • Java binary at: /Applications/Android Studio.app/Contents/jbr/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 17.0.6+0-17.0.6b829.9-10027231)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 14.3.1)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Build 14E300c
    • CocoaPods version 1.12.1

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

[✓] Android Studio (version 2022.3)
    • 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.6+0-17.0.6b829.9-10027231)

[✓] IntelliJ IDEA Ultimate Edition (version 2023.2.1)
    • IntelliJ at /Applications/IntelliJ IDEA.app
    • Flutter plugin version 75.1.4
    • Dart plugin version 232.9559.10

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

[✓] Connected device (2 available)
    • macOS (desktop) • macos  • darwin-arm64   • macOS 13.4.1 22F82 darwin-arm64
    • Chrome (web)    • chrome • web-javascript • Google Chrome 116.0.5845.187

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

• No issues found!

and flutterfire configure

Unhandled exception:
Exception: /Library/Ruby/Gems/2.6.0/gems/xcodeproj-1.22.0/lib/xcodeproj/project.rb:110:in `open': [Xcodeproj] Unable to open `/Users/tensor_lab/projects/flutter/xxxx_project/ios/Runner.xcodeproj` because it doesn't exist. (RuntimeError)
    from -e:8:in `<main>'

#0      ConfigCommand.run (package:flutterfire_cli/src/commands/config.dart:540:11)
<asynchronous suspension>
#1      CommandRunner.runCommand (package:args/command_runner.dart:212:13)
<asynchronous suspension>
#2      main (file:///Users/tensor_lab/.pub-cache/hosted/pub.dev/flutterfire_cli-0.2.7/bin/flutterfire.dart:57:5)
<asynchronous suspension>
russellwheatley commented 1 year ago

It is occurring because you've renamed the Runner. FlutterFire CLI has been built with the assumption that the Apple project is called Runner. I guess this is something we need to update. Thanks for the heads up!

mustafa1605 commented 11 months ago

How do you fix this error?

dario-digregorio commented 9 months ago

It worked for me by renaming it back to Runner

kjxbyz commented 7 months ago

Same issue. Any updates?

github-actions[bot] commented 1 day ago

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.