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

error: Build input file cannot be found: GoogleService-Info.plist React Native - Expo eas build IOS #2199

Open
opielapatryk opened this issue Jan 26, 2024 · 11 comments
Labels
needs review Issue is ready to be reviewed by a maintainer

Comments

@opielapatryk
Copy link

Build/Submit details page URL

https://expo.dev/accounts/patrykopiela/projects/stickyinreactnative/builds/a730b9bb-c72d-4bc8-b620-a6b70b9d7f39

Summary

Since few days I am trying to fix this error:
❌ error: Build input file cannot be found: '/Users/expo/workingdir/build/GoogleService-Info.plist'. Did you forget to declare this file as an output of a script phase or custom build rule which produces it? (in target 'StickyInReactNative' from project 'StickyInReactNative')

I tried every solution found on internet but nothing helps!

Managed or bare?

Bare

Environment

✔ Check Expo config for common issues
✔ Check package.json for common issues
✔ Check dependencies for packages that should not be installed directly
✔ Check for common project setup issues
✔ Check npm/ yarn versions
✔ Check Expo config (app.json/ app.config.js) schema
✔ Check that native modules do not use incompatible support packages
✔ Check for legacy global CLI installed locally
✔ Check that native modules use compatible support package versions for installed Expo SDK
✔ Check that packages match versions required by installed Expo SDK

Didn't find any issues with the project!

Error output

❌ error: Build input file cannot be found: '/Users/expo/workingdir/build/GoogleService-Info.plist'. Did you forget to declare this file as an output of a script phase or custom build rule which produces it? (in target 'StickyInReactNative' from project 'StickyInReactNative')

Reproducible demo or steps to reproduce from a blank project

After clone project from github I have to

comment firebase pods
cd ios && pod install
uncomment firebase pods
pod install

then I use for build:
eas build --profile development --platform ios

@opielapatryk opielapatryk added the needs review Issue is ready to be reviewed by a maintainer label Jan 26, 2024
@szdziedzic
Copy link
Member

Do you have it git ignored by any chance?

@karimessouabni
Copy link

I had the same issue. I did add it to my git ignore. I still can't get it why does the git ignore is used when running an eas build --local

@rinaldycodes
Copy link

i was facing this issue, if you want using GoogleService-Info.plist, you must not add GoogleService-Info.plist file in .gitignore . because in eas build need that file. you can check it https://docs.expo.dev/build-reference/variables/

@MariuzM
Copy link

MariuzM commented Mar 10, 2024

Got into the same issue, wish there was another way to still have it in gitignore but able to build locally

@hisayan
Copy link

hisayan commented Apr 2, 2024

I faced the same issue and I solved by this script.

.gitignore

GoogleService-info.plist

package.json

"scripts": {
    ...
    "eas:preview": "EAS_PWD=$PWD npx eas build --profile preview --platform ios --local",
    "eas-build-pre-install": "cp $EAS_PWD/GoogleService-info.plist $EAS_BUILD_WORKINGDIR"
}
$ npm run eas:preview

and I also copy .env file.

"eas-build-pre-install": "cp $EAS_PWD/GoogleService-info.plist $EAS_BUILD_WORKINGDIR && cp $EAS_PWD/.env $EAS_BUILD_WORKINGDIR"

@ndav
Copy link

ndav commented Jul 31, 2024

I had the same issue. I did add it to my git ignore. I still can't get it why does the git ignore is used when running an eas build --local

I would completely agree with this. I've just been banging my head against a wall for 2 days only realising that .gitignore is used for a local build! It makes no sense whatsoever, whatever is on the filesystem should be considered available

@fernandatoledo
Copy link

if your .env is in your gitignore that solution would not work, right? @hisayan

@renerpdev
Copy link

renerpdev commented Aug 26, 2024

I had the same issue, either on Expo CI or locally. The problem I faced was that the EAS bundler omitted all GoogleService-info.plist files (at the root level or inside the ios folder) because I added that entry to .gitignore. Yeah a dummy dev issue xD

The fix was to force it only to exclude the one from my root ;)

# .gitignore (See I prepended it with a backslash)

\GoogleService-info.plist

I also needed to grab the env variables using dotenv-cli

Here is my command to build it locally

dotenv -- eas build -p ios --local

@dearlordylord
Copy link

does it mean we have to check GoogleService-info.plist into the repository?

@alexandrubeu
Copy link

alexandrubeu commented Oct 2, 2024

Quick question, is there a way to have GoogleService-Info.plist uploaded to expo services in the secrets section? Currently I'm trying to that but when I'm trying to build directly on expo services says that I needed locally in order to trigger the build.
Using this command: eas build --profile dev:debug --platform=ios --non-interactive

@renerpdev
Copy link

does it mean we have to check GoogleService-info.plist into the repository?

Hi @dearlordylord I didn't need to add it to git, I just created env vars either on local or CI envs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs review Issue is ready to be reviewed by a maintainer
Projects
None yet
Development

No branches or pull requests