leegeunhyeok / react-native-zendesk-messaging

🗣️ Zendesk messaging SDK for React Native
https://www.npmjs.com/package/react-native-zendesk-messaging
MIT License
40 stars 12 forks source link

Crash on Android #24

Closed Numan-Munir closed 1 year ago

Numan-Munir commented 1 year ago

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

Screenshot 2023-09-01 at 1 56 57 PM Screenshot 2023-09-01 at 1 57 14 PM
leegeunhyeok commented 1 year ago

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

Ankur-Float commented 1 year ago

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
Ankur-Float commented 1 year ago

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

leegeunhyeok commented 1 year ago

@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

pierricklete commented 1 year ago

we faced a similar issue that was related to some conflicting build issue with Firebase performance https://github.com/firebase/firebase-android-sdk/issues/3155

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

stale[bot] commented 1 year ago

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.