#22339·fastlane

Creating sandbox account via Spaceship fails with "The email is already being used" even if brand new email is used.

Author: may246Created Oct 11, 2024Updated Sep 23, 2026

New Issue Checklist

Issue Description

When attempting to create a sandbox tester via Fastlane Spaceship, our requests have recently started failing with an error stating that the email is already in use. However, the email is NOT in use, and the same error occurs even if I use a brand new real email address (e.g., a newly created gmail account), or a fake email that does not exist at all.

We believe this must be an issue related to Fastlane Spaceship because sandbox account creation works manually via the App Store Connect portal still, even with the exact same emails that fail for Spaceship. Is it possible we're being rate-limited and the error message shown by Spaceship is wrong? Or that the legacy APIs for creating sandbox accounts are finally being deprecated by Apple? (Worried this is the case...fingers crossed you guys have some alternative suggestions!)

Command executed

I've tried two different ways, both resulting in the same error:

    Spaceship::ConnectAPI::SandboxTester.create(
      first_name: 'Fastlane', # required
      last_name: 'Spaceship', # required
      email: email, # required
      password: password, # required. Must contain >=8 characters, >=1 uppercase, >=1 lowercase, >=1 numeric, >=1 symbol.
      confirm_password: password, # required
      secret_question: 'Question?', # required. Must contain >=6 characters
      secret_answer: 'Answer.', # required. Must contain >=6 characters
      birth_date: '1985-03-01', # required
      app_store_territory: territory # required
    )
    attributes = {}
    attributes["firstName"] = "Fastlane"
    attributes["lastName"] = "Spaceship"
    attributes["email"] = email
    attributes["password"] = password
    attributes["confirmPassword"] = password
    attributes["secretQuestion"] = "Question?"
    attributes["secretAnswer"] = "Answer."
    attributes["birthDate"] = "1985-03-01"
    attributes["appStoreTerritory"] = territory
    Spaceship::ConnectAPI.post_sandbox_tester(attributes: attributes)
Complete output when running fastlane, including the stack trace and command used
 
 /opt/homebrew/lib/ruby/gems/3.3.0/gems/fastlane-2.222.0/spaceship/lib/spaceship/connect_api/api_client.rb:223:in `handle_response': The provided entity includes an attribute with a value that has already been used - The email is already being used. - /data/attributes/EMAIL (Spaceship::UnexpectedResponse)                                                 
┃ 	from /opt/homebrew/lib/ruby/gems/3.3.0/gems/fastlane-2.222.0/spaceship/lib/spaceship/connect_api/api_client.rb:125:in `post'
┃ 	from /opt/homebrew/lib/ruby/gems/3.3.0/gems/fastlane-2.222.0/spaceship/lib/spaceship/connect_api/tunes/tunes.rb:1206:in `post_sandbox_tester'
┃ 	from /opt/homebrew/Cellar/ruby/3.3.4/lib/ruby/3.3.0/forwardable.rb:240:in `post_sandbox_tester'
┃ 	from sandbox.rb:85:in `create_sandbox_tester'
┃ 	from sandbox.rb:275:in `block (3 levels) in '
┃ 	from sandbox.rb:273:in `each'
┃ 	from sandbox.rb:273:in `each_with_index'
┃ 	from sandbox.rb:273:in `block (2 levels) in '
┃ 	from sandbox.rb:272:in `each'
┃ 	from sandbox.rb:272:in `block in '
┃ 	from /opt/homebrew/lib/ruby/gems/3.3.0/gems/cli-ui-2.2.3/lib/cli/ui/frame.rb:126:in `open'
┃ 	from sandbox.rb:202:in `'

Environment

fastlane environment

Stack

Key Value
OS 14.6.1
Ruby 3.3.4
Bundler? false
Git git version 2.33.0
Installation Source /opt/homebrew/lib/ruby/gems/3.3.0/bin/fastlane
Host macOS 14.6.1 (23G93)
Ruby Lib Dir /opt/homebrew/Cellar/ruby/3.3.4/lib
OpenSSL Version OpenSSL 3.3.1 4 Jun 2024
Is contained false
Is homebrew false
Is installed via Fabric.app false
Xcode Path /Applications/Xcode.app/Contents/Developer/
Xcode Version 15.4
Swift Version 5.10

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.222.0 Update available

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 6.0.1
addressable 2.8.7
artifactory 3.0.17
babosa 1.0.4
colored 1.2
highline 2.0.3
commander 4.6.0
dotenv 2.8.1
emoji_regex 3.2.3
excon 0.111.0
faraday-em_http 1.0.0
faraday-em_synchrony 1.0.0
faraday-excon 1.1.0
faraday-httpclient 1.0.1
faraday-multipart 1.0.4
faraday-net_http 1.0.2
faraday-net_http_persistent 1.2.0
faraday-patron 1.0.0
faraday-rack 1.0.0
faraday-retry 1.0.3
faraday 1.10.3
faraday_middleware 1.2.0
faraday-cookie_jar 0.0.7
fastimage 2.3.1
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.8.2
multi_json 1.15.0
os 1.1.4
signet 0.19.0
googleauth 1.8.1
httpclient 2.8.3
google-apis-core 0.11.3
google-apis-androidpublisher_v3 0.54.0
google-apis-playcustomapp_v1 0.13.0
google-cloud-env 1.6.0
google-apis-iamcredentials_v1 0.17.0
google-apis-storage_v1 0.31.0
digest-crc 0.6.5
google-cloud-storage 1.47.0
mini_magick 4.13.2
naturally 2.2.1
plist 3.7.1
rubyzip 2.3.2
security 0.1.5
simctl 1.6.10
terminal-notifier 2.0.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
rouge 2.0.7
xcpretty 0.3.0
xcpretty-travis-formatter 1.0.1
set 1.1.0
aws-eventstream 1.3.0
aws-sigv4 1.9.1
aws-partitions 1.966.0
jmespath 1.6.2
aws-sdk-core 3.201.5
aws-sdk-kms 1.88.0
aws-sdk-s3 1.159.0
bundler 2.5.16
base64 0.2.0
nkf 0.2.0
strscan 3.1.0
rexml 3.3.5
CFPropertyList 3.0.7
multipart-post 2.4.1
ruby2_keywords 0.0.5
domain_name 0.6.20240107
http-cookie 1.0.7
google-cloud-errors 1.4.0
google-cloud-core 1.7.1
rake 13.2.1
json 2.7.2
optparse 0.5.0
unicode-display_width 2.5.0
nanaimo 0.3.0
colored2 3.1.2
claide 1.1.0
atomos 0.1.3
xcodeproj 1.25.0
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
stringio 3.1.1
securerandom 0.3.1
uri 0.13.0
ipaddr 1.2.6
openssl 3.2.0
digest 3.1.1
io-nonblock 0.3.0
zlib 3.1.1
resolv 0.4.0
io-wait 0.3.1
time 0.3.0
open-uri 0.4.1
mutex_m 0.2.0
net-http 0.4.1
net-protocol 0.2.2
english 0.8.0
erb 4.0.4
abbrev 0.1.2
io-console 0.7.2
tempfile 0.2.1
delegate 0.3.1
fileutils 1.7.2
tmpdir 0.2.0
singleton 0.2.0
open3 0.2.1
prettyprint 0.2.0
pp 0.5.0
find 0.2.0
ostruct 0.6.0
yaml 0.3.0
psych 5.1.2
bigdecimal 3.1.8

generated on: 2024-10-11