fastlane: 809: unexpected token at '

New Issue Checklist

Issue Description

Command executed

bundle exec fastlane match appstore

Complete output when running fastlane, including the stack trace and command used
ERROR [2021-08-22 14:04:19.31]: 809: unexpected token at '<HTML> <HEAD> <TITLE>Error</TITLE> </HEAD> <BODY BGCOLOR="white" FGCOLOR="black">

Error


<FONT FACE="Helvetica,Arial"> Description: Could not process this request. </FONT>


</BODY> ' INFO [2021-08-22 14:04:19.31]: Successfully generated documentation at path '/Users/nabinshrestha/builds/LsabXp68/0/project/fastlane/README.md'

±-----±------------------±------------+ | fastlane summary | ±-----±------------------±------------+ | Step | Action | Time (in s) | ±-----±------------------±------------+ | 1 | default_platform | 0 | | 2 | delete_keychain | 0 | | 3 | create_keychain | 0 | | 💥 | sync_code_signing | 6 | ±-----±------------------±------------+

DEBUG [2021-08-22 14:04:19.31]: All plugins are up to date ERROR [2021-08-22 14:04:19.31]: fastlane finished with errors

Looking for related GitHub issues on fastlane/fastlane… Search query: 809: unexpected token at '<HTML>

<HEAD> <TITLE>Error</TITLE> </HEAD> <BODY BGCOLOR="white" FGCOLOR="black">

Error


<FONT FACE="Helvetica,Arial"> Description: Could not process this request. </FONT>


</BODY> '

URL: https://api.github.com/search/issues?q=809%3A unexpected token at '<HTML> <HEAD> <TITLE>Error<%2FTITLE> <%2FHEAD> <BODY BGCOLOR%3D"white" FGCOLOR%3D"black"> <H1>Error<%2FH1> <HR> <FONT FACE%3D"Helvetica%2CArial"><B> Description%3A Could not process this request. <%2FB><%2FFONT> <HR> <%2FBODY> '+repo:fastlane/fastlane ➡️ Can’t solve dependency problem between fastlane and deliver https://github.com/fastlane/fastlane/issues/599 [closed] 17 💬 22 Sep 2016

➡️ Fastlane fails on IDFA step on itunes connect https://github.com/fastlane/fastlane/issues/600 [closed] 1 💬 22 Sep 2016

➡️ Builds archived with Gym 0.6.2 no longer appear in Xcode 7 Organizer https://github.com/fastlane/fastlane/issues/605 [closed] 1 💬 22 Sep 2016

and 18345 more at: https://github.com/fastlane/fastlane/search?q=809%3A unexpected token at '<HTML> <HEAD> <TITLE>Error<%2FTITLE> <%2FHEAD> <BODY BGCOLOR%3D"white" FGCOLOR%3D"black"> <H1>Error<%2FH1> <HR> <FONT FACE%3D"Helvetica%2CArial"><B> Description%3A Could not process this request. <%2FB><%2FFONT> <HR> <%2FBODY> '&type=Issues&utf8=✓

🔗 You can ⌘ + double-click on links to open them directly in your browser. DEBUG [2021-08-22 14:04:20.52]: All plugins are up to date bundler: failed to load command: fastlane (/Users/nabinshrestha/.gem/bin/fastlane) JSON::ParserError: [!] 809: unexpected token at '<HTML>

<HEAD> <TITLE>Error</TITLE> </HEAD> <BODY BGCOLOR="white" FGCOLOR="black">

Error


<FONT FACE="Helvetica,Arial"> Description: Could not process this request. </FONT>


</BODY> ' /Users/nabinshrestha/.gem/gems/json-2.5.1/lib/json/common.rb:216:in `parse' /Users/nabinshrestha/.gem/gems/json-2.5.1/lib/json/common.rb:216:in `parse' /Users/nabinshrestha/.gem/gems/fastlane-2.191.0/spaceship/lib/spaceship/connect_api/api_client.rb:211:in `handle_error' /Users/nabinshrestha/.gem/gems/fastlane-2.191.0/spaceship/lib/spaceship/client.rb:902:in `block in send_request' /Users/nabinshrestha/.gem/gems/fastlane-2.191.0/spaceship/lib/spaceship/client.rb:657:in `with_retry' /Users/nabinshrestha/.gem/gems/fastlane-2.191.0/spaceship/lib/spaceship/client.rb:898:in `send_request' /Users/nabinshrestha/.gem/gems/fastlane-2.191.0/spaceship/lib/spaceship/client.rb:742:in `request' /Users/nabinshrestha/.gem/gems/fastlane-2.191.0/spaceship/lib/spaceship/connect_api/provisioning/client.rb:54:in `proxy_get' /Users/nabinshrestha/.gem/gems/fastlane-2.191.0/spaceship/lib/spaceship/connect_api/provisioning/client.rb:29:in `get' /Users/nabinshrestha/.gem/gems/fastlane-2.191.0/spaceship/lib/spaceship/connect_api/provisioning/provisioning.rb:22:in `get_bundle_ids' /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/forwardable.rb:230:in `get_bundle_ids' /Users/nabinshrestha/.gem/gems/fastlane-2.191.0/spaceship/lib/spaceship/connect_api/models/bundle_id.rb:44:in `all' /Users/nabinshrestha/.gem/gems/fastlane-2.191.0/spaceship/lib/spaceship/connect_api/models/bundle_id.rb:50:in `find' /Users/nabinshrestha/.gem/gems/fastlane-2.191.0/match/lib/match/spaceship_ensure.rb:45:in `bundle_identifier_exists' /Users/nabinshrestha/.gem/gems/fastlane-2.191.0/match/lib/match/runner.rb:91:in `block in run' /Users/nabinshrestha/.gem/gems/fastlane-2.191.0/match/lib/match/runner.rb:90:in `each' /Users/nabinshrestha/.gem/gems/fastlane-2.191.0/match/lib/match/runner.rb:90:in `run' /Users/nabinshrestha/.gem/gems/fastlane-2.191.0/fastlane/lib/fastlane/actions/sync_code_signing.rb:19:in `run' /Users/nabinshrestha/.gem/gems/fastlane-2.191.0/fastlane/lib/fastlane/runner.rb:263:in `block (2 levels) in execute_action' /Users/nabinshrestha/.gem/gems/fastlane-2.191.0/fastlane/lib/fastlane/actions/actions_helper.rb:69:in `execute_action' /Users/nabinshrestha/.gem/gems/fastlane-2.191.0/fastlane/lib/fastlane/runner.rb:255:in `block in execute_action' /Users/nabinshrestha/.gem/gems/fastlane-2.191.0/fastlane/lib/fastlane/runner.rb:229:in `chdir' /Users/nabinshrestha/.gem/gems/fastlane-2.191.0/fastlane/lib/fastlane/runner.rb:229:in `execute_action' /Users/nabinshrestha/.gem/gems/fastlane-2.191.0/fastlane/lib/fastlane/runner.rb:157:in `trigger_action_by_name' /Users/nabinshrestha/.gem/gems/fastlane-2.191.0/fastlane/lib/fastlane/fast_file.rb:159:in `method_missing' Fastfile:101:in `block (2 levels) in parsing_binding' /Users/nabinshrestha/.gem/gems/fastlane-2.191.0/fastlane/lib/fastlane/lane.rb:33:in `call' /Users/nabinshrestha/.gem/gems/fastlane-2.191.0/fastlane/lib/fastlane/runner.rb:49:in `block in execute' /Users/nabinshrestha/.gem/gems/fastlane-2.191.0/fastlane/lib/fastlane/runner.rb:45:in `chdir' /Users/nabinshrestha/.gem/gems/fastlane-2.191.0/fastlane/lib/fastlane/runner.rb:45:in `execute' /Users/nabinshrestha/.gem/gems/fastlane-2.191.0/fastlane/lib/fastlane/lane_manager.rb:47:in `cruise_lane' /Users/nabinshrestha/.gem/gems/fastlane-2.191.0/fastlane/lib/fastlane/command_line_handler.rb:36:in `handle' /Users/nabinshrestha/.gem/gems/fastlane-2.191.0/fastlane/lib/fastlane/commands_generator.rb:109:in `block (2 levels) in run' /Users/nabinshrestha/.gem/gems/commander-4.6.0/lib/commander/command.rb:187:in `call' /Users/nabinshrestha/.gem/gems/commander-4.6.0/lib/commander/command.rb:157:in `run' /Users/nabinshrestha/.gem/gems/commander-4.6.0/lib/commander/runner.rb:444:in `run_active_command' /Users/nabinshrestha/.gem/gems/fastlane-2.191.0/fastlane_core/lib/fastlane_core/ui/fastlane_runner.rb:76:in `run!' /Users/nabinshrestha/.gem/gems/commander-4.6.0/lib/commander/delegates.rb:18:in `run!' /Users/nabinshrestha/.gem/gems/fastlane-2.191.0/fastlane/lib/fastlane/commands_generator.rb:353:in `run' /Users/nabinshrestha/.gem/gems/fastlane-2.191.0/fastlane/lib/fastlane/commands_generator.rb:42:in `start' /Users/nabinshrestha/.gem/gems/fastlane-2.191.0/fastlane/lib/fastlane/cli_tools_distributor.rb:122:in `take_off' /Users/nabinshrestha/.gem/gems/fastlane-2.191.0/bin/fastlane:23:in `<top (required)>' /Users/nabinshrestha/.gem/bin/fastlane:23:in `load' /Users/nabinshrestha/.gem/bin/fastlane:23:in `<top (required)>'

Environment

 
✅ fastlane environment ✅

Stack

Key Value
OS 11.5.2
Ruby 2.7.0
Bundler? true
Git git version 2.30.1 (Apple Git-130)
Installation Source ~/.gem/ruby/2.7.0/bin/fastlane
Host macOS 11.5.2 (20G95)
Ruby Lib Dir ~/.rbenv/versions/2.7.0/lib
OpenSSL Version OpenSSL 1.1.1i 8 Dec 2020
Is contained false
Is homebrew false
Is installed via Fabric.app false
Xcode Path /Applications/Xcode.app/Contents/Developer/
Xcode Version 12.5.1
Swift Version 5.4.2

System Locale

Variable Value
LANG en_US.UTF-8
LC_ALL
LANGUAGE

fastlane files:

`./fastlane/Fastfile`
# This file contains the fastlane.tools configuration
# You can find the documentation at https://docs.fastlane.tools
#
# For a list of all available actions, check out
#
#     https://docs.fastlane.tools/actions
#
# For a list of all available plugins, check out
#
#     https://docs.fastlane.tools/plugins/available-plugins
#
  
# Uncomment the line if you want fastlane to automatically update itself
# update_fastlane

require 'spaceship'

default_platform(:ios)
 
def ensure_temp_keychain(name)
  delete_keychain(
    name: name
  ) if File.exist? File.expand_path("~/Library/Keychains/#{name}-db")
  create_keychain(
    name: name,
    password: 'temppassword',
    unlock: true,
    timeout: 0
  )
end

 platform :ios do
#  lane :lint do
#    swiftlint(mode: :lint, config_file: ".swiftlint-ci.yml", strict: true)
#  end
  lane :qa do
    ensure_temp_keychain 'fastlane_keychain'
    sync_code_signing(
        type: "adhoc",
        keychain_name: "fastlane_keychain",
        keychain_password: "temppassword",
	      app_identifier: [ENV["BUNDLE_ID"], ENV["BUNDLE_ID_NOTIFICATION"]]
	      #api_key_path: 'fastlane/key.json'
    )
    increment_version_number_in_plist(
      bump_type: 'patch',
      target:'BankSmart'
    )
    increment_build_number_in_plist(
      target:'BankSmart'
    )
    increment_version_number_in_plist(
      bump_type: 'patch',
      target:'NotificationServiceExt'
    )
    increment_build_number_in_plist(
      target:'NotificationServiceExt'
    )
    build_app(workspace: "BankSmart.xcworkspace", scheme: "GlobalIME")
    appcenter_upload(
      api_token: ENV["APP_CENTER_API_TOKEN"],
      app_name: ENV["APP_CENTER_GLOBAL"],
      owner_name: "F1Soft-International-Pvt.-Ltd.",
      notify_testers: true
    )
  end
  lane :uat do
    ensure_temp_keychain 'fastlane_keychain'
    sync_code_signing(
        type: "appstore",
        keychain_name: "fastlane_keychain",
        keychain_password: "temppassword",
	      app_identifier: [ENV["BUNDLE_ID"], ENV["BUNDLE_ID_NOTIFICATION"]]
    )
    increment_build_number_in_plist(
      target:'BankSmart'
    )
    increment_build_number_in_plist(
      target:'NotificationServiceExt'
    )
    build_app(workspace: "BankSmart.xcworkspace", scheme: "BankSmart-uat")
    pilot(
      ipa: "BankSmart.ipa",
      skip_submission: true,
      skip_waiting_for_build_processing: true
    )
  end
  lane :beta_ipa do
    ensure_temp_keychain 'fastlane_keychain'
    sync_code_signing(
        type: "appstore",
        keychain_name: "fastlane_keychain",
        keychain_password: "temppassword",
	      app_identifier: [ENV["BUNDLE_ID"], ENV["BUNDLE_ID_NOTIFICATION"]]
    )
    build_app(workspace: "BankSmart.xcworkspace", scheme: "Production")
  end
  desc "Push a new beta build to TestFlight"
  lane :beta do
    ensure_temp_keychain 'fastlane_keychain'
    sync_code_signing(
        type: "appstore",
        keychain_name: "fastlane_keychain",
        keychain_password: "temppassword",
	      app_identifier: [ENV["BUNDLE_ID"], ENV["BUNDLE_ID_NOTIFICATION"]],
	      #api_key_path: "fastlane/key.json",
    )
    increment_version_number_in_plist(
      bump_type: 'patch',
      target:'BankSmart'
    )
    increment_build_number_in_plist(
      target:'BankSmart'
    )
    increment_version_number_in_plist(
      bump_type: 'patch',
      target:'NotificationServiceExt'
    )
    increment_build_number_in_plist(
      target:'NotificationServiceExt'
    )
    build_app(workspace: "BankSmart.xcworkspace", scheme: "Production")
    pilot(
      #api_key_path: "fastlane/key.json",
      ipa: "BankSmart.ipa",
      skip_submission: true,
      skip_waiting_for_build_processing: true
    )
  end
  
    lane :submit_review do
      # Spaceship::ConnectAPI.login(ENV["FASTLANE_USER"], ENV["FASTLANE_PASSWORD"])
      # Spaceship::ConnectAPI.select_team
      # app = Spaceship::ConnectAPI::Application.find(ENV["BUNDLE_ID"])
      # if app.edit_version != nil
      #   app.reject_version_if_possible!
      # end

      Spaceship::ConnectAPI.login(
        use_portal: false,
        tunes_team_id: ENV["FASTLANE_ITC_TEAM_ID"],
      )

      app = Spaceship::ConnectAPI::App.find(ENV["BUNDLE_ID"])
      if app.nil?
        UI.important "Not found in team #{teamID} on ASC!"
        next
      end

      if !app.reject_version_if_possible!(platform: Spaceship::ConnectAPI::Platform::IOS)
        UI.important "Couldn't Reject!"
      end
      UI.success "Rejected"

      deliver(
        #api_key_path: "fastlane/key.json",
        app_version: get_version_number(
	        target: 'BankSmart'
        ),
        reject_if_possible: true,
        submit_for_review: true,
        automatic_release: false,
        force: true, # Skip HTMl report verification
        skip_metadata: false,
        skip_screenshots: true,
        skip_binary_upload: true,
        run_precheck_before_submit: false,
        precheck_include_in_app_purchases: false,
        submission_information: {
            add_id_info_uses_idfa: false,
            export_compliance_uses_encryption: false
        }
      )
      # download_dsyms
      # upload_symbols_to_crashlytics(gsp_path: "./BankSmart/GoogleService-Info.plist")
      clean_build_artifacts
  end
  
  lane :release do
    Spaceship::ConnectAPI.login(ENV["FASTLANE_USER"], ENV["FASTLANE_PASSWORD"])
    Spaceship::ConnectAPI.select_team
    app = Spaceship::ConnectAPI::App.find(ENV["BUNDLE_ID"])
    #app.get_edit_app_store_version.release!
    version = app.get_pending_release_app_store_version(platform: Spaceship::ConnectAPI::Platform::IOS)
    Spaceship::ConnectAPI.post_app_store_version_release_request(app_store_version_id: version.id)
  end
end

`./fastlane/Appfile`
app_identifier(ENV["BUNDLE_ID"]) # The bundle identifier of your app
apple_id("appdelivery@f1soft.com") # Your Apple email address

itc_team_id("119290125") # App Store Connect Team ID
team_id("835QF9MFFU") # Developer Portal Team ID

# For more information about the Appfile, see:
#     https://docs.fastlane.tools/advanced/#appfile

fastlane gems

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

Loaded fastlane plugins:

Plugin Version Update-Status
fastlane-plugin-appcenter 1.11.1 ✅ Up-To-Date
fastlane-plugin-versioning 0.5.0 ✅ Up-To-Date
Loaded gems
Gem Version
did_you_mean 1.4.0
bundler 2.2.16
uri 0.10.0
rake 13.0.6
CFPropertyList 3.0.3
public_suffix 4.0.6
addressable 2.8.0
artifactory 3.0.15
atomos 0.1.3
aws-eventstream 1.1.1
aws-partitions 1.489.0
aws-sigv4 1.2.4
jmespath 1.4.0
aws-sdk-core 3.119.1
aws-sdk-kms 1.46.0
aws-sdk-s3 1.99.0
babosa 1.0.4
claide 1.0.3
colored 1.2
colored2 3.1.2
highline 2.0.3
commander 4.6.0
declarative 0.0.20
digest-crc 0.6.4
unf_ext 0.0.7.7
unf 0.1.4
domain_name 0.5.20190701
dotenv 2.7.6
emoji_regex 3.2.2
excon 0.85.0
faraday-em_http 1.0.0
faraday-em_synchrony 1.0.0
faraday-excon 1.1.0
faraday-httpclient 1.0.1
faraday-net_http 1.0.1
faraday-net_http_persistent 1.2.0
faraday-patron 1.0.0
faraday-rack 1.0.0
multipart-post 2.0.0
ruby2_keywords 0.0.5
faraday 1.7.0
http-cookie 1.0.4
faraday-cookie_jar 0.0.7
faraday_middleware 1.1.0
fastimage 2.2.5
gh_inspector 1.1.3
jwt 2.2.3
memoist 0.16.2
multi_json 1.15.0
os 1.1.1
signet 0.15.0
googleauth 0.17.0
httpclient 2.8.3
mini_mime 1.1.0
trailblazer-option 0.1.1
uber 0.1.0
representable 3.1.1
retriable 3.1.2
rexml 3.2.5
webrick 1.7.0
google-apis-core 0.4.1
google-apis-androidpublisher_v3 0.10.0
google-apis-playcustomapp_v1 0.5.0
google-apis-iamcredentials_v1 0.6.0
google-apis-storage_v1 0.6.0
google-cloud-env 1.5.0
google-cloud-errors 1.1.0
google-cloud-core 1.6.0
google-cloud-storage 1.34.1
json 2.5.1
mini_magick 4.11.0
naturally 2.2.1
plist 3.6.0
rubyzip 2.3.2
security 0.1.3
simctl 1.6.8
terminal-notifier 2.0.0
unicode-display_width 1.7.0
terminal-table 1.8.0
tty-screen 0.8.1
tty-cursor 0.7.1
tty-spinner 0.9.3
word_wrap 1.0.0
nanaimo 0.3.0
xcodeproj 1.21.0
rouge 2.0.7
xcpretty 0.3.0
xcpretty-travis-formatter 1.0.1
fastlane-plugin-appcenter 1.11.1
fastlane-plugin-versioning 0.5.0

generated on: 2021-08-22

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Reactions: 32
  • Comments: 41 (9 by maintainers)

Most upvoted comments

📣 Sorry, everybody! I was traveling yesterday and I’m at the 360iDev conference this week but I’ll look into this today.

I’ll post an update when I have something 💪

❇️ OFFICIAL UPDATE 3

I got a PR available (with directions on how to test it out) that should provide a fix for this 🤞 If anybody having this issue test this out and let me know if things work or don’t work that would be ❤️

‼️ PLEASE LEAVE ALL FEEDBACK WHEN TESTING IN THE PR 😊

cc: @emartinez85 Do you mind testing this since you are really likely to run into the error? 😇

❇️ OFFICIAL UPDATE

It looks like the developer portal now has the following query params for filtering by ID 😬

{"urlEncodedQueryParams":"limit=1000&sort=name&filter[name]=com.joshholtz.bundle&filter[identifier]=com.joshholtz.bundle&filter[platform]=com.joshholtz.bundle","teamId":"972KS36P2U"}

The bundle identifier is being used on the name, identifier, and platform filter and I am not sure why 🤔 We were previously just using the identifier query param (which seems correct) but that doesn’t work anymore. The only way I could get it to work was by doing what the developer portal is doing by sending all three of those.

Sooooo… I’m making a PR that should safely try this if using Apple ID auth 🤷‍♂️

Hope to have this out in a few hours (I need to do some testing)

❇️ OFFICIAL UPDATE 2

I think I have a solution but this isn’t happening for me very often right now. I’ve nuked and recreated my certs about 15 times now trying to get this error to happen 😅

I have unit tests that I can use to verify this works but I’d like to make sure this works in practice 😀

Cutting a release for this now. Should be out in an hour or so 🤷‍♂️

okay, so for me i just had to keep trying and after like 5 tries it just worked on its own. it’s an intermittent issue

I just wanted to report the same issue, I getting this:

/usr/local/lib/ruby/gems/2.7.0/gems/json-2.5.1/lib/json/common.rb:216:in `parse': \e[31m[!] 809: unexpected token at '<HTML> (JSON::ParserError)
<HEAD>
<TITLE>Error</TITLE>
</HEAD>

<BODY BGCOLOR="white" FGCOLOR="black">
<H1>Error</H1>
<HR>

<FONT FACE="Helvetica,Arial"><B>
Description: Could not process this request.
</B></FONT>
<HR>
</BODY>
'\e[0m

The issue appears to be with Apple rather than fastlane itself. Logging into the developer portal and clicking around there are a lot of 502 errors thrown in the network tab and you can see the exact same error being thrown:

image

i.e. Apple throws a 502 which gives that generic HTML error page which fastlane can’t parse as the JSON it’s expecting to get from the request.

My guess is it’s some sort of outage even though the system status page isn’t reporting it yet.

Solved for us with version 2.192.0. 👏 @joshdholtz

Hi all, it seems…this is an Apple server-side issue, there’s nothing much we can do but let’s keep an 👀 wait for now. i m not the spaceship tool expert yet and as per the logs, it seems its failing in the spaceship tool

gems/fastlane-2.191.0/spaceship/lib/spaceship/connect_api/provisioning/provisioning.rb:199:in `get_profiles’

Tagging @joshdholtz for more updates! 🚀

Issue fixed on my side with 2.192.0, thank you @joshdholtz

@joshdholtz I can confirm that behavior as well. I have a large pool of provisioning profiles, 105, for a group of white label applications which sometimes will fail with match and other times not.

it worked for some time a few minutes ago but it stopped again. It’s fluctuating now.

I am also getting this in 2.191.0. It’s quite random. It sometimes happens after

bundle exec fastlane match

If I can get match to work by running that command again then I get the same error in the match phase with

bundle exec fastlane ios deploy

`[12:18:01]: 809: unexpected token at '<HTML>

<HEAD> <TITLE>Error</TITLE> </HEAD> <BODY BGCOLOR="white" FGCOLOR="black">

Error


<FONT FACE="Helvetica,Arial"> Description: Could not process this request. </FONT>


</BODY> '

±-----±-----------------±------------+ | fastlane summary | ±-----±-----------------±------------+ | Step | Action | Time (in s) | ±-----±-----------------±------------+ | 1 | default_platform | 0 | | 2 | update_fastlane | 1 | | 3 | setup_ci | 0 | | 💥 | match | 7 | ±-----±-----------------±------------+

[12:18:01]: fastlane finished with errors `