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

get_cert_info: path name contains null byte #20489

Closed
4 tasks done
ff-ahumberston opened this issue Jul 20, 2022 · 8 comments · Fixed by #20497
Closed
4 tasks done

get_cert_info: path name contains null byte #20489

ff-ahumberston opened this issue Jul 20, 2022 · 8 comments · Fixed by #20497

Comments

@ff-ahumberston
Copy link

New Issue Checklist

Issue Description

Receiving 'ERROR [2022-07-20 09:52:59.80]: get_cert_info: path name contains null byte'

Command executed

bundle exec fastlane match development --team_id xxx --username yyy@zzz.com --verbose

Complete output when running fastlane, including the stack trace and command used

Output trimmed, as very long -
INFO [2022-07-20 09:57:24.36]: 🔓 Decrypted 'AdHoc_com.xxx.yyy.mobileprovision'
INFO [2022-07-20 09:57:24.36]: 🔓 Successfully decrypted certificates repo
INFO [2022-07-20 09:57:24.36]: Verifying that the certificate and profile are still valid on the Dev Portal...
Reading keychain entry, because either user or password were empty
Loading session from '/Users/aaaa/.fastlane/spaceship/xxx@yyy.com/cookie'
Available session is not valid any more. Continuing with normal login.

+-------------------+-------------------------------------------------+
| Installed Certificate |
+-------------------+-------------------------------------------------+
| User ID | 12345 |
| Common Name | Apple Development: Acme User |
| Organisation Unit | 54321 |
| Organisation | Acme |
| Country | US |
| Start Datetime | 2022-07-19 22:22:39 UTC |
| End Datetime | 2023-07-19 22:22:38 UTC |
+-------------------+-------------------------------------------------+

INFO [2022-07-20 09:58:29.75]: Installing provisioning profile...
WARN [2022-07-20 09:58:34.18]: Setting environment variable 'sigh_com.xxx._development' to '1cb624e7-f42b-45ab-98b1-57246599e76c'
WARN [2022-07-20 09:58:34.18]: Setting environment variable 'sigh_com.xxx.
_development_team-id' to '9H95BT9Q8V'
ERROR [2022-07-20 09:58:34.18]: get_cert_info: path name contains null byte
WARN [2022-07-20 09:58:34.18]: Setting environment variable 'sigh_com.xxx._development_certificate-name' to ''
WARN [2022-07-20 09:58:34.18]: Setting environment variable 'sigh_com.xxx.
_development_profile-name' to 'match Development com.fullfat.'
WARN [2022-07-20 09:58:34.18]: Setting environment variable 'sigh_com.xxx.
_development_profile-path' to '/Users/aaaa/Library/MobileDevice/Provisioning Profiles/1cb624e7-f42b-45ab-98b1-57246599e76c.mobileprovision'

Receiving the error path name contains null byte, looks to be connected to 
   Setting environment variable 'sigh_com.xxx.*_development_certificate-name' to ''
 

Environment

@getaaron
Copy link
Collaborator

Thanks for the report, this looks safe to ignore but should be fixed

I think it was introduced in #20187

@tejassharma96 would you be able to take a look?

@getaaron
Copy link
Collaborator

I believe it's emitted by the File.exists? check, e.g.

irb(main):007:0> File.exist?("/etc/hosts\x00")
Traceback (most recent call last):
	20: from /Users/aaron/.rbenv/versions/2.7.4/bin/irb:23:in `<main>'
	19: from /Users/aaron/.rbenv/versions/2.7.4/bin/irb:23:in `load'
	18: from /Users/aaron/.rbenv/versions/2.7.4/lib/ruby/gems/2.7.0/gems/irb-1.4.1/exe/irb:11:in `<top (required)>'
	 1: from (irb):7:in `<main>'

@Dids
Copy link

Dids commented Jul 21, 2022

Also getting this when running bundle exec fastlane run match init, however the fastlane/Matchfile never gets created, which I'm assuming is from this error.

EDIT: Tried creating the fastlane/Matchfile manually, and it seems to generate new certificates for every app identifier I've specified, as well as uploads them back to the certificates repository, however it never imports them locally, so they're not available in Xcode etc.

Never mind! My issue was using fastlane run match ... instead of fastlane match ..., and now I can confirm that the error is purely visual after all. 👍🏻

@carlosen14
Copy link

i dont know on which version this fix will be released, but still happening on 2.208.0 when running bundle exec fastlane match appstoreplacing

@getaaron
Copy link
Collaborator

@carlosen14 thanks for the ping, we'll try to get a release out later tonight if we can swing it

@carlosen14
Copy link

carlosen14 commented Aug 11, 2022 via email

@fastlane-bot
Copy link

The pull request #20497 that closed this issue was merged and released as part of fastlane 2.209.0 🚀
Please let us know if the functionality works as expected as a reply here. If it does not, please open a new issue. Thanks!

@pedromassango
Copy link

This happens when you use a EMPTY STRING as your keychain password when prompted by Fastlane. You can fix by providing a non-empty string, by that I mean DON'T just press enter when prompted to type a password for the keychain.

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

Successfully merging a pull request may close this issue.

6 participants