Open RWOverdijk opened 2 years ago
Can you share a link to the failing build?
@dsokal No, because it never gets uploaded. This error shows up locally.
This runs before eas-build-pre-install
, which itself shouldn't run until the build starts afaik. This error shows up immediately after running build. I'll add the full output below (so you can see the order of things which might be helpful?):
Preparation:
$ npm i -g eas-cli@v0.59
// Boring output
Note: Anything above v0.59 (tested up to v1.1.1 has the exact same behaviour._
Local:
$ eas build --profile production --local
★ eas-cli@1.1.1 is now available.
To upgrade, run npm install -g eas-cli.
Proceeding with outdated version.
✔ Select platform › iOS
✔ Linked to project @myorg/MyProject
Error: [ios.infoPlist]: withIosInfoPlistBaseMod: ENOENT: no such file or directory, open '/Users/spiderclam/projects/mobile/projectname/GoogleService-Info.plist'
Code: ENOENT
EAS:
$ eas build --profile production
★ eas-cli@1.1.1 is now available.
To upgrade, run npm install -g eas-cli.
Proceeding with outdated version.
✔ Select platform › iOS
✔ Linked to project @myorg/MyProject
Error: [ios.infoPlist]: withIosInfoPlistBaseMod: ENOENT: no such file or directory, open '/Users/spiderclam/projects/mobile/projectname/GoogleService-Info.plist'
Code: ENOENT
When running a non-local build, the eas-build-pre-install
script is only executed in the cloud. See the docs https://docs.expo.dev/build-reference/ios-builds/#remote-steps
GoogleService-Info.plist
locally. app.json
/app.config.js
. Probable solution:
GoogleService-Info.plist
in the project dir locally.@dsokal
eas-build-pre-install
is being called locally (on 0.58 at least) so what you're saying isn't true.Proof of point 2 (output when running using --local):
[PRE_INSTALL_HOOK] Script 'eas-build-pre-install' is present in package.json, running it...
But I want to repeat, this isn't just about --local
. This is about any eas build
This is a breaking change.
What is a breaking change?
eas-build-pre-install is being called locally (on 0.58 at least) so what you're saying isn't true.
It's called locally only if you run local builds.
I don't feel like you've read everything I wrote.
Vice versa. Please read my comment again https://github.com/expo/eas-cli/issues/1317#issuecomment-1228204303
What is a breaking change?
It works on 0.58. It doesn't on 0.59. Something broke for me that's why I call it a breaking change. I don't know the change is that broke things for me though, that's what I want to find out 😄
It's called locally only if you run local builds. Vice versa. Please read my comment again
My bad, I read your comment and you're right, I missed the "non-" part. But that's still not the actual issue.
The problem is not eas-build-pre-install
. The problem is that it's looking for a file (from a config plugin I think?) before even starting the build.
So like you said:
When running a non-local build, the eas-build-pre-install script is only executed in the cloud.
This sounds perfectly logical to me. But before it gets to running a build, something is already looking for a file. It shouldn't do that and before v0.59 it didn't.
I see, I can see we upgraded a bunch of packages in 0.59. You could be right. Can you share your app.json/app.config.js?
Also, I'm aware this could be a breaking change but what do you think about the solution I propose above?
Keep GoogleService-Info.plist in the project dir locally. If you don't want to have this file uploaded to EAS Build, add it to .gitignore.
It's not the "fix" but it should unblock you.
@dsokal Sure thing.
I do want to note that I already tried removing the entire "plugins" key from the config with the same result. The reason I mention this is because I have a custom plugin in that list, so that's the first thing I tried.
{
"expo": {
"backgroundColor": "#ffffff",
"owner": "ltodev",
"name": "LTO Dichtbij",
"slug": "LTO",
"version": "1.0.0",
"orientation": "portrait",
"icon": "./assets/app-icons/icon.png",
"splash": {
"image": "./assets/app-icons/splash.png",
"resizeMode": "contain",
"backgroundColor": "#ffffff"
},
"updates": {
"enabled": false,
"fallbackToCacheTimeout": 0
},
"assetBundlePatterns": [
"**/*"
],
"ios": {
"config": {
"usesNonExemptEncryption": false
},
"associatedDomains": [
"applinks:ltodichtbij.nl",
"applinks:landing.test.ltodichtbij.nl"
],
"bundleIdentifier": "nl.ltodichtbij.app",
"googleServicesFile": "./GoogleService-Info.plist",
"supportsTablet": false,
"buildNumber": "57"
},
"android": {
"intentFilters": [
{
"action": "VIEW",
"data": [
{
"scheme": "https",
"host": "*.ltodichtbij.nl",
"pathPrefix": "/link"
}
],
"category": [
"BROWSABLE",
"DEFAULT"
]
}
],
"package": "nl.ltodichtbij.app",
"googleServicesFile": "./google-services.json",
"adaptiveIcon": {
"foregroundImage": "./assets/app-icons/adaptive-icon.png",
"backgroundColor": "#FFFFFF"
},
"versionCode": 23
},
"web": {
"favicon": "./assets/favicon.png"
},
"plugins": [
"@react-native-firebase/app",
"@react-native-firebase/crashlytics",
"./plugins/analytics/disable-ad-id.js"
],
"extra": {
"eas": {
"projectId": "b6b896b3-0cd2-47cd-b64a-b4aaa8a33f4c"
}
}
}
}
It's not the "fix" but it should unblock you.
I've thought about that, but I use eas.json to pick the right file based on the profile. I could move the copy to a bunch of npm scripts instead as a workaround for now?
Or do you mean, even if it's empty I could have the file there for now to shut up the error?
Or do you mean, even if it's empty I could have the file there for now to shut up the error?
It's definitely worth trying.
I'll try that. Any way I can find the source of this as well?
What do you mean?
I mean, the source of what is trying to find that file. Which package has the withIosInfoPlistBaseMod
that is doing this.
I want to help find the source of the issue so I can be a good open source citizen 😄
I have a similar problem.
I am running a local build on GitHub Actions.
I had to use eas-build-pre-install
to run a script to get GoogleService-Info.plist etc from GCP Secret Manager (setup.sh).
In Android's eas build, setup.sh is executed in ease-build-pre-install after fetching JKS and other files.
However, in the iOS eas build, the GoogleService-Info.plist check is performed first, and I get Error: [ios.infoPlist]: withIosInfoPlistBaseMod: ENOENT: no such file or directory
.
Tool versions
However, I have found workaround.
It seems to work if I put GoogleService-Info.plist in the directory before running npx eas build --platform ios--local --profile preview --non-interactive
.
In my case.
npx eas build ...
When I did this workaround, eas-build-pre-install
was also executed when building iOS.
For Android, it seems that eas-build-pre-install
is executed without this workaround.
I have not investigated the code to the bug, but I hope this helps. 🙏
I have the same issue ... it only works if I include a non-empty GoogleService-Info.plist file in the repository / before the eas-build-pre-install
Facing this too on v3.3.2 for iOS only and my setup is very similar to OP's:
My pre-install hook creates the GoogleService-Info.plist
file from an environment variable. I first came across this when setting up Expo Github Action since the CI environment doesn't have a GoogleService-Info.plist
file present like my machine does. Might be worth noting that the file is in my .gitignore
and .easignore
.
However, when uploading the file as a secret file to EAS , the build starts (and successfully builds my app) just fine, so I'll be using this as my workaround for now.
This also fails for me on GitHub Actions.
This just started failing for me on Github Actions also
Same issue on Github Actions also
I don't know if it's the same anymore, I don't even remember this issue. So I'm muting notifications and leave it up to you + maintainers to deal with this :D Good luck all <3
I have the same issue ... it only works if I include a non-empty GoogleService-Info.plist file in the repository / before the
eas-build-pre-install
To add further context, I see the same thing but working around the issue breaks it on the other platform...
To fix iOS, I add a step to run the eas_pre_install
script myself before the build step.
- name: 📂 Setup Google Services Files
env:
GOOGLE_SERVICES_JSON_BASE64: ${{ secrets.GOOGLE_SERVICES_JSON_BASE64 }}
GOOGLE_SERVICES_PLIST_BASE64: ${{ secrets.GOOGLE_SERVICES_PLIST_BASE64 }}
run: ./scripts/eas_pre_install
- name: 👷 Build app
env:
GOOGLE_SERVICES_JSON: ${{ vars.GOOGLE_SERVICES_JSON }}
GOOGLE_SERVICES_PLIST: ${{ vars.GOOGLE_SERVICES_PLIST }}
EXPO_PUBLIC_FIREBASE_WEB_CLIENT_ID: ${{ secrets.EXPO_PUBLIC_FIREBASE_WEB_CLIENT_ID }}
run: |
eas build --local \
--non-interactive \
--output=./app-build \
--platform=${{ github.event.inputs.platform }} \
--profile=${{ github.event.inputs.profile }}
This works around the issue on iOS, but now breaks for Android...
I now get:
[PREBUILD] [Error: ENOENT: no such file or directory, open '/tmp/runner/eas-build-local-nodejs/7a56da89-d12d-4d48-b594-1d3730b0b21d/build/googleServices/google-services.json'] {
[PREBUILD] Error: [android.dangerous]: withAndroidDangerousBaseMod: Cannot copy google-services.json from /tmp/runner/eas-build-local-nodejs/7a56da89-d12d-4d48-b594-1d3730b0b21d/build/googleServices/google-services.json to /tmp/runner/eas-build-local-nodejs/7a56da89-d12d-4d48-b594-1d3730b0b21d/build/android/app/google-services.json. Please make sure the source and destination paths exist.
✖ Config sync failed
I think there's a discrepancy between where each respective build looks at for the local files.
On Android, the config looks at /tmp/runner/eas-build-local-nodejs/7a56da89-d12d-4d48-b594-1d3730b0b21d/build/googleServices
whereas for iOS, it works with /home/runner/work/MyApp/MyApp/googleServices
cc @EvanBacon
Appologies for using a blank issue. I just wanted to stop bumping in discord. Also hoping this attracts other people with the same issue.
When running a build (local and remote) I get:
This makes sense, because the file doesn't exist until after eas-build-pre-install (That's where I place the correct GoogleService files based on the profile used).
So, for some reason it's running a config plugin before it should be running a plugin.
I've narrowed it down to somewhere between v0.58 and v0.59, since v0.59 (and later releases, too) is where the issue starts popping up.
Additional remarks: