mieszko4 / react-native-zoom-us

MIT License
122 stars 115 forks source link

URGENT: Issue with Jitpack repo in latest version #311

Closed wilkinson4 closed 6 months ago

wilkinson4 commented 6 months ago

Really would appreciate a response on this since the deadline to upgrade zoom meetings sdk version is Nov 4th 2023. I tried updating to the latest version of react-native-zoom-us from 6.16.5 but I get the error message below when trying to build/run the app locally. After a lot of googling I tried to upgrade my react-native version from 0.71.3 to 0.72.6, but I am still experiencing the same error when trying to run the app locally.

MacOS Sonoma 14.0 - M2

Error Message:

* What went wrong:
Execution failed for task ':app:checkStagingDebugAarMetadata'.
> Could not resolve all files for configuration ':app:StagingDebugRuntimeClasspath'.
   > Failed to transform mobilertc-5.13.10.12578.aar (com.github.zoom-us-community.jitpack-zoom-us:mobilertc:5.13.10.12578) to match attributes {artifactType=a
ndroid-aar-metadata, org.gradle.status=release}.
      > Could not find mobilertc-5.13.10.12578.aar (com.github.zoom-us-community.jitpack-zoom-us:mobilertc:5.13.10.12578).
        Searched in the following locations:
            https://jitpack.io/com/github/zoom-us-community/jitpack-zoom-us/mobilertc/5.13.10.12578/mobilertc-5.13.10.12578.aar

build.gradle

// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
    ext {
        buildToolsVersion = "33.0.2"
        minSdkVersion = 23
        compileSdkVersion = 33
        targetSdkVersion = 33
        ndkVersion = "23.1.7779620"
        googlePlayServicesVersion = "17.0.0"
        supportLibVersion = "28.0.0"
        kotlinVersion = "1.7.20"
    }
    repositories {
        google()
        mavenCentral()
    }
    dependencies {
        classpath("com.android.tools.build:gradle:7.4.1")
        classpath('com.google.gms:google-services:4.3.15')
        classpath('org.jetbrains.kotlin:kotlin-gradle-plugin:1.7.20')
        classpath("com.facebook.react:react-native-gradle-plugin")
    }
}

allprojects {
    repositories {
        maven {
            // react-native-background-fetch
            url("${project(':react-native-background-fetch').projectDir}/libs")
        }
        maven { url { "https://jitpack.io" } }
    }
}
bryanmalaluan commented 6 months ago

We are experiencing this issue as well, we can't release to google play because of this

wilkinson4 commented 6 months ago

I changed this:

implementation 'com.github.zoom-us-community:jitpack-zoom-us:5.13.10.12578'

to this:

implementation 'com.github.zoom-us-community.jitpack-zoom-us:commonlib:5.13.10.12578' // 5.13.10.12577

...in my react-native-zoom-us build.gradle locally, and now I'm getting these errors.

  symbol: class MeetingViewsOptions
/Users/williamwilkinson/workspace/cb-risk-mobile/node_modules/react-native-zoom-us/android/src/main/java/ch/milosz/reactnative/RNZoomUsModule.java:360: error: cannot find symbol
          JoinMeetingParam4WithoutLogin params = new JoinMeetingParam4WithoutLogin();
          ^
  symbol: class JoinMeetingParam4WithoutLogin
Note: /Users/williamwilkinson/workspace/cb-risk-mobile/node_modules/react-native-zoom-us/android/src/main/java/ch/milosz/reactnative/RNZoomUsModule.java uses or overrides a deprecat
ed API.
Note: Recompile with -Xlint:deprecation for details.
100 errors
  symbol: class MeetingViewsOptions
/Users/williamwilkinson/workspace/cb-risk-mobile/node_modules/react-native-zoom-us/android/src/main/java/ch/milosz/reactnative/RNZoomUsModule.java:360: error: cannot find symbol
          JoinMeetingParam4WithoutLogin params = new JoinMeetingParam4WithoutLogin();
          ^
  symbol: class JoinMeetingParam4WithoutLogin
Note: /Users/williamwilkinson/workspace/cb-risk-mobile/node_modules/react-native-zoom-us/android/src/main/java/ch/milosz/reactnative/RNZoomUsModule.java uses or overrides a deprecat
ed API.
Note: Recompile with -Xlint:deprecation for details.
100 errors
bryanmalaluan commented 6 months ago

@mieszko4 can you have a look at it please thanks!

wilkinson4 commented 6 months ago

Update on this. We found a workaround for now by just downloading the aar files manually and changing the react-native-zoom-us's build.gradle file to what I had below. I'm not sure if there is an issue with the .jar file located at that jitpack location that is causing the issue, but I noticed that it's managed by zoom directly, so maybe it just fell by the wayside 🤷‍♂️


-     implementation 'com.github.zoom-us-community:jitpack-zoom-us:5.13.10.12578' // 5.13.10.12577
+    implementation files('/path-to-zoom-sdk-on-machine/zoom-sdk-android-5.13.10.12577/mobilertc-android-studio/mobilertc/mobilertc.aar')
+    implementation files('/path-to-zoom-sdk-on-machine/zoom-sdk-android-5.13.10.12577/mobilertc-android-studio/commonlib/commonlib.aar')
frankie-fk commented 6 months ago

I face the same issue, have to upgrade to: implementation 'com.github.zoom-us-community:jitpack-zoom-us:5.14.11.14322' then I have to change a lot of stuff on android folder of react-native-zoom-us, successfully run the build but got crash when trying to join a webinar.

wilkinson4 commented 6 months ago

I face the same issue, have to upgrade to: implementation 'com.github.zoom-us-community:jitpack-zoom-us:5.14.11.14322' then I have to change a lot of stuff on android folder of react-native-zoom-us, successfully run the build but got crash when trying to join a webinar.

That is because there were breaking changes in 5.14.0. So the react native zoom us code will need to be changed to reflect that.

mieszko4 commented 6 months ago

The err is here:

Searched in the following locations:
            https://jitpack.io/com/github/zoom-us-community/jitpack-zoom-us/mobilertc/5.13.10.12578/mobilertc-5.13.10.12578.aar

If you go to https://jitpack.io/com/github/zoom-us-community/jitpack-zoom-us/mobilertc/5.13.10.12578/, you will see that it is missing mobilertc-5.13.10.12578.aar. image

On the other hand, in the build logs (https://jitpack.io/com/github/zoom-us-community/jitpack-zoom-us/5.13.10.12578/build.log) there is mobilertc/5.13.10.12578/mobilertc-5.13.10.12578.aar in ✅ Build artifacts:

Also, I am certain that I tested this version on Android back then. So for me it looks like this file was deleted by jitpack. Perhaps jitpack is having issues?


The newest jitpack build has .aar file in https://jitpack.io/com/github/zoom-us-community/jitpack-zoom-us/mobilertc/5.16.2.16555/ image So that looks fine. However, I did not add this jitpack to react-native-zoom-us yet because of build issue which I still haven't figure out (https://github.com/mieszko4/react-native-zoom-us/pull/292)

mieszko4 commented 6 months ago

I created jitpack issue https://github.com/jitpack/jitpack.io/issues/5950

frankie-fk commented 6 months ago

hi @wilkinson4 , thanks for your idea on importing local SDK, I copy the ZoomSDK folder directly to android folder and point implementation of mobilrtc and commonlib to it. Can make build now.

frankie-fk commented 6 months ago

actually I can run it locally but cannot make build due to this:

Direct local .aar file dependencies are not supported when building an AAR. The resulting AAR would be broken because the classes and Android resources from any local .aar file dependencies would not be packaged in the resulting AAR. Previous versions of the Android Gradle Plugin produce broken AARs in this case too (despite not throwing this error). The following direct local .aar file dependencies of the :react-native-zoom-us project caused this error: /Users/frankie/Downloads/CODING/ReactNative/Projects/Cysterhood/android/app/libs/mobilertc.aar, /Users/frankie/Downloads/CODING/ReactNative/Projects/Cysterhood/android/app/libs/commonlib.aar

frankie-fk commented 6 months ago

For those who use the workaround to copy commonlib and mobilertc directly to the project and face the issue Direct local .aar when building/bundling build, here's the steps:

  1. Download ZoomSDK 5.13.10.12578, copy 2 folder commonlib and mobilertc to Android root folder.
  2. In the file android/app/build.gradle of the app, add these:
    implementation project(':commonlib')
    implementation project(':mobilertc')
  3. In the file android/settings.gradle of the app, add these:
    include ':mobilertc'
    include ':commonlib'
  4. In the file android/build.gradle of the react-native-zoom-us package (you have to fork them and make changes), add these:
    implementation project(path: ':commonlib')
    implementation project(path: ':mobilertc')
miarevalo10 commented 6 months ago

This is also blocking us from building the app

It seems like the missing build artifacts issue has also happened to other people before https://github.com/jitpack/jitpack.io/issues/5741 The workaround they did was:

We have since worked around this issue, simply by tagging a new empty commit. But the issue described here still indicates a bug; would be good to better understand it. https://github.com/jitpack/jitpack.io/issues/5741#issuecomment-1679907980

@mieszko4 Could we try doing this to see if it fixes the issue?

mieszko4 commented 6 months ago

@mieszko4 Could we try doing this to see if it fixes the issue?

Not sure what they mean by tagging a new empty commit. I think we would have to change the version which means that we would need to update react-native-zoom-us

mieszko4 commented 6 months ago

I just build a new version and all assets show correctly in https://jitpack.io/com/github/zoom-us-community/jitpack-zoom-us/mobilertc/5.13.10.12579/ (as expected)

image
mieszko4 commented 6 months ago

I also updated react-native-zoom-us and made a patch release. Please try with 6.18.1

frankie-fk commented 6 months ago

great work, thank you so much @mieszko4