fastlane: Rare crash on startup in fastlane_folder.rb: in `join': no implicit conversion of nil into String

New Issue Checklist

Issue Description

We currently run fastlane-2.96.0 on a build server (running buildbot-1.2.0), and occasionally notice a build failure due to one of fastlane’s actions failing. The actual action itself seems to be irrelevant (cert, sigh, etc.), however it seems to happen more often when the build server machine is under a heavy load.

Rerunning the build again shortly after the build fails has so far always succeeded, so this is more or less a small annoyance than anything problematic.

We also haven’t seen this happen before 2.96.0.

I am aware we aren’t using the latest version of fastlane right now, but I decided to submit this report before I forget about it. 😃 I’ll update to 2.98.0 right after this and post a reply here if I see it happen again after the update.

I’ll also mention that fastlane suggests I run “gem cleanup” to speed up the launch, but we already do this after every fastlane update. The build machine simultaneously runs multiple compiler processes across multiple VMs, so an occasional slow start is not at all unexpected for our use case.

Complete output when running fastlane, including the stack trace and command used
bash -c 'env FASTLANE_PASSWORD=$(< fastlane/xyz.key.txt) fastlane cert'
 in dir /Volumes/Buildbot/buildbot-osx/CrystalClash-iOS/build (timeout 1200 secs)
 watching logfiles {}
 argv: ['bash', '-c', 'env FASTLANE_PASSWORD=$(< fastlane/xyz.key.txt) fastlane cert']
 environment:
  Apple_PubSub_Socket_Render=/private/tmp/com.apple.launchd.i0vQVsLZRk/Render
  DISPLAY=/private/tmp/com.apple.launchd.htpenpkJin/org.macosforge.xquartz:0
  EDITOR=vi
  HOME=/Users/falken
  LC_CTYPE=UTF-8
  LOGNAME=falken
  PATH=/Users/falken/.fastlane/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/X11/bin
  PWD=/Volumes/Buildbot/buildbot-osx/CrystalClash-iOS/build
  SECURITYSESSIONID=186a6
  SHELL=/bin/bash
  SHLVL=1
  SSH_AUTH_SOCK=/private/tmp/com.apple.launchd.GtMWyocuk4/Listeners
  TERM=xterm-256color
  TERM_PROGRAM=Apple_Terminal
  TERM_PROGRAM_VERSION=404
  TERM_SESSION_ID=21E43212-25DB-484D-9BE5-BD234D17C8A1
  TMPDIR=/var/folders/_y/bk85gnj92fj_mlk9x1c8nm0w0000gn/T/
  USER=falken
  XPC_FLAGS=0x0
  XPC_SERVICE_NAME=0
  _=/usr/local/bin/buildbot-worker
  __CF_USER_TEXT_ENCODING=0x1F5:0x0:0x0
 using PTY: False
[21:57:35]: Seems like launching fastlane takes a while - please run
[21:57:35]: 
[21:57:35]: $ [sudo] gem cleanup
[21:57:35]: 
[21:57:35]: to uninstall outdated gems and make fastlane launch faster
[21:57:35]: Alternatively it's recommended to start using a Gemfile to lock your dependencies
[21:57:35]: To get started with a Gemfile, run
[21:57:35]: 
[21:57:35]: $ bundle init
[21:57:35]: $ echo 'gem "fastlane"' >> Gemfile
[21:57:35]: $ bundle install
[21:57:35]: 
[21:57:35]: After creating the Gemfile and Gemfile.lock, commit those files into version control
[21:57:35]: Get started using a Gemfile for fastlane https://docs.fastlane.tools/getting-started/ios/setup/#use-a-gemfile
/Users/falken/.fastlane/bin/bundle/lib/ruby/gems/2.2.0/gems/fastlane-2.96.0/fastlane_core/lib/fastlane_core/fastlane_folder.rb:49:in `join': no implicit conversion of nil into String (TypeError)
	from /Users/falken/.fastlane/bin/bundle/lib/ruby/gems/2.2.0/gems/fastlane-2.96.0/fastlane_core/lib/fastlane_core/fastlane_folder.rb:49:in `fastfile_path'
	from /Users/falken/.fastlane/bin/bundle/lib/ruby/gems/2.2.0/gems/fastlane-2.96.0/fastlane/lib/fastlane/cli_tools_distributor.rb:167:in `available_lanes'
	from /Users/falken/.fastlane/bin/bundle/lib/ruby/gems/2.2.0/gems/fastlane-2.96.0/fastlane/lib/fastlane/cli_tools_distributor.rb:74:in `take_off'
	from /Users/falken/.fastlane/bin/bundle/lib/ruby/gems/2.2.0/gems/fastlane-2.96.0/bin/fastlane:20:in `<top (required)>'
	from /Users/falken/.fastlane/bin/bundle/bin/fastlane:22:in `load'
	from /Users/falken/.fastlane/bin/bundle/bin/fastlane:22:in `<main>'
program finished with exit code 1
elapsedTime=8.027540

Environment

🚫 fastlane environment 🚫

Stack

Key Value
OS 10.13.5
Ruby 2.2.4
Bundler? false
Git git version 2.15.2 (Apple Git-101.1)
Installation Source ~/.fastlane/bin/bundle/bin/fastlane
Host Mac OS X 10.13.5 (17F77)
Ruby Lib Dir ~/.fastlane/bin/bundle/lib
OpenSSL Version OpenSSL 1.0.2g 1 Mar 2016
Is contained false
Is homebrew true
Is installed via Fabric.app false
Xcode Path /Applications/Xcode.app/Contents/Developer/
Xcode Version 9.4.1

System Locale

Variable Value
LANG en_US.UTF-8
LC_ALL en_US.UTF-8
LANGUAGE en_US.UTF-8

fastlane files:

No Fastfile found

fastlane gems

Gem Version Update-Status
fastlane 2.96.0 🚫 Update available

Loaded fastlane plugins:

No plugins Loaded

Loaded gems
Gem Version
slack-notifier 2.3.2
atomos 0.1.2
CFPropertyList 2.3.5
claide 1.0.2
colored2 3.1.2
nanaimo 0.2.4
xcodeproj 1.5.7
rouge 1.11.1
xcpretty 0.2.6
terminal-notifier 1.7.1
unicode-display_width 1.1.3
terminal-table 1.7.3
plist 3.2.0
public_suffix 2.0.5
addressable 2.5.1
multipart-post 2.0.0
word_wrap 1.0.0
tty-screen 0.6.4
tty-cursor 0.5.0
tty-spinner 0.8.0
babosa 1.0.2
colored 1.2
highline 1.7.8
commander-fastlane 4.4.6
excon 0.55.0
faraday 0.12.1
unf_ext 0.0.7.4
unf 0.1.4
domain_name 0.5.20170404
http-cookie 1.0.3
faraday-cookie_jar 0.0.6
fastimage 2.1.0
gh_inspector 1.1.3
json 1.8.1
mini_magick 4.5.1
multi_json 1.12.1
multi_xml 0.6.0
rubyzip 1.2.1
security 0.1.3
xcpretty-travis-formatter 0.0.4
dotenv 2.2.0
bundler 1.14.6
faraday_middleware 0.11.0.1
naturally 2.1.0
simctl 1.6.4
uber 0.0.15
declarative 0.0.9
declarative-option 0.1.0
representable 3.0.4
retriable 2.1.0
mime-types-data 3.2016.0521
mime-types 3.1
little-plugger 1.1.4
logging 2.2.2
jwt 1.5.6
memoist 0.15.0
os 0.9.6
signet 0.7.3
googleauth 0.5.1
httpclient 2.8.3
google-api-client 0.21.2
emoji_regex 0.1.1
libxml-ruby 3.0.0

generated on: 2018-06-23

About this issue

  • Original URL
  • State: closed
  • Created 6 years ago
  • Reactions: 4
  • Comments: 121 (71 by maintainers)

Most upvoted comments

Good news: I think I got it: #13918

I could reproduce the error pretty consistently locally and on Azure Pipelines. Disabling the update made it go away in 100% of the cases, opting out of Analytics did as well. So I looked into the Analytics a bit and discovered that this specific data was not used any more - so I could simply remove the code. #13918 is the PR doing that, and with the next release the problem should be gone.

Another occurence with 2.108.0 on Azure Devops Pipelines (CI): https://github.com/fastlane/fastlane/issues/13680

Ahah, I’ve not tried yet with the latest version as I was not able to update the CI on our side. I was just wondering if you fixed all paths you discovered. If so, we’ll update soon and let you know, so we can hopefully close this issue 😃

Yes we do have Appfile

Hi!

I did wait a bit to provide results but since we set FASTLANE_SKIP_UPDATE_CHECK=1, we’ve not seen the issue 😕. Before we had it everyday and now nothing since three days.

@janpio Will do a test with FASTLANE_SKIP_UPDATE_CHECK and let you know.

My setup on Azure Pipelines (the CI build 335 etc) and that repo is “special”, in that I start a normal fastlane run and use the sh action to start another fastlane run inside it. So Pipelines executes the bundle exec fastlane all command, which itself then starts another bundle exec fastlane screengrab init (in the case of 335) which then crashes. That is why the Stacktrace there looks different and “convoluted”.

The “real” stacktrace of the “inner” fastlane is output as soon as it crashes. That crash is then bubbled up to the “outer” fastlane, which doesn’t handle it and adds its own stacktrace for that.

For the other people reporting here in this issue, they do no such funny stuff but just execute a command manually or on CI and encounter the crash with the output and stacktrace they posted.

It might be a coincidence that my matrjoschka style setup triggers a similar problem - or might just be another way to trigger the exact same problem.


That being said:
https://janpio.visualstudio.com/fastlane-e2e-tests/_build/results?buildId=117 and https://janpio.visualstudio.com/fastlane-e2e-tests/_build/results?buildId=256 (Linux) are two other full outputs of my setup.

But https://github.com/fastlane/fastlane/issues/12789#issue-335105535 https://github.com/fastlane/fastlane/issues/12789#issuecomment-430482522 https://github.com/fastlane/fastlane/issues/12789#issuecomment-443172562 https://github.com/fastlane/fastlane/issues/12789#issuecomment-445028889 https://github.com/fastlane/fastlane/issues/12789#issuecomment-445049874 are also full outputs (some with the pure release of fastlane, some with different stages of our puts debugging included) - they are just very short as fastlane crashes very early in the “startup” and isn’t wrapper in another fastlane run.

@janpio I’m looking at that old build (335), and I also cloned that same repo locally and ran the bundle exec fastlane all command and got the same error (with a join and a TypeError)

Looking at the full debug output in that build and my build locally it doesn’t like that fastlane_folder.rb is the cause, it’s another shell script that’s causing the error. I wonder if the root cause of the original issue might be an unhandled shell command/exception? Or an over-rescued exception in one of the shell runner commands?

Do you have any more examples (full output) we can look at? The other example in this thread looks like it’s truncated to just show the puts statements.

bundler: failed to load command: fastlane (/Users/jay/.asdf/installs/ruby/2.5.3/lib/ruby/gems/2.5.0/bin/fastlane)
TypeError: no implicit conversion of nil into String
  /Users/jay/.asdf/installs/ruby/2.5.3/lib/ruby/gems/2.5.0/gems/fastlane-2.108.0/fastlane_core/lib/fastlane_core/fastlane_folder.rb:50:in `join'

@janpio

  • OS and OS version: macOS 10.13.6 (17G3025)
  • Ruby version: ruby 2.5.3p105 (2018-10-18 revision 65156) [x86_64-darwin17]
  • Ruby install method: Probably Homebrew
  • File system: APFS
  • What is running at the same time: difficult to say as we don’t have control over the VM provided by Bitrise, but our setup is not doing things in parallel

@janpio I’m visiting from the SO post because it’s a little easier to have the discussion here than in the comments boxes. I don’t use fastlane or write ios/swift code I just think this is an interesting Ruby behavior so I’d like to try and help.

Have you tried throwing the pry/pry-byebug gems into your fastlane gemspec (you’ll want to add them as dependencies, rather than development dependencies I think)?

You could use a rescue TypeError => e with a binding.pry inside that self.path method to inspect the environment when it errors. Note: Don’t use a branch with that in your production code or a CI runner

I’m trying to recreate a local environment to reproduce the error. I pushed up a public repo here: https://github.com/jaydorsey/FastlaneDemo

Everything seems to work (e.g. I can run bundle exec fastlane ios custom_lane) but I’m not 100% sure I’m recreating what you guys are testing. Mainly because I couldn’t make it break. If someone can take a look at it I’d appreciate it?

I did get all the debug output, but even when I ran this 100 times in a loop nothing broke. Ruby 2.5.3 with readline support, macos 10.14.1.

As I mentioned on the SO post, one immediate change that could be made is making the value ||= assignments straight up returns because ||= isn’t thread safe. I think a return is a little more expressive as well. Would still like to see if the root cause can be identified so if anyone is able to make a PR on my repo with a reproducible (even intermittently) change that would be cool 👍

@janpio: I still only very rarely see this happen (nowhere near as often as the others here have been able to repro it), but here’s my environment as a datapoint to help narrow things down:

  • OS and OS version: macOS High Sierra 10.13.6 (17G3025)
  • Ruby version: ruby 2.5.1p57 (2018-03-29 revision 63029) [x86_64-darwin17]
  • Ruby install method: Homebrew (brew install ruby)
  • File system:
    • OSX System Disk: Mac OS Extended (Journaled)
    • fastlane execution disk: USB External Physical Volume / Mac OS Extended (Journaled)
  • What is running at the same time: only gitlab-runner (with concurrent = 2 so both macOS and iOS builds are performed simultaneously, but only the iOS build calls out to fastlane)

Yeah, I’ve checked that: we have two Dir.chdir but inside actions (and using the closure version). We have 2 sh("cd ...") as well, but inside lanes.

Pasting the full output here without redacting anything just to make sure I’m not messing something:

$ bundle exec fastlane scan
0 take_off
[✔] 🚀 
0 take_off: after require
0 take_off: after lang
3 path: Dir.getwd = '/Users/marcelofabri/instashopper-ios' - START 
3 path: Dir.getwd = '/Users/marcelofabri/instashopper-ios' - files in current wd = '["Cartfile.resolved", "CHANGELOG.md", "Makefile", "InstaShopper.xcodeproj", "Cartfile", "InternalFrameworks", "Tests", "Carthage", "README.md", "Cartfile.private", "ShopperAPI", "Pods", "CONTRIBUTING.md", "Configs", "Scripts", "fastlane", "Dangerfile", "InstaShopper.xcworkspace", "Gemfile", "Gemfile.lock", "InstaShopper", "Brewfile", "Podfile", "build", "swiftgen.yml", "Podfile.lock", "Vendor"]'
3 path: Dir.getwd = '/Users/marcelofabri/instashopper-ios' - files in current wd/fastlane = '["fastlane/Gymfile", "fastlane/test_output", "fastlane/Pluginfile", "fastlane/Appfile", "fastlane/Fastfile", "fastlane/README.md", "fastlane/Scanfile", "fastlane/actions", "fastlane/build", "fastlane/Matchfile", "fastlane/report.xml", "fastlane/helpers"]'
3 path: Dir.getwd = '/Users/marcelofabri/instashopper-ios' - fastlane_folder_is_directory =                    'true' (File.directory?(./FOLDER_NAME/))
3 path: Dir.getwd = '/Users/marcelofabri/instashopper-ios' - fastlane_folder_is_directory_no_trailing_slash =  'true' (File.directory?(./FOLDER_NAME))
3 path: Dir.getwd = '/Users/marcelofabri/instashopper-ios' - fastlane_folder_is_directory_no_slashes_at_all =  'true' (File.directory?(FOLDER_NAME))
3 path: Dir.getwd = '/Users/marcelofabri/instashopper-ios' - fastlane_folder_is_a_file =                       'false' (File.file?(./FOLDER_NAME/))
3 path: Dir.getwd = '/Users/marcelofabri/instashopper-ios' - fastlane_folder_exists =                          'false' (File.exist?(./FOLDER_NAME/)),
3 path: Dir.getwd = '/Users/marcelofabri/instashopper-ios' - fastfile_exists_in_fastlane_folder =              'false' (File.exist?(./FOLDER_NAME/Fastfile))
3 path: Dir.getwd = '/Users/marcelofabri/instashopper-ios' - fastfile_exists =                                 'false' (File.exist?(Fastfile))
3 path: Dir.getwd = '/Users/marcelofabri/instashopper-ios' - 1: ''
3 path: Dir.getwd = '/Users/marcelofabri/instashopper-ios' - 2: './fastlane/'
3 path: Dir.getwd = '/Users/marcelofabri/instashopper-ios' - 3: './fastlane/'
3 path: Dir.getwd = '/Users/marcelofabri/instashopper-ios' - 4: './fastlane/'
3 path: Dir.getwd = '/Users/marcelofabri/instashopper-ios' - 5: './fastlane/'
3 path: Dir.getwd = '/Users/marcelofabri/instashopper-ios' - 6: './fastlane/'
3 path: Dir.getwd = '/Users/marcelofabri/instashopper-ios' - 7: './fastlane/'
3 path: Dir.getwd = '/Users/marcelofabri/instashopper-ios' - END value = './fastlane/'

0 take_off: after dotenv
0 take_off: after updatechecker
0 take_off: after tool_name (= 'scan'), before if ...
1 available_lanes
2 fastfile_path 0: Dir.getwd = '/Users/marcelofabri/instashopper-ios'
3 path: Dir.getwd = '/Users/marcelofabri/instashopper-ios' - START 
3 path: Dir.getwd = '/Users/marcelofabri/instashopper-ios' - files in current wd = '["Cartfile.resolved", "CHANGELOG.md", "Makefile", "InstaShopper.xcodeproj", "Cartfile", "InternalFrameworks", "Tests", "Carthage", "README.md", "Cartfile.private", "ShopperAPI", "Pods", "CONTRIBUTING.md", "Configs", "Scripts", "fastlane", "Dangerfile", "InstaShopper.xcworkspace", "Gemfile", "Gemfile.lock", "InstaShopper", "Brewfile", "Podfile", "build", "swiftgen.yml", "Podfile.lock", "Vendor"]'
3 path: Dir.getwd = '/Users/marcelofabri/instashopper-ios' - files in current wd/fastlane = '["fastlane/Gymfile", "fastlane/test_output", "fastlane/Pluginfile", "fastlane/Appfile", "fastlane/Fastfile", "fastlane/README.md", "fastlane/Scanfile", "fastlane/actions", "fastlane/build", "fastlane/Matchfile", "fastlane/report.xml", "fastlane/helpers"]'
3 path: Dir.getwd = '/Users/marcelofabri/instashopper-ios/fastlane' - fastlane_folder_is_directory =                    'false' (File.directory?(./FOLDER_NAME/))
3 path: Dir.getwd = '/Users/marcelofabri/instashopper-ios/fastlane' - fastlane_folder_is_directory_no_trailing_slash =  'false' (File.directory?(./FOLDER_NAME))
3 path: Dir.getwd = '/Users/marcelofabri/instashopper-ios/fastlane' - fastlane_folder_is_directory_no_slashes_at_all =  'false' (File.directory?(FOLDER_NAME))
3 path: Dir.getwd = '/Users/marcelofabri/instashopper-ios/fastlane' - fastlane_folder_is_a_file =                       'false' (File.file?(./FOLDER_NAME/))
3 path: Dir.getwd = '/Users/marcelofabri/instashopper-ios/fastlane' - fastlane_folder_exists =                          'false' (File.exist?(./FOLDER_NAME/)),
3 path: Dir.getwd = '/Users/marcelofabri/instashopper-ios/fastlane' - fastfile_exists_in_fastlane_folder =              'false' (File.exist?(./FOLDER_NAME/Fastfile))
3 path: Dir.getwd = '/Users/marcelofabri/instashopper-ios/fastlane' - fastfile_exists =                                 'true' (File.exist?(Fastfile))
3 path: Dir.getwd = '/Users/marcelofabri/instashopper-ios/fastlane' - 1: ''
3 path: Dir.getwd = '/Users/marcelofabri/instashopper-ios/fastlane' - 2: ''
3 path: Dir.getwd = '/Users/marcelofabri/instashopper-ios/fastlane' - 3: ''
3 path: Dir.getwd = '/Users/marcelofabri/instashopper-ios/fastlane' - 4: ''
3 path: Dir.getwd = '/Users/marcelofabri/instashopper-ios/fastlane' - 5: ''
3 path: Dir.getwd = '/Users/marcelofabri/instashopper-ios/fastlane' - 6: './'
3 path: Dir.getwd = '/Users/marcelofabri/instashopper-ios/fastlane' - 7: './'
3 path: Dir.getwd = '/Users/marcelofabri/instashopper-ios/fastlane' - END value = './'

2 fastfile_path 1: Dir.getwd = '/Users/marcelofabri/instashopper-ios' - Fastfile.swift
3 path: Dir.getwd = '/Users/marcelofabri/instashopper-ios' - START 
3 path: Dir.getwd = '/Users/marcelofabri/instashopper-ios' - files in current wd = '["Cartfile.resolved", "CHANGELOG.md", "Makefile", "InstaShopper.xcodeproj", "Cartfile", "InternalFrameworks", "Tests", "Carthage", "README.md", "Cartfile.private", "ShopperAPI", "Pods", "CONTRIBUTING.md", "Configs", "Scripts", "fastlane", "Dangerfile", "InstaShopper.xcworkspace", "Gemfile", "Gemfile.lock", "InstaShopper", "Brewfile", "Podfile", "build", "swiftgen.yml", "Podfile.lock", "Vendor"]'
3 path: Dir.getwd = '/Users/marcelofabri/instashopper-ios/fastlane' - files in current wd/fastlane = '[]'
3 path: Dir.getwd = '/Users/marcelofabri/instashopper-ios/fastlane' - fastlane_folder_is_directory =                    'false' (File.directory?(./FOLDER_NAME/))
3 path: Dir.getwd = '/Users/marcelofabri/instashopper-ios/fastlane' - fastlane_folder_is_directory_no_trailing_slash =  'false' (File.directory?(./FOLDER_NAME))
3 path: Dir.getwd = '/Users/marcelofabri/instashopper-ios/fastlane' - fastlane_folder_is_directory_no_slashes_at_all =  'false' (File.directory?(FOLDER_NAME))
3 path: Dir.getwd = '/Users/marcelofabri/instashopper-ios/fastlane' - fastlane_folder_is_a_file =                       'false' (File.file?(./FOLDER_NAME/))
3 path: Dir.getwd = '/Users/marcelofabri/instashopper-ios/fastlane' - fastlane_folder_exists =                          'false' (File.exist?(./FOLDER_NAME/)),
3 path: Dir.getwd = '/Users/marcelofabri/instashopper-ios/fastlane' - fastfile_exists_in_fastlane_folder =              'false' (File.exist?(./FOLDER_NAME/Fastfile))
3 path: Dir.getwd = '/Users/marcelofabri/instashopper-ios' - fastfile_exists =                                 'false' (File.exist?(Fastfile))
3 path: Dir.getwd = '/Users/marcelofabri/instashopper-ios' - 1: ''
3 path: Dir.getwd = '/Users/marcelofabri/instashopper-ios' - 2: ''
3 path: Dir.getwd = '/Users/marcelofabri/instashopper-ios' - 3: ''
3 path: Dir.getwd = '/Users/marcelofabri/instashopper-ios' - 4: ''
3 path: Dir.getwd = '/Users/marcelofabri/instashopper-ios' - 5: ''
3 path: Dir.getwd = '/Users/marcelofabri/instashopper-ios' - 6: ''
3 path: Dir.getwd = '/Users/marcelofabri/instashopper-ios' - 7: ''
3 path: Dir.getwd = '/Users/marcelofabri/instashopper-ios' - END value = ''

bundler: failed to load command: fastlane (/Users/marcelofabri/.rbenv/versions/2.5.3/lib/ruby/gems/2.5.0/bin/fastlane)
TypeError: no implicit conversion of nil into String
  /Users/marcelofabri/.rbenv/versions/2.5.3/lib/ruby/gems/2.5.0/bundler/gems/fastlane-80d2dfbb37ce/fastlane_core/lib/fastlane_core/fastlane_folder.rb:88:in `join'
  /Users/marcelofabri/.rbenv/versions/2.5.3/lib/ruby/gems/2.5.0/bundler/gems/fastlane-80d2dfbb37ce/fastlane_core/lib/fastlane_core/fastlane_folder.rb:88:in `fastfile_path'
  /Users/marcelofabri/.rbenv/versions/2.5.3/lib/ruby/gems/2.5.0/bundler/gems/fastlane-80d2dfbb37ce/fastlane/lib/fastlane/cli_tools_distributor.rb:182:in `available_lanes'
  /Users/marcelofabri/.rbenv/versions/2.5.3/lib/ruby/gems/2.5.0/bundler/gems/fastlane-80d2dfbb37ce/fastlane/lib/fastlane/cli_tools_distributor.rb:85:in `take_off'
  /Users/marcelofabri/.rbenv/versions/2.5.3/lib/ruby/gems/2.5.0/bundler/gems/fastlane-80d2dfbb37ce/bin/fastlane:23:in `<top (required)>'
  /Users/marcelofabri/.rbenv/versions/2.5.3/lib/ruby/gems/2.5.0/bin/fastlane:23:in `load'
  /Users/marcelofabri/.rbenv/versions/2.5.3/lib/ruby/gems/2.5.0/bin/fastlane:23:in `<top (required)>'

Here’s what I get:

[20:53:47]: Loading 'Metadata/secondary_first_sub_category.txt'...
[20:53:47]: Loading 'Metadata/secondary_second_sub_category.txt'...
fastlane_folder: 1
fastlane_folder: 2: './fastlane/'
fastlane_folder: 3: './fastlane/'
fastlane_folder: 4: './fastlane/'
fastlane_folder: 5: './fastlane/'
fastlane_folder: 6: './fastlane/'
fastlane_folder: 7: './fastlane/'
DEBUG: self.path = './fastlane/', Dir.getwd = '/Users/russ/Projects/HappyScale'
[20:53:48]: #<ArgumentError: different prefix: "/" and "fastlane">
[20:53:48]: /System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/2.3.0/pathname.rb:520:in `relative_path_from'
/Users/russ/.bundle/ruby/2.3.0/fastlane-8740885f1eb1/deliver/lib/deliver/html_generator.rb:38:in `render_relative_path'
(erb):240:in `block (3 levels) in render'
(erb):239:in `each'
(erb):239:in `each_with_index'
(erb):239:in `block (2 levels) in render'
(erb):233:in `each'
(erb):233:in `block in render'
(erb):157:in `each'
(erb):157:in `render'
/System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/2.3.0/erb.rb:864:in `eval'
/System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/2.3.0/erb.rb:864:in `result'
/Users/russ/.bundle/ruby/2.3.0/fastlane-8740885f1eb1/deliver/lib/deliver/html_generator.rb:56:in `render'
/Users/russ/.bundle/ruby/2.3.0/fastlane-8740885f1eb1/deliver/lib/deliver/html_generator.rb:13:in `run'
/Users/russ/.bundle/ruby/2.3.0/fastlane-8740885f1eb1/deliver/lib/deliver/runner.rb:180:in `validate_html'
/Users/russ/.bundle/ruby/2.3.0/fastlane-8740885f1eb1/deliver/lib/deliver/runner.rb:117:in `upload_metadata'
/Users/russ/.bundle/ruby/2.3.0/fastlane-8740885f1eb1/deliver/lib/deliver/runner.rb:38:in `run'
/Users/russ/.bundle/ruby/2.3.0/fastlane-8740885f1eb1/fastlane/lib/fastlane/actions/upload_to_app_store.rb:16:in `run'
/Users/russ/.bundle/ruby/2.3.0/fastlane-8740885f1eb1/fastlane/lib/fastlane/runner.rb:253:in `block (2 levels) in execute_action'
/Users/russ/.bundle/ruby/2.3.0/fastlane-8740885f1eb1/fastlane/lib/fastlane/actions/actions_helper.rb:50:in `execute_action'
/Users/russ/.bundle/ruby/2.3.0/fastlane-8740885f1eb1/fastlane/lib/fastlane/runner.rb:232:in `block in execute_action'
/Users/russ/.bundle/ruby/2.3.0/fastlane-8740885f1eb1/fastlane/lib/fastlane/runner.rb:227:in `chdir'
/Users/russ/.bundle/ruby/2.3.0/fastlane-8740885f1eb1/fastlane/lib/fastlane/runner.rb:227:in `execute_action'
/Users/russ/.bundle/ruby/2.3.0/fastlane-8740885f1eb1/fastlane/lib/fastlane/runner.rb:157:in `trigger_action_by_name'
/Users/russ/.bundle/ruby/2.3.0/fastlane-8740885f1eb1/fastlane/lib/fastlane/fast_file.rb:154:in `method_missing'
Fastfile:19:in `block in parsing_binding'
/Users/russ/.bundle/ruby/2.3.0/fastlane-8740885f1eb1/fastlane/lib/fastlane/lane.rb:33:in `call'
/Users/russ/.bundle/ruby/2.3.0/fastlane-8740885f1eb1/fastlane/lib/fastlane/runner.rb:49:in `block in execute'
/Users/russ/.bundle/ruby/2.3.0/fastlane-8740885f1eb1/fastlane/lib/fastlane/runner.rb:45:in `chdir'
/Users/russ/.bundle/ruby/2.3.0/fastlane-8740885f1eb1/fastlane/lib/fastlane/runner.rb:45:in `execute'
/Users/russ/.bundle/ruby/2.3.0/fastlane-8740885f1eb1/fastlane/lib/fastlane/lane_manager.rb:56:in `cruise_lane'
/Users/russ/.bundle/ruby/2.3.0/fastlane-8740885f1eb1/fastlane/lib/fastlane/command_line_handler.rb:36:in `handle'
/Users/russ/.bundle/ruby/2.3.0/fastlane-8740885f1eb1/fastlane/lib/fastlane/commands_generator.rb:108:in `block (2 levels) in run'
/Library/Ruby/Gems/2.3.0/gems/commander-fastlane-4.4.6/lib/commander/command.rb:178:in `call'
/Library/Ruby/Gems/2.3.0/gems/commander-fastlane-4.4.6/lib/commander/command.rb:153:in `run'
/Library/Ruby/Gems/2.3.0/gems/commander-fastlane-4.4.6/lib/commander/runner.rb:476:in `run_active_command'
/Users/russ/.bundle/ruby/2.3.0/fastlane-8740885f1eb1/fastlane_core/lib/fastlane_core/ui/fastlane_runner.rb:76:in `run!'
/Library/Ruby/Gems/2.3.0/gems/commander-fastlane-4.4.6/lib/commander/delegates.rb:15:in `run!'
/Users/russ/.bundle/ruby/2.3.0/fastlane-8740885f1eb1/fastlane/lib/fastlane/commands_generator.rb:333:in `run'
/Users/russ/.bundle/ruby/2.3.0/fastlane-8740885f1eb1/fastlane/lib/fastlane/commands_generator.rb:41:in `start'
/Users/russ/.bundle/ruby/2.3.0/fastlane-8740885f1eb1/fastlane/lib/fastlane/cli_tools_distributor.rb:122:in `take_off'
/Users/russ/.bundle/ruby/2.3.0/fastlane-8740885f1eb1/bin/fastlane:23:in `<top (required)>'
/Library/Ruby/Gems/2.3.0/bin/fastlane:22:in `load'
/Library/Ruby/Gems/2.3.0/bin/fastlane:22:in `<top (required)>'
/Library/Ruby/Gems/2.3.0/gems/bundler-1.16.1/lib/bundler/cli/exec.rb:75:in `load'
/Library/Ruby/Gems/2.3.0/gems/bundler-1.16.1/lib/bundler/cli/exec.rb:75:in `kernel_load'
/Library/Ruby/Gems/2.3.0/gems/bundler-1.16.1/lib/bundler/cli/exec.rb:28:in `run'
/Library/Ruby/Gems/2.3.0/gems/bundler-1.16.1/lib/bundler/cli.rb:424:in `exec'
/Library/Ruby/Gems/2.3.0/gems/bundler-1.16.1/lib/bundler/vendor/thor/lib/thor/command.rb:27:in `run'
/Library/Ruby/Gems/2.3.0/gems/bundler-1.16.1/lib/bundler/vendor/thor/lib/thor/invocation.rb:126:in `invoke_command'
/Library/Ruby/Gems/2.3.0/gems/bundler-1.16.1/lib/bundler/vendor/thor/lib/thor.rb:387:in `dispatch'
/Library/Ruby/Gems/2.3.0/gems/bundler-1.16.1/lib/bundler/cli.rb:27:in `dispatch'
/Library/Ruby/Gems/2.3.0/gems/bundler-1.16.1/lib/bundler/vendor/thor/lib/thor/base.rb:466:in `start'
/Library/Ruby/Gems/2.3.0/gems/bundler-1.16.1/lib/bundler/cli.rb:18:in `start'
/Library/Ruby/Gems/2.3.0/gems/bundler-1.16.1/exe/bundle:30:in `block in <top (required)>'
/Library/Ruby/Gems/2.3.0/gems/bundler-1.16.1/lib/bundler/friendly_errors.rb:122:in `with_friendly_errors'
/Library/Ruby/Gems/2.3.0/gems/bundler-1.16.1/exe/bundle:22:in `<top (required)>'
/usr/local/bin/bundle:22:in `load'
/usr/local/bin/bundle:22:in `<main>'
[20:53:48]: Could not render HTML preview. Do you still want to continue?

I assume some of those should be printed with double quotes to fill the values 😅

@marcelofabri Now we’re talking. Console log debugging via a branch on a Github repo… something I don’t do every day 😉

I added a few puts inside cli_tools_distributor.rb and fastlane_folder.rb. Because what I see in your output doesn’t really make sense, does it? Why can the path become nil when we are in the same folder as before?
Please run run bundle install to install 2.109.1.foo1 and run it again 🌪

@janpio here’s what I got:

bundle exec fastlane scan
[✔] 🚀 
DEBUG: self.path = './fastlane/', Dir.getwd = 'project-folder'
DEBUG: self.path = './fastlane/', Dir.getwd = 'project-folder/fastlane'
DEBUG: self.path = '', Dir.getwd = 'project-folder'
bundler: failed to load command: fastlane (/Users/marcelofabri/.rbenv/versions/2.5.3/lib/ruby/gems/2.5.0/bin/fastlane)
TypeError: no implicit conversion of nil into String
  /Users/marcelofabri/.rbenv/versions/2.5.3/lib/ruby/gems/2.5.0/bundler/gems/fastlane-89a336f38651/fastlane_core/lib/fastlane_core/fastlane_folder.rb:51:in `join'
  /Users/marcelofabri/.rbenv/versions/2.5.3/lib/ruby/gems/2.5.0/bundler/gems/fastlane-89a336f38651/fastlane_core/lib/fastlane_core/fastlane_folder.rb:51:in `fastfile_path'
  /Users/marcelofabri/.rbenv/versions/2.5.3/lib/ruby/gems/2.5.0/bundler/gems/fastlane-89a336f38651/fastlane/lib/fastlane/cli_tools_distributor.rb:167:in `available_lanes'
  /Users/marcelofabri/.rbenv/versions/2.5.3/lib/ruby/gems/2.5.0/bundler/gems/fastlane-89a336f38651/fastlane/lib/fastlane/cli_tools_distributor.rb:74:in `take_off'
  /Users/marcelofabri/.rbenv/versions/2.5.3/lib/ruby/gems/2.5.0/bundler/gems/fastlane-89a336f38651/bin/fastlane:23:in `<top (required)>'
  /Users/marcelofabri/.rbenv/versions/2.5.3/lib/ruby/gems/2.5.0/bin/fastlane:23:in `load'
  /Users/marcelofabri/.rbenv/versions/2.5.3/lib/ruby/gems/2.5.0/bin/fastlane:23:in `<top (required)>'
make: *** [test] Error 1

@janpio I already found and linked the relevant issue, see above.

see the code files and lines in the stracktrace, totally different from all the similar ones posted here

I was aware of that, I thought they were connected since the error message was the same, but yeah I’ll try to do better with searching for an existing issue that fits 😉