EAS build fails: Execution failed for task ':expo-crypto:compileReleaseKotlin'.
See original GitHub issueSummary
Running eas build
fails with the below logs in the “Run gradle” step
View build logs
> Task :expo-constants:javaPreCompileRelease
> Task :expo-constants:compileReleaseJavaWithJavac
> Task :expo-constants:bundleLibRuntimeToJarRelease
> Task :expo-crypto:compileReleaseAidl NO-SOURCE
> Task :expo-crypto:generateReleaseBuildConfig
> Task :expo-crypto:parseReleaseLocalResources
> Task :expo-crypto:generateReleaseRFile
> Task :expo-crypto:compileReleaseKotlin FAILED
[stderr] e: Incompatible classes were found in dependencies. Remove them from the classpath or use '-Xskip-metadata-version-check' to suppress errors
[stderr] e: /home/expo/.gradle/caches/transforms-3/2b1af5f9399fb17298398b88f55cd8d3/transformed/jetified-kotlin-stdlib-jdk7-1.6.10.jar!/META-INF/kotlin-stdlib-jdk7.kotlin_module: Module was compiled with an incompatible version of Kotlin. The binary version of its metadata is 1.6.0, expected version is 1.4.1.
[stderr] e: /home/expo/.gradle/caches/transforms-3/391b3c71caebe9b16d839d51b84fdf1b/transformed/jetified-kotlin-stdlib-1.6.10.jar!/META-INF/kotlin-stdlib.kotlin_module: Module was compiled with an incompatible version of Kotlin. The binary version of its metadata is 1.6.0, expected version is 1.4.1.
[stderr] e: /home/expo/.gradle/caches/transforms-3/a7d39c6118917414b1838d435183459d/transformed/jetified-kotlin-stdlib-common-1.6.10.jar!/META-INF/kotlin-stdlib-common.kotlin_module: Module was compiled with an incompatible version of Kotlin. The binary version of its metadata is 1.6.0, expected version is 1.4.1.
[stderr] e: /home/expo/workingdir/build/node_modules/expo-modules-core/android/build/intermediates/compile_library_classes_jar/release/classes.jar!/META-INF/expo-modules-core_release.kotlin_module: Module was compiled with an incompatible version of Kotlin. The binary version of its metadata is 1.6.0, expected version is 1.4.1.
[stderr] e: /home/expo/workingdir/build/node_modules/expo-crypto/android/src/main/java/expo/modules/crypto/CryptoModule.kt: (21, 44): Unresolved reference: apply
[stderr] e: /home/expo/workingdir/build/node_modules/expo-crypto/android/src/main/java/expo/modules/crypto/CryptoModule.kt: (21, 52): Unresolved reference: update
[stderr] e: /home/expo/workingdir/build/node_modules/expo-crypto/android/src/main/java/expo/modules/crypto/CryptoModule.kt: (21, 64): Unresolved reference: toByteArray
[stderr] e: /home/expo/workingdir/build/node_modules/expo-crypto/android/src/main/java/expo/modules/crypto/CryptoModule.kt: (23, 15): Class 'kotlin.Unit' was compiled with an incompatible version of Kotlin. The binary version of its metadata is 1.6.0, expected version is 1.4.1.
[stderr] The class is loaded from /home/expo/.gradle/caches/transforms-3/391b3c71caebe9b16d839d51b84fdf1b/transformed/jetified-kotlin-stdlib-1.6.10.jar!/kotlin/Unit.class
[stderr] e: /home/expo/workingdir/build/node_modules/expo-crypto/android/src/main/java/expo/modules/crypto/CryptoModule.kt: (27, 43): Unresolved reference: digest
[stderr] e: /home/expo/workingdir/build/node_modules/expo-crypto/android/src/main/java/expo/modules/crypto/CryptoModule.kt: (28, 5): Class 'kotlin.Unit' was compiled with an incompatible version of Kotlin. The binary version of its metadata is 1.6.0, expected version is 1.4.1.
[stderr] The class is loaded from /home/expo/.gradle/caches/transforms-3/391b3c71caebe9b16d839d51b84fdf1b/transformed/jetified-kotlin-stdlib-1.6.10.jar!/kotlin/Unit.class
[stderr] e: /home/expo/workingdir/build/node_modules/expo-crypto/android/src/main/java/expo/modules/crypto/CryptoModule.kt: (31, 17): Class 'kotlin.Unit' was compiled with an incompatible version of Kotlin. The binary version of its metadata is 1.6.0, expected version is 1.4.1.
[stderr] The class is loaded from /home/expo/.gradle/caches/transforms-3/391b3c71caebe9b16d839d51b84fdf1b/transformed/jetified-kotlin-stdlib-1.6.10.jar!/kotlin/Unit.class
[stderr] e: /home/expo/workingdir/build/node_modules/expo-crypto/android/src/main/java/expo/modules/crypto/CryptoModule.kt: (34, 29): Unresolved reference: joinToString
[stderr] e: /home/expo/workingdir/build/node_modules/expo-crypto/android/src/main/java/expo/modules/crypto/CryptoModule.kt: (39, 17): Class 'kotlin.Unit' was compiled with an incompatible version of Kotlin. The binary version of its metadata is 1.6.0, expected version is 1.4.1.
[stderr] The class is loaded from /home/expo/.gradle/caches/transforms-3/391b3c71caebe9b16d839d51b84fdf1b/transformed/jetified-kotlin-stdlib-1.6.10.jar!/kotlin/Unit.class
[stderr] e: /home/expo/workingdir/build/node_modules/expo-crypto/android/src/main/java/expo/modules/crypto/CryptoModule.kt: (42, 17): Class 'kotlin.Unit' was compiled with an incompatible version of Kotlin. The binary version of its metadata is 1.6.0, expected version is 1.4.1.
[stderr] The class is loaded from /home/expo/.gradle/caches/transforms-3/391b3c71caebe9b16d839d51b84fdf1b/transformed/jetified-kotlin-stdlib-1.6.10.jar!/kotlin/Unit.class
[stderr] e: /home/expo/workingdir/build/node_modules/expo-crypto/android/src/main/java/expo/modules/crypto/CryptoPackage.kt: (8, 80): Unresolved reference: listOf
w: Detected multiple Kotlin daemon sessions at build/kotlin/sessions
Deprecated Gradle features were used in this build, making it incompatible with Gradle 8.0.
You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins.
See https://docs.gradle.org/7.3.3/userguide/command_line_interface.html#sec:command_line_warnings
Execution optimizations have been disabled for 4 invalid unit(s) of work during this build to ensure correctness.
Please consult deprecation warnings for more details.
275 actionable tasks: 275 executed
Unable to list file systems to check whether they can be watched. The whole state of the virtual file system has been discarded. Reason: Could not query file systems: could not open mount file (errno 2: No such file or directory)
[stderr] FAILURE: Build failed with an exception.
[stderr] * What went wrong:
[stderr] Execution failed for task ':expo-crypto:compileReleaseKotlin'.
[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] * Get more help at https://help.gradle.org
[stderr] BUILD FAILED in 7m 13s
Error: Gradle build failed with unknown error. Please see logs for the "Run gradlew" phase.
Note:
I scanned the repo issues and found out there are more modules with this error Execution failed for task ':expo-[module-name-here]:compileReleaseKotlin'
. And it seems like there is a different version of kotlin needed than what’s running. Is this something related to bigger issue which can be solved within the build infra or does every expo package needs to address it? (Also by looking at other issues such as #13233, #17253, #16291, it seems like they are not fully resolved but the issues were closed)
Managed or bare workflow? If you have ios/
or android/
directories in your project, the answer is bare!
managed
What platform(s) does this occur on?
Android
SDK Version (managed workflow only)
45.0.3
Environment
expo-env-info 1.0.3 environment info:
System:
OS: macOS 12.3.1
Shell: 5.8 - /bin/zsh
Binaries:
Node: 16.14.2 - /usr/local/bin/node
npm: 8.5.0 - /usr/local/bin/npm
Watchman: 4.9.0 - /usr/local/bin/watchman
Managers:
CocoaPods: 1.9.1 - /usr/local/bin/pod
SDKs:
iOS SDK:
Platforms: DriverKit 21.4, iOS 15.4, macOS 12.3, tvOS 15.4, watchOS 8.5
Android SDK:
API Levels: 26
System Images: android-26 | Google APIs Intel x86 Atom_64
IDEs:
Xcode: 13.3/13E113 - /usr/bin/xcodebuild
npmPackages:
babel-preset-expo: ~9.1.0 => 9.1.0
expo: ~45.0.3 => 45.0.3
react: 17.0.2 => 17.0.2
react-native: 0.68.2 => 0.68.2
npmGlobalPackages:
expo-cli: 5.3.0
Expo Workflow: managed
Reproducible demo
(check the logs above)
Issue Analytics
- State:
- Created a year ago
- Comments:6 (5 by maintainers)
Top Results From Across the Web
EAS build fails: Execution failed for task ':expo-constants ...
Summary I have sdk 42, node: 12.22.11 Success on classic build of expo build but fail in eas build as expo build will...
Read more >EAS build fails for Android: Execution failed for task ':app ...
I see the following error on my build (link to failing build): > Task :app:mergeReleaseNativeLibs FAILED w: Detected multiple Kotlin daemon ...
Read more >Execution failed for task ':expo:compileReleaseKotlin'
I am building a react native app using eas. Its failing each ... A failure occurred while executing org.jetbrains.kotlin.compilerRunner.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Hi @madhums, thanks for your report. However, to fix it I have to have more information.
expo-crypto
are you using (you can runyarn why expo-crypto
)?I see, thank you for this! I am however unable to use my account because
eas update
is not available yet.Where should I go for help?