EAS build failing due to internal issue - react-native

I am trying to migrate from classical builds to eas but the builds are failing due to some internal reason.
This happened with both bare and managed workflows,
Expo Cli version : 5.2.0
Expo SDK Version : 44.0.0
Here is the error log :
Task :react-native-webview:compileReleaseRenderscript NO-SOURCE
Task :react-native-webview:generateReleaseResValues
Task :react-native-webview:generateReleaseResources
Task :react-native-webview:packageReleaseResources
Task :unimodules-task-manager-interface:compileReleaseRenderscript NO-SOURCE
Task :unimodules-task-manager-interface:generateReleaseResValues
Task :unimodules-task-manager-interface:generateReleaseResources
Task :unimodules-task-manager-interface:packageReleaseResources
Task :app:mergeReleaseResources
Task :app:mergeReleaseResources FAILED
[stderr] FAILURE: Build failed with an exception.
[stderr] * What went wrong:
[stderr] Execution failed for task ‘:app:mergeReleaseResources’.
[stderr] >
[stderr] A failure occurred while executing com.android.build.gradle.internal.tasks.Workers$ActionFacade
[stderr] > Android resource compilation failed
[stderr] /home/expo/workingdir/build/android/app/build/intermediates/incremental/mergeReleaseResources/merged.dir/values/values.xml:7078: AAPT: error: duplicate value for resource ‘attr/show_buffering’ with config ‘’.
[stderr]
[stderr] /home/expo/workingdir/build/android/app/build/intermediates/incremental/mergeReleaseResources/merged.dir/values/values.xml:7078: AAPT: error: resource previously defined here.
[stderr]
[stderr] /home/expo/workingdir/build/android/app/build/intermediates/incremental/mergeReleaseResources/merged.dir/values/values.xml: AAPT: error: file failed to compile.
[stderr]
[stderr] * Try:
[stderr] 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.
[stderr] * Get more help at https://help.gradle.org
[stderr] BUILD FAILED in 5m 47s
Deprecated Gradle features were used in this build, making it incompatible with Gradle 7.0.
Use ‘–warning-mode all’ to show the individual deprecation warnings.
See Command-Line Interface
167 actionable tasks: 167 executed
Error: Gradle build failed with unknown error. See logs for the “Run gradlew” phase for more information.
Please advise.

Related

Problem with unimodules-permissions-interface when exporting

I have an app that I was developing and it was exporting correctly until I upgraded to EAS. Now with npm start it emulates well, it works correctly but the APK is not generated. What it tells me in the build is the following:
[stderr] FAILURE: Build failed with an exception.
[stderr] * What went wrong:
[stderr] Execution failed for task ':unimodules-permissions-interface:compileReleaseJavaWithJavac'.
[stderr] > Compilation failed; see the compiler error output for details.
[stderr] * Try:
[stderr] 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.
[stderr] * Get more help at https://help.gradle.org
[stderr] BUILD FAILED in 4m 12s
Deprecated Gradle features were used in this build, making it incompatible with Gradle 7.0.
Use '--warning-mode all' to show the individual deprecation warnings.
See https://docs.gradle.org/6.9/userguide/command_line_interface.html#sec:command_line_warnings
438 actionable tasks: 438 executed
Error: Gradle build failed with unknown error. See logs for the "Run gradlew" phase for more information.

Deploy React Native Expo for Android: error Execution failed for task ':app:bundleReleaseJsAndAssets'

Trying to deploy my react native project, got as far as putting eas build --platform android in the terminal and got this error
[stderr] FAILURE: Build completed with 2 failures.
[stderr] 1: Task failed with an exception.
[stderr] -----------
[stderr] * What went wrong:
[stderr] Execution failed for task ':app:bundleReleaseJsAndAssets'.
[stderr] > Process 'command 'node'' finished with non-zero exit value 1
[stderr] * Try:
[stderr] > Run with --stacktrace option to get the stack trace.
[stderr] > Run with --info or --debug option to get more log output.
[stderr] > Run with --scan to get full insights.
[stderr] ==============================================================================
[stderr] 2: Task failed with an exception.
[stderr] -----------
[stderr] * What went wrong:
[stderr] java.lang.StackOverflowError (no error message)
[stderr] * Try:
[stderr] > Run with --stacktrace option to get the stack trace.
[stderr] > Run with --info or --debug option to get more log output.
[stderr] > Run with --scan to get full insights.
I tried killing the terminal and trying again, making sure android studio is closed, and having been searching the web but to no avail. Thanks in advance!

react native expo - Execution failed for task ':expo-updates:compileReleaseKotlin'

In order to add OTA updates functionality, I installed expo-updates package and before that I configured expo-modules#latest in my react native bare project. Everything worked fine, build successfully, but when I execute the command eas build -p android --profile preview, it crashes/build-fails after 6 mins due to the following error:
[stderr] FAILURE: Build completed with 2 failures.
[stderr] 1: Task failed with an exception.
[stderr] -----------
[stderr] * What went wrong:
[stderr] Execution failed for task ':expo-updates:compileReleaseKotlin'.
[stderr] > A failure occurred while executing org.jetbrains.kotlin.compilerRunner.GradleCompilerRunnerWithWorkers$GradleKotlinCompilerWorkAction
[stderr] > Compilation error. See log for more details
[stderr] * Try:
[stderr] > Run with --stacktrace option to get the stack trace.
[stderr] > Run with --info or --debug option to get more log output.
[stderr] > Run with --scan to get full insights.
[stderr] ==============================================================================
[stderr] 2: Task failed with an exception.
[stderr] -----------
[stderr] * What went wrong:
[stderr] java.lang.StackOverflowError (no error message)
[stderr] * Try:
[stderr] > Run with --stacktrace option to get the stack trace.
[stderr] > Run with --info or --debug option to get more log output.
[stderr] > Run with --scan to get full insights.
[stderr] ==============================================================================
[stderr] * Get more help at https://help.gradle.org
[stderr] BUILD FAILED in 4m 53s
Error: Gradle build failed with unknown error. See logs for the "Run gradlew" phase for more information.
I searched for hours related to this issue and found something similar here https://github.com/expo/expo/issues/19259#issuecomment-1259724391, applied the changes, and it is still throwing the same build everytime... Everything works in development though, no crashes there...
My env:
{
...,
"dependencies": {
"react": "18.1.0",
"react-native": "0.70.0",
"expo": "^46.0.0",
"expo-updates": "~0.14.6",
},
...
}
I am not able to create a build due to this error, if someone could help, I would really appreciate it!
Feel free to ask any more details if needed!

Getting an "Android resource compilation failed" error while trying to build my react native app using expo

I am trying to build an android apk of my react native app. I was trying two commands expo-cli build:android -t apk and expo build:android. But I am getting this error repeatedly. If anyone can give any clue about this error please do the help :')
[stderr] FAILURE: Build failed with an exception.
[stderr] * What went wrong:
[stderr] Execution failed for task ':app:mergeReleaseResources'.
[stderr] > A failure occurred while executing com.android.build.gradle.internal.tasks.Workers$ActionFacade
[stderr] > Android resource compilation failed
[stderr] /app/turtle/workingdir/android/sdk41/android-shell-app/app/src/main/res/values/colors.xml:13:3-57: AAPT: error: invalid color.
[stderr]
[stderr] /app/turtle/workingdir/android/sdk41/android-shell-app/app/build/intermediates/incremental/mergeReleaseResources/merged.dir/values/values.xml: AAPT: error: file failed to compile.
[stderr]
[stderr] * Try:
[stderr] 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.
[stderr] * Get more help at https://help.gradle.org
[stderr] BUILD FAILED in 31s
I have attached a screenshot of the error I am getting. Please give a look.
Build failed with an exception.

I can't build expo app (:app:mergeReleaseResources)

I build expo app yesterday.
But I can't build expo app today (another app).
I don't update at all.
I search google but can't get any answer
exp build:android
this is expo app build log
FAILED
[stderr] FAILURE: Build failed with an exception.
[stderr] * What went wrong:
[stderr] Execution failed for task ':app:mergeReleaseResources'.
[stderr] > java.util.concur rent.ExecutionException:
com.android.builder.internal.aapt.v2.Aapt2Exception: Android resource
compilation failed
[stderr] /app/turtle/workingdir/android/sdk33/android-shell-
app/app/src/main/res/mipmap-xxhdpi/ic_launcher.png: error: failed to read PNG
signature: file does not start with PNG signature.
[stderr] * Try:
[stderr] 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.
[stderr] * Get more help at https://help.gradle.org
[stderr] BUILD FAILED in 43s
`
I was facing this issue too, and I resolved it by using "expo-cli build:android -t apk" instead of "exp build:android". This built the apk without any errors and all the images rendered perfectly.
Make sure you have expo-cli installed.