(<unknown>): could not find expected ':' while scanning a simple key at line 25 column 3


#1

It seems I am not able to excape characters on the FASTLANE_SESSION environment variable stored on Bitrise - well at least I think that is the issue.

Stacktrace:

Configs:
- WorkDir: ios
- Lane: beta
- UpdateFastlane: true
Expand WorkDir
Expanded WorkDir: /Users/vagrant/git/ios
Determine desired Fastlane version
Checking Gemfile.lock (/Users/vagrant/git/ios/Gemfile.lock) for fastlane gem
Gemfile.lock defined fastlane version: 2.109.0
Install Fastlane with bundler
$ bundle "install" "--jobs" "20" "--retry" "5"
Warning: the running version of Bundler (1.16.2) is older than the version that created the lockfile (1.17.1). We suggest you upgrade to the latest version of Bundler by running `gem install bundler`.
Fetching gem metadata from https://rubygems.org/........
Using CFPropertyList 3.0.0
Using public_suffix 2.0.5
Using atomos 0.1.3
Using babosa 1.0.2
Using bundler 1.16.2
Using claide 1.0.2
Using colored 1.2
Using colored2 3.1.2
Using highline 1.7.10
Using declarative 0.0.10
Using declarative-option 0.1.0
Using unf_ext 0.0.7.5
Using dotenv 2.5.0
Using emoji_regex 0.1.1
Using excon 0.62.0
Using multipart-post 2.0.0
Using gh_inspector 1.1.3
Using jwt 2.1.0
Using memoist 0.16.0
Using multi_json 1.13.1
Using os 1.0.0
Using httpclient 2.8.3
Using mime-types-data 3.2018.0812
Using uber 0.1.0
Using retriable 3.1.2
Using json 2.1.0
Fetching fastimage 2.1.5
Using mini_magick 4.5.1
Using multi_xml 0.6.0
Using rubyzip 1.2.2
Using security 0.1.3
Using naturally 2.2.0
Using slack-notifier 2.3.2
Using terminal-notifier 1.8.0
Using unicode-display_width 1.4.0
Using tty-screen 0.6.5
Using tty-cursor 0.6.0
Fetching plist 3.4.0
Using word_wrap 1.0.0
Using nanaimo 0.2.6
Using rouge 2.0.7
Using addressable 2.5.2
Using commander-fastlane 4.4.6
Using unf 0.1.4
Using domain_name 0.5.20180417
Using mime-types 3.2.2
Using simctl 1.6.5
Using terminal-table 1.8.0
Using xcpretty 0.3.0
Using http-cookie 1.0.3
Fetching tty-spinner 0.9.0
Fetching xcodeproj 1.7.0
Using xcpretty-travis-formatter 1.0.0
Fetching faraday 0.15.4
Using representable 3.0.4
Installing plist 3.4.0
Installing tty-spinner 0.9.0
Installing fastimage 2.1.5
Installing faraday 0.15.4
Installing xcodeproj 1.7.0
Using faraday-cookie_jar 0.0.6
Using faraday_middleware 0.12.2
Fetching signet 0.11.0
Installing signet 0.11.0
Fetching googleauth 0.6.7
Installing googleauth 0.6.7
Using google-api-client 0.23.9
Fetching fastlane 2.109.0
Installing fastlane 2.109.0
Bundle complete! 1 Gemfile dependency, 61 gems now installed.
Use `bundle info [gemname]` to see where a bundled gem is installed.
Fastlane version:
$ bundle "exec" "fastlane" "--version"
fastlane installation at path:
/usr/local/lib/ruby/gems/2.5.0/gems/fastlane-2.109.0/bin/fastlane
-----------------------------
fastlane 2.109.0
Run Fastlane
$ bundle "exec" "fastlane" "beta"
[03:33:27]: Sending anonymous analytics information
[03:33:27]: Learn more at https://docs.fastlane.tools/#metrics
[03:33:27]: No personal or sensitive data is sent.
[03:33:27]: You can disable this by adding `opt_out_usage` at the top of your Fastfile
[03:33:28]: ------------------------------
[03:33:28]: --- Step: default_platform ---
[03:33:28]: ------------------------------
[03:33:28]: Driving the lane 'ios beta' 🚀
[03:33:28]: ------------------------------
[03:33:28]: --- Step: get_certificates ---
[03:33:28]: ------------------------------
+---------------+----------------------------------------------------+
|                      Summary for cert 2.109.0                      |
+---------------+----------------------------------------------------+
| development   | false                                              |
| force         | false                                              |
| username      | [REDACTED]                                |
| team_id       | U4VGNL272S                                         |
| keychain_path | /Users/vagrant/Library/Keychains/login.keychain-db |
| platform      | ios                                                |
+---------------+----------------------------------------------------+
[03:33:28]: Starting login with user '[REDACTED]'
Error loading session from environment
Make sure to pass the session in a valid format
+------------------+----------+
|        Lane Context         |
+------------------+----------+
| DEFAULT_PLATFORM | ios      |
| PLATFORM_NAME    | ios      |
| LANE_NAME        | ios beta |
+------------------+----------+
[03:33:28]: (<unknown>): could not find expected ':' while scanning a simple key at line 25 column 3
+------+------------------+-------------+
|           fastlane summary            |
+------+------------------+-------------+
| Step | Action           | Time (in s) |
+------+------------------+-------------+
| 1    | default_platform | 0           |
| 💥   | get_certificates | 0           |
+------+------------------+-------------+
[03:33:28]: fastlane finished with errors
Looking for related GitHub issues on fastlane/fastlane...
➡️  Where should I keep sensitive data?
    https://github.com/fastlane/fastlane/issues/25 [closed] 2 💬
    22 Sep 2016
➡️  testmunk intro text
    https://github.com/fastlane/fastlane/pull/3 [closed] 0 💬
    04 Feb 2017
🔗  You can ⌘ + double-click on links to open them directly in your browser.
bundler: failed to load command: fastlane (/usr/local/bin/fastlane)
Psych::SyntaxError: [!] (<unknown>): could not find expected ':' while scanning a simple key at line 25 column 3
  /usr/local/Cellar/ruby/2.5.1/lib/ruby/2.5.0/psych.rb:402:in `parse'
  /usr/local/Cellar/ruby/2.5.1/lib/ruby/2.5.0/psych.rb:402:in `parse_stream'
  /usr/local/Cellar/ruby/2.5.1/lib/ruby/2.5.0/psych.rb:350:in `parse'
  /usr/local/Cellar/ruby/2.5.1/lib/ruby/2.5.0/psych.rb:263:in `load'
  /usr/local/lib/ruby/gems/2.5.0/gems/http-cookie-1.0.3/lib/http/cookie_jar/yaml_saver.rb:24:in `load'
  /usr/local/lib/ruby/gems/2.5.0/gems/http-cookie-1.0.3/lib/http/cookie_jar.rb:325:in `block in load'
  /usr/local/lib/ruby/gems/2.5.0/gems/http-cookie-1.0.3/lib/http/cookie_jar.rb:324:in `open'
  /usr/local/lib/ruby/gems/2.5.0/gems/http-cookie-1.0.3/lib/http/cookie_jar.rb:324:in `load'
  /usr/local/lib/ruby/gems/2.5.0/gems/fastlane-2.109.0/spaceship/lib/spaceship/client.rb:581:in `load_session_from_env'
  /usr/local/lib/ruby/gems/2.5.0/gems/fastlane-2.109.0/spaceship/lib/spaceship/client.rb:430:in `send_shared_login_request'
  /usr/local/lib/ruby/gems/2.5.0/gems/fastlane-2.109.0/spaceship/lib/spaceship/portal/portal_client.rb:28:in `send_login_request'
  /usr/local/lib/ruby/gems/2.5.0/gems/fastlane-2.109.0/spaceship/lib/spaceship/client.rb:751:in `do_login'
  /usr/local/lib/ruby/gems/2.5.0/gems/fastlane-2.109.0/spaceship/lib/spaceship/client.rb:383:in `login'
  /usr/local/lib/ruby/gems/2.5.0/gems/fastlane-2.109.0/spaceship/lib/spaceship/client.rb:345:in `login'
  /usr/local/lib/ruby/gems/2.5.0/gems/fastlane-2.109.0/spaceship/lib/spaceship/portal/spaceship.rb:25:in `login'
  /usr/local/lib/ruby/gems/2.5.0/gems/fastlane-2.109.0/spaceship/lib/spaceship/portal/spaceship.rb:103:in `login'
  /usr/local/lib/ruby/gems/2.5.0/gems/fastlane-2.109.0/cert/lib/cert/runner.rb:24:in `login'
  /usr/local/lib/ruby/gems/2.5.0/gems/fastlane-2.109.0/cert/lib/cert/runner.rb:34:in `run'
  /usr/local/lib/ruby/gems/2.5.0/gems/fastlane-2.109.0/cert/lib/cert/runner.rb:13:in `launch'
  /usr/local/lib/ruby/gems/2.5.0/gems/fastlane-2.109.0/fastlane/lib/fastlane/actions/get_certificates.rb:17:in `run'
  /usr/local/lib/ruby/gems/2.5.0/gems/fastlane-2.109.0/fastlane/lib/fastlane/runner.rb:253:in `block (2 levels) in execute_action'
  /usr/local/lib/ruby/gems/2.5.0/gems/fastlane-2.109.0/fastlane/lib/fastlane/actions/actions_helper.rb:50:in `execute_action'
  /usr/local/lib/ruby/gems/2.5.0/gems/fastlane-2.109.0/fastlane/lib/fastlane/runner.rb:232:in `block in execute_action'
  /usr/local/lib/ruby/gems/2.5.0/gems/fastlane-2.109.0/fastlane/lib/fastlane/runner.rb:227:in `chdir'
  /usr/local/lib/ruby/gems/2.5.0/gems/fastlane-2.109.0/fastlane/lib/fastlane/runner.rb:227:in `execute_action'
  /usr/local/lib/ruby/gems/2.5.0/gems/fastlane-2.109.0/fastlane/lib/fastlane/runner.rb:157:in `trigger_action_by_name'
  /usr/local/lib/ruby/gems/2.5.0/gems/fastlane-2.109.0/fastlane/lib/fastlane/fast_file.rb:154:in `method_missing'
  Fastfile:21:in `block (2 levels) in parsing_binding'
  /usr/local/lib/ruby/gems/2.5.0/gems/fastlane-2.109.0/fastlane/lib/fastlane/lane.rb:33:in `call'
  /usr/local/lib/ruby/gems/2.5.0/gems/fastlane-2.109.0/fastlane/lib/fastlane/runner.rb:49:in `block in execute'
  /usr/local/lib/ruby/gems/2.5.0/gems/fastlane-2.109.0/fastlane/lib/fastlane/runner.rb:45:in `chdir'
  /usr/local/lib/ruby/gems/2.5.0/gems/fastlane-2.109.0/fastlane/lib/fastlane/runner.rb:45:in `execute'
  /usr/local/lib/ruby/gems/2.5.0/gems/fastlane-2.109.0/fastlane/lib/fastlane/lane_manager.rb:56:in `cruise_lane'
  /usr/local/lib/ruby/gems/2.5.0/gems/fastlane-2.109.0/fastlane/lib/fastlane/command_line_handler.rb:36:in `handle'
  /usr/local/lib/ruby/gems/2.5.0/gems/fastlane-2.109.0/fastlane/lib/fastlane/commands_generator.rb:108:in `block (2 levels) in run'
  /usr/local/lib/ruby/gems/2.5.0/gems/commander-fastlane-4.4.6/lib/commander/command.rb:178:in `call'
  /usr/local/lib/ruby/gems/2.5.0/gems/commander-fastlane-4.4.6/lib/commander/command.rb:153:in `run'
  /usr/local/lib/ruby/gems/2.5.0/gems/commander-fastlane-4.4.6/lib/commander/runner.rb:476:in `run_active_command'
  /usr/local/lib/ruby/gems/2.5.0/gems/fastlane-2.109.0/fastlane_core/lib/fastlane_core/ui/fastlane_runner.rb:76:in `run!'
  /usr/local/lib/ruby/gems/2.5.0/gems/commander-fastlane-4.4.6/lib/commander/delegates.rb:15:in `run!'
  /usr/local/lib/ruby/gems/2.5.0/gems/fastlane-2.109.0/fastlane/lib/fastlane/commands_generator.rb:333:in `run'
  /usr/local/lib/ruby/gems/2.5.0/gems/fastlane-2.109.0/fastlane/lib/fastlane/commands_generator.rb:41:in `start'
  /usr/local/lib/ruby/gems/2.5.0/gems/fastlane-2.109.0/fastlane/lib/fastlane/cli_tools_distributor.rb:108:in `take_off'
  /usr/local/lib/ruby/gems/2.5.0/gems/fastlane-2.109.0/bin/fastlane:23:in `<top (required)>'
  /usr/local/bin/fastlane:23:in `load'
  /usr/local/bin/fastlane:23:in `<top (required)>'
Fastlane command: (bundle "exec" "fastlane" "beta") failed

Fastfile:

platform :ios do
  desc "Push a new beta build to TestFlight"
  lane :beta do
  get_certificates           # invokes cert
  get_provisioning_profile   # invokes sigh
    increment_build_number(xcodeproj: "PROJECT.xcodeproj")
    build_app(scheme: "PROJECT")
    upload_to_testflight
  end
end

Fastlane env:

| Gem      | Version | Update-Status |
| -------- | ------- | ------------- |
| fastlane | 2.109.0 | ✅ Up-To-Date  |

#2

Hi @FMI!

Sorry to hear this, can you please include a build URL?


#3

@bitce thanks for your reply.

Build URL: https://app.bitrise.io/build/15f7e8bf114dbece

I have also enabled support on this account.

Thanks


#4

Hy there!

fastlane uses Ruby as it’s config language, and in Ruby you reference environment variables with ENV['ENV_KEY'] . In the case above: ENV['FASTLANE_SESSION'] . Note: there’s no $ in the ID!


#5

Hey @fehersanyi-bitrise

Thanks for your reply.

So sorry but I do not understand where the issue lies. In bitrise.yml I reference the FASTLANE_SESSION under envs and there is no $ anywhere.

Please could you provide a bit of clarity if possible.

Thank you!


#6

could you please enable support user to the app, so I can check it out?


#7

@fehersanyi-bitrise done :slight_smile:


#8

I have updated the FASTLANE_SESSION but now I get the error undefined method strip for nil:NilClass

Build URL: https://app.bitrise.io/build/dd480c58af6a1583


#9

Hy @FMI!

In the log you sent me I see that your session cookie is expired so fastlane can not download your code signing files.


#10

@fehersanyi-bitrise above is the error I get after generating a new session cookie


#11

@FMI Can you please include your latest failing build URL?


#12

@bitce sure - https://app.bitrise.io/build/dd480c58af6a1583

I think this has to do with character escaping on the FASTLANE_SESSION env var on Bitrise?


#13

Hello!

So I learned that the dev account session is location based, so you will not be able to use it on CI
my suggestion is, don’t do code signing with fastlane.


#14

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.