Skip to content

HOT_UPDATER_PRIVATE_KEY environment variable is not found when executing 'eas build' through 'git action'. #810

@ko-devHong

Description

@ko-devHong

Precheck

  • Infrastructure may have changed. Did you retry hot-updater init?
  • Is your Node version v20 or higher?
  • Are you aware that the update will only work properly if you hot-updater deploy after building the native app?

Name, Version of hot-updater

0.25.7

Version of react-native

0.81.5

Platforms

Android, iOS

Architecture

New Architecture(Fabric)

What provider are you seeing the problem on? (multiple)

S3 & Lambda

Expo App

  • I am using Expo
  • Project is managed with Expo CNG(android, ios directories are included in .gitignore)

Bundler

metro(hermes)

What happened?

HOT_UPDATER_PRIVATE_KEY environment variable is not found when executing 'eas build' through 'git action'.

# Store private key in EAS Secrets
eas env:create --name HOT_UPDATER_PRIVATE_KEY --value "$(cat keys/private-key.pem)"

I've already registered as an eas environment variable, but I still get the error.

Also I've already registered .easignore

Image

eas env setting building log

...
Environment secrets:
  EXPO_TOKEN=********
  HOT_UPDATER_PRIVATE_KEY=/home/expo/workingdir/eas-environment-secrets/2858530d3eacc9f231ca6a3ac339d37db4871032ae8f59f53243d3a1c2b846af
...

ios

» ios: name: "ios.infoPlist.CFBundleDisplayName" is set in the config. Ignoring abstract property "name": Ddocdoc
- Running prebuild
Running in CI environment, using environment variables directly
- Running prebuild
[hot-updater] WARNING: Failed to extract public key from HOT_UPDATER_PRIVATE_KEY:
error:1E08010C:DECODER routines::unsupported
- Running prebuild
✖ Prebuild failed
Error: [ios.infoPlist]: withIosInfoPlistBaseMod: [hot-updater] Failed to load public key for bundle signing.
Signing is enabled (signing.enabled: true) but no public key sources found.
For EAS builds, use EAS Secrets:
  eas env:create --name HOT_UPDATER_PRIVATE_KEY --value "$(cat keys/private-key.pem)"
Or add to eas.json:
  "env": { "HOT_UPDATER_PRIVATE_KEY": "-----BEGIN PRIVATE KEY-----\n..." }
For local development:
  npx hot-updater keys generate
Searched locations:
  - HOT_UPDATER_PRIVATE_KEY environment variable
  - Private key file: /Users/expo/workingdir/build/apps/example-app/keys/private-key.pem
  - Public key file: /Users/expo/workingdir/build/apps/example-app/keys/public-key.pem
Error: [ios.infoPlist]: withIosInfoPlistBaseMod: [hot-updater] Failed to load public key for bundle signing.
Signing is enabled (signing.enabled: true) but no public key sources found.
For EAS builds, use EAS Secrets:
  eas env:create --name HOT_UPDATER_PRIVATE_KEY --value "$(cat keys/private-key.pem)"
Or add to eas.json:
  "env": { "HOT_UPDATER_PRIVATE_KEY": "-----BEGIN PRIVATE KEY-----\n..." }
For local development:
  npx hot-updater keys generate
Searched locations:
  - HOT_UPDATER_PRIVATE_KEY environment variable
  - Private key file: /Users/expo/workingdir/build/apps/example-app/keys/private-key.pem
  - Public key file: /Users/expo/workingdir/build/apps/example-app/keys/public-key.pem
    at /Users/expo/workingdir/build/node_modules/@hot-updater/react-native/plugin/build/withHotUpdater.js:129:23
    at step (/Users/expo/workingdir/build/node_modules/@hot-updater/react-native/plugin/build/withHotUpdater.js:33:23)
    at Object.throw (/Users/expo/workingdir/build/node_modules/@hot-updater/react-native/plugin/build/withHotUpdater.js:14:53)
    at rejected (/Users/expo/workingdir/build/node_modules/@hot-updater/react-native/plugin/build/withHotUpdater.js:6:65)
pnpm expo prebuild --no-install --platform ios exited with non-zero code: 1

android

✖ Prebuild failed
Error: [android.strings]: withAndroidStringsBaseMod: [hot-updater] Failed to load public key for bundle signing.
Signing is enabled (signing.enabled: true) but no public key sources found.
For EAS builds, use EAS Secrets:
  eas env:create --name HOT_UPDATER_PRIVATE_KEY --value "$(cat keys/private-key.pem)"
Or add to eas.json:
  "env": { "HOT_UPDATER_PRIVATE_KEY": "-----BEGIN PRIVATE KEY-----\n..." }
For local development:
  npx hot-updater keys generate
Searched locations:
  - HOT_UPDATER_PRIVATE_KEY environment variable
  - Private key file: /home/expo/workingdir/build/apps/example-app/keys/private-key.pem
  - Public key file: /home/expo/workingdir/build/apps/example-app/keys/public-key.pem
Error: [android.strings]: withAndroidStringsBaseMod: [hot-updater] Failed to load public key for bundle signing.
Signing is enabled (signing.enabled: true) but no public key sources found.
For EAS builds, use EAS Secrets:
  eas env:create --name HOT_UPDATER_PRIVATE_KEY --value "$(cat keys/private-key.pem)"
Or add to eas.json:
  "env": { "HOT_UPDATER_PRIVATE_KEY": "-----BEGIN PRIVATE KEY-----\n..." }
For local development:
  npx hot-updater keys generate
Searched locations:
  - HOT_UPDATER_PRIVATE_KEY environment variable
  - Private key file: /home/expo/workingdir/build/apps/example-app/keys/private-key.pem
  - Public key file: /home/expo/workingdir/build/apps/example-app/keys/public-key.pem
    at /home/expo/workingdir/build/node_modules/@hot-updater/react-native/plugin/build/withHotUpdater.js:129:23
    at step (/home/expo/workingdir/build/node_modules/@hot-updater/react-native/plugin/build/withHotUpdater.js:33:23)
    at Object.throw (/home/expo/workingdir/build/node_modules/@hot-updater/react-native/plugin/build/withHotUpdater.js:14:53)
    at rejected (/home/expo/workingdir/build/node_modules/@hot-updater/react-native/plugin/build/withHotUpdater.js:6:65)
pnpm expo prebuild --no-install --platform android exited with non-zero code: 1

Relevant log output

Reproducible Sample Repository

No response

Code of Conduct

  • I agree to follow this project's Code of Conduct

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions