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

Cannot write in $RUNNER_TEMP #3028

Closed
mmorier opened this issue Dec 7, 2023 · 2 comments
Closed

Cannot write in $RUNNER_TEMP #3028

mmorier opened this issue Dec 7, 2023 · 2 comments
Labels
bug Something isn't working

Comments

@mmorier
Copy link

mmorier commented Dec 7, 2023

Describe the bug
I used Github Actions on macos runners for buillding and siging iOS applications.
I follow this documentation and it works perfectly on runners macos-latest. If I set macos-13 because I need Xcode 15, I have the following error :

  shell: /bin/bash -e {0}
  env:
    CERTIFICATE_BASE64: ***  
    P12_PASSWORD: ***
    KEYCHAIN_PASSWORD: ***
    MD_APPLE_SDK_ROOT: /Applications/Xcode_15.0.1.app
base64: invalid argument --output
Usage:	base64 [-hDd] [-b num] [-i in_file] [-o out_file]
  -h, --help     display this message
  -Dd, --decode   decodes input
  -b, --break    break encoded string into num character lines
  -i, --input    input file (default: "-" for stdin)
  -o, --output   output file (default: "-" for stdout)
security: Error reading infile /Users/runner/work/_temp/certificate.p12: No such file or directory

If I run the same script on macos-latest runner, everything is OK and I have the following log :

   shell: /bin/bash -e {0}
  env:
    CERTIFICATE_BASE64: ***
    P12_PASSWORD: ***
    KEYCHAIN_PASSWORD: ***
1 identity imported.

If I display $CERTIFICATE_PATH (CERTIFICATE_PATH=$RUNNER_TEMP/certificate.p12), it displays the same path (/Users/runner/work/_temp/certificate.p12) for both runners but it seems macos-13 runner has not the same rights to allow base64` command writing in it.

So I am totally blocked to build a new signed IPA because I need Xcode 15 and it fails because no certificate can be installed in the keychain for signing the IPA.

I tried to create file with the command touch $CERTIFICATE_PATH and I have no issue with this command but after base64 cannot did its job :

 base64: invalid argument --output
Usage:	base64 [-hDd] [-b num] [-i in_file] [-o out_file]
  -h, --help     display this message
  -Dd, --decode   decodes input
  -b, --break    break encoded string into num character lines
  -i, --input    input file (default: "-" for stdin)
  -o, --output   output file (default: "-" for stdout)
security: SecKeychainItemImport: One or more parameters passed to a function were not valid.

To Reproduce
Steps to reproduce the behavior:

  1. follow https://docs.github.com/en/actions/deployment/deploying-xcode-applications/installing-an-apple-certificate-on-macos-runners-for-xcode-development#add-a-step-to-your-workflow
  2. execute the step Install the Apple certificate and provisioning profile on macos-13 runner, checked everything works on macos-12 runnerExpected behavior
   shell: /bin/bash -e {0}
  env:
    CERTIFICATE_BASE64: ***
    P12_PASSWORD: ***
    KEYCHAIN_PASSWORD: ***
1 identity imported.

Runner Version and Platform

Image: macos-13
Version: 20231025.2

What's not working?

  shell: /bin/bash -e {0}
  env:
    CERTIFICATE_BASE64: ***  
    P12_PASSWORD: ***
    KEYCHAIN_PASSWORD: ***
    MD_APPLE_SDK_ROOT: /Applications/Xcode_15.0.1.app
base64: invalid argument --output
Usage:	base64 [-hDd] [-b num] [-i in_file] [-o out_file]
  -h, --help     display this message
  -Dd, --decode   decodes input
  -b, --break    break encoded string into num character lines
  -i, --input    input file (default: "-" for stdin)
  -o, --output   output file (default: "-" for stdout)
security: Error reading infile /Users/runner/work/_temp/certificate.p12: No such file or directory
@mmorier mmorier added the bug Something isn't working label Dec 7, 2023
@mmorier
Copy link
Author

mmorier commented Dec 28, 2023

For those who will have the same issue, base64 seems different between macos-latest and macos-13 runner image. On macos-13, the argument --output does not work but -o perfectly works.
Very strange because the help indicates it is the same...

@andrewescutia
Copy link

as reference it appears that it was adjusted here: github/docs#22970

@mmorier mmorier closed this as completed Feb 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants