{"action":"created","issue":{"url":"https://api.github.com/repos/fastlane/fastlane/issues/6318","repository_url":"https://api.github.com/repos/fastlane/fastlane","labels_url":"https://api.github.com/repos/fastlane/fastlane/issues/6318/labels{/name}","comments_url":"https://api.github.com/repos/fastlane/fastlane/issues/6318/comments","events_url":"https://api.github.com/repos/fastlane/fastlane/issues/6318/events","html_url":"https://github.com/fastlane/fastlane/issues/6318","id":179804914,"number":6318,"title":"Cannot run fastlane on Xcode Server bot","user":{"login":"fcamaster","id":22370620,"avatar_url":"https://avatars.githubusercontent.com/u/22370620?v=3","gravatar_id":"","url":"https://api.github.com/users/fcamaster","html_url":"https://github.com/fcamaster","followers_url":"https://api.github.com/users/fcamaster/followers","following_url":"https://api.github.com/users/fcamaster/following{/other_user}","gists_url":"https://api.github.com/users/fcamaster/gists{/gist_id}","starred_url":"https://api.github.com/users/fcamaster/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fcamaster/subscriptions","organizations_url":"https://api.github.com/users/fcamaster/orgs","repos_url":"https://api.github.com/users/fcamaster/repos","events_url":"https://api.github.com/users/fcamaster/events{/privacy}","received_events_url":"https://api.github.com/users/fcamaster/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2016-09-28T15:22:46Z","updated_at":"2016-10-05T07:44:20Z","closed_at":null,"body":"### Issue Description\r\n\r\nCannot run fastlane from Xcode bot trigger (error: Could not retrieve response as fastlane runs in non-interactive mode\u001B).\r\nI've read many issues here and none of that worked for me.\r\n\r\n##### Complete output when running fastlane, including the stack trace and command used\r\n\r\nThis is what I get when I try to run fastlane from Xcode bot:\r\n\r\nexport LC_ALL=\"en_US.UTF8\"\r\nexport PATH=/usr/local/bin:$PATH\r\nfastlane ios after_integration --verbose\r\n\r\n```\r\n[16:21:07]: \u001B[33mSeems like launching fastlane takes a while - please run\u001B[0m\r\n[16:21:07]: \r\n[16:21:07]: \u001B[4m\u001B[36m$ [sudo] gem cleanup\u001B[0m\u001B[0m\r\n[16:21:07]: \r\n[16:21:07]: \u001B[33mto uninstall outdated gems and make fastlane launch faster\u001B[0m\r\n[16:21:07]: \u001B[33mAlternatively it's recommended to start using a Gemfile to lock your dependencies\u001B[0m\r\n[16:21:07]: \u001B[33mTo get started with a Gemfile, run\u001B[0m\r\n[16:21:07]: \r\n[16:21:07]: \u001B[4m\u001B[36m$ bundle init\u001B[0m\u001B[0m\r\n[16:21:07]: \u001B[4m\u001B[36m$ echo 'gem \"fastlane\"' >> Gemfile\u001B[0m\u001B[0m\r\n[16:21:07]: \u001B[4m\u001B[36m$ bundle install\u001B[0m\u001B[0m\r\n[16:21:07]: \r\n[16:21:07]: \u001B[33mAfter creating the Gemfile and Gemfile.lock, commit those files into version control\u001B[0m\r\n[16:21:07]: \u001B[33mFor more information, check out https://guides.cocoapods.org/using/a-gemfile.html\u001B[0m\r\nDEBUG [2016-09-28 16:21:18.44]: Checking if there are any plugins that should be loaded...\r\nWARN [2016-09-28 16:21:18.54]: \u001B[33mCould not find fastlane in current directory. Would you like to set it up?\u001B[0m\r\n\r\nLooking for related GitHub issues on fastlane/fastlane...\r\nSearch query: Could not retrieve response as fastlane runs in non-interactive mode\r\n\r\nURL: https://api.github.com/search/issues?q=Could%20not%20retrieve%20response%20as%20fastlane%20runs%20in%20non-interactive%20mode+repo:fastlane/fastlane\r\n➡️  \u001B[33mRunning fastlane on Bitrise - non-interactive mode\u001B[0m\r\n   https://github.com/fastlane/fastlane/issues/5867 [\u001B[32mclosed\u001B[0m] 5 💬\r\n   5 weeks ago\r\n\r\n➡️  \u001B[33mFastlane android deploy issue\u001B[0m\r\n   https://github.com/fastlane/fastlane/issues/5800 [\u001B[32mclosed\u001B[0m] 2 💬\r\n   5 weeks ago\r\n\r\n➡️  \u001B[33mBug - using fastlane to run fastlane (as shell script) fails when interaction required\u001B[0m\r\n   https://github.com/fastlane/fastlane/issues/3788 [\u001B[32mclosed\u001B[0m] 3 💬\r\n   a week ago\r\n\r\nand 3 more at: https://github.com/fastlane/fastlane/search?q=Could%20not%20retrieve%20response%20as%20fastlane%20runs%20in%20non-interactive%20mode&type=Issues&utf8=✓\r\n/Library/Ruby/Gems/2.0.0/gems/fastlane_core-0.52.0/lib/fastlane_core/ui/interface.rb:132:in `crash!': \u001B[31m[!] Could not retrieve response as fastlane runs in non-interactive mode\u001B[0m (FastlaneCore::Interface::FastlaneCrash)\r\n\tfrom /Library/Ruby/Gems/2.0.0/gems/fastlane_core-0.52.0/lib/fastlane_core/ui/implementations/shell.rb:119:in `verify_interactive!'\r\n\tfrom /Library/Ruby/Gems/2.0.0/gems/fastlane_core-0.52.0/lib/fastlane_core/ui/implementations/shell.rb:97:in `confirm'\r\n\tfrom /Library/Ruby/Gems/2.0.0/gems/fastlane_core-0.52.0/lib/fastlane_core/ui/ui.rb:14:in `method_missing'\r\n\tfrom /Library/Ruby/Gems/2.0.0/gems/fastlane-1.104.0/lib/fastlane/commands_generator.rb:256:in `ensure_fastfile'\r\n\tfrom /Library/Ruby/Gems/2.0.0/gems/fastlane-1.104.0/lib/fastlane/commands_generator.rb:48:in `block (2 levels) in run'\r\n\tfrom /Library/Ruby/Gems/2.0.0/gems/commander-4.4.0/lib/commander/command.rb:178:in `call'\r\n\tfrom /Library/Ruby/Gems/2.0.0/gems/commander-4.4.0/lib/commander/command.rb:178:in `call'\r\n\tfrom /Library/Ruby/Gems/2.0.0/gems/commander-4.4.0/lib/commander/command.rb:153:in `run'\r\n\tfrom /Library/Ruby/Gems/2.0.0/gems/commander-4.4.0/lib/commander/runner.rb:444:in `run_active_command'\r\n\tfrom /Library/Ruby/Gems/2.0.0/gems/fastlane_core-0.52.0/lib/fastlane_core/ui/fastlane_runner.rb:36:in `run!'\r\n\tfrom /Library/Ruby/Gems/2.0.0/gems/commander-4.4.0/lib/commander/delegates.rb:15:in `run!'\r\n\tfrom /Library/Ruby/Gems/2.0.0/gems/fastlane-1.104.0/lib/fastlane/commands_generator.rb:246:in `run'\r\n\tfrom /Library/Ruby/Gems/2.0.0/gems/fastlane-1.104.0/lib/fastlane/commands_generator.rb:20:in `start'\r\n\tfrom /Library/Ruby/Gems/2.0.0/gems/fastlane-1.104.0/lib/fastlane/cli_tools_distributor.rb:58:in `take_off'\r\n\tfrom /Library/Ruby/Gems/2.0.0/gems/fastlane-1.104.0/bin/fastlane:5:in `<top (required)>'\r\n\tfrom /usr/local/bin/fastlane:23:in `load'\r\n\tfrom /usr/local/bin/fastlane:23:in `<main>'\r\n```\r\n\r\n\r\nThis is what I get when I run the command directly from the project directory:\r\nbundle exec fastlane ios after_integration\r\n```\r\n[16:53:58]: -----------------------------\r\n[16:53:58]: --- Step: update_fastlane ---\r\n[16:53:58]: -----------------------------\r\n[16:53:58]: Looking for updates for credentials_manager, fastlane_core, spaceship, cert, deliver, frameit, gym, sigh, match, pem, pilot, produce, scan, screengrab, snapshot, supply, fastlane...\r\n[16:53:58]: It seems that your Gem directory is not writable by your current User.\r\n[16:53:58]: Fastlane would need sudo rights to update itself, however, running 'sudo fastlane' is not recommended.\r\n[16:53:58]: If you still want to use this action, please read the Actions.md documentation on a guide how to set this up.\r\n[16:53:58]: -------------------------------------------------\r\n[16:53:58]: --- Step: Verifying required fastlane version ---\r\n[16:53:58]: -------------------------------------------------\r\n[16:53:58]: fastlane version valid\r\n[16:53:58]: ------------------------------\r\n[16:53:58]: --- Step: default_platform ---\r\n[16:53:58]: ------------------------------\r\n[16:53:58]: Driving the lane 'ios after_integration' 🚀\r\n[16:53:58]: ----------------------------------\r\n[16:53:58]: --- Step: get_info_plist_value ---\r\n[16:53:58]: ----------------------------------\r\n[16:53:58]: ----------------------------------\r\n[16:53:58]: --- Step: get_info_plist_value ---\r\n[16:53:58]: ----------------------------------\r\n[16:53:58]: -------------------\r\n[16:53:58]: --- Step: slack ---\r\n[16:53:58]: -------------------\r\n[16:53:59]: Successfully sent Slack notification\r\n\r\n+------+-------------------------------------+-------------+\r\n|                     fastlane summary                     |\r\n+------+-------------------------------------+-------------+\r\n| Step | Action                              | Time (in s) |\r\n+------+-------------------------------------+-------------+\r\n| 1    | update_fastlane                     | 0           |\r\n| 2    | Verifying required fastlane version | 0           |\r\n| 3    | default_platform                    | 0           |\r\n| 4    | get_info_plist_value                | 0           |\r\n| 5    | get_info_plist_value                | 0           |\r\n| 6    | slack                               | 0           |\r\n+------+-------------------------------------+-------------+\r\n\r\n[16:53:59]: fastlane.tools finished successfully 🎉\r\n```\r\n\r\n### Configuration Files\r\n\r\nPlease copy the complete content of your `Fastfile` and any other configuration files you use below:\r\n\r\nFastfile:\r\n```ruby\r\n\r\nupdate_fastlane\r\n\r\nfastlane_version \"1.104.0\"\r\ndefault_platform :ios\r\nplatform :ios do\r\n\r\n  before_all do\r\n    ENV[\"SLACK_URL\"] ||= \"https://hooks.slack.com/services/XXXXXXXXX/XXXXXXXXXX/XXXXXXXXXXXXXXXXXXXX\"\r\n  end\r\n\r\n  after_all do |lane|\r\n  end\r\n\r\n  error do |lane, exception|\r\n    # reset_git_repo(force: true)\r\n    slack(\r\n      message: \"Failed to build #{ENV['XL_TARGET']}: #{exception.message}\",\r\n      success: false\r\n    )\r\n  end\r\n\r\n  # Custom lanes\r\n\r\n  desc 'Do basic setup, as installing cocoapods dependencies and fetching profiles, before start integration.'\r\n  lane :before_integration do\r\n    plist_file = './MyApp/MyApp-Info.plist'\r\n\r\n    increase_build_number(plist_file)\r\n\r\n    # Run `pod install`\r\n    cocoapods\r\n\r\n  end\r\n\r\n  lane :after_integration do\r\n    plist_file = './MyApp/MyApp-Info.plist'\r\n\r\n    tag_base_path = ENV['XL_TAG_BASE_PATH']\r\n    tag_base_path = \"#{tag_base_path}/\" unless tag_base_path.nil? || tag_base_path == ''\r\n    tag_link = ENV['XL_TAG_LINK']\r\n\r\n    # Get the build and version numbers from the project's plist file\r\n    build_number = get_info_plist_value(\r\n      path: plist_file,\r\n      key: 'CFBundleVersion',\r\n    )\r\n    version_number = get_info_plist_value(\r\n      path: plist_file,\r\n      key: 'CFBundleShortVersionString',\r\n    )\r\n\r\n    ENV['XL_VERSION_NUMBER'] = \"#{version_number}\"\r\n    ENV['XL_BUILD_NUMBER'] = \"#{build_number}\"\r\n\r\n    # TODO: upload to iTunes Connect\r\n\r\n    slack(\r\n      message: \"#{ENV['XL_TARGET']} #{ENV['XL_VERSION_NUMBER']}.#{ENV['XL_BUILD_NUMBER']} successfully released\",\r\n    )\r\n  end\r\n  \r\nend\r\n```\r\n\r\n### Environment\r\n\r\nfastlane version (run `fastlane -v`): fastlane 1.104.0\r\n\r\nDo you use bundler to execute fastlane (i.e. `bundle exec fastlane`)? no\r\n\r\nDo you use a Ruby environment manager (e.g. `chruby`, `rbenv`, `rvm`)? no\r\n"},"comment":{"url":"https://api.github.com/repos/fastlane/fastlane/issues/comments/251604903","html_url":"https://github.com/fastlane/fastlane/issues/6318#issuecomment-251604903","issue_url":"https://api.github.com/repos/fastlane/fastlane/issues/6318","id":251604903,"user":{"login":"fcamaster","id":22370620,"avatar_url":"https://avatars.githubusercontent.com/u/22370620?v=3","gravatar_id":"","url":"https://api.github.com/users/fcamaster","html_url":"https://github.com/fcamaster","followers_url":"https://api.github.com/users/fcamaster/followers","following_url":"https://api.github.com/users/fcamaster/following{/other_user}","gists_url":"https://api.github.com/users/fcamaster/gists{/gist_id}","starred_url":"https://api.github.com/users/fcamaster/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fcamaster/subscriptions","organizations_url":"https://api.github.com/users/fcamaster/orgs","repos_url":"https://api.github.com/users/fcamaster/repos","events_url":"https://api.github.com/users/fcamaster/events{/privacy}","received_events_url":"https://api.github.com/users/fcamaster/received_events","type":"User","site_admin":false},"created_at":"2016-10-05T07:44:20Z","updated_at":"2016-10-05T07:44:20Z","body":"Thanks for the answer @TKBurner \r\n\r\nHave you run fastlane init on this project yet?  Yes\r\nWhat directory are you running from?  Root of the project directory\r\nCan you run from the project directory?  I did it. The log is on the issue above \"Configuration files\""}}
{"actor":{"display_login":"fcamaster"}}