The same code started failing: EAS build ios and android.

I got my both ios and android builds started failing yesterday (even after the outage is resolved, it keeps failing.).

I also got back in commits and tried a version that was built before, but it is not working anymore.

Things I tried so far, but didn’t work:
1- Clean setup,
2- Latest eas cli and tried an older version as well,
3- Installing react-native-community/cli and android version,
4- setting expo build properties for ios and android,
5- upgrade/downgrading some packages: react-native, expo-permissions, etc.
6- expo doctor…

I am getting the following error:

on iOS:

[Expo] Enabling modular headers for pod ExpoModulesCore.
Auto-generating .xcode.env.local with $NODE_BINARY=/Users/expo/.nvm/versions/node/v16.18.1/bin/node.
Error: Failed to build the app: No package name found. Found errors in /Users/expo/workingdir/build/node_modules/expo-permissions/android/src/main/AndroidManifest.xml.
Invalid Podfile file: unexpected token at ‘info Run CLI with --verbose flag for more details.’
From /Users/expo/workingdir/build/ios/Podfile:14
config = use_native_modules!
Error: Unknown error. See logs for more information.

on Android:

Daemon will be stopped at the end of the build.
Build failed with an exception.
Script ‘/home/expo/workingdir/build/node_modules/react-native-community/cli-platform-android/native_modules.gradle’ line: 450
A problem occurred evaluating script.
Calling [node, /home/expo/workingdir/build/node_modules/react-native-community/cli/build/bin.js, config] finished with an exception. Error message: groovy.json.JsonException: Unable to determine the current character, it is not a string, number, array, or object
The current character read is ‘i’ with an int value of 105
Unable to determine the current character, it is not a string, number, array, or object
line number 1
index number 0
info Run CLI with --verbose flag for more details.
^.
Run with --stacktrace option to get the stack trace.
Run with --info or --debug option to get more log output.
Run with --scan to get full insights.
Get more help at https://help.gradle.org
BUILD FAILED in 15s
Error: Gradle build failed with unknown error. See logs for the “Run gradlew” phase for more information.

package.json:
{
“main”: “node_modules/expo/AppEntry.js”,
“scripts”: {
“start”: “expo start”,
“android”: “expo start --android”,
“ios”: “expo start --ios”,
“web”: “expo start --web”,
“eject”: “expo eject”,
“test”: “jest”
},
“jest”: {
“preset”: “jest-expo”,
“transformIgnorePatterns”: [
“node_modules/(?!((jest-)?react-native|react-native(-community)?)|expo(nent)?|expo(nent)?/.|expo-google-fonts/.|react-navigation|react-navigation/.|unimodules/.|unimodules|sentry-expo|native-base|react-native-svg)”
]
},
“dependencies”: {
“expo/webpack-config”: “^0.17.2”,
“react-native-async-storage/async-storage”: “^1.18.1”,
“react-native-community/masked-view”: “0.1.11”,
“react-navigation/native”: “^5.4.0”,
“react-navigation/stack”: “^5.3.7”,
“base-64”: “^0.1.0”,
“date-fns”: “^2.30.0”,
“expo”: “^47.0.0”,
“expo-auth-session”: “~3.8.0”,
“expo-build-properties”: “~0.4.1”,
“expo-contacts”: “~11.0.1”,
“expo-firebase”: “^0.0.0-alpha.0”,
“expo-firebase-recaptcha”: “~2.3.1”,
“expo-in-app-purchases”: “~14.0.0”,
“expo-notifications”: “^0.18.1”,
“expo-permissions”: “^14.1.1”,
“expo-updates”: “~0.15.6”,
“firebase”: “^7.14.4”,
“form-urlencoded”: “^6.1.0”,
“jest”: “^26.6.3”,
“jest-expo”: “^48.0.2”,
“libphonenumber-js”: “^1.10.26”,
“react”: “18.1.0”,
“react-dom”: “18.1.0”,
“react-native”: “0.70.5”,
“react-native-animatable”: “^1.3.3”,
“react-native-country-picker-modal”: “^2.0.0”,
“react-native-gesture-handler”: “~2.8.0”,
“react-native-keyboard-aware-scroll-view”: “^0.9.5”,
“react-native-popup-menu”: “^0.16.1”,
“react-native-qrcode-svg”: “^6.2.0”,
“react-native-reanimated”: “~2.12.0”,
“react-native-safe-area-context”: “4.4.1”,
“react-native-screens”: “~3.18.0”,
“react-native-svg”: “13.4.0”,
“react-native-swiper”: “^1.6.0”,
“react-native-url-polyfill”: “^1.3.0”,
“react-native-vector-icons”: “^9.2.0”,
“react-native-web”: “~0.18.7”,
“react-native-webview”: “11.23.1”
},
“devDependencies”: {
@babel/core”: “^7.19.3”,
“babel-preset-expo”: “~9.2.1”
},
“private”: true
}

Thank you!

Have you found a fix for this yet? I’m encountering the same issue for eas build for Android.

please refer to this guide: Troubleshoot build errors and crashes - Expo Documentation

it could be that a config plugin from a dependency in your project is not working as expected, or one of your dependencies is breaking your build in another way

Thanks for your response! These are the dependencies that are currently listed in my package.json:

"dependencies": {
    "@amplitude/react-native": "^2.12.1",
    "@expo-google-fonts/inter": "^0.2.2",
    "@expo-google-fonts/roboto": "^0.2.3",
    "@expo/config-plugins": "^5.0.4",
    "@expo/prebuild-config": "^5.0.7",
    "@react-native-async-storage/async-storage": "~1.17.3",
    "@react-native-community/datetimepicker": "6.5.2",
    "@react-native-masked-view/masked-view": "0.2.8",
    "@react-navigation/bottom-tabs": "^6.4.0",
    "@react-navigation/native": "^6.0.13",
    "@react-navigation/stack": "^6.3.0",
    "axios": "^0.27.2",
    "dotenv": "^16.0.3",
    "eas-cli": "^2.1.0",
    "eslint": "^8.22.0",
    "eslint-config-rallycoding": "^3.2.0",
    "expo": "~47.0.14",
    "expo-app-loading": "~2.1.0",
    "expo-application": "~5.0.1",
    "expo-auth-session": "~3.8.0",
    "expo-dev-client": "~2.0.1",
    "expo-font": "~11.0.1",
    "expo-image-picker": "~14.0.2",
    "expo-network": "~5.0.0",
    "expo-notifications": "~0.17.0",
    "expo-random": "~13.0.0",
    "expo-splash-screen": "~0.17.5",
    "expo-status-bar": "~1.4.2",
    "expo-updates": "~0.15.6",
    "expo-web-browser": "~12.0.0",
    "firebase": "^9.10.0",
    "lodash": "^4.17.21",
    "moment": "^2.29.4",
    "react": "18.1.0",
    "react-dom": "18.1.0",
    "react-native": "0.70.8",
    "react-native-color-picker": "^0.6.0",
    "react-native-elements": "^3.4.3",
    "react-native-gesture-handler": "~2.8.0",
    "react-native-image-crop-picker": "0.38.1",
    "react-native-image-picker": "^4.8.3",
    "react-native-modal-datetime-picker": "^14.0.0",
    "react-native-open-maps": "^0.4.0",
    "react-native-popup-menu": "^0.16.1",
    "react-native-progress": "^5.0.0",
    "react-native-push-notification": "^8.1.1",
    "react-native-rapi-ui": "^0.2.1",
    "react-native-raw-bottom-sheet": "^2.2.0",
    "react-native-reanimated": "~2.12.0",
    "react-native-safe-area-context": "4.4.1",
    "react-native-screens": "~3.18.0",
    "react-native-searchable-dropdown": "^1.1.3",
    "react-native-svg": "13.4.0",
    "react-native-web": "0.18.9",
    "react-schedule-selector": "^3.0.0",
    "styled-components": "^5.3.5",
    "yelp-fusion": "^3.0.0"
  },
  "devDependencies": {
    "@babel/core": "^7.12.9",
    "react-native-dotenv": "^3.3.1"
  }

Since the error seems to be from @react-native-community, do you think the @react-native-community/datetimepicker might be the culprit? Let me know if anything else might be worth looking into.

It turns out that the culprit was the @amplitude/react-native package at the top of my package.json, which our app wasn’t using. Uninstalling it fixed the issue.

For others coming to this post with similar issues, make sure to clean out any unnecessary packages that your app doesn’t use anymore.

1 Like