expo / config-plugins

Out-of-tree Expo config plugins for packages that haven't adopted the config plugin system yet.
465 stars 99 forks source link

Error on building with EAS on config-plugins-react-native-branch #248

Closed NicolasRecomiendApp closed 1 month ago

NicolasRecomiendApp commented 1 month ago

Summary

Hi everyone! First of all, the same project with same versions on package.json was building with EAS normally, the 3rd week of August. Actually it throws an error on running gradlew phase (image1). I've updated EAS cli to the latest version, expo-config-plugins to latest too, and currently have @config-plugins/react-native-branch 7.0.0 and react-native-branch on 6.0.0 as official docs recommend for SDK 50 of Expo.

Using managed with expo 50.0.8, not ejected.

I have everything configured as docs recommend, even deeplinks are running well with branch on development actually, but cannot build on Android. iOs is building correctly.

Tried to reproduce the error from a new project, installing the needed dependencies, but it throws another errors not related with the one appearing on my logs.

Those are the logs of gradlew:

Running 'gradlew :app:assembleDebug' in /home/expo/workingdir/build/android
Welcome to Gradle 8.3!
Here are the highlights of this release:
- Faster Java compilation
 - Reduced memory usage
 - Support for running on Java 20
For more details see https://docs.gradle.org/8.3/release-notes.html
To honour the JVM settings for this build a single-use Daemon process will be forked. For more on this, please refer to https://docs.gradle.org/8.3/userguide/gradle_daemon.html#sec:disabling_the_daemon in the Gradle documentation.
Daemon will be stopped at the end of the build
Path for java installation '/usr/lib/jvm/openjdk-17' (Common Linux Locations) does not contain a java executable
> Task :gradle-plugin:pluginDescriptors
> Task :expo-dev-launcher-gradle-plugin:pluginDescriptors
> Task :gradle-plugin:processResources
> Task :expo-dev-launcher-gradle-plugin:processResources
> Task :expo-dev-launcher-gradle-plugin:compileKotlin
> Task :expo-dev-launcher-gradle-plugin:compileJava
NO-SOURCE
> Task :expo-dev-launcher-gradle-plugin:classes
> Task :expo-dev-launcher-gradle-plugin:jar
> Task :expo-dev-launcher-gradle-plugin:inspectClassesForKotlinIC
> Task :gradle-plugin:compileKotlin
> Task :gradle-plugin:compileJava
NO-SOURCE
> Task :gradle-plugin:classes
> Task :gradle-plugin:jar
> Task :gradle-plugin:inspectClassesForKotlinIC
> Configure project :app
ℹ️  Applying gradle plugin 'expo-dev-launcher-gradle-plugin' (expo-dev-launcher@3.6.10)
FAILURE: Build completed with 2 failures.
1:
Task failed with an exception.
-----------
* Where:
Script '/home/expo/workingdir/build/node_modules/expo-modules-core/android/ExpoModulesCorePlugin.gradle' line: 40
* What went wrong:
A problem occurred evaluating project ':config-plugins-react-native-branch'.
> Failed to apply plugin class 'KotlinExpoModulesCorePlugin'.
   > Could not find method android() for arguments [KotlinExpoModulesCorePlugin$_apply_closure4@71669481] on project ':config-plugins-react-native-branch' of type org.gradle.api.Project.
* Try:
> 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/.
==============================================================================
2: Task failed with an exception.
-----------
* What went wrong:
A problem occurred configuring project ':config-plugins-react-native-branch'.
> 'kotlin-android' plugin requires one of the Android Gradle plugins.
  Please apply one of the following plugins to ':config-plugins-react-native-branch' project:
  - com.android.application
    - com.android.library
    - com.android.dynamic-feature
- com.android.test
    - com.android.instantapp
    - com.android.feature
* Try:
> 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 1m 39s
10 actionable tasks: 10 executed
Error: Gradle build failed with unknown error. See logs for the "Run gradlew" phase for more information.

If needed I can response with more information. Thanks in advance for your time. error on build

UPDATE: I removed the library of react-native-branch, @config-plugins/react-native-branch and removed it on plugins from app.json, and it builds regularly now. We tried, as a team, to update SKD of Expo on many of the 50 SDK subversions, and none of them run. We are now configuring a Repoducible demo to help you find the problem. Thanks in advance.

Config Plugin

@config-plugins/react-native-branch

What platform(s) does this occur on?

Android

SDK Version

50

Reproducible demo

No reproducible demo by now.