ayoy / fastlane-plugin-dropbox

Fastlane plugin for uploading files to Dropbox
MIT License
3 stars 4 forks source link

Unable to load plugin #4

Open rmato opened 6 years ago

rmato commented 6 years ago

I tried to add the plugin and use it, but I couldn't add it correctly and then the plugin failed.

Adding the plugin:

➜  fastlane add_plugin dropbox
[βœ”] πŸš€ 
[12:45:49]: fastlane detected a Gemfile in the current directory
[12:45:49]: however it seems like you don't use `bundle exec`
[12:45:49]: to launch fastlane faster, please use
[12:45:49]: 
[12:45:49]: $ bundle exec fastlane add_plugin dropbox
[12:45:49]: 
[12:45:49]: Get started using a Gemfile for fastlane https://docs.fastlane.tools/getting-started/ios/setup/#use-a-gemfile
[12:45:50]: It seems like you wanted to load some plugins, however they couldn't be loaded
[12:45:50]: Please follow the troubleshooting guide: https://docs.fastlane.tools/plugins/plugins-troubleshooting/
[12:45:50]: Plugin 'fastlane-plugin-dropbox' was added to './fastlane/Pluginfile'
[12:45:50]: It looks like fastlane plugins are not yet set up for this project.
[12:45:50]: fastlane will modify your existing Gemfile at path '/Users/rodrigomato/Workspace/Avi-On/iOSApp/Gemfile'
[12:45:50]: This change is necessary for fastlane plugins to work
[12:45:50]: Should fastlane modify the Gemfile at path '/Users/rodrigomato/Workspace/Avi-On/iOSApp/Gemfile' for you? (y/n)
y
[12:45:58]: Successfully modified '/Users/rodrigomato/Workspace/Avi-On/iOSApp/Gemfile'
[12:45:58]: Make sure to commit your Gemfile, Gemfile.lock and Pluginfile to version control
Installing plugin dependencies...
Bundler could not find compatible versions for gem "faraday":
  In snapshot (Gemfile.lock):
    faraday (= 0.14.0)

  In Gemfile:
    fastlane-plugin-dropbox was resolved to 0.2.0, which depends on
      dropbox_api was resolved to 0.1.10, which depends on
        faraday (~> 0.8, ~> 0.9)

    fastlane was resolved to 2.85.0, which depends on
      faraday-cookie_jar (~> 0.0.6) was resolved to 0.0.6, which depends on
        faraday (>= 0.7.4)

    fastlane was resolved to 2.85.0, which depends on
      faraday_middleware (~> 0.9) was resolved to 0.12.2, which depends on
        faraday (< 1.0, >= 0.7.4)

    fastlane was resolved to 2.85.0, which depends on
      faraday (~> 0.9)

    fastlane was resolved to 2.85.0, which depends on
      google-api-client (< 0.14.0, >= 0.13.1) was resolved to 0.13.6, which depends on
        googleauth (~> 0.5) was resolved to 0.6.2, which depends on
          faraday (~> 0.12)

    fastlane-plugin-dropbox was resolved to 0.2.0, which depends on
      dropbox_api was resolved to 0.1.10, which depends on
        oauth2 (~> 1.1) was resolved to 1.2.0, which depends on
          faraday (< 0.10, >= 0.8)

Running `bundle update` will rebuild your snapshot from scratch, using only
the gems in your Gemfile, which may resolve the conflict.

-> After that I tried to use the plugin, and the expected error appeared:

➜  fastlane <lane>
[βœ”] πŸš€ 
[12:49:34]: fastlane detected a Gemfile in the current directory
[12:49:34]: however it seems like you don't use `bundle exec`
[12:49:34]: to launch fastlane faster, please use
[12:49:34]: 
[12:49:34]: $ bundle exec fastlane test
[12:49:34]: 
[12:49:34]: Get started using a Gemfile for fastlane https://docs.fastlane.tools/getting-started/ios/setup/#use-a-gemfile
[12:49:35]: Error loading plugin 'fastlane-plugin-dropbox': Unable to activate oauth2-1.4.0, because faraday-0.14.0 conflicts with faraday (< 0.13, >= 0.8)
[12:49:35]: Error loading plugin 'fastlane-plugin-dropbox': Unable to activate oauth2-1.4.0, because faraday-0.14.0 conflicts with faraday (< 0.13, >= 0.8)
[12:49:35]: It seems like you wanted to load some plugins, however they couldn't be loaded
[12:49:35]: Please follow the troubleshooting guide: https://docs.fastlane.tools/plugins/plugins-troubleshooting/
+-------------------------+-----------+------------------+
|                      Used plugins                      |
+-------------------------+-----------+------------------+
| Plugin                  | Version   | Action           |
+-------------------------+-----------+------------------+
| fastlane-plugin-dropbox | undefined | No actions found |
+-------------------------+-----------+------------------+

I tried with bundle update as the console suggested but the error persisted.

ayoy commented 6 years ago

Have you tried using bundler as fastlane output suggests?

I.e. bundle exec fastlane add_plugin dropbox and bundle exec fastlane <lane>?

rmato commented 6 years ago

@ayoy yes, the result is exactly the same..

HardikDG commented 6 years ago

@ayoy I am also having the same issue

Error loading plugin 'fastlane-plugin-dropbox': Unable to activate oauth2-1.4.0, because faraday-0.13.1 conflicts with faraday (< 0.13, >= 0.8)
[00:41:11]: Error loading plugin 'fastlane-plugin-dropbox': Unable to activate oauth2-1.4.0, because faraday-0.13.1 conflicts with faraday (< 0.13, >= 0.8)
[00:41:11]: It seems like you wanted to load some plugins, however they couldn't be loaded
ayoy commented 6 years ago

@HardikDG @rmato could you please make sure that these commands work for you with a fresh repository?

$ fastlane init
$ bundle exec fastlane add_plugin dropbox   # it fails due to broken faraday dependency
$ bundle update
$ bundle exec fastlane add_plugin dropbox   # here it works fine for me...

You can temporarily remove Gemfile, Gemfile.lock and fastlane directory from your project and give it a try, just so we're sure that it's not related e.g. to your Ruby installation.

HardikDG commented 6 years ago

@ayoy Which fastlane version you are using?

I have tried it with fresh repo and i still got the version conflict issue. I am using fastlane 2.87.0

ayoy commented 6 years ago

My env:

and it works fine repetitively here.

HardikDG commented 6 years ago

@ayoy Do we need to make any cache clear or something like that?

When I do bundle update it using 0.12 version for Faraday, but when I run Fastlane command it still shows the dependency error

Is there any command to specify the specific dependency to use to solve this manually.

Below is my output in terminal

bundle update
Fetching gem metadata from https://rubygems.org/.........
Fetching gem metadata from https://rubygems.org/.
Resolving dependencies.......
Using CFPropertyList 3.0.0
Using public_suffix 2.0.5
Using addressable 2.5.2
Using atomos 0.1.2
Using babosa 1.0.2
Using bundler 1.16.1
Using claide 1.0.2
Using colored 1.2
Using colored2 3.1.2
Using highline 1.7.10
Using commander-fastlane 4.4.6
Using declarative 0.0.10
Using declarative-option 0.1.0
Using unf_ext 0.0.7.5
Using unf 0.1.4
Using domain_name 0.5.20170404
Using dotenv 2.2.1
Using multipart-post 2.0.0
Using faraday 0.12.2
Using jwt 1.5.6
Using multi_json 1.13.1
Using multi_xml 0.6.0
Using rack 2.0.4
Using oauth2 1.4.0
Using dropbox_api 0.1.10
Using excon 0.62.0
Using http-cookie 1.0.3
Using faraday-cookie_jar 0.0.6
Using faraday_middleware 0.12.2
Using fastimage 2.1.1
Using gh_inspector 1.1.3
Using little-plugger 1.1.4
Using logging 2.2.2
Using memoist 0.16.0
Using os 0.9.6
Using signet 0.8.1
Using googleauth 0.6.2
Using httpclient 2.8.3
Using mime-types-data 3.2016.0521
Using mime-types 3.1
Using uber 0.1.0
Using representable 3.0.4
Using retriable 3.1.1
Using google-api-client 0.13.6
Using json 2.1.0
Using mini_magick 4.5.1
Using plist 3.4.0
Using rubyzip 1.2.1
Using security 0.1.3
Using naturally 2.1.0
Using simctl 1.6.2
Using slack-notifier 2.3.2
Using terminal-notifier 1.8.0
Using unicode-display_width 1.3.0
Using terminal-table 1.8.0
Using tty-screen 0.6.4
Using tty-cursor 0.5.0
Using tty-spinner 0.8.0
Using word_wrap 1.0.0
Using nanaimo 0.2.4
Using xcodeproj 1.5.7
Using rouge 2.0.7
Using xcpretty 0.2.8
Using xcpretty-travis-formatter 1.0.0
Using fastlane 2.87.0
Using fastlane-plugin-dropbox 0.2.0
Bundle updated!
hardik PGSample
$ bundle exec fastlane add_plugin dropbox
[21:26:41]: Error loading plugin 'fastlane-plugin-dropbox': Unable to activate oauth2-1.4.0, because faraday-0.13.1 conflicts with faraday (< 0.13, >= 0.8)
[21:26:41]: It seems like you wanted to load some plugins, however they couldn't be loaded
[21:26:41]: Please follow the troubleshooting guide: https://docs.fastlane.tools/plugins/plugins-troubleshooting/
+------------------------+-----------+------------------+
|                     Used plugins                      |
+------------------------+-----------+------------------+
| Plugin                 | Version   | Action           |
+------------------------+-----------+------------------+
| fastlane-plugin-dropb  | undefined | No actions found |
| ox                     |           |                  |
+------------------------+-----------+------------------+

[21:26:41]: Make sure to commit your Gemfile, Gemfile.lock and Pluginfile to version control
Installing plugin dependencies...
Successfully installed plugins
hardik PGSample
$ bundle exec fastlane beta
[21:26:52]: Error loading plugin 'fastlane-plugin-dropbox': Unable to activate oauth2-1.4.0, because faraday-0.13.1 conflicts with faraday (< 0.13, >= 0.8)
[21:26:52]: It seems like you wanted to load some plugins, however they couldn't be loaded
[21:26:52]: Please follow the troubleshooting guide: https://docs.fastlane.tools/plugins/plugins-troubleshooting/

I have tried this in the new Xcode project still it is showing the same error.

Does it take somewhere from the global dependancy? As env is almost same as you.

ayoy commented 6 years ago

The only cache that is there is your local Gemfile.lock file. It's especially weird that bundle update correctly resolves gem versioning, but it fails later on when trying to add a plugin.

There's one very dirty workaround - you could try hardcoding required versions of faraday and jwt (bundler complained about that one for me too) in your Gemfile:

source "https://rubygems.org"

gem "fastlane"
gem "faraday", "~>0.12.2"
gem "jwt", "~> 1.0"

then run bundle update and try adding a plugin. Let's hope it helps...

HardikDG commented 6 years ago

I have added hardcoded versions also, still, it is showing the same error.

I still don't get from where it is getting 0.13.1 version. it is not in the gemfile.lock nor in the installed gem list. In the bundle update it is installing the 0.12 but when executing it is getting 0.13.1 from somewhere

I will wait for the new version of Fastlane and dropbox's new version with 0.14 support may solve my problem.

Thanks for your quick support and help.

ayoy commented 6 years ago

You can also try with gem update (I believe it requires sudo in standard setups). The issue is about downgrading gems, but maybe you can resolve some conflicts by upgrading existing gems... (?)