Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fastlane init failed - unknown keyword: :snapfile_path #21813

Closed
4 tasks done
thertzelle opened this issue Jan 16, 2024 · 5 comments · Fixed by #21832
Closed
4 tasks done

fastlane init failed - unknown keyword: :snapfile_path #21813

thertzelle opened this issue Jan 16, 2024 · 5 comments · Fixed by #21832

Comments

@thertzelle
Copy link

New Issue Checklist

Issue Description

fastlane init generates an error and afterwards no configuration of 'fastlane snapshot' will not run successfully, even after I say 'y' to manual fallback

Command executed

fastlane init

Complete output when running fastlane, including the stack trace and command used

`fastlane init
[✔] 🚀
[✔] Looking for iOS and Android projects in current directory...
[15:33:25]: Created new folder './fastlane'.
[15:33:25]: Detected an iOS/macOS project in the current directory: 'Project.xcodeproj'
[15:33:25]: -----------------------------
[15:33:25]: --- Welcome to fastlane 🚀 ---
[15:33:25]: -----------------------------
[15:33:25]: fastlane can help you with all kinds of automation for your mobile app
[15:33:25]: We recommend automating one task first, and then gradually automating more over time
[15:33:25]: What would you like to use fastlane for?

  1. 📸 Automate screenshots
  2. 👩‍✈️ Automate beta distribution to TestFlight
  3. 🚀 Automate App Store distribution
  4. 🛠 Manual setup - manually setup your project to automate your tasks
    ? 1
    [15:33:28]: -------------------------------------------------------
    [15:33:28]: --- Setting up fastlane to automate iOS screenshots ---
    [15:33:28]: -------------------------------------------------------
    [15:33:28]: fastlane uses UI Tests to automate generating localized screenshots of your iOS app
    [15:33:28]: fastlane will now create 2 helper files that are needed to get the setup running
    [15:33:28]: For more information on how this works and best practices, check out
    [15:33:28]: https://docs.fastlane.tools/getting-started/ios/screenshots/
    [15:33:28]: Continue by pressing Enter ⏎

[15:33:30]: Parsing your local Xcode project to find the available schemes and the app identifier
[15:33:30]: Resolving Swift Package Manager dependencies...
[15:33:30]: $ xcodebuild -resolvePackageDependencies -project Project.xcodeproj
[15:33:30]: ▸ Command line invocation:
[15:33:30]: ▸ /Applications/Xcode.app/Contents/Developer/usr/bin/xcodebuild -resolvePackageDependencies -project Project.xcodeproj
[15:33:30]: ▸ User defaults from command line:
[15:33:30]: ▸ IDEPackageSupportUseBuiltinSCM = YES
[15:33:30]: ▸ resolved source packages:
[15:33:30]: $ xcodebuild -showBuildSettings -project Project.xcodeproj 2>&1
✅ Successfully created SnapshotHelper.swift './fastlane/SnapshotHelper.swift'
✅ Successfully created new Snapfile at './fastlane/Snapfile'

15:33:31: fastlane init failed
15:33:31: --------------------
15:33:31: unknown keyword: :snapfile_path
15:33:31: Something failed while running fastlane init
15:33:31: Tried using Apple ID with email ''
15:33:31: You can either retry, or fallback to manual setup which will create a basic Fastfile
15:33:31: Would you like to fallback to a manual Fastfile? (y/n)`

Environment

✅ fastlane environment ✅

Stack

Key Value
OS 14.2.1
Ruby 3.3.0
Bundler? false
Git git version 2.39.3 (Apple Git-145)
Installation Source /opt/homebrew/Cellar/fastlane/2.219.0_2/libexec/bin/fastlane
Host macOS 14.2.1 (23C71)
Ruby Lib Dir /opt/homebrew/Cellar/ruby/3.3.0/lib
OpenSSL Version OpenSSL 3.2.0 23 Nov 2023
Is contained false
Is homebrew true
Is installed via Fabric.app false
Xcode Path /Applications/Xcode.app/Contents/Developer/
Xcode Version 15.2
Swift Version 5.9.2

System Locale

Variable Value
LANG en_US.UTF-8
LC_ALL
LANGUAGE

fastlane files:

No Fastfile found

No Appfile found

fastlane gems

Gem Version Update-Status
fastlane 2.219.0 ✅ Up-To-Date

Loaded fastlane plugins:

No plugins Loaded

Loaded gems
Gem Version
error_highlight 0.6.0
did_you_mean 1.6.3
syntax_suggest 2.0.0
public_suffix 5.0.4
addressable 2.8.6
artifactory 3.0.15
aws-eventstream 1.3.0
aws-sigv4 1.8.0
aws-sdk-kms 1.76.0
aws-sdk-s3 1.142.0
babosa 1.0.4
bundler 2.5.4
rexml 3.2.6
CFPropertyList 3.0.6
colored 1.2
highline 2.0.3
commander 4.6.0
dotenv 2.8.1
emoji_regex 3.2.3
excon 0.109.0
faraday-em_http 1.0.0
faraday-em_synchrony 1.0.0
faraday-excon 1.1.0
faraday-httpclient 1.0.1
multipart-post 2.3.0
faraday-multipart 1.0.4
faraday-net_http 1.0.1
faraday-net_http_persistent 1.2.0
faraday-patron 1.0.0
faraday-rack 1.0.0
faraday-retry 1.0.3
ruby2_keywords 0.0.5
faraday 1.10.3
faraday_middleware 1.2.0
domain_name 0.6.20240107
http-cookie 1.0.5
faraday-cookie_jar 0.0.7
fastimage 2.3.0
gh_inspector 1.1.3
uber 0.1.0
declarative 0.0.20
trailblazer-option 0.1.2
representable 3.2.0
retriable 3.1.2
mini_mime 1.1.5
jwt 2.7.1
multi_json 1.15.0
os 1.1.4
signet 0.18.0
googleauth 1.8.1
httpclient 2.8.3
webrick 1.8.1
google-apis-core 0.11.2
google-apis-androidpublisher_v3 0.54.0
google-apis-playcustomapp_v1 0.13.0
google-cloud-env 1.6.0
google-cloud-errors 1.3.1
google-cloud-core 1.6.1
google-apis-iamcredentials_v1 0.17.0
google-apis-storage_v1 0.31.0
rake 13.1.0
digest-crc 0.6.5
google-cloud-storage 1.47.0
json 2.7.1
mini_magick 4.12.0
naturally 2.2.1
optparse 0.4.0
plist 3.7.1
rubyzip 2.3.2
security 0.1.3
simctl 1.6.10
terminal-notifier 2.0.0
unicode-display_width 2.5.0
terminal-table 3.0.2
tty-screen 0.8.2
tty-cursor 0.7.1
tty-spinner 0.9.3
word_wrap 1.0.0
atomos 0.1.3
claide 1.1.0
colored2 3.1.2
nanaimo 0.3.0
xcodeproj 1.23.0
rouge 2.0.7
xcpretty 0.3.0
xcpretty-travis-formatter 1.0.1
set 1.1.0
aws-partitions 1.880.0
jmespath 1.6.2
aws-sdk-core 3.190.2
forwardable 1.3.3
logger 1.6.0
pathname 0.3.0
shellwords 0.2.0
cgi 0.4.1
date 3.3.4
timeout 0.4.1
securerandom 0.3.1
uri 0.13.0
openssl 3.2.0
digest 3.1.1
ipaddr 1.2.6
resolv 0.3.0
time 0.3.0
stringio 3.1.0
open-uri 0.4.1
mutex_m 0.2.0
net-http 0.4.0
net-protocol 0.2.2
ostruct 0.6.0
english 0.8.0
erb 4.0.3
abbrev 0.1.2
tempfile 0.2.1
delegate 0.3.1
fileutils 1.7.2
tmpdir 0.2.0
base64 0.2.0
singleton 0.2.0
open3 0.2.1
nkf 0.1.3
prettyprint 0.2.0
pp 0.5.0
find 0.2.0
yaml 0.3.0
psych 5.1.2

generated on: 2024-01-16

@phil-hudson
Copy link

+1 seeing the same

@developeranshul1986
Copy link

+1 same issue

@pelusoBuendia01
Copy link

+1 same issue

▶︎ fastlane snapshot init
[✔] 🚀 
✅  Successfully created SnapshotHelper.swift './fastlane/SnapshotHelper.swift'
✅  Successfully created new Snapfile at './fastlane/Snapfile'
-------------------------------------------------------

Looking for related GitHub issues on fastlane/fastlane...

➡️  fastlane init failed - unknown keyword: :snapfile_path
    https://github.com/fastlane/fastlane/issues/21813 [closed] 2 💬
    5 weeks ago

🔗  You can ⌘ + double-click on links to open them directly in your browser.
/usr/local/Cellar/fastlane/2.214.0/libexec/gems/fastlane-2.219.0/snapshot/lib/snapshot/setup.rb:40:in `print_instructions': \e[31m[!] unknown keyword: :snapfile_path\e[0m (ArgumentError)
        from /usr/local/Cellar/fastlane/2.214.0/libexec/gems/fastlane-2.219.0/snapshot/lib/snapshot/setup.rb:37:in `create'
        from /usr/local/Cellar/fastlane/2.214.0/libexec/gems/fastlane-2.219.0/snapshot/lib/snapshot/commands_generator.rb:54:in `block (2 levels) in run'
        from /usr/local/Cellar/fastlane/2.214.0/libexec/gems/commander-4.6.0/lib/commander/command.rb:187:in `call'
        from /usr/local/Cellar/fastlane/2.214.0/libexec/gems/commander-4.6.0/lib/commander/command.rb:157:in `run'
        from /usr/local/Cellar/fastlane/2.214.0/libexec/gems/commander-4.6.0/lib/commander/runner.rb:444:in `run_active_command'
        from /usr/local/Cellar/fastlane/2.214.0/libexec/gems/fastlane-2.219.0/fastlane_core/lib/fastlane_core/ui/fastlane_runner.rb:124:in `run!'
        from /usr/local/Cellar/fastlane/2.214.0/libexec/gems/commander-4.6.0/lib/commander/delegates.rb:18:in `run!'
        from /usr/local/Cellar/fastlane/2.214.0/libexec/gems/fastlane-2.219.0/snapshot/lib/snapshot/commands_generator.rb:106:in `run'
        from /usr/local/Cellar/fastlane/2.214.0/libexec/gems/fastlane-2.219.0/snapshot/lib/snapshot/commands_generator.rb:16:in `start'
        from /usr/local/Cellar/fastlane/2.214.0/libexec/gems/fastlane-2.219.0/fastlane/lib/fastlane/cli_tools_distributor.rb:115:in `take_off'
        from /usr/local/Cellar/fastlane/2.214.0/libexec/gems/fastlane-2.219.0/bin/fastlane:23:in `<top (required)>'
        from /usr/local/Cellar/fastlane/2.214.0/libexec/bin/fastlane:25:in `load'
        from /usr/local/Cellar/fastlane/2.214.0/libexec/bin/fastlane:25:in `<main>'
/usr/local/Cellar/fastlane/2.214.0/libexec/gems/fastlane-2.219.0/snapshot/lib/snapshot/setup.rb:40:in `print_instructions': unknown keyword: :snapfile_path (ArgumentError)
        from /usr/local/Cellar/fastlane/2.214.0/libexec/gems/fastlane-2.219.0/snapshot/lib/snapshot/setup.rb:37:in `create'
        from /usr/local/Cellar/fastlane/2.214.0/libexec/gems/fastlane-2.219.0/snapshot/lib/snapshot/commands_generator.rb:54:in `block (2 levels) in run'
        from /usr/local/Cellar/fastlane/2.214.0/libexec/gems/commander-4.6.0/lib/commander/command.rb:187:in `call'
        from /usr/local/Cellar/fastlane/2.214.0/libexec/gems/commander-4.6.0/lib/commander/command.rb:157:in `run'
        from /usr/local/Cellar/fastlane/2.214.0/libexec/gems/commander-4.6.0/lib/commander/runner.rb:444:in `run_active_command'
        from /usr/local/Cellar/fastlane/2.214.0/libexec/gems/fastlane-2.219.0/fastlane_core/lib/fastlane_core/ui/fastlane_runner.rb:124:in `run!'
        from /usr/local/Cellar/fastlane/2.214.0/libexec/gems/commander-4.6.0/lib/commander/delegates.rb:18:in `run!'
        from /usr/local/Cellar/fastlane/2.214.0/libexec/gems/fastlane-2.219.0/snapshot/lib/snapshot/commands_generator.rb:106:in `run'
        from /usr/local/Cellar/fastlane/2.214.0/libexec/gems/fastlane-2.219.0/snapshot/lib/snapshot/commands_generator.rb:16:in `start'
        from /usr/local/Cellar/fastlane/2.214.0/libexec/gems/fastlane-2.219.0/fastlane/lib/fastlane/cli_tools_distributor.rb:115:in `take_off'
        from /usr/local/Cellar/fastlane/2.214.0/libexec/gems/fastlane-2.219.0/bin/fastlane:23:in `<top (required)>'
        from /usr/local/Cellar/fastlane/2.214.0/libexec/bin/fastlane:25:in `load'
        from /usr/local/Cellar/fastlane/2.214.0/libexec/bin/fastlane:25:in `<main>'
▶︎ 

@Azilla030
Copy link

+1 same issue

@ByTyson
Copy link

ByTyson commented Mar 16, 2024

Hello, I have the same issue and I fix it just now.

  1. run $ sudo xcode-select --switch /Applications/Xcode.app
  2. Add a new UI Test target to your project (if not created when your start the project)
  3. Go to ( 'YourAppNameUITests)
  4. Add the ./fastlane/SnapshotHelper.swift to your UI Test target
  • In "Framework and Libraries, Click "+", select "Add other File" and Add ./FastLane/SnapshotHelper.swift ( This file previously make with the cmd : $ fastlane init

I hope that help you

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
6 participants