-Managed
-eas-cli@0.36.1
I have created app-specific secret following: Environment variables and secrets - Expo Documentation. I saved google-services.json file in base64 format and named it as
google_services_base64
Then I used Pre-install hook as explained here: EAS Build: how to include non-Git (private) files, eg google-services.json.
"eas-build-pre-install": "echo $google_services_base64 | base64 -d > google-service.json",
My problem now is that how can I use this secret in app.json: expo.android.googleServicesFile
I have tried to build it: Pre-install hook goes through but build fails in Prebuild:
Prebuilding managed project
- Creating native project directories (./ios and ./android) and updating .gitignore
✔ Created native project
- Adding Metro bundler config
✔ Added Metro config
- Updating your package.json scripts, dependencies, and main file
✔ Updated package.json and added index.js entry point for iOS and Android
- Config syncing
✖ Config sync failed
10[stderr] [07:57:36] [android.dangerous]: withAndroidDangerousBaseMod: Cannot copy google-services.json from /build/workingdir/build/google_services_base64 to /build/workingdir/build/android/app/google-services.json. Please make sure the source and destination paths exist.
11[stderr] [07:57:36] Error: [android.dangerous]: withAndroidDangerousBaseMod: Cannot copy google-services.json from /build/workingdir/build/google_services_base64 to /build/workingdir/build/android/app/google-services.json. Please make sure the source and destination paths exist.
12[stderr] at setGoogleServicesFile (/build/node_modules/@expo/config-plugins/src/android/GoogleServices.ts:79:11)
13[stderr] at processTicksAndRejections (internal/process/task_queues.js:93:5)
14[stderr] at /build/node_modules/@expo/config-plugins/src/android/GoogleServices.ts:53:7
15[stderr] at action (/build/node_modules/@expo/config-plugins/src/plugins/withMod.ts:227:23)
16[stderr] at interceptingMod (/build/node_modules/@expo/config-plugins/src/plugins/withMod.ts:108:21)
17[stderr] at interceptingMod (/build/node_modules/@expo/config-plugins/src/plugins/withMod.ts:108:21)
18[stderr] at interceptingMod (/build/node_modules/@expo/config-plugins/src/plugins/withMod.ts:108:21)
19[stderr] at action (/build/node_modules/@expo/config-plugins/src/plugins/createBaseMod.ts:82:21)
20[stderr] at interceptingMod (/build/node_modules/@expo/config-plugins/src/plugins/withMod.ts:108:21)
21[stderr] at evalModsAsync (/build/node_modules/@expo/config-plugins/src/plugins/mod-compiler.ts:172:25)
22[stderr] at compileModsAsync (/build/node_modules/@expo/config-plugins/src/plugins/mod-compiler.ts:82:10)
23[stderr] at configureManagedProjectAsync (/build/node_modules/expo-cli/src/commands/eject/configureProjectAsync.ts:64:12)
24[stderr] at prebuildAsync (/build/node_modules/expo-cli/src/commands/eject/prebuildAsync.ts:90:21)
25[stderr] at actionAsync (/build/node_modules/expo-cli/src/commands/prebuildAsync.ts:37:3)
node exited with non-zero code: 1