Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: Could not resolve com.google.firebase:firebase-messaging during react native expo eas android gradle build #1776

Closed
2 of 3 tasks
alexwolf22 opened this issue Dec 18, 2024 · 2 comments

Comments

@alexwolf22
Copy link

alexwolf22 commented Dec 18, 2024

What happened?

I'm attempting to setup one signal in my expo react native app.

I have these onesignal versions

    "react-native-onesignal": "^5.2.8",
     "onesignal-expo-plugin": "^2.0.3",

and this in my app config

 plugins: [
    [
      'onesignal-expo-plugin',
      {
        mode: appEnv === 'production' ? 'production' : 'development',
        devTeam: '...',
        iPhoneDeploymentTarget: '13.4',
        smallIcons: ['./assets/android-notification-icons/ic_stat_onesignal_default.png'],
        largeIcons: ['./assets/android-notification-icons/ic_onesignal_large_icon_default.png'],
      },
    ],

When I run eas build --platform android I'm getting the following error when eas build in expo

Build failed with an exception.
* What went wrong:
Could not determine the dependencies of task ':app:lintVitalReportRelease'.
> Could not resolve all dependencies for configuration ':app:releaseRuntimeClasspath'.
   > Could not resolve com.google.firebase:firebase-messaging:{require [21.0.0, 23.4.99]; prefer 23.4.0}.
     Required by:
         project :app > project :react-native-onesignal > com.onesignal:OneSignal:5.1.26 > com.onesignal:notifications:5.1.26
      > Failed to list versions for com.google.firebase:firebase-messaging.
         > Unable to load Maven meta-data from https://www.jitpack.io/com/google/firebase/firebase-messaging/maven-metadata.xml.
            > Could not GET 'https://www.jitpack.io/com/google/firebase/firebase-messaging/maven-metadata.xml'.
               > Read timed out
* 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 4m 32s
20 actionable tasks: 20 executed
Error: Gradle build failed with unknown error. See logs for the "Run gradlew" phase for more information.

I have been trying to find a solution to this for a while and can't. I have the lasest one signal react native package versions.

I wanted to post here in case is a version/dependecy properly with onesignal. Could potentially be on expo's side.

Can I manually install the JS version of > Could not resolve com.google.firebase:firebase-messaging:{require [21.0.0, 23.4.99]; prefer 23.4.0}.?

Steps to reproduce?

- Install lastest versions of one signal for expo project
- run `eas build --platform android`
- See in expo the error posted above during the `Run gradlew` build step

What did you expect to happen?

No error on expo eas build since have lastest onesignal package versions

React Native OneSignal SDK version

5.2.8

Which platform(s) are affected?

  • iOS
  • Android

Relevant log output

Running 'gradlew :app:assembleRelease' in /home/expo/workingdir/build/android
Downloading https://services.gradle.org/distributions/gradle-8.8-all.zip
10%.
20%
30%.
40%
50%.
60
%.
70%.
80%.
90%
100%
Welcome to Gradle 8.8!
Here are the highlights of this release:
 - Running Gradle on Java 22
 - Configurable Gradle daemon JVM
 - Improved IDE performance for large projects
For more details see https://docs.gradle.org/8.8/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.8/userguide/gradle_daemon.html#sec:disabling_the_daemon in the Gradle documentation.
Daemon will be stopped at the end of the build
> Task :gradle-plugin:settings-plugin:checkKotlinGradlePluginConfigurationErrors
> Task :gradle-plugin:settings-plugin:pluginDescriptors
> Task :gradle-plugin:settings-plugin:processResources
> Task :gradle-plugin:settings-plugin:compileKotlin
> Task :gradle-plugin:settings-plugin:compileJava NO-SOURCE
> Task :gradle-plugin:settings-plugin:classes
> Task :gradle-plugin:settings-plugin:jar
> Task :gradle-plugin:react-native-gradle-plugin:checkKotlinGradlePluginConfigurationErrors
> Task :expo-dev-launcher-gradle-plugin:checkKotlinGradlePluginConfigurationErrors
> Task :expo-updates-gradle-plugin:checkKotlinGradlePluginConfigurationErrors
> Task :expo-updates-gradle-plugin:pluginDescriptors
> Task :expo-updates-gradle-plugin:processResources
> Task :gradle-plugin:react-native-gradle-plugin:pluginDescriptors
> Task :gradle-plugin:react-native-gradle-plugin:processResources
> Task :expo-dev-launcher-gradle-plugin:pluginDescriptors
> 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 :gradle-plugin:react-native-gradle-plugin:compileKotlin
> Task :gradle-plugin:react-native-gradle-plugin:compileJava NO-SOURCE
> Task :gradle-plugin:react-native-gradle-plugin:classes
> Task :gradle-plugin:react-native-gradle-plugin:jar
> Task :expo-updates-gradle-plugin:compileKotlin
> Task :expo-updates-gradle-plugin:compileJava NO-SOURCE
> Task :expo-updates-gradle-plugin:classes
> Task :expo-updates-gradle-plugin:jar
> Configure project :app
ℹ️  Applying gradle plugin 'expo-dev-launcher-gradle-plugin' ([email protected])
 ℹ️  Applying gradle plugin 'expo-updates-gradle-plugin' ([email protected])
> Configure project :expo
Using expo modules
  - expo-application (5.9.1)
  - expo-asset (10.0.10)
  - expo-constants (16.0.2)
  - expo-dev-client (4.0.29)
  - expo-dev-launcher (4.0.29)
- expo-dev-menu (5.0.23)
  - expo-eas-client (0.12.0)
  - expo-file-system (17.0.1)
  - expo-font (12.0.10)
  - expo-json-utils (0.13.1)
  - expo-keep-awake (13.0.2)
  - expo-linear-gradient (13.0.2)
  - expo-manifests (0.14.3)
  - expo-modules-core (1.12.26)
  - expo-secure-store (13.0.2)
- expo-splash-screen (0.27.7)
  - expo-structured-headers (3.8.0)
  - expo-tracking-transparency (4.0.2)
  - expo-updates (0.25.27)
FAILURE:
Build failed with an exception.
* What went wrong:
Could not determine the dependencies of task ':app:lintVitalReportRelease'.
> Could not resolve all dependencies for configuration ':app:releaseRuntimeClasspath'.
   > Could not resolve com.google.firebase:firebase-messaging:{require [21.0.0, 23.4.99]; prefer 23.4.0}.
     Required by:
         project :app > project :react-native-onesignal > com.onesignal:OneSignal:5.1.26 > com.onesignal:notifications:5.1.26
      > Failed to list versions for com.google.firebase:firebase-messaging.
         > Unable to load Maven meta-data from https://www.jitpack.io/com/google/firebase/firebase-messaging/maven-metadata.xml.
            > Could not GET 'https://www.jitpack.io/com/google/firebase/firebase-messaging/maven-metadata.xml'.
               > Read timed out
* 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 4m 32s
20 actionable tasks: 20 executed
Error: Gradle build failed with unknown error. See logs for the "Run gradlew" phase for more information.

Code of Conduct

  • I agree to follow this project's Code of Conduct
@alexwolf22 alexwolf22 changed the title [Bug]: Could not resolve com.google.firebase:firebase-messaging during react native expo gradle gradle [Bug]: Could not resolve com.google.firebase:firebase-messaging during react native expo eas android gradle build Dec 18, 2024
@alexwolf22
Copy link
Author

I beleive the issue has to do with jit being not 100% stable now actually- https://status.jitpack.io/

Expo said this about android builds not working for another jit error
image

@nan-li
Copy link
Contributor

nan-li commented Dec 19, 2024

closing as unrelated to onesignal SDK

@nan-li nan-li closed this as completed Dec 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants