leegeunhyeok/react-native-zendesk-messaging

Crash on Android

Numan-Munir opened this issue · 6 comments

Describe the bug
I am trying to run react-native-zendesk-messaging on Android. It's works fine on iOS but issue on Android.

To Reproduce
Steps to reproduce the behavior:
1 - Open terminal
2 - Navigate to project
3 - Run command yarn android

Expected behavior
A clear and concise description of what you expected to happen.

**Environment **

  • Platform: [iOS, Android]
  • React Native Version [0.68.6]
  • Zendesk SDK Version [2.8.0]
Screenshot 2023-09-01 at 1 56 57 PM Screenshot 2023-09-01 at 1 57 14 PM

Can I get logs that run with --verbose flag? @Numan-Munir

failing for me as well:

@leegeunhyeok here is the verbose logs:

FAILURE: Build failed with an exception.

* What went wrong:
Could not determine the dependencies of task ':app:processDebugResources'.
> Could not resolve all task dependencies for configuration ':app:debugRuntimeClasspath'.
   > Could not find zendesk.messaging:messaging-android:2.13.0.
     Searched in the following locations:
       - https://oss.sonatype.org/content/repositories/snapshots/zendesk/messaging/messaging-android/2.13.0/messaging-android-2.13.0.pom
       - https://repo.maven.apache.org/maven2/zendesk/messaging/messaging-android/2.13.0/messaging-android-2.13.0.pom
       - file:/Users/ankurankur/Documents/test/mobile-app/node_modules/jsc-android/dist/zendesk/messaging/messaging-android/2.13.0/messaging-android-2.13.0.pom
       - https://dl.google.com/dl/android/maven2/zendesk/messaging/messaging-android/2.13.0/messaging-android-2.13.0.pom
       - https://www.jitpack.io/zendesk/messaging/messaging-android/2.13.0/messaging-android-2.13.0.pom
     Required by:
         project :app > project :react-native-zendesk-messaging

* 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

i found a fix in latest react native version it does not allProjects section in android/build.gradle so instead of adding maven link in repositories directly I added it as below

allprojects {
    repositories {
     
        maven {
            url "https://zendesk.jfrog.io/artifactory/repo"
        }
     
    }
}

make sure this block of code is outside of buildscript block.

@leegeunhyeok I am not sure if this can be fixed in package itself

@Ankur-Float In your case, not the same issue as #24. (#24: error occurs in build, not a dependencies sync)

And repository configuration is already covered in the android section of getting started guide. (In root build.gradle, add repository to allprojects)

https://github.com/leegeunhyeok/react-native-zendesk-messaging/blob/master/docs/getting-started.md#android

we faced a similar issue that was related to some conflicting build issue with Firebase performance firebase/firebase-android-sdk#3155

we have fixed the issue by upgrading AGP to v7.2 and firebase:perf-plugin to v1.4.2

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.