12

I'm trying to setup CI-CD for firebase app distribution on my local system.

fastlane-plugin-firebase_app_distribution plugin can't be found.

Error loading plugin 'fastlane-plugin-firebase_app_distribution': cannot load such file -- fastlane/plugin/firebase_app_distribution
+-------------------------------------------+-----------+------------------+
|                               Used plugins                               |
+-------------------------------------------+-----------+------------------+
| Plugin                                    | Version   | Action           |
+-------------------------------------------+-----------+------------------+
| fastlane-plugin-firebase_app_distribution | undefined | No actions found |
+-------------------------------------------+-----------+------------------+

What should I do?

sagarkothari
  • 24,520
  • 50
  • 165
  • 235
  • 1
    Did you install this Plugin with `fastlane add_plugin fastlane-plugin-firebase_app_distribution`? Or try to execute: `sudo fastlane install_plugins`. Seems like others have the same issue: https://github.com/fastlane/fastlane-plugin-firebase_app_distribution/issues/15 – balazs630 Mar 22 '20 at 21:34
  • Yes. `sudo fastlane install_plugins` worked for installing. But, when I run `bundle exec fastlane testFlightRelease` it throws same error. – sagarkothari Mar 23 '20 at 00:01
  • If you use bundle, use it consistently for every Fastlane related call: `bundle exec fastlane install_plugins` – balazs630 Mar 23 '20 at 11:24
  • tried that. Didn't help – sagarkothari Mar 23 '20 at 12:38
  • @SagarKothari I am facing a pretty similar issue. did you find out the solutions? mine problem happens only on CI (github actions) – Andriy Antonov Sep 06 '22 at 09:32

6 Answers6

24

Looks like some kind of file permission issue under Catalina, so chmod might help. But you can also install fastlane-plugin-firebase_app_distribution in gem's USER INSTALLATION DIRECTORY (gem env will tell you where it is).

Uninstall the gem from the default dir:

sudo gem uninstall fastlane-plugin-firebase_app_distribution

Install in user dir:

gem install fastlane-plugin-firebase_app_distribution --user-install
komorian
  • 361
  • 3
  • 2
  • 2
    this is the correct answer and work with me and also found it in fastlane issues https://github.com/fastlane/fastlane-plugin-firebase_app_distribution/issues/15 – Abdelrahman Mohamed Jun 15 '20 at 19:01
7

Thank you @Balaz.

Try this. I think this will solve the issue.

sudo chmod -R a+r /Library/Ruby/Gems/2.6.0/gems/fastlane-plugin-firebase_app_distribution-0.1.4

I had the same issue.

dhiku
  • 1,818
  • 2
  • 22
  • 38
6

For me simply updating the Fastlane and then updating the plugins worked

bundle update fastlane
fastlane update_plugins
Sonu Sourav
  • 2,926
  • 2
  • 12
  • 25
  • 1
    Works every time! :D My tip to Stackoverflow newbies, upvote the answers that help you. Because there will come a time when you will experience the same problem and you'd know what answer did help you when you first encountered such problem. – Glenn Posadas Jan 04 '22 at 15:01
3
  1. Install plugin again. Command:

    fastlane add_plugin firebase_app_distribution
    

more info: https://firebase.google.com/docs/app-distribution/ios/distribute-fastlane

  1. If instillation does not help try to run

    bundle install
    
  2. And the run your lane.

Vasily Bodnarchuk
  • 24,482
  • 9
  • 132
  • 127
1

Probably, Fastlane is not up to date. Might need to check fastlane version and update it

bundle update fastlane
0

Flutter and Github Actions for Android:

If you are setting up Github Actions for a Flutter project for android and run into this error in one of your steps, see the work flow below:

  release:
    runs-on: ubuntu-latest
    env:
      LC_ALL: en_US.UTF-8
      LANG: en_US.UTF-8
    steps:
      - uses: actions/checkout@v3

      - name: Set up ruby
        uses: ruby/setup-ruby@v1

      - name: Setup Fastlane
        working-directory: ./android  # <-- Make sure you have this
        run: bundle install

      - name: Run Fastlane
        working-directory: ./android. # <-- Make sure you have this
        run: bundle exec fastlane android [lane name].

Make sure to setup the ruby/setup-ruby@v1 action correctly depending on your project. see the doc: https://github.com/ruby/setup-ruby

In my case I have not specified the ruby version because I am using the .ruby-version file in my project.

Margach Chris
  • 1,404
  • 12
  • 20