Coder Social home page Coder Social logo

Comments (13)

ming-chu avatar ming-chu commented on April 26, 2024 8

I got the similar error

/Users/me/.gem/gems/fastlane-2.211.0/spaceship/lib/spaceship/connect_api/token.rb:71:in `initialize': \e[31m[!] invalid curve name\e[0m (OpenSSL::PKey::ECError)

In my case, I feed the key using the env variable which has the error:
APP_STORE_CONNECT_API_KEY_KEY=-----BEGIN PRIVATE KEY----\nbalalllaalal\n-----END PRIVATE KEY-----

And it works after adding the double quote:
APP_STORE_CONNECT_API_KEY_KEY="-----BEGIN PRIVATE KEY----\nbalalllaalal\n-----END PRIVATE KEY-----"

Hope this help or is a clue to fix the issue.

from fastlane.

samkahchiin avatar samkahchiin commented on April 26, 2024 6

I got similar error.
Make sure the APP_STORE_CONNECT_API_KEY_KEY has the trailing \n.
In my case, we store the key in a Password Manager and clicking copy on the field doesn't copy some \n.

This is the ruby code that throw this error. For those who faced this issue, you can try this in your irb until you figure out what is wrong with your key.

OpenSSL::PKey::EC.new(key)

from fastlane.

blyscuit avatar blyscuit commented on April 26, 2024 5

You can use is_key_content_base64 from fastlane. app_store_connect_api_key which does not show the same error as the non-base64 version.

app_store_connect_api_key(
  key_id: "D83848D23",
  issuer_id: "227b0bbf-ada8-458c-9d62-3d8022b7d07f",
  key_content: "Base64_encode_of_-----BEGIN EC PRIVATE KEY-----\nfewfawefawfe\n-----END EC PRIVATE KEY-----",
  is_key_content_base64: true
)

from fastlane.

bonkowski avatar bonkowski commented on April 26, 2024 2

Well, to not get stuck, I edited the token.rb and assigned the value of my private key into the key variable after line 62 πŸ€¦πŸ»β€β™‚οΈ

from fastlane.

fastlane-bot avatar fastlane-bot commented on April 26, 2024

It seems like you have not included the output of fastlane env
To make it easier for us help you resolve this issue, please update the issue to include the output of fastlane env πŸ‘

from fastlane.

VitalikKizlov avatar VitalikKizlov commented on April 26, 2024

Also can confirm that. I'm using the same Using fastlane 2.209.0 version and tried everything but error is still the same

from fastlane.

VitalikKizlov avatar VitalikKizlov commented on April 26, 2024

`[12:52:03]: ------------------------------
[12:52:03]: --- Step: default_platform ---
[12:52:03]: ------------------------------
[12:52:03]: Driving the lane 'ios closed_beta' πŸš€
[12:52:03]: -----------------------------
[12:52:03]: --- Step: delete_keychain ---
[12:52:03]: -----------------------------
[12:52:03]: -----------------------------
[12:52:03]: --- Step: create_keychain ---
[12:52:03]: -----------------------------
[12:52:03]: $ security list-keychains -d user
[12:52:03]: β–Έ "/Users/vitaliikizlov/Library/Keychains/login.keychain-db"
[12:52:03]: ---------------------------------------
[12:52:03]: --- Step: app_store_connect_api_key ---
[12:52:03]: ---------------------------------------
+------------------+----------------------------+
| Lane Context |
+------------------+----------------------------+
| DEFAULT_PLATFORM | ios |
| PLATFORM_NAME | ios |
| LANE_NAME | ios closed_beta |
| KEYCHAIN_PATH | ~/Library/Keychains/Quartr |
+------------------+----------------------------+
[12:52:03]: invalid curve name

+------+---------------------------+-------------+
| fastlane summary |
+------+---------------------------+-------------+
| Step | Action | Time (in s) |
+------+---------------------------+-------------+
| 1 | default_platform | 0 |
| 2 | delete_keychain | 0 |
| 3 | create_keychain | 0 |
| πŸ’₯ | app_store_connect_api_key | 0 |
+------+---------------------------+-------------+

[12:52:03]: fastlane finished with errors

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

➑️ invalid curve name after brew upgrade?
#20553 [open] 1 πŸ’¬
a week ago

➑️ Pilot fails using environment variables on GitHub
#18655 [closed] 13 πŸ’¬
09 May 2022

➑️ Pilot and deliver fails with "string contains null byte"
#18312 [closed] 7 πŸ’¬
12 Jul 2021

and 4 more at: https://github.com/fastlane/fastlane/search?q=invalid%20curve%20name&type=Issues&utf8=βœ“

πŸ”— You can ⌘ + double-click on links to open them directly in your browser.
bundler: failed to load command: fastlane (/usr/local/bin/fastlane)
/Library/Ruby/Gems/2.6.0/gems/fastlane-2.209.0/spaceship/lib/spaceship/connect_api/token.rb:71:in initialize': [!] invalid curve name (OpenSSL::PKey::ECError) from /Library/Ruby/Gems/2.6.0/gems/fastlane-2.209.0/spaceship/lib/spaceship/connect_api/token.rb:71:in new'
from /Library/Ruby/Gems/2.6.0/gems/fastlane-2.209.0/spaceship/lib/spaceship/connect_api/token.rb:71:in create' from /Library/Ruby/Gems/2.6.0/gems/fastlane-2.209.0/fastlane/lib/fastlane/actions/app_store_connect_api_key.rb:43:in run'
from /Library/Ruby/Gems/2.6.0/gems/fastlane-2.209.0/fastlane/lib/fastlane/runner.rb:263:in block (2 levels) in execute_action' from /Library/Ruby/Gems/2.6.0/gems/fastlane-2.209.0/fastlane/lib/fastlane/actions/actions_helper.rb:69:in execute_action'
from /Library/Ruby/Gems/2.6.0/gems/fastlane-2.209.0/fastlane/lib/fastlane/runner.rb:255:in block in execute_action' from /Library/Ruby/Gems/2.6.0/gems/fastlane-2.209.0/fastlane/lib/fastlane/runner.rb:229:in chdir'
from /Library/Ruby/Gems/2.6.0/gems/fastlane-2.209.0/fastlane/lib/fastlane/runner.rb:229:in execute_action' from /Library/Ruby/Gems/2.6.0/gems/fastlane-2.209.0/fastlane/lib/fastlane/runner.rb:157:in trigger_action_by_name'
from /Library/Ruby/Gems/2.6.0/gems/fastlane-2.209.0/fastlane/lib/fastlane/fast_file.rb:159:in method_missing' from Fastfile:54:in block (2 levels) in parsing_binding'
from /Library/Ruby/Gems/2.6.0/gems/fastlane-2.209.0/fastlane/lib/fastlane/lane.rb:33:in call' from /Library/Ruby/Gems/2.6.0/gems/fastlane-2.209.0/fastlane/lib/fastlane/runner.rb:49:in block in execute'
from /Library/Ruby/Gems/2.6.0/gems/fastlane-2.209.0/fastlane/lib/fastlane/runner.rb:45:in chdir' from /Library/Ruby/Gems/2.6.0/gems/fastlane-2.209.0/fastlane/lib/fastlane/runner.rb:45:in execute'
from /Library/Ruby/Gems/2.6.0/gems/fastlane-2.209.0/fastlane/lib/fastlane/lane_manager.rb:47:in cruise_lane' from /Library/Ruby/Gems/2.6.0/gems/fastlane-2.209.0/fastlane/lib/fastlane/command_line_handler.rb:36:in handle'
from /Library/Ruby/Gems/2.6.0/gems/fastlane-2.209.0/fastlane/lib/fastlane/commands_generator.rb:110:in block (2 levels) in run' from /Library/Ruby/Gems/2.6.0/gems/commander-4.6.0/lib/commander/command.rb:187:in call'
from /Library/Ruby/Gems/2.6.0/gems/commander-4.6.0/lib/commander/command.rb:157:in run' from /Library/Ruby/Gems/2.6.0/gems/commander-4.6.0/lib/commander/runner.rb:444:in run_active_command'
from /Library/Ruby/Gems/2.6.0/gems/fastlane-2.209.0/fastlane_core/lib/fastlane_core/ui/fastlane_runner.rb:124:in run!' from /Library/Ruby/Gems/2.6.0/gems/commander-4.6.0/lib/commander/delegates.rb:18:in run!'
from /Library/Ruby/Gems/2.6.0/gems/fastlane-2.209.0/fastlane/lib/fastlane/commands_generator.rb:354:in run' from /Library/Ruby/Gems/2.6.0/gems/fastlane-2.209.0/fastlane/lib/fastlane/commands_generator.rb:43:in start'
from /Library/Ruby/Gems/2.6.0/gems/fastlane-2.209.0/fastlane/lib/fastlane/cli_tools_distributor.rb:123:in take_off' from /Library/Ruby/Gems/2.6.0/gems/fastlane-2.209.0/bin/fastlane:23:in <top (required)>'
from /usr/local/bin/fastlane:23:in load' from /usr/local/bin/fastlane:23:in <top (required)>'
from /Library/Ruby/Gems/2.6.0/gems/bundler-2.3.20/lib/bundler/cli/exec.rb:58:in load' from /Library/Ruby/Gems/2.6.0/gems/bundler-2.3.20/lib/bundler/cli/exec.rb:58:in kernel_load'
from /Library/Ruby/Gems/2.6.0/gems/bundler-2.3.20/lib/bundler/cli/exec.rb:23:in run' from /Library/Ruby/Gems/2.6.0/gems/bundler-2.3.20/lib/bundler/cli.rb:485:in exec'
from /Library/Ruby/Gems/2.6.0/gems/bundler-2.3.20/lib/bundler/vendor/thor/lib/thor/command.rb:27:in run' from /Library/Ruby/Gems/2.6.0/gems/bundler-2.3.20/lib/bundler/vendor/thor/lib/thor/invocation.rb:127:in invoke_command'
from /Library/Ruby/Gems/2.6.0/gems/bundler-2.3.20/lib/bundler/vendor/thor/lib/thor.rb:392:in dispatch' from /Library/Ruby/Gems/2.6.0/gems/bundler-2.3.20/lib/bundler/cli.rb:31:in dispatch'
from /Library/Ruby/Gems/2.6.0/gems/bundler-2.3.20/lib/bundler/vendor/thor/lib/thor/base.rb:485:in start' from /Library/Ruby/Gems/2.6.0/gems/bundler-2.3.20/lib/bundler/cli.rb:25:in start'
from /Library/Ruby/Gems/2.6.0/gems/bundler-2.3.20/exe/bundle:48:in block in <top (required)>' from /Library/Ruby/Gems/2.6.0/gems/bundler-2.3.20/lib/bundler/friendly_errors.rb:120:in with_friendly_errors'
from /Library/Ruby/Gems/2.6.0/gems/bundler-2.3.20/exe/bundle:36:in <top (required)>' from /usr/local/bin/bundle:23:in load'
from /usr/local/bin/bundle:23:in <main>'

from fastlane.

nikki-cat avatar nikki-cat commented on April 26, 2024

I had the same error.
I did a workaround where i used a filepath to the actual .p8 file instead..

from fastlane.

itsnaidu avatar itsnaidu commented on April 26, 2024

@bonkowski Did you get any workaround for it? I too was facing the similar issue.

from fastlane.

fastlane-bot avatar fastlane-bot commented on April 26, 2024

There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates.

Please make sure to update to the latest fastlane version and check if that solves the issue. Let us know if that works for you by adding a comment πŸ‘

Friendly reminder: contributions are always welcome! Check out CONTRIBUTING.md for more information on how to help with fastlane and feel free to tackle this issue yourself πŸ’ͺ

This issue will be auto-closed if there is no reply within 1 month.

from fastlane.

aendel avatar aendel commented on April 26, 2024

Nevertheless it's a workaround, thanks to @blyscuit , I made it work.

from fastlane.

sinisa503 avatar sinisa503 commented on April 26, 2024

Is there any progress with this?
We are having issues with this for a last 2 or 3 weeks.
Here are some error logs...

/usr/local/lib/ruby/gems/3.1.0/gems/fastlane-2.211.0/spaceship/lib/spaceship/connect_api/token.rb:71:in initialize': \e[31m[!] invalid curve name\e[0m (OpenSSL::PKey::ECError) from /usr/local/lib/ruby/gems/3.1.0/gems/fastlane-2.211.0/spaceship/lib/spaceship/connect_api/token.rb:71:in new'
from /usr/local/lib/ruby/gems/3.1.0/gems/fastlane-2.211.0/spaceship/lib/spaceship/connect_api/token.rb:71:in `create'

from fastlane.

ttruongatl avatar ttruongatl commented on April 26, 2024

In our project, we've chosen to safeguard the .p8 key file by storing it within Azure KeyVault as a secret. To effectively manage the key while ensuring it remains unaltered, we've adopted a base64 encoding strategy prior to its storage. The steps to reproduce our approach are detailed below:

Storing the .p8 Key File in Azure KeyVault:

Step 1: First, base64 encode the key file:

base64 -i ios/AuthKey_ABCDEFGH.p8 > encoded.txt

Step 2: Manually copy the content from encoded.txt and save it as a secret within Azure KeyVault.

Retrieving and Decoding the Key within a GitHub Actions Workflow:

Step 1: Fetch the base64-encoded key from Azure KeyVault:

az keyvault secret show --name <SECRET_NAME> --vault-name <KEYVAULT_NAME> --query "value" | tr -d '"' > encoded.txt

Step 2: Decode the fetched base64 content to retrieve the original .p8 key:

base64 -D -i encoded.txt > ios/AuthKey_ABCDEFGH.p8

from fastlane.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.