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]: Dependency problem while adding onesignal to an existing react native project #1710

Open
3 tasks done
Yash-Goyal007 opened this issue May 28, 2024 · 3 comments
Open
3 tasks done

Comments

@Yash-Goyal007
Copy link

Yash-Goyal007 commented May 28, 2024

What happened?

I'm integrating OneSignal into my React Native application, but I'm encountering a Firebase dependency conflict error when trying to make a debug build. My React Native version is 0.62.3, Gradle version is 5.5, Google Services version is 4.3.3, and the conflicting Firebase version is 23.4.1. I'm also using "@react-native-firebase/app": "^16.5.0" and "@react-native-firebase/crashlytics": "^16.5.0" as app dependencies. I've tried removing all Firebase-dependent code and running OneSignal, but the dependency conflict error persists.
PS: I have added my build.gradle file config
build.gradle.txt

Steps to reproduce?

Just adding onesignal sdk by following the official documentation is enough for reproducing the issue.

What did you expect to happen?

I expected the app to work normally after adding one signal sdk and send push notifications through one signal sdk.

React Native OneSignal SDK version

5.2.0

Which platform(s) are affected?

  • iOS
  • Android

Relevant log output

* What went wrong:
Could not determine the dependencies of task ':app:preDebugBuild'.
> In project 'app' a resolved Google Play services library dependency depends on another at an exact version (e.g. "[19.0.0, 23.4.99]", but isn't being resolved to that version. Behavior exhibited by the library will be unknown.
 
  Dependency failing: com.onesignal:notifications:5.1.8 -> com.google.firebase:firebase-messaging@[19.0.0, 23.4.99], but firebase-messaging version was 23.4.1.
 
  The following dependencies are project dependencies that are direct or have transitive dependencies that lead to the artifact with the issue.
  -- Project 'app' depends onto com.google.firebase:firebase-messaging@{strictly 23.4.1}
  -- Project 'app' depends onto com.onesignal:OneSignal@{strictly 5.1.8}
  -- Project 'app' depends onto com.onesignal:notifications@{strictly 5.1.8}
  -- Project 'app' depends on project 'react' which depends onto com.onesignal:OneSignal@5.1.8
 
  For extended debugging info execute Gradle from the command line with ./gradlew --info :app:assembleDebug to see the dependency paths to the artifact. This error message came from the google-services Gradle plugin, report issues at https://github.com/google/play-services-plugins and disable by adding "googleServices { disableVersionCheck = false }" to your build.gradle file.

Code of Conduct

  • I agree to follow this project's Code of Conduct
@Yash-Goyal007 Yash-Goyal007 changed the title [Bug]: Dependency problem while adding onesignal to an existing project [Bug]: Dependency problem while adding onesignal to an existing react native project May 28, 2024
@jkasten2
Copy link
Member

@Yash-Goyal007 I believe this is a bug the google-services Gradle plugin. Can you try updating it to the latest version?

@Yash-Goyal007
Copy link
Author

I tried updating google services gradle plugin but still the same error persists.

@jkasten2
Copy link
Member

jkasten2 commented Jun 6, 2024

@Yash-Goyal007 could you share a project reproducing the build issue?

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