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

[match] cannot create new provisioning profiles for Mac/Catalyst since 2.218.0 #21837

Open
4 tasks done
greatcat19 opened this issue Jan 30, 2024 · 10 comments
Open
4 tasks done

Comments

@greatcat19
Copy link

New Regression Checklist

Regression Information

  • Breaking version: 2.218.0
  • Last working version: 2.217.0

Regression Description

Fastlane Error for creating new provisioning profiles for mac / catalyst apps.

2.218.0:

[22:02:57]: Error setting value '[]' for option 'cached_devices'
+-----------------------------------------------+
|                 Lane Context                  |
+------------------+----------------------------+
| DEFAULT_PLATFORM | ios                        |
| PLATFORM_NAME    | mac                        |
| LANE_NAME        | mac configure_code_signing |
+------------------+----------------------------+
[22:02:57]: cached_devices parameter must be a non-empty array of Spaceship::ConnectAPI::Device

+---------------------------------------+
|           fastlane summary            |
+------+------------------+-------------+
| Step | Action           | Time (in s) |
+------+------------------+-------------+
| 1    | default_platform | 0           |
| 2    | setup_ci         | 0           |
| 💥   | match            | 14          |
+------+------------------+-------------+

[22:02:57]: fastlane finished with errors

[!] cached_devices parameter must be a non-empty array of Spaceship::ConnectAPI::Device

2.219.0:

There are no current MAC_OS devices on this team matching the provided device IDs
Complete output when running fastlane, including the stack trace and command used
[INSERT OUTPUT HERE]

Environment

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

Loaded fastlane plugins:

Plugin Version Update-Status
fastlane-plugin-swiftformat 0.3.0 ✅ Up-To-Date
Loaded gems
Gem Version
error_highlight 0.3.0
did_you_mean 1.6.1
bundler 2.2.32
pathname 0.2.0
rake 13.1.0
rexml 3.2.6
CFPropertyList 3.0.6
base64 0.2.0
bigdecimal 3.1.6
concurrent-ruby 1.2.3
connection_pool 2.4.1
ruby2_keywords 0.0.5
drb 2.2.0
i18n 1.14.1
minitest 5.21.2
mutex_m 0.2.0
tzinfo 2.0.6
activesupport 7.1.3
public_suffix 4.0.7
addressable 2.8.6
httpclient 2.8.3
json 2.7.1
algoliasearch 1.27.5
artifactory 3.0.15
atomos 0.1.3
aws-eventstream 1.3.0
aws-partitions 1.883.0
aws-sigv4 1.8.0
jmespath 1.6.2
aws-sdk-core 3.190.3
aws-sdk-kms 1.76.0
aws-sdk-s3 1.142.0
babosa 1.0.4
claide 1.1.0
fuzzy_match 2.0.4
nap 1.1.0
netrc 0.11.0
ffi 1.16.3
ethon 0.16.0
typhoeus 1.4.1
cocoapods-core 1.14.3
cocoapods-deintegrate 1.0.5
cocoapods-downloader 2.1
cocoapods-plugins 1.0.0
cocoapods-search 1.0.1
cocoapods-trunk 1.6.0
cocoapods-try 1.2.0
colored2 3.1.2
escape 0.0.4
fourflusher 2.3.1
gh_inspector 1.1.3
molinillo 0.8.0
ruby-macho 2.5.1
nanaimo 0.3.0
xcodeproj 1.23.0
cocoapods 1.14.3
colored 1.2
highline 2.0.3
commander 4.6.0
declarative 0.0.20
digest-crc 0.6.5
domain_name 0.6.20240107
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
faraday 1.10.3
http-cookie 1.0.5
faraday-cookie_jar 0.0.7
faraday_middleware 1.2.0
fastimage 2.3.0
jwt 2.7.1
multi_json 1.15.0
os 1.1.4
signet 0.18.0
googleauth 1.8.1
mini_mime 1.1.5
trailblazer-option 0.1.2
uber 0.1.0
representable 3.2.0
retriable 3.1.2
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
google-cloud-errors 1.3.1
google-cloud-core 1.6.1
google-cloud-storage 1.47.0
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
rouge 2.0.7
xcpretty 0.3.0
xcpretty-travis-formatter 1.0.1
fastlane-plugin-swiftformat 0.3.0
http-accept 1.7.0
mime-types-data 3.2023.1205
mime-types 3.5.2
rest-client 2.1.0
xcode-install 2.8.1
@lacostej
Copy link
Collaborator

lacostej commented Jan 31, 2024

@greatcat19 What command are you running?

@nekrich an idea?

@greatcat19
Copy link
Author

greatcat19 commented Feb 3, 2024

something like

$ bundle e fastlane match development --platform catalyst

My lane:

def perform_match(type)
  platform = lane_context[:PLATFORM_NAME]
  # https://docs.fastlane.tools/actions/match/#match
  match_platform = platform == :ios ? 'ios' : 'catalyst'
  match(
    type: type,
    team_id: TEAM_ID,
    api_key_path: ASC_KEY_PATH, # comment me out when readonly is false
    app_identifier: MAIN_IDENTIFIERS,
    platform: match_platform,
    additional_cert_types: type == 'developer_id' ? 'developer_id_installer' : nil,
  )
end

desc 'This lane downloads and configures the code signing certificates and profiles.'
lane :configure_code_signing do |options|
  perform_match('appstore') if options[:appstore] == true
  perform_match('development') if options[:development] == true
end

@lacostej
Copy link
Collaborator

Could you run VERBOSE=true bundle e fastlane match development --platform catalystand also put more of your output so we see where it fails? Thanks.

@Schlabbi
Copy link

Schlabbi commented Feb 18, 2024

Running into the same problem right now.

[19:37:59]: Creating new provisioning profile for 'redacted' with name 'match Development redacted catalyst' for 'catalyst' platform
INFO  [19:38:00]: >> POST profiles: {"data":{"attributes":{"name":"match Development redacted catalyst","profileType":"MAC_CATALYST_APP_DEVELOPMENT","templateName":null,"teamId":"redacted"},"type":"profiles","relationships":{"bundleId":{"data":{"type":"bundleIds","id":"redacted"}},"certificates":{"data":[{"type":"certificates","id":"redacted"}]},"devices":{"data":[]}}}} 
DEBUG [19:38:00]: << POST profiles: 409 {
  "errors" : [ {
    "id" : "redacted",
    "status" : "409",
    "code" : "ENTITY_ERROR",
    "title" : "There is a problem with the request entity",
    "resultCode" : 35,
    "detail" : "There are no current MAC_OS devices on this team matching the provided device IDs."
  } ]
}

This seems to be the relevant part.

@lacostej
Copy link
Collaborator

@Schlabbi can you confirm that the devices array is indeed empty in the POST request body?

Can you try with fastlane 2.217 and see if the request has the same content? Thanks

@lacostej
Copy link
Collaborator

I am getting the same issue for iOS adhoc profiles with fastlane 2.216 when I don't have devices registered in my portal. Maybe the issue is that development profiles cannot be created without having device in the portal? I haven't tried doing it by hand.

@Schlabbi
Copy link

@Schlabbi can you confirm that the devices array is indeed empty in the POST request body?

Can you try with fastlane 2.217 and see if the request has the same content? Thanks

It works with 2.217. And yes, the devices array is indeed empty in the POST request. On 2.217 the array is not empty and it seems to work just fine.

@lacostej
Copy link
Collaborator

lacostej commented Feb 23, 2024

I suspect it is due to the integration of the Cache. @nekrich an idea?

@Schlabbi you can confirm if the cache is indeed the culprit by testing fastlane at the following commits

4eb636f before the cache
a3715d6 after

another thing that could be helpful would be to run your both 2.217 and 2.218 in verbose mode. and compare the queries. In particular I am interested in this code:

https://github.com/fastlane/fastlane/pull/21694/files#diff-a3f19787d89fdd5a42fc5c085d1273811c4ca0dc6f25623eb5907dcfdf43ba2fR113-R136

It should trigger a query of the existing devices, but then it filters them out. I wonder if that's what is causing the array to be empty afterwards.

@Simonas-Juska
Copy link

Ran into the same issue on 2.219, downgrading to 2.217 helped.

@ffittschen
Copy link
Contributor

@lacostej I just tested the two commits you mentioned

4eb636f works as expected (devices array in POST is not empty)
a3715d6 returns unrelated error
5ca4eb7 contains fix for error and sends empty devices array in POST
9ae433c works as expected (devices array in POST is not empty)

This means #21915, which is on main since two weeks fixed this issue.

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

No branches or pull requests

5 participants