invertase / flutterfire_cli

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

[bug]: ProcessException: Permission denied when running flutter build ipa #298

Open rehmatsg opened 1 month ago

rehmatsg commented 1 month ago

Is there an existing issue for this?

CLI Version

1.0.0

Firebase Tools version

12.4.4

Flutter Doctor Output

Doctor summary (to see all details, run flutter doctor -v): [✓] Flutter (Channel stable, 3.22.0, on macOS 14.0 23A344 darwin-arm64, locale en-IN) [✗] Android toolchain - develop for Android devices ✗ cmdline-tools component is missing Run path/to/sdkmanager --install "cmdline-tools;latest" See https://developer.android.com/studio/command-line for more details. [✓] Xcode - develop for iOS and macOS (Xcode 15.4) [✓] Chrome - develop for the web [!] Android Studio (not installed) [✓] VS Code (version 1.87.2) [✓] VS Code (version 1.89.0-insider)

Description

When running flutter build ipa, the process throws error when reaching "Compiling, Linking and Signing" phase:

Unhandled exception:
    ProcessException: Permission denied
      Command: /Users/rehmatsg/Desktop/Development/Flutter --validate --flutter-project
      /Users/rehmatsg/Desktop/Development/Flutter
      Projects/my_project/.dart_tool/flutterfire/platforms/ios/default/app-render-studio/app_id_file.json
    #0      _ProcessImpl._start (dart:io-patch/process_patch.dart:402:33)
    #1      Process.start (dart:io-patch/process_patch.dart:38:20)
    #2      _runNonInteractiveProcess (dart:io-patch/process_patch.dart:579:18)
    #3      Process.run (dart:io-patch/process_patch.dart:49:12)
    #4      UploadCrashlyticsSymbols.run (package:flutterfire_cli/src/commands/upload_symbols.dart:365:44)
    <asynchronous suspension>
    #5      CommandRunner.runCommand (package:args/command_runner.dart:212:13)
    <asynchronous suspension>
    #6      main (file:///Users/rehmatsg/.pub-cache/hosted/pub.dev/flutterfire_cli-1.0.1-dev.0/bin/flutterfire.dart:63:5)
    <asynchronous suspension>

My project is stored in directory /Users/rehmatsg/Desktop/Development/Flutter Projects/my_project

Steps to reproduce

  1. Run command flutter build ipa

Expected behavior

When running flutter build ipa, it should have run the process without any errors and successfully built ipa ready to release.

Screenshots

No response

Additional context and comments

No response

russellwheatley commented 1 month ago

I succesfully ran flutter build ipa with crashlytics symbols upload script:

Screenshot 2024-05-22 at 12 00 01

You have a "Permission denied" exception. The script is running the upload symbol scipt on FirebaseCrashlytics pod in your project. It should be located here:

/Users/rehmatsg/Desktop/Development/Flutter Projects/my_project/ios/Pods/FirebaseCrashlytics/upload-symbols

There shouldn't be a permission exception, I think it is because you have a space in your path, i.e. "Flutter Projects". I would try to remove the space and see what happens.