Getting error while building apk with EAS

Hey

We are encountering difficulties while attempting to build an apk file using eas build in our Expo managed workflow.

We have explored various methods outlined in the documentation (https://docs.expo.dev/build-reference/apk/#configuring-a-profile-to-build-apks) to address this issue, but unfortunately, we continue to encounter the same error.

What could be the underlying cause of this error, and do you have any suggestions or insights on how we can resolve it?

Error we get

`[stderr]

/home/expo/workingdir/build/android/app/build/generated/assets/createBundleReleaseJsAndAssets/index.android.bundle:2087:23: warning: the variable “DebuggerInternal” was not declared in function “__shouldPauseOnThrow”

[stderr]
return typeof DebuggerInternal !== ‘undefined’ && DebuggerInternal.shouldPauseOnThrow === true;
[stderr]
^~~~~~~~~~~~~~~~
[stderr]

/home/expo/workingdir/build/android/app/build/generated/assets/createBundleReleaseJsAndAssets/index.android.bundle:9114:7: warning: the variable “setTimeout” was not declared in function “logCapturedError”

[stderr]
setTimeout(function () {
[stderr]
^~~~~~~~~~
[stderr]
/home/expo/workingdir/build/android/app/build/generated/assets/createBundleReleaseJsAndAssets/index.android.bundle:7079:108: warning: the variable “nativeFabricUIManager” was not declared in function “onChange”

[stderr]
(fromOrTo = fromOrTo && fromOrTo.stateNode) && fromOrTo.canonical._internalInstanceHandle ? (from && nativeFabricUIManager.setIsJSResponder(from.stateNode.node, false, blockNativeResponder || false), to && nativeFabricUIManager.setIsJSResponder(to.stateNode.node, true, blockNativeResponder || false)) : null !== to ? ReactNativePrivateInterface.UIManager.setJSResponder(to.stateNode.canonical._nativeTag, blockNativeResponder) : ReactNativePrivateInterface.UIManager.clearJSResponder();
`

The set up

  1. node-v16.16.0
  2. eas-cli/3.13.3
  3. expo managed workflow

dependencies
"@react-native-async-storage/async-storage": "1.17.11", "@react-native-community/netinfo": "9.3.7", "@react-navigation/drawer": "^6.6.2", "@react-navigation/native": "^6.1.6", "@react-navigation/native-stack": "^6.9.12", "@react-navigation/stack": "^6.3.16", "amazon-cognito-identity-js": "^6.2.0", "aws-amplify": "^5.2.5", "axios": "^1.4.0", "expo": "~48.0.18", "expo-haptics": "~12.2.1", "expo-location": "~15.1.1", "expo-splash-screen": "~0.18.2", "expo-status-bar": "~1.4.4", "formik": "^2.4.1", "lottie-react-native": "5.1.4", "react": "18.2.0", "react-native": "0.71.8", "react-native-gesture-handler": "~2.9.0", "react-native-google-places-autocomplete": "^2.5.1", "react-native-maps": "1.3.2", "react-native-maps-directions": "^1.9.0", "react-native-reanimated": "~2.14.4", "react-native-safe-area-context": "4.5.0", "react-native-screens": "~3.20.0"

EAS file
{ "cli": { "version": ">= 3.13.3" }, "build": { "development": { "distribution": "internal", "android": { "gradleCommand": ":app:assembleDebug" }, "ios": { "buildConfiguration": "Debug" } }, "preview": { "distribution": "internal", "android": { "buildType": "apk" } }, "production": {} }, "submit": { "production": {} } }

Command used to build
eas build --platform android --profile preview

I’m also having similar error.

Here is the error that I got. There are some duplicate errors with the original question.
Fore example, DebuggerInternal, setTimeout, nativeFabricUIManager are not declared.

[RUN_GRADLEW] > Task :app:mapReleaseSourceSetPaths
[RUN_GRADLEW] > Task :app:createBundleReleaseJsAndAssets
[RUN_GRADLEW] ● Validation Warning:
[RUN_GRADLEW] Unknown option "serializer.isThirdPartyModule" with value (module) =>
[RUN_GRADLEW]       /(?:^|[/\\])node_modules[/\\]/.test(module.path) was found.
[RUN_GRADLEW]   This is probably a typing mistake. Fixing it will remove this message.
[RUN_GRADLEW] ● Validation Warning:
[RUN_GRADLEW] Unknown option "symbolicator.customizeStack" with value async (stack, _) => stack was found.
[RUN_GRADLEW]   This is probably a typing mistake. Fixing it will remove this message.
[RUN_GRADLEW] ● Validation Warning:
[RUN_GRADLEW]   Unknown option "unstable_perfLoggerFactory" with value () => {
[RUN_GRADLEW]   class Logger {
[RUN_GRADLEW]     start() {}
[RUN_GRADLEW]     end() {}
[RUN_GRADLEW]     annotate() {}
[RUN_GRADLEW]     point() {}
[RUN_GRADLEW]     subSpan() {
[RUN_GRADLEW]       return this;
[RUN_GRADLEW]     }
[RUN_GRADLEW]   }
[RUN_GRADLEW]   return new Logger();
[RUN_GRADLEW] } was found.
[RUN_GRADLEW]   This is probably a typing mistake. Fixing it will remove this message.
[RUN_GRADLEW] warning: the transform cache was reset.
[RUN_GRADLEW]                 Welcome to Metro v0.76.6
[RUN_GRADLEW]               Fast - Scalable - Integrated
[RUN_GRADLEW] info Writing bundle output to:, /private/var/folders/7s/fss6wldj1wd9sny88lpyfmxh0000gn/T/eas-build-local-nodejs/bcd98d89-6e71-4e69-bedf-310474bf6141/build/expo-app/android/app/build/generated/assets/createBundleReleaseJsAndAssets/index.android.bundle
[RUN_GRADLEW] info Writing sourcemap output to:, /private/var/folders/7s/fss6wldj1wd9sny88lpyfmxh0000gn/T/eas-build-local-nodejs/bcd98d89-6e71-4e69-bedf-310474bf6141/build/expo-app/android/app/build/intermediates/sourcemaps/react/release/index.android.bundle.packager.map
[RUN_GRADLEW] info Done writing bundle output
[RUN_GRADLEW] info Done writing sourcemap output
[RUN_GRADLEW] info Copying 13 asset files
[RUN_GRADLEW] info Done copying assets
[RUN_GRADLEW] /private/var/folders/7s/fss6wldj1wd9sny88lpyfmxh0000gn/T/eas-build-local-nodejs/bcd98d89-6e71-4e69-bedf-310474bf6141/build/expo-app/android/app/build/generated/assets/createBundleReleaseJsAndAssets/index.android.bundle:981:42: warning: the variable "fetch" was not declared in anonymous function " 25#"
[RUN_GRADLEW]       value: wrapFetchWithWindowLocation(fetch)
[RUN_GRADLEW]                                          ^~~~~
[RUN_GRADLEW] /private/var/folders/7s/fss6wldj1wd9sny88lpyfmxh0000gn/T/eas-build-local-nodejs/bcd98d89-6e71-4e69-bedf-310474bf6141/build/expo-app/android/app/build/generated/assets/createBundleReleaseJsAndAssets/index.android.bundle:2744:18: warning: the variable "DebuggerInternal" was not declared in function "__shouldPauseOnThrow"
[RUN_GRADLEW]           typeof DebuggerInternal !== 'undefined' && DebuggerInternal.shouldPauseOnThrow === true
[RUN_GRADLEW]                  ^~~~~~~~~~~~~~~~
[RUN_GRADLEW] /private/var/folders/7s/fss6wldj1wd9sny88lpyfmxh0000gn/T/eas-build-local-nodejs/bcd98d89-6e71-4e69-bedf-310474bf6141/build/expo-app/android/app/build/generated/assets/createBundleReleaseJsAndAssets/index.android.bundle:11317:7: warning: the variable "setTimeout" was not declared in function "logCapturedError"
[RUN_GRADLEW]       setTimeout(function () {
[RUN_GRADLEW]       ^~~~~~~~~~
[RUN_GRADLEW] /private/var/folders/7s/fss6wldj1wd9sny88lpyfmxh0000gn/T/eas-build-local-nodejs/bcd98d89-6e71-4e69-bedf-310474bf6141/build/expo-app/android/app/build/generated/assets/createBundleReleaseJsAndAssets/index.android.bundle:9282:108: warning: the variable "nativeFabricUIManager" was not declared in function "onChange"
[RUN_GRADLEW]       (fromOrTo = fromOrTo && fromOrTo.stateNode) && fromOrTo.canonical._internalInstanceHandle ? (from && nativeFabricUIManager.setIsJSResponder(from.stateNode.node, false, blockNativeResponder || false), to && nativeFabricUIManager.setIsJSResponder(to.stateNode.node, true, blockNativeResponder || false)) : null !== to ? ReactNativePrivateInterface.UIManager.setJSResponder(to.stateNode.canonical._nativeTag, blockNativeResponder) : ReactNativePrivateInterface.UIManager.clearJSResponder();
[RUN_GRADLEW]                                                                                                            ^~~~~~~~~~~~~~~~~~~~~
[RUN_GRADLEW] /private/var/folders/7s/fss6wldj1wd9sny88lpyfmxh0000gn/T/eas-build-local-nodejs/bcd98d89-6e71-4e69-bedf-310474bf6141/build/expo-app/android/app/build/generated/assets/createBundleReleaseJsAndAssets/index.android.bundle:9898:21: warning: the variable "clearTimeout" was not declared in anonymous function " 258#"
[RUN_GRADLEW]     cancelTimeout = clearTimeout;
[RUN_GRADLEW]                     ^~~~~~~~~~~~
[RUN_GRADLEW] /private/var/folders/7s/fss6wldj1wd9sny88lpyfmxh0000gn/T/eas-build-local-nodejs/bcd98d89-6e71-4e69-bedf-310474bf6141/build/expo-app/android/app/build/generated/assets/createBundleReleaseJsAndAssets/index.android.bundle:13648:30: warning: the variable "__REACT_DEVTOOLS_GLOBAL_HOOK__" was not declared in anonymous function " 258#"
[RUN_GRADLEW]   if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
[RUN_GRADLEW]                              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[RUN_GRADLEW] /private/var/folders/7s/fss6wldj1wd9sny88lpyfmxh0000gn/T/eas-build-local-nodejs/bcd98d89-6e71-4e69-bedf-310474bf6141/build/expo-app/android/app/build/generated/assets/createBundleReleaseJsAndAssets/index.android.bundle:14091:16: warning: the variable "AggregateError" was not declared in function "getAggregateError"
[RUN_GRADLEW]     if (typeof AggregateError === 'function') {
[RUN_GRADLEW]                ^~~~~~~~~~~~~~
[RUN_GRADLEW] /private/var/folders/7s/fss6wldj1wd9sny88lpyfmxh0000gn/T/eas-build-local-nodejs/bcd98d89-6e71-4e69-bedf-310474bf6141/build/expo-app/android/app/build/generated/assets/createBundleReleaseJsAndAssets/index.android.bundle:14230:5: warning: the variable "setImmediate" was not declared in function "handleResolved"
[RUN_GRADLEW]     setImmediate(function () {
[RUN_GRADLEW]     ^~~~~~~~~~~~
[RUN_GRADLEW] /private/var/folders/7s/fss6wldj1wd9sny88lpyfmxh0000gn/T/eas-build-local-nodejs/bcd98d89-6e71-4e69-bedf-310474bf6141/build/expo-app/android/app/build/generated/assets/createBundleReleaseJsAndAssets/index.android.bundle:18324:14: warning: the variable "Headers" was not declared in anonymous function " 454#"
[RUN_GRADLEW]     Headers: Headers,
[RUN_GRADLEW]              ^~~~~~~
[RUN_GRADLEW] /private/var/folders/7s/fss6wldj1wd9sny88lpyfmxh0000gn/T/eas-build-local-nodejs/bcd98d89-6e71-4e69-bedf-310474bf6141/build/expo-app/android/app/build/generated/assets/createBundleReleaseJsAndAssets/index.android.bundle:18325:14: warning: the variable "Request" was not declared in anonymous function " 454#"
[RUN_GRADLEW]     Request: Request,
[RUN_GRADLEW]              ^~~~~~~
[RUN_GRADLEW] /private/var/folders/7s/fss6wldj1wd9sny88lpyfmxh0000gn/T/eas-build-local-nodejs/bcd98d89-6e71-4e69-bedf-310474bf6141/build/expo-app/android/app/build/generated/assets/createBundleReleaseJsAndAssets/index.android.bundle:18326:15: warning: the variable "Response" was not declared in anonymous function " 454#"
[RUN_GRADLEW]     Response: Response
[RUN_GRADLEW]               ^~~~~~~~
[RUN_GRADLEW] /private/var/folders/7s/fss6wldj1wd9sny88lpyfmxh0000gn/T/eas-build-local-nodejs/bcd98d89-6e71-4e69-bedf-310474bf6141/build/expo-app/android/app/build/generated/assets/createBundleReleaseJsAndAssets/index.android.bundle:18476:24: warning: the variable "FileReader" was not declared in function "readBlobAsArrayBuffer"
[RUN_GRADLEW]       var reader = new FileReader();
[RUN_GRADLEW]                        ^~~~~~~~~~
[RUN_GRADLEW] /private/var/folders/7s/fss6wldj1wd9sny88lpyfmxh0000gn/T/eas-build-local-nodejs/bcd98d89-6e71-4e69-bedf-310474bf6141/build/expo-app/android/app/build/generated/assets/createBundleReleaseJsAndAssets/index.android.bundle:18523:36: warning: the variable "Blob" was not declared in anonymous function " 465#"
[RUN_GRADLEW]         } else if (support.blob && Blob.prototype.isPrototypeOf(body)) {
[RUN_GRADLEW]                                    ^~~~
[RUN_GRADLEW] /private/var/folders/7s/fss6wldj1wd9sny88lpyfmxh0000gn/T/eas-build-local-nodejs/bcd98d89-6e71-4e69-bedf-310474bf6141/build/expo-app/android/app/build/generated/assets/createBundleReleaseJsAndAssets/index.android.bundle:18525:40: warning: the variable "FormData" was not declared in anonymous function " 465#"
[RUN_GRADLEW]         } else if (support.formData && FormData.prototype.isPrototypeOf(body)) {
[RUN_GRADLEW]                                        ^~~~~~~~
[RUN_GRADLEW] /private/var/folders/7s/fss6wldj1wd9sny88lpyfmxh0000gn/T/eas-build-local-nodejs/bcd98d89-6e71-4e69-bedf-310474bf6141/build/expo-app/android/app/build/generated/assets/createBundleReleaseJsAndAssets/index.android.bundle:18527:44: warning: the variable "URLSearchParams" was not declared in anonymous function " 465#"
[RUN_GRADLEW]         } else if (support.searchParams && URLSearchParams.prototype.isPrototypeOf(body)) {
[RUN_GRADLEW]                                            ^~~~~~~~~~~~~~~
[RUN_GRADLEW] /private/var/folders/7s/fss6wldj1wd9sny88lpyfmxh0000gn/T/eas-build-local-nodejs/bcd98d89-6e71-4e69-bedf-310474bf6141/build/expo-app/android/app/build/generated/assets/createBundleReleaseJsAndAssets/index.android.bundle:18765:23: warning: the variable "XMLHttpRequest" was not declared in anonymous function " 474#"
[RUN_GRADLEW]         var xhr = new XMLHttpRequest();
[RUN_GRADLEW]                       ^~~~~~~~~~~~~~
[RUN_GRADLEW] /private/var/folders/7s/fss6wldj1wd9sny88lpyfmxh0000gn/T/eas-build-local-nodejs/bcd98d89-6e71-4e69-bedf-310474bf6141/build/expo-app/android/app/build/generated/assets/createBundleReleaseJsAndAssets/index.android.bundle:18335:76: warning: the variable "self" was not declared in anonymous function " 457#"
[RUN_GRADLEW] var global = typeof globalThis !== 'undefined' && globalThis || typeof self !== 'undefined' && self || typeof global !== 'undefined' && global;
[RUN_GRADLEW]                                                                            ^~~~
[RUN_GRADLEW] /private/var/folders/7s/fss6wldj1wd9sny88lpyfmxh0000gn/T/eas-build-local-nodejs/bcd98d89-6e71-4e69-bedf-310474bf6141/build/expo-app/android/app/build/generated/assets/createBundleReleaseJsAndAssets/index.android.bundle:22219:27: warning: the variable "performance" was not declared in anonymous function " 622#"
[RUN_GRADLEW] if ("object" === typeof performance && "function" === typeof performance.now) {
[RUN_GRADLEW]                           ^~~~~~~~~~~
[RUN_GRADLEW] /private/var/folders/7s/fss6wldj1wd9sny88lpyfmxh0000gn/T/eas-build-local-nodejs/bcd98d89-6e71-4e69-bedf-310474bf6141/build/expo-app/android/app/build/generated/assets/createBundleReleaseJsAndAssets/index.android.bundle:22242:26: warning: the variable "navigator" was not declared in anonymous function " 622#"
[RUN_GRADLEW] "undefined" !== typeof navigator && undefined !== navigator.scheduling && undefined !== navigator.scheduling.isInputPending && navigator.scheduling.isInputPending.bind(navigator.scheduling);
[RUN_GRADLEW]                          ^~~~~~~~~
[RUN_GRADLEW] /private/var/folders/7s/fss6wldj1wd9sny88lpyfmxh0000gn/T/eas-build-local-nodejs/bcd98d89-6e71-4e69-bedf-310474bf6141/build/expo-app/android/app/build/generated/assets/createBundleReleaseJsAndAssets/index.android.bundle:22309:37: warning: the variable "MessageChannel" was not declared in anonymous function " 622#"
[RUN_GRADLEW]   };else if ("undefined" !== typeof MessageChannel) {
[RUN_GRADLEW]                                     ^~~~~~~~~~~~~~
[RUN_GRADLEW] /private/var/folders/7s/fss6wldj1wd9sny88lpyfmxh0000gn/T/eas-build-local-nodejs/bcd98d89-6e71-4e69-bedf-310474bf6141/build/expo-app/android/app/build/generated/assets/createBundleReleaseJsAndAssets/index.android.bundle:34141:34: warning: the variable "requestAnimationFrame" was not declared in function "start 9#"
[RUN_GRADLEW]           this._animationFrame = requestAnimationFrame(this.onUpdate.bind(this));
[RUN_GRADLEW]                                  ^~~~~~~~~~~~~~~~~~~~~
[RUN_GRADLEW] /private/var/folders/7s/fss6wldj1wd9sny88lpyfmxh0000gn/T/eas-build-local-nodejs/bcd98d89-6e71-4e69-bedf-310474bf6141/build/expo-app/android/app/build/generated/assets/createBundleReleaseJsAndAssets/index.android.bundle:65252:25: warning: the variable "Atomics" was not declared in anonymous function " 2244#"
[RUN_GRADLEW]     '%Atomics%': typeof Atomics === 'undefined' ? undefined : Atomics,
[RUN_GRADLEW]                         ^~~~~~~
[RUN_GRADLEW] /private/var/folders/7s/fss6wldj1wd9sny88lpyfmxh0000gn/T/eas-build-local-nodejs/bcd98d89-6e71-4e69-bedf-310474bf6141/build/expo-app/android/app/build/generated/assets/createBundleReleaseJsAndAssets/index.android.bundle:65269:38: warning: the variable "FinalizationRegistry" was not declared in anonymous function " 2244#"
[RUN_GRADLEW]     '%FinalizationRegistry%': typeof FinalizationRegistry === 'undefined' ? undefined : FinalizationRegistry,
[RUN_GRADLEW]                                      ^~~~~~~~~~~~~~~~~~~~
[RUN_GRADLEW] /private/var/folders/7s/fss6wldj1wd9sny88lpyfmxh0000gn/T/eas-build-local-nodejs/bcd98d89-6e71-4e69-bedf-310474bf6141/build/expo-app/android/app/build/generated/assets/createBundleReleaseJsAndAssets/index.android.bundle:65294:35: warning: the variable "SharedArrayBuffer" was not declared in anonymous function " 2244#"
[RUN_GRADLEW]     '%SharedArrayBuffer%': typeof SharedArrayBuffer === 'undefined' ? undefined : SharedArrayBuffer,
[RUN_GRADLEW]                                   ^~~~~~~~~~~~~~~~~
[RUN_GRADLEW] /private/var/folders/7s/fss6wldj1wd9sny88lpyfmxh0000gn/T/eas-build-local-nodejs/bcd98d89-6e71-4e69-bedf-310474bf6141/build/expo-app/android/app/build/generated/assets/createBundleReleaseJsAndAssets/index.android.bundle:65308:25: warning: the variable "WeakRef" was not declared in anonymous function " 2244#"
[RUN_GRADLEW]     '%WeakRef%': typeof WeakRef === 'undefined' ? undefined : WeakRef,
[RUN_GRADLEW]                         ^~~~~~~
[RUN_GRADLEW] /private/var/folders/7s/fss6wldj1wd9sny88lpyfmxh0000gn/T/eas-build-local-nodejs/bcd98d89-6e71-4e69-bedf-310474bf6141/build/expo-app/android/app/build/generated/assets/createBundleReleaseJsAndAssets/index.android.bundle:115952:29: warning: the variable "IDBDatabase" was not declared in function "getMethod"
[RUN_GRADLEW]     if (!(target instanceof IDBDatabase && !(prop in target) && typeof prop === 'string')) {
[RUN_GRADLEW] ^~~~~~~~~~~
[RUN_GRADLEW] /private/var/folders/7s/fss6wldj1wd9sny88lpyfmxh0000gn/T/eas-build-local-nodejs/bcd98d89-6e71-4e69-bedf-310474bf6141/build/expo-app/android/app/build/generated/assets/createBundleReleaseJsAndAssets/index.android.bundle:115961:37: warning: the variable "IDBIndex" was not declared in function "getMethod"
[RUN_GRADLEW]     !(targetFuncName in (useIndex ? IDBIndex : IDBObjectStore).prototype) || !(isWrite || readMethods.includes(targetFuncName))) {
[RUN_GRADLEW]                                     ^~~~~~~~
[RUN_GRADLEW] /private/var/folders/7s/fss6wldj1wd9sny88lpyfmxh0000gn/T/eas-build-local-nodejs/bcd98d89-6e71-4e69-bedf-310474bf6141/build/expo-app/android/app/build/generated/assets/createBundleReleaseJsAndAssets/index.android.bundle:115961:48: warning: the variable "IDBObjectStore" was not declared in function "getMethod"
[RUN_GRADLEW]     !(targetFuncName in (useIndex ? IDBIndex : IDBObjectStore).prototype) || !(isWrite || readMethods.includes(targetFuncName))) {
[RUN_GRADLEW]                                                ^~~~~~~~~~~~~~
[RUN_GRADLEW] /private/var/folders/7s/fss6wldj1wd9sny88lpyfmxh0000gn/T/eas-build-local-nodejs/bcd98d89-6e71-4e69-bedf-310474bf6141/build/expo-app/android/app/build/generated/assets/createBundleReleaseJsAndAssets/index.android.bundle:116015:94: warning: the variable "IDBCursor" was not declared in function "getIdbProxyableTypes"
[RUN_GRADLEW]     return idbProxyableTypes || (idbProxyableTypes = [IDBDatabase, IDBObjectStore, IDBIndex, IDBCursor, IDBTransaction]);
[RUN_GRADLEW]                                                                                              ^~~~~~~~~
[RUN_GRADLEW] /private/var/folders/7s/fss6wldj1wd9sny88lpyfmxh0000gn/T/eas-build-local-nodejs/bcd98d89-6e71-4e69-bedf-310474bf6141/build/expo-app/android/app/build/generated/assets/createBundleReleaseJsAndAssets/index.android.bundle:116015:105: warning: the variable "IDBTransaction" was not declared in function "getIdbProxyableTypes"
[RUN_GRADLEW]     return idbProxyableTypes || (idbProxyableTypes = [IDBDatabase, IDBObjectStore, IDBIndex, IDBCursor, IDBTransaction]);
[RUN_GRADLEW]                                                                                                         ^~~~~~~~~~~~~~
[RUN_GRADLEW] /private/var/folders/7s/fss6wldj1wd9sny88lpyfmxh0000gn/T/eas-build-local-nodejs/bcd98d89-6e71-4e69-bedf-310474bf6141/build/expo-app/android/app/build/generated/assets/createBundleReleaseJsAndAssets/index.android.bundle:116070:32: warning: the variable "DOMException" was not declared in function "error 2#"
[RUN_GRADLEW]         reject(tx.error || new DOMException('AbortError', 'AbortError'));
[RUN_GRADLEW]                                ^~~~~~~~~~~~
[RUN_GRADLEW] /private/var/folders/7s/fss6wldj1wd9sny88lpyfmxh0000gn/T/eas-build-local-nodejs/bcd98d89-6e71-4e69-bedf-310474bf6141/build/expo-app/android/app/build/generated/assets/createBundleReleaseJsAndAssets/index.android.bundle:116162:26: warning: the variable "IDBRequest" was not declared in function "wrap 1#"
[RUN_GRADLEW]     if (value instanceof IDBRequest) return promisifyRequest(value);
[RUN_GRADLEW]                          ^~~~~~~~~~
constants:createReleaseExpoConfig' to ensure correctness due to the following reasons:
[RUN_GRADLEW]   - Gradle detected a problem with the following location: '/private/var/folders/7s/fss6wldj1wd9sny88lpyfmxh0000gn/T/eas-build-local-nodejs/bcd98d89-6e71-4e69-bedf-310474bf6141/build/expo-app/android'. Reason: Task ':expo-constants:createReleaseExpoConfig' uses this output of task ':app:compileReleaseRenderscript' without declaring an explicit or implicit dependency. This can lead to incorrect results being produced, depending on what order the tasks are executed. Please refer to https://docs.gradle.org/7.5.1/userguide/validation_problems.html#implicit_dependency for more details about this problem.
[RUN_GRADLEW]   - Gradle detected a problem with the following location: '/private/var/folders/7s/fss6wldj1wd9sny88lpyfmxh0000gn/T/eas-build-local-nodejs/bcd98d89-6e71-4e69-bedf-310474bf6141/build/expo-app/android'. Reason: Task ':expo-constants:createReleaseExpoConfig' uses this output of task ':app:compileReleaseShaders' without declaring an explicit or implicit dependency. This can lead to incorrect results being produced, depending on what order the tasks are executed. Please refer to https://docs.gradle.org/7.5.1/userguide/validation_problems.html#implicit_dependency for more details about this problem.
[RUN_GRADLEW]   - Gradle detected a problem with the following location: '/private/var/folders/7s/fss6wldj1wd9sny88lpyfmxh0000gn/T/eas-build-local-nodejs/bcd98d89-6e71-4e69-bedf-310474bf6141/build/expo-app/android'. Reason: Task ':expo-constants:createReleaseExpoConfig' uses this output of task ':app:createBundleReleaseJsAndAssets' without declaring an explicit or implicit dependency. This can lead to incorrect results being produced, depending on what order the tasks are executed. Please refer to https://docs.gradle.org/7.5.1/userguide/validation_problems.html#implicit_dependency for more details about this problem.
[RUN_GRADLEW] - Gradle detected a problem with the following location: '/private/var/folders/7s/fss6wldj1wd9sny88lpyfmxh0000gn/T/eas-build-local-nodejs/bcd98d89-6e71-4e69-bedf-310474bf6141/build/expo-app/android'. Reason: Task ':expo-constants:createReleaseExpoConfig' uses this output of task ':app:generateReleaseResValues' without declaring an explicit or implicit dependency. This can lead to incorrect results being produced, depending on what order the tasks are executed. Please refer to https://docs.gradle.org/7.5.1/userguide/validation_problems.html#implicit_dependency for more details about this problem.
[RUN_GRADLEW]   - Gradle detected a problem with the following location: '/private/var/folders/7s/fss6wldj1wd9sny88lpyfmxh0000gn/T/eas-build-local-nodejs/bcd98d89-6e71-4e69-bedf-310474bf6141/build/expo-app/android'. Reason: Task ':expo-constants:createReleaseExpoConfig' uses this output of task ':app:mapReleaseSourceSetPaths' without declaring an explicit or implicit dependency. This can lead to incorrect results being produced, depending on what order the tasks are executed. Please refer to https://docs.gradle.org/7.5.1/userguide/validation_problems.html#implicit_dependency for more details about this problem.
[RUN_GRADLEW]   - Gradle detected a problem with the following location: '/private/var/folders/7s/fss6wldj1wd9sny88lpyfmxh0000gn/T/eas-build-local-nodejs/bcd98d89-6e71-4e69-bedf-310474bf6141/build/expo-app/android'. Reason: Task ':expo-constants:createReleaseExpoConfig' uses this output of task ':app:mergeReleaseShaders' without declaring an explicit or implicit dependency. This can lead to incorrect results being produced, depending on what order the tasks are executed. Please refer to https://docs.gradle.org/7.5.1/userguide/validation_problems.html#implicit_dependency for more details about this problem.
[RUN_GRADLEW]   - Gradle detected a problem with the following location: '/private/var/folders/7s/fss6wldj1wd9sny88lpyfmxh0000gn/T/eas-build-local-nodejs/bcd98d89-6e71-4e69-bedf-310474bf6141/build/expo-app/android'. Reason: Task ':expo-constants:createReleaseExpoConfig' uses this output of task ':app:processReleaseGoogleServices' without declaring an explicit or implicit dependency. This can lead to incorrect results being produced, depending on what order the tasks are executed. Please refer to https://docs.gradle.org/7.5.1/userguide/validation_problems.html#implicit_dependency for more details about this problem.

[RUN_GRADLEW]   - Gradle detected a problem with the following location: '/private/var/folders/7s/fss6wldj1wd9sny88lpyfmxh0000gn/T/eas-build-local-nodejs/bcd98d89-6e71-4e69-bedf-310474bf6141/build/expo-app/android'. Reason: Task ':expo-updates:createReleaseExpoManifest' uses this output of task ':app:compileReleaseRenderscript' without declaring an explicit or implicit dependency. This can lead to incorrect results being produced, depending on what order the tasks are executed. Please refer to https://docs.gradle.org/7.5.1/userguide/validation_problems.html#implicit_dependency for more details about this problem.
[RUN_GRADLEW]   - Gradle detected a problem with the following location: '/private/var/folders/7s/fss6wldj1wd9sny88lpyfmxh0000gn/T/eas-build-local-nodejs/bcd98d89-6e71-4e69-bedf-310474bf6141/build/expo-app/android'. Reason: Task ':expo-updates:createReleaseExpoManifest' uses this output of task ':app:compileReleaseShaders' without declaring an explicit or implicit dependency. This can lead to incorrect results being produced, depending on what order the tasks are executed. Please refer to https://docs.gradle.org/7.5.1/userguide/validation_problems.html#implicit_dependency for more details about this problem.
[RUN_GRADLEW]   - Gradle detected a problem with the following location: '/private/var/folders/7s/fss6wldj1wd9sny88lpyfmxh0000gn/T/eas-build-local-nodejs/bcd98d89-6e71-4e69-bedf-310474bf6141/build/expo-app/android'. Reason: Task ':expo-updates:createReleaseExpoManifest' uses this output of task ':app:createBundleReleaseJsAndAssets' without declaring an explicit or implicit dependency. This can lead to incorrect results being produced, depending on what order the tasks are executed. Please refer to https://docs.gradle.org/7.5.1/userguide/validation_problems.html#implicit_dependency for more details about this problem.
[RUN_GRADLEW]   - Gradle detected a problem with the following location: '/private/var/folders/7s/fss6wldj1wd9sny88lpyfmxh0000gn/T/eas-build-local-nodejs/bcd98d89-6e71-4e69-bedf-310474bf6141/build/expo-app/android'. Reason: Task ':expo-updates:createReleaseExpoManifest' uses this output of task ':app:generateReleaseResValues' without declaring an explicit or implicit dependency. This can lead to incorrect results being produced, depending on what order the tasks are executed. Please refer to https://docs.gradle.org/7.5.1/userguide/validation_problems.html#implicit_dependency for more details about this problem.
[RUN_GRADLEW]   - Gradle detected a problem with the following location: '/private/var/folders/7s/fss6wldj1wd9sny88lpyfmxh0000gn/T/eas-build-local-nodejs/bcd98d89-6e71-4e69-bedf-310474bf6141/build/expo-app/android'. Reason: Task ':expo-updates:createReleaseExpoManifest' uses this output of task ':app:mapReleaseSourceSetPaths' without declaring an explicit or implicit dependency. This can lead to incorrect results being produced, depending on what order the tasks are executed. Please refer to https://docs.gradle.org/7.5.1/userguide/validation_problems.html#implicit_dependency for more details about this problem.
[RUN_GRADLEW]   - Gradle detected a problem with the following location: '/private/var/folders/7s/fss6wldj1wd9sny88lpyfmxh0000gn/T/eas-build-local-nodejs/bcd98d89-6e71-4e69-bedf-310474bf6141/build/expo-app/android'. Reason: Task ':expo-updates:createReleaseExpoManifest' uses this output of task ':app:mergeReleaseAssets' without declaring an explicit or implicit dependency. This can lead to incorrect results being produced, depending on what order the tasks are executed. Please refer to https://docs.gradle.org/7.5.1/userguide/validation_problems.html#implicit_dependency for more details about this problem.
[RUN_GRADLEW]   - Gradle detected a problem with the following location: '/private/var/folders/7s/fss6wldj1wd9sny88lpyfmxh0000gn/T/eas-build-local-nodejs/bcd98d89-6e71-4e69-bedf-310474bf6141/build/expo-app/android'. Reason: Task ':expo-updates:createReleaseExpoManifest' uses this output of task ':app:mergeReleaseShaders' without declaring an explicit or implicit dependency. This can lead to incorrect results being produced, depending on what order the tasks are executed. Please refer to https://docs.gradle.org/7.5.1/userguide/validation_problems.html#implicit_dependency for more details about this problem.
[RUN_GRADLEW]   - Gradle detected a problem with the following location: '/private/var/folders/7s/fss6wldj1wd9sny88lpyfmxh0000gn/T/eas-build-local-nodejs/bcd98d89-6e71-4e69-bedf-310474bf6141/build/expo-app/android'. Reason: Task ':expo-updates:createReleaseExpoManifest' uses this output of task ':app:processReleaseGoogleServices' without declaring an explicit or implicit dependency. This can lead to incorrect results being produced, depending on what order the tasks are executed. Please refer to https://docs.gradle.org/7.5.1/userguide/validation_problems.html#implicit_dependency for more details about this problem.
[RUN_GRADLEW] Deprecated Gradle features were used in this build, making it incompatible with Gradle 8.0.
[RUN_GRADLEW] You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins.
[RUN_GRADLEW] See https://docs.gradle.org/7.5.1/userguide/command_line_interface.html#sec:command_line_warnings
[RUN_GRADLEW] Execution optimizations have been disabled for 2 invalid unit(s) of work during this build to ensure correctness.
[RUN_GRADLEW] Please consult deprecation warnings for more details.
[RUN_GRADLEW] 130 actionable tasks: 130 executed
[RUN_GRADLEW] Error: @build-script-error-begin
[RUN_GRADLEW] Error loading application entry point. If your entry point is not index.js, please set ENTRY_FILE environment variable with your app entry point.
[RUN_GRADLEW] @build-script-error-end
[RUN_GRADLEW]     at /private/var/folders/7s/fss6wldj1wd9sny88lpyfmxh0000gn/T/eas-build-local-nodejs/bcd98d89-6e71-4e69-bedf-310474bf6141/build/expo-app/node_modules/expo-updates/scripts/createManifest.js:36:11
[RUN_GRADLEW]     at Object.<anonymous> (/private/var/folders/7s/fss6wldj1wd9sny88lpyfmxh0000gn/T/eas-build-local-nodejs/bcd98d89-6e71-4e69-bedf-310474bf6141/build/expo-app/node_modules/expo-updates/scripts/createManifest.js:99:3)
[RUN_GRADLEW]     at Module._compile (node:internal/modules/cjs/loader:1254:14)
[RUN_GRADLEW]     at Module._extensions..js (node:internal/modules/cjs/loader:1308:10)
[RUN_GRADLEW]     at Module.load (node:internal/modules/cjs/loader:1117:32)
[RUN_GRADLEW]     at Module._load (node:internal/modules/cjs/loader:958:12)
[RUN_GRADLEW]     at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:81:12)
[RUN_GRADLEW]     at node:internal/main/run_main_module:23:47
[RUN_GRADLEW] FAILURE: Build completed with 2 failures.
[RUN_GRADLEW] 1: Task failed with an exception.
[RUN_GRADLEW] -----------
[RUN_GRADLEW] * What went wrong:
[RUN_GRADLEW] Execution failed for task ':expo-updates:createReleaseExpoManifest'.
[RUN_GRADLEW] > Process 'command 'node'' finished with non-zero exit value 1
[RUN_GRADLEW] * Try:
[RUN_GRADLEW] > Run with --stacktrace option to get the stack trace.
[RUN_GRADLEW] > Run with --info or --debug option to get more log output.
[RUN_GRADLEW] > Run with --scan to get full insights.
[RUN_GRADLEW] ==============================================================================
[RUN_GRADLEW] 2: Task failed with an exception.
[RUN_GRADLEW] -----------
[RUN_GRADLEW] * What went wrong:
[RUN_GRADLEW] java.lang.StackOverflowError (no error message)
[RUN_GRADLEW] * Try:
[RUN_GRADLEW] > Run with --stacktrace option to get the stack trace.
[RUN_GRADLEW] > Run with --info or --debug option to get more log output.
[RUN_GRADLEW] > Run with --scan to get full insights.
[RUN_GRADLEW] ==============================================================================
[RUN_GRADLEW] * Get more help at https://help.gradle.org
[RUN_GRADLEW] BUILD FAILED in 42s
[RUN_GRADLEW] Error: Gradle build failed with unknown error. See logs for the "Run gradlew" phase for more information.

Build failed
Gradle build failed with unknown error. See logs for the "Run gradlew" phase for more information.
npx exited with non-zero code: 1
    Error: build command failed.

Interestingly, the build suceedes in development build.

Here is my eas.json

{
  "cli": {
    "version": ">= 3.12.1"
  },
  "build": {
    "development": {
      "developmentClient": true,
      "distribution": "internal",
      "channel": "development",
      "env": {
        "CUSTOM_ENVIRONMENT": "development"
      }
    },
    "preview": {
      "distribution": "internal",
      "channel": "preview",
      "env": {
        "CUSTOM_ENVIRONMENT": "staging"
      }
    },
    "production": {
      "channel": "production",
      "env": {
        "CUSTOM_ENVIRONMENT": "production"
      }
    }
  },
  "submit": {
    "production": {}
  }
}

It would be helpful to get any hints to solve this issue.

I fixed my issue by changing index.ts to index.js.
Here is the reference.

1 Like

Hey @keunwoo

I’ve tried to build in development build and everything works fine there.

On my side I don’t have the index.ts nor the index.js. Im using the Expo managed workflow, and I only have the App.js file.

Is there another work around?

Yes. My project also built without problems in development build.
I’m also using Expo managed workflow with expo router.
If that is the case, you might have index.(ts|js) in the root folder.
At least that is what the document recommends.

I was using index.ts for the entry file, which was the cause of the problem.