-
Notifications
You must be signed in to change notification settings - Fork 89
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
eas build --local doesn't work with google services files #1253
Comments
secrets do not work with local builds, you will need to set GOOGLE_SERVICES_IOS_BASE64 and GOOGLE_SERVICES_ANDROID_BASE64 in your shell |
@wkozyra95 But even with the files in my local directory (so that I don't have to do the decoding of GOOGLE_SERVICES_IOS_BASE64 and GOOGLE_SERVICES_ANDROID_BASE64 ), if I run The error output I added in Local iOS Error is the result of building a local project with both services files in the directory they're supposed to be, or the build wouldn't even start because the cli would complain that i don' have the files specified in // app.json
{
"expo": {
...
"ios": {
...
"googleServicesFile": "./GoogleService-Info.plist",
},
"android": {
"googleServicesFile": "./google-services.json",
...
},
}
} So I don't think its just a problem with the secrets not being processed by |
when running local builds the same rules apply as for cloud builds, gitignored files are not part of the build |
@wkozyra95 oh ok thank you! so if I want to make this work how can I do it? is there a way to make these files included by eas without committing them to git? Also trying to build without having them ignored doesn't seem to work |
Just set those envs in the shell
You can do it using .easignore file, but I don't recommend it https://github.com/expo/fyi/blob/main/eas-build-archive.md
You probably still have that hook in package JSON that overrides the files. |
@wkozyra95 Thank you again! now this works great! |
Hey Wojciech, SetupIn my app.config.js I have: export default {
...
ios: {
googleServicesFile: process.env.GOOGLE_SERVICES_PLIST,
}
...
} Which I have on Expo as a secret: Question: can you please clarify the discrepancy of the value being a file path vs a file and how that differs between local and cloud builds? Trying to run
|
Here's what I'm using For cloud build ( For local build (
|
Updated: the path of google-services.json for |
Build/Submit details page URL
No response
Summary
When launching a build in a CI environment (or on a local machine, tested with macOS) with
eas build --local
and a package that requires a google services file (bothgoogle-services.json
orGoogleService-Info.plist
) to be used the build errors out when reading/parsing the file.This can be a problem for packages like
expo-firebase-core
,expo-notifications
and all the ones that require a google services file to be used.Managed or bare?
Managed
Environment
npx expo-env-info
expo doctor
Error output
Android Action Error
iOS Action Error
Local iOS Error
Reproducible demo or steps to reproduce from a blank project
I made an example project with SDK 45 and a GitHub action that installs the required packages for
eas --local
to work. This project was a standardexpo init
to which I addedexpo-firebase-core
.As for best practice, the google services files are provided via an
eas-build-pre-install
hook which parses the base64 content of an environment variable containing the encoded services files. Of course, when I run the local build on my MacBook they're in the path specified inapp.json
The decoding strategy above is proven to be working in a cloud build here for android
The GitHub action has been taken from this project: https://github.com/byCedric/eas-gha
This is the example project: https://github.com/zaniluca/eas-local-build-google-services-error
And here if you visit this workflow run you can see the error thrown when building. both for an iOS and Android build
The text was updated successfully, but these errors were encountered: