livekit / client-sdk-react-native

Official React Native SDK for LiveKit.
https://livekit.io
Apache License 2.0
121 stars 32 forks source link

Release build both Android and iOS crash the app #76

Closed Mihai-github closed 1 year ago

Mihai-github commented 1 year ago

Describe the bug

Locally both the Android and iOS apps work perfectly but when moving to a release build when joining the room both apps (Android and iOS) crash the app. The error is the same on both platforms:

2023-06-18 18:42:46.665396+0300 uHubs Dev[8610:509463] [javascript] TypeError: undefined is not an object (evaluating 'r(d[8]).Room')

and

CTFatalException: Unhandled JS Exception: TypeError: this.methodFactory is not a function. (In 'this.methodFactory(a,t,n)', 'this.methodFactory' is undefined)', reason: 'Unhandled JS Exception: TypeError: this.methodFactory is not a function. (In 'this.methodFactory(a,t,n)', 'this.methodFactory' is undefined),

To Reproduce

Steps to reproduce the behavior:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

(4) #Logcat ERROR

2023-06-18 18:24:42.067 27745-27813/? E/ReactNativeJS: TypeError: undefined is not an object (evaluating 'r(d[8]).Room')

    This error is located at:
        in Unknown
        in Unknown
        in Unknown
        in Unknown
        in RCTView
        in Unknown
        in RCTView
        in Unknown
        in RCTView
        in Unknown
        in Unknown
        in RCTView
        in Unknown
        in f
        in Unknown
        in PanGestureHandler
        in Unknown
        in RCTView
        in Unknown
        in f
        in Unknown
        in RCTView
        in Unknown
        in G
        in Unknown
        in RNSScreen
        in f
        in Unknown
        in M
        in P
        in Unknown
        in RNSScreenContainer
        in ScreenContainer
        in Unknown
        in D
        in T
        in Unknown
        in RCTView
        in Unknown
        in Unknown
        in H
        in Unknown
        in Unknown
        in Unknown
        in Unknown
        in Unknown
        in RCTView
        in Unknown
        in RCTView
        in Unknown
        in RCTView
        in Unknown
        in Unknown
        in RCTView
        in Unknown
        in f
        in Unknown
        in PanGestureHandler
        in Unknown
        in RCTView
        in Unknown
        in f
        in Unknown
        in RCTView
        in Unknown
        in G
        in Unknown
        in RNSScreen
        in f
        in Unknown
        in M
        in P
        in Unknown
        in RNSScreenContainer
        in ScreenContainer
        in Unknown
        in D
        in T
        in Unknown
        in RCTView
        in Unknown
        in Unknown
        in H
        in Unknown
        in Unknown
        in Unknown
        in Unknown
        in Unknown
        in Unknown
        in RCTView
        in Unknown
        in k
        in RNSScreen
        in f
        in Unknown
        in M
        in P
        in Unknown
        in RNSScreenContainer
        in ScreenContainer
        in Unknown
        in H
        in Unknown
        in Unknown
        in Unknown
        in Unknown
        in Unknown
        in RCTView
        in Unknown
        in RCTView
        in Unknown
        in RCTView
        in Unknown
        in Unknown
        in RCTView
        in Unknown
        in f
        in Unknown
        in PanGestureHandler
        in Unknown
        in RCTView
        in Unknown
        in f
        in Unknown
        in RCTView
        in Unknown
        in G
        in Unknown
        in RNSScreen
        in f
        in Unknown
        in M
        in P
        in Unknown
        in RNSScreenContainer
        in ScreenContainer
        in Unknown
        in D
        in T
        in Unknown
        in GestureHandlerRootView
        in Unknown
        in H
        in Unknown
        in Unknown
        in Unknown
        in Unknown
        in Unknown
        in Unknown
        in c
        in RNCSafeAreaProvider
        in Unknown
        in s
        in C
        in n
        in Unknown
        in RCTView
        in Unknown
        in RCTView
        in Unknown
        in C
2023-06-18 18:24:42.070 27745-27813/? I/ReactNativeJS: { error: 
       { [TypeError: undefined is not an object (evaluating 'r(d[8]).Room')]
         componentStack: '\n    in Unknown\n    in Unknown\n    in Unknown\n    in Unknown\n    in RCTView\n    in Unknown\n    in RCTView\n    in Unknown\n    in RCTView\n    in Unknown\n    in Unknown\n    in RCTView\n    in Unknown\n    in f\n    in Unknown\n    in PanGestureHandler\n    in Unknown\n    in RCTView\n    in Unknown\n    in f\n    in Unknown\n    in RCTView\n    in Unknown\n    in G\n    in Unknown\n    in RNSScreen\n    in f\n    in Unknown\n    in M\n    in P\n    in Unknown\n    in RNSScreenContainer\n    in ScreenContainer\n    in Unknown\n    in D\n    in T\n    in Unknown\n    in RCTView\n    in Unknown\n    in Unknown\n    in H\n    in Unknown\n    in Unknown\n    in Unknown\n    in Unknown\n    in Unknown\n    in RCTView\n    in Unknown\n    in RCTView\n    in Unknown\n    in RCTView\n    in Unknown\n    in Unknown\n    in RCTView\n    in Unknown\n    in f\n    in Unknown\n    in PanGestureHandler\n    in Unknown\n    in RCTView\n    in Unknown\n    in f\n    in Unknown\n    in RCTView\n    in Unknown\n    in G\n    in Unknown\n    in RNSScreen\n    in f\n    in Unknown\n    in M\n    in P\n    in Unknown\n    in RNSScreenContainer\n    in ScreenContainer\n    in Unknown\n    in D\n    in T\n    in Unknown\n    in RCTView\n    in Unknown\n    in Unknown\n    in H\n    in Unknown\n    in Unknown\n    in Unknown\n    in Unknown\n    in Unknown\n    in Unknown\n    in RCTView\n    in Unknown\n    in k\n    in RNSScreen\n    in f\n    in Unknown\n    in M\n    in P\n    in Unknown\n    in RNSScreenContainer\n    in ScreenContainer\n    in Unknown\n    in H\n    in Unknown\n    in Unknown\n    in Unknown\n    in Unknown\n    in Unknown\n    in RCTView\n    in Unknown\n    in RCTView\n    in Unknown\n    in RCTView\n    in Unknown\n    in Unknown\n    in RCTView\n    in Unknown\n    in f\n    in Unknown\n    in PanGestureHandler\n    in Unknown\n    in RCTView\n    in Unknown\n    in f\n    in Unknown\n    in RCTView\n    in Unknown\n    in G\n    in Unknown\n    in RNSScreen\n    in f\n    in Unknown\n    in M\n    in P\n    in Unknown\n    in RNSScreenContainer\n    in ScreenContainer\n    in Unknown\n    in D\n    in T\n    in Unknown\n    in GestureHandlerRootView\n    in Unknown\n    in H\n    in Unknown\n    in Unknown\n    in Unknown\n    in Unknown\n    in Unknown\n    in Unknown\n    in c\n    in RNCSafeAreaProvider\n    in Unknown\n    in s\n    in C\n    in n\n    in Unknown\n    in RCTView\n    in Unknown\n    in RCTView\n    in Unknown\n    in C',
         isComponentError: true,
         line: 2257,
         column: 1065,
         sourceURL: 'index.android.bundle' } }
2023-06-18 18:24:42.840 27745-27813/? E/ReactNativeJS: TypeError: this.methodFactory is not a function. (In 'this.methodFactory(a,t,n)', 'this.methodFactory' is undefined)

    --------- beginning of crash
2023-06-18 18:24:42.850 27745-27814/? E/AndroidRuntime: FATAL EXCEPTION: mqt_native_modules
    Process: io.uhubs.development, PID: 27745
    com.facebook.react.common.JavascriptException: TypeError: this.methodFactory is not a function. (In 'this.methodFactory(a,t,n)', 'this.methodFactory' is undefined), stack:
    n@2258:1061
    setLevel@2258:2040
    r@2258:2577
    i@2258:2595
    <unknown>@2258:3019
    d@2258:3033
    <unknown>@2258:395714
    h@2:1585
    d@2:958
    <unknown>@2257:1058
    Nr@81:45962
    RoomPage@2257:1034
    wr@81:42144
    Hl@81:89901
    Ba@81:79143
    Oa@81:79045
    ja@81:78810
    Ia@81:75972
    Ia@-1
    <unknown>@81:26350
    unstable_runWithPriority@144:3806
    ht@81:26297
    pt@81:26232
    Pa@81:73345
    Vr@81:47944
    Vr@-1
    <unknown>@903:465
    <unknown>@914:548
    <unknown>@914:548
    <unknown>@914:548
    <unknown>@920:747
    t@918:289
    k@916:477
    <unknown>@916:611
    <unknown>@2113:2520
    generatorResume@-1
    n@281:68
    v@281:279
    f@92:154
    <unknown>@92:863
    p@98:497
    b@98:895
    callImmediates@98:2990
    value@48:2779
    <unknown>@48:937
    value@48:2459
    value@48:907
    value@-1
    value@-1

        at com.facebook.react.modules.core.ExceptionsManagerModule.reportException(ExceptionsManagerModule.java:83)
        at java.lang.reflect.Method.invoke(Native Method)
        at com.facebook.react.bridge.JavaMethodWrapper.invoke(JavaMethodWrapper.java:372)
        at com.facebook.react.bridge.JavaModuleWrapper.invoke(JavaModuleWrapper.java:151)
        at com.facebook.react.bridge.queue.NativeRunnable.run(Native Method)
        at android.os.Handler.handleCallback(Handler.java:942)
        at android.os.Handler.dispatchMessage(Handler.java:99)
        at com.facebook.react.bridge.queue.MessageQueueThreadHandler.dispatchMessage(MessageQueueThreadHandler.java:27)
        at android.os.Looper.loopOnce(Looper.java:226)
        at android.os.Looper.loop(Looper.java:313)
        at com.facebook.react.bridge.queue.MessageQueueThreadImpl$4.run(MessageQueueThreadImpl.java:226)
        at java.lang.Thread.run(Thread.java:1012)

Expected behavior

To be able to start the room w/o any issue

Screenshots

If applicable, could you add screenshots to help explain your problem?

Device Info:

Dependencies Info (please reference your package-lock.json or yarn.lock file):

"dependencies": {
        "@codler/react-native-keyboard-aware-scroll-view": "^1.0.1",
        "@fingerprintjs/fingerprintjs": "^3.0.6",
        "@flyerhq/react-native-link-preview": "^1.6.0",
        "@fortawesome/fontawesome-svg-core": "^1.2.32",
        "@fortawesome/free-brands-svg-icons": "^5.15.1",
        "@fortawesome/free-regular-svg-icons": "^5.15.1",
        "@fortawesome/free-solid-svg-icons": "^5.15.1",
        "@fortawesome/react-native-fontawesome": "^0.2.6",
        "@gorhom/bottom-sheet": "^2",
        "@livekit/react-native": "^1.1.2",
        "@livekit/react-native-webrtc": "^104.0.1",
        "@react-native-async-storage/async-storage": "^1.14.1",
        "@react-native-community/art": "^1.2.0",
        "@react-native-community/cli": "^5.0.1",
        "@react-native-community/cli-debugger-ui": "5.0.1",
        "@react-native-community/clipboard": "^1.5.1",
        "@react-native-community/datetimepicker": "^3.4.6",
        "@react-native-community/masked-view": "^0.1.10",
        "@react-native-community/netinfo": "^6.0.0",
        "@react-native-community/picker": "^1.8.1",
        "@react-native-community/push-notification-ios": "^1.10.1",
        "@react-navigation/bottom-tabs": "^5.11.11",
        "@react-navigation/compat": "^5.3.15",
        "@react-navigation/material-bottom-tabs": "^5.3.15",
        "@react-navigation/native": "^5.9.4",
        "@react-navigation/stack": "^5.14.5",
        "@stripe/stripe-react-native": "^0.22.0",
        "@voximplant/react-native-foreground-service": "^3.0.1",
        "add": "^2.0.6",
        "axios": "^0.21.0",
        "babel-plugin-module-resolver": "^4.0.0",
        "buffer": "^6.0.3",
        "date-fns": "^2.28.0",
        "device-uuid": "^1.0.4",
        "final-form": "^4.20.2",
        "final-form-arrays": "^3.0.2",
        "jetifier": "^2.0.0",
        "js-base64": "^3.6.0",
        "json5": "^2.2.0",
        "lodash": "^4.17.20",
        "metro-config": "^0.66.1",
        "moment": "^2.29.1",
        "public-ip": "^4.0.3",
        "qs": "^6.9.3",
        "query-string": "^7.0.1",
        "react": "17.0.2",
        "react-devtools": "^4.14.0",
        "react-devtools-core": "^4.14.0",
        "react-final-form": "^6.5.3",
        "react-native": "^0.64.1",
        "react-native-add-calendar-event": "^4.0.0",
        "react-native-autocomplete-input": "^5.0.2",
        "react-native-autolink": "^4.0.0",
        "react-native-calendars": "^1.1249.0",
        "react-native-chip-view": "^0.0.12",
        "react-native-complete-mentions": "^1.0.9",
        "react-native-config": "^1.4.1",
        "react-native-controlled-mentions": "^2.2.5",
        "react-native-datepicker": "^1.7.2",
        "react-native-device-info": "^8.0.1",
        "react-native-dialog": "^9.3.0",
        "react-native-document-picker": "^5.0.3",
        "react-native-drawer": "^2.5.1",
        "react-native-elements": "3.4.2",
        "react-native-email-link": "^1.10.0",
        "react-native-fast-image": "^8.3.6",
        "react-native-file-viewer": "^2.1.4",
        "react-native-fs": "^2.20.0",
        "react-native-gesture-handler": "^1.10.0",
        "react-native-gifted-chat": "^0.16.3",
        "react-native-image-crop-picker": "^0.36.0",
        "react-native-image-picker": "^4.10.2",
        "react-native-image-progress": "^1.1.1",
        "react-native-image-slider": "^2.0.3",
        "react-native-image-slider-box": "^1.0.12",
        "react-native-image-slider-show": "^1.0.3",
        "react-native-keyboard-aware-scroll-view": "^0.9.3",
        "react-native-keychain": "^7.0.0",
        "react-native-linear-gradient": "^2.5.6",
        "react-native-maps": "^0.28.0",
        "react-native-onesignal": "^4.3.1",
        "react-native-paper": "^4.7.2",
        "react-native-permissions": "^3.1.0",
        "react-native-picker-select": "^8.0.2",
        "react-native-popup-dialog": "^0.18.3",
        "react-native-reanimated": "^1.13.2",
        "react-native-render-html": "^5.0.1",
        "react-native-safe-area-context": "^3.1.9",
        "react-native-screens": "3.10.2",
        "react-native-shared-element": "^0.8.2",
        "react-native-shortcut-badge": "^0.1.0-beta.2",
        "react-native-simple-toast": "^1.1.3",
        "react-native-skeleton-placeholder": "^4.0.0",
        "react-native-snap-carousel": "^4.0.0-beta.5",
        "react-native-splash-screen": "^3.2.0",
        "react-native-status-bar-height": "^2.6.0",
        "react-native-svg": "^12.1.0",
        "react-native-svg-transformer": "^0.14.3",
        "react-native-swipe-list-view": "^3.2.5",
        "react-native-toast-message": "2.1.5",
        "react-native-url-polyfill": "^1.3.0",
        "react-native-url-preview": "^1.1.9",
        "react-native-vector-icons": "^8.0.0",
        "react-native-video": "^5.1.0-alpha8",
        "react-native-webview": "^11.18.1",
        "react-navigation-slide-from-right-transition": "^1.0.4",
        "react-redux": "^7.2.2",
        "react-tiny-link": "^3.6.1",
        "redux": "^4.0.5",
        "redux-actions": "^2.6.5",
        "redux-enhancer-react-native-appstate": "^0.3.1",
        "redux-logger": "^3.0.6",
        "redux-persist": "^6.0.0",
        "redux-persist-transform-filter": "^0.0.20",
        "redux-saga": "^1.1.3",
        "redux-thunk": "^2.3.0",
        "reselect": "^4.0.0",
        "rn-fetch-blob": "^0.12.0",
        "rollbar-react-native": "^0.9.2",
        "sync-storage": "^0.4.2",
        "url-parse": "^1.5.3",
        "xregexp": "^5.0.1",
        "yarn": "^1.22.10"
    },
    "devDependencies": {
        "@babel/core": "^7.17.9",
        "@babel/runtime": "^7.17.9",
        "@react-native-community/eslint-config": "3.0.1",
        "@types/jest": "^27.4.1",
        "@types/lodash": "^4.14.181",
        "@types/qs": "^6.9.7",
        "@types/react": "^18.0.5",
        "@types/react-native": "0.67.4",
        "@types/react-native-autocomplete-input": "^5.0.0",
        "@types/react-native-datepicker": "^1.7.1",
        "@types/react-native-popup-dialog": "^0.16.3",
        "@types/react-native-snap-carousel": "^3.8.4",
        "@types/react-native-video": "^5.0.13",
        "@types/react-native-webrtc": "^1.75.5",
        "@types/react-redux": "^7.1.24",
        "@types/react-test-renderer": "^18.0.0",
        "@types/redux-actions": "^2.6.2",
        "@types/redux-immutable-state-invariant": "^2.1.2",
        "@types/redux-logger": "^3.0.9",
        "@types/url-parse": "^1.4.8",
        "babel-jest": "^27.5.1",
        "eslint": "8.13.0",
        "jest": "^27.5.1",
        "metro-react-native-babel-preset": "^0.70.1",
        "react-native-iap": "8.0.8",
        "react-test-renderer": "18.0.0",
        "redux-immutable-state-invariant": "^2.1.0",
        "redux-promise-middleware": "^6.1.2",
        "typescript": "^4.1.4"
    },

Additional context Please feel free to add any other context about the problem here.

Mihai-github commented 1 year ago

Update: After trying to comment out everything line by line I see the error somehow on the release version is coming from this initialization:

const [room] = useState(
    () =>
      new Room({
        adaptiveStream: { pixelDensity: 'screen' },
      })
  );

I don't know why since locally in debug mode works fine but maybe this helps somehow if someone can help me out

davidliu commented 1 year ago

Hmm, building the release version of the example app doesn't seem to run into this issue. Can you try seeing if there's any differences between your app and the example app?

It'd also help if you could symbolicate your error logs.

Finally, could you provide the specific version of livekit-client seen in your package-lock.json or yarn.lock file?

Mihai-github commented 1 year ago

Hey, @davidliu I've tried to look over the example app and compare but nothing looks really out of the ordinary. What's weird is in debug there's no issue but once I make the release build the error appears which I've tried to check by turning the release build locally on my device and removing everything except the:

const [room] = useState(
    () =>
      new Room()
  );

About the symbolicate the error logs, @davidliu, will check and try to provide the output.

About the version in my yarn.lock:

"@livekit/react-native@^1.1.2":
  version "1.1.2"
  resolved "https://registry.yarnpkg.com/@livekit/react-native/-/react-native-1.1.2.tgz#349dd703766169c2d962226f0b1dcec5642555d8"
  integrity sha512-NWhHtqhRFeqzvZDvpcJjYtdz3SjO9QTdXBvO1aAb3jgz8w+y80tTjbsdDIh1Sd4+qBxnwZTpXvvynfU6NXCXTQ==
  dependencies:
    array.prototype.at "^1.1.1"
    livekit-client "^1.8.0"
    promise.allsettled "^1.0.5"
    react-native-url-polyfill "^1.3.0"

and

livekit-client@^1.8.0:
  version "1.11.2"
  resolved "https://registry.yarnpkg.com/livekit-client/-/livekit-client-1.11.2.tgz#a567fb5f099f1f638bb58f4b35aae980a95ffb49"
  integrity sha512-zVGmUltO7udhSHcIbBofOzJBCXaHefqZZZhW+1okDWktSydHE6Se55je/OUx1Qwnaji6ub5jLSDB9WpX/+7eoQ==
  dependencies:
    eventemitter3 "^5.0.1"
    loglevel "^1.8.0"
    protobufjs "^7.0.0"
    sdp-transform "^2.14.1"
    ts-debounce "^4.0.0"
    webrtc-adapter "^8.1.1"
Mihai-github commented 1 year ago

@davidliu Symbolicating a stack trace is not supposed to be used while when generating a release build an error, appear. If that's the case for me there is no error in the sense that my build works the app is functional but crashes when I want to test the functionality for calling on a release build and I open the screen where the livekit logic is placed ... otherwise the app works fine w/o any issue expect the one mentioned.

davidliu commented 1 year ago

I'm sorry, not sure what you mean. Symbolicating is specifically for release builds, since those symbols are obfuscated; symbolicating lets us see where the actual code is.

Mihai-github commented 1 year ago

Yap, my bad, but what I'm trying to say is that only while running the release command does the file get populated android/app/build/generated/sourcemaps/react/release/index.android.bundle.map but if the error happens while the app is running how do I get those outputs not obfuscated??

Mihai-github commented 1 year ago

The stacktrace.txt is always empty, even if I run the line command specified by the docs (https://reactnative.dev/docs/0.67/symbolication) and add the correct file path...

Mihai-github commented 1 year ago

Hey, @davidliu, I am trying to build for you a demo app with RN v0.64. (thinking maybe the RN version I use is too low?) but after installing everything in the @livekit/react-native package I'm stuck now with this error:

Build file 'path/node_modules/@livekit/react-native/android/build.gradle' line: 29

A problem occurred evaluating project ':livekit_react-native'.
> No signature of method: build_cnj2ja3g84zne9ohoyuvmflwu.android() is applicable for argument types: (build_cnj2ja3g84zne9ohoyuvmflwu$_run_closure1) values: [build_cnj2ja3g84zne9ohoyuvmflwu$_run_closure1@2abb6cb9]

* Try:
Run with --info or --debug option to get more log output. Run with --scan to get full insights.

* Exception is:
org.gradle.api.GradleScriptException: A problem occurred evaluating project ':livekit_react-native'.
    at org.gradle.groovy.scripts.internal.DefaultScriptRunnerFactory$ScriptRunnerImpl.run(DefaultScriptRunnerFactory.java:93)
    at org.gradle.configuration.DefaultScriptPluginFactory$ScriptPluginImpl.lambda$apply$0(DefaultScriptPluginFactory.java:133)
    at org.gradle.configuration.ProjectScriptTarget.addConfiguration(ProjectScriptTarget.java:77)
    at org.gradle.configuration.DefaultScriptPluginFactory$ScriptPluginImpl.apply(DefaultScriptPluginFactory.java:136)
    at org.gradle.configuration.BuildOperationScriptPlugin$1.run(BuildOperationScriptPlugin.java:65)
    at org.gradle.internal.operations.DefaultBuildOperationRunner$1.execute(DefaultBuildOperationRunner.java:29)
    at org.gradle.internal.operations.DefaultBuildOperationRunner$1.execute(DefaultBuildOperationRunner.java:26)
    at org.gradle.internal.operations.DefaultBuildOperationRunner$3.execute(DefaultBuildOperationRunner.java:75)
    at org.gradle.internal.operations.DefaultBuildOperationRunner$3.execute(DefaultBuildOperationRunner.java:68)
    at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:153)
    at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:68)
    at org.gradle.internal.operations.DefaultBuildOperationRunner.run(DefaultBuildOperationRunner.java:56)
    at org.gradle.internal.operations.DefaultBuildOperationExecutor.lambda$run$1(DefaultBuildOperationExecutor.java:71)
    at org.gradle.internal.operations.UnmanagedBuildOperationWrapper.runWithUnmanagedSupport(UnmanagedBuildOperationWrapper.java:45)
    at org.gradle.internal.operations.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:71)
    at org.gradle.configuration.BuildOperationScriptPlugin.lambda$apply$0(BuildOperationScriptPlugin.java:62)
    at org.gradle.configuration.internal.DefaultUserCodeApplicationContext.apply(DefaultUserCodeApplicationContext.java:43)
    at org.gradle.configuration.BuildOperationScriptPlugin.apply(BuildOperationScriptPlugin.java:62)
    at org.gradle.api.internal.project.DefaultProjectStateRegistry$ProjectStateImpl.lambda$applyToMutableState$0(DefaultProjectStateRegistry.java:248)
    at org.gradle.api.internal.project.DefaultProjectStateRegistry$ProjectStateImpl.fromMutableState(DefaultProjectStateRegistry.java:275)
    at org.gradle.api.internal.project.DefaultProjectStateRegistry$ProjectStateImpl.applyToMutableState(DefaultProjectStateRegistry.java:247)
    at org.gradle.configuration.project.BuildScriptProcessor.execute(BuildScriptProcessor.java:42)
    at org.gradle.configuration.project.BuildScriptProcessor.execute(BuildScriptProcessor.java:26)
    at org.gradle.configuration.project.ConfigureActionsProjectEvaluator.evaluate(ConfigureActionsProjectEvaluator.java:35)
    at org.gradle.configuration.project.LifecycleProjectEvaluator$EvaluateProject.lambda$run$0(LifecycleProjectEvaluator.java:100)
    at org.gradle.api.internal.project.DefaultProjectStateRegistry$ProjectStateImpl.lambda$applyToMutableState$0(DefaultProjectStateRegistry.java:248)
    at org.gradle.api.internal.project.DefaultProjectStateRegistry$ProjectStateImpl.lambda$withProjectLock$3(DefaultProjectStateRegistry.java:308)
    at org.gradle.internal.work.DefaultWorkerLeaseService.withLocks(DefaultWorkerLeaseService.java:178)
    at org.gradle.api.internal.project.DefaultProjectStateRegistry$ProjectStateImpl.withProjectLock(DefaultProjectStateRegistry.java:308)
    at org.gradle.api.internal.project.DefaultProjectStateRegistry$ProjectStateImpl.fromMutableState(DefaultProjectStateRegistry.java:289)
    at org.gradle.api.internal.project.DefaultProjectStateRegistry$ProjectStateImpl.applyToMutableState(DefaultProjectStateRegistry.java:247)
    at org.gradle.configuration.project.LifecycleProjectEvaluator$EvaluateProject.run(LifecycleProjectEvaluator.java:91)
    at org.gradle.internal.operations.DefaultBuildOperationRunner$1.execute(DefaultBuildOperationRunner.java:29)
    at org.gradle.internal.operations.DefaultBuildOperationRunner$1.execute(DefaultBuildOperationRunner.java:26)
    at org.gradle.internal.operations.DefaultBuildOperationRunner$3.execute(DefaultBuildOperationRunner.java:75)
    at org.gradle.internal.operations.DefaultBuildOperationRunner$3.execute(DefaultBuildOperationRunner.java:68)
    at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:153)
    at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:68)
    at org.gradle.internal.operations.DefaultBuildOperationRunner.run(DefaultBuildOperationRunner.java:56)
    at org.gradle.internal.operations.DefaultBuildOperationExecutor.lambda$run$1(DefaultBuildOperationExecutor.java:71)
    at org.gradle.internal.operations.UnmanagedBuildOperationWrapper.runWithUnmanagedSupport(UnmanagedBuildOperationWrapper.java:45)
    at org.gradle.internal.operations.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:71)
    at org.gradle.configuration.project.LifecycleProjectEvaluator.evaluate(LifecycleProjectEvaluator.java:63)
    at org.gradle.api.internal.project.DefaultProject.evaluate(DefaultProject.java:710)
    at org.gradle.api.internal.project.DefaultProject.evaluate(DefaultProject.java:145)
    at org.gradle.execution.TaskPathProjectEvaluator.configure(TaskPathProjectEvaluator.java:36)
    at org.gradle.execution.TaskPathProjectEvaluator.configureHierarchy(TaskPathProjectEvaluator.java:64)
    at org.gradle.configuration.DefaultProjectsPreparer.prepareProjects(DefaultProjectsPreparer.java:46)
    at org.gradle.configuration.BuildTreePreparingProjectsPreparer.prepareProjects(BuildTreePreparingProjectsPreparer.java:57)
    at org.gradle.configuration.BuildOperationFiringProjectsPreparer$ConfigureBuild.run(BuildOperationFiringProjectsPreparer.java:52)
    at org.gradle.internal.operations.DefaultBuildOperationRunner$1.execute(DefaultBuildOperationRunner.java:29)
    at org.gradle.internal.operations.DefaultBuildOperationRunner$1.execute(DefaultBuildOperationRunner.java:26)
    at org.gradle.internal.operations.DefaultBuildOperationRunner$3.execute(DefaultBuildOperationRunner.java:75)
    at org.gradle.internal.operations.DefaultBuildOperationRunner$3.execute(DefaultBuildOperationRunner.java:68)
    at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:153)
    at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:68)
    at org.gradle.internal.operations.DefaultBuildOperationRunner.run(DefaultBuildOperationRunner.java:56)
    at org.gradle.internal.operations.DefaultBuildOperationExecutor.lambda$run$1(DefaultBuildOperationExecutor.java:71)
    at org.gradle.internal.operations.UnmanagedBuildOperationWrapper.runWithUnmanagedSupport(UnmanagedBuildOperationWrapper.java:45)
    at org.gradle.internal.operations.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:71)
    at org.gradle.configuration.BuildOperationFiringProjectsPreparer.prepareProjects(BuildOperationFiringProjectsPreparer.java:40)
    at org.gradle.initialization.DefaultGradleLauncher.prepareProjects(DefaultGradleLauncher.java:228)
    at org.gradle.initialization.DefaultGradleLauncher.doClassicBuildStages(DefaultGradleLauncher.java:165)
    at org.gradle.initialization.DefaultGradleLauncher.doBuildStages(DefaultGradleLauncher.java:150)
    at org.gradle.initialization.DefaultGradleLauncher.executeTasks(DefaultGradleLauncher.java:126)
    at org.gradle.internal.invocation.GradleBuildController$1.create(GradleBuildController.java:72)
    at org.gradle.internal.invocation.GradleBuildController$1.create(GradleBuildController.java:67)
    at org.gradle.internal.work.DefaultWorkerLeaseService.withLocks(DefaultWorkerLeaseService.java:178)
    at org.gradle.internal.invocation.GradleBuildController.doBuild(GradleBuildController.java:67)
    at org.gradle.internal.invocation.GradleBuildController.run(GradleBuildController.java:56)
    at org.gradle.tooling.internal.provider.runner.ClientProvidedPhasedActionRunner.run(ClientProvidedPhasedActionRunner.java:60)
    at org.gradle.launcher.exec.ChainingBuildActionRunner.run(ChainingBuildActionRunner.java:35)
    at org.gradle.launcher.exec.ChainingBuildActionRunner.run(ChainingBuildActionRunner.java:35)
    at org.gradle.launcher.exec.BuildOutcomeReportingBuildActionRunner.run(BuildOutcomeReportingBuildActionRunner.java:63)
    at org.gradle.tooling.internal.provider.ValidatingBuildActionRunner.run(ValidatingBuildActionRunner.java:32)
    at org.gradle.tooling.internal.provider.FileSystemWatchingBuildActionRunner.run(FileSystemWatchingBuildActionRunner.java:67)
    at org.gradle.launcher.exec.BuildCompletionNotifyingBuildActionRunner.run(BuildCompletionNotifyingBuildActionRunner.java:41)
    at org.gradle.launcher.exec.RunAsBuildOperationBuildActionRunner$3.call(RunAsBuildOperationBuildActionRunner.java:49)
    at org.gradle.launcher.exec.RunAsBuildOperationBuildActionRunner$3.call(RunAsBuildOperationBuildActionRunner.java:44)
    at org.gradle.internal.operations.DefaultBuildOperationRunner$CallableBuildOperationWorker.execute(DefaultBuildOperationRunner.java:200)
    at org.gradle.internal.operations.DefaultBuildOperationRunner$CallableBuildOperationWorker.execute(DefaultBuildOperationRunner.java:195)
    at org.gradle.internal.operations.DefaultBuildOperationRunner$3.execute(DefaultBuildOperationRunner.java:75)
    at org.gradle.internal.operations.DefaultBuildOperationRunner$3.execute(DefaultBuildOperationRunner.java:68)
    at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:153)
    at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:68)
    at org.gradle.internal.operations.DefaultBuildOperationRunner.call(DefaultBuildOperationRunner.java:62)
    at org.gradle.internal.operations.DefaultBuildOperationExecutor.lambda$call$2(DefaultBuildOperationExecutor.java:76)
    at org.gradle.internal.operations.UnmanagedBuildOperationWrapper.callWithUnmanagedSupport(UnmanagedBuildOperationWrapper.java:54)
    at org.gradle.internal.operations.DefaultBuildOperationExecutor.call(DefaultBuildOperationExecutor.java:76)
    at org.gradle.launcher.exec.RunAsBuildOperationBuildActionRunner.run(RunAsBuildOperationBuildActionRunner.java:44)
    at org.gradle.launcher.exec.InProcessBuildActionExecuter.lambda$execute$0(InProcessBuildActionExecuter.java:54)
    at org.gradle.composite.internal.DefaultRootBuildState.run(DefaultRootBuildState.java:87)
    at org.gradle.launcher.exec.InProcessBuildActionExecuter.execute(InProcessBuildActionExecuter.java:53)
    at org.gradle.launcher.exec.InProcessBuildActionExecuter.execute(InProcessBuildActionExecuter.java:29)
    at org.gradle.launcher.exec.BuildTreeScopeLifecycleBuildActionExecuter.lambda$execute$0(BuildTreeScopeLifecycleBuildActionExecuter.java:33)
    at org.gradle.internal.buildtree.BuildTreeState.run(BuildTreeState.java:49)
    at org.gradle.launcher.exec.BuildTreeScopeLifecycleBuildActionExecuter.execute(BuildTreeScopeLifecycleBuildActionExecuter.java:32)
    at org.gradle.launcher.exec.BuildTreeScopeLifecycleBuildActionExecuter.execute(BuildTreeScopeLifecycleBuildActionExecuter.java:27)
    at org.gradle.tooling.internal.provider.ContinuousBuildActionExecuter.execute(ContinuousBuildActionExecuter.java:104)
    at org.gradle.tooling.internal.provider.ContinuousBuildActionExecuter.execute(ContinuousBuildActionExecuter.java:55)
    at org.gradle.tooling.internal.provider.SubscribableBuildActionExecuter.execute(SubscribableBuildActionExecuter.java:64)
    at org.gradle.tooling.internal.provider.SubscribableBuildActionExecuter.execute(SubscribableBuildActionExecuter.java:37)
    at org.gradle.tooling.internal.provider.SessionScopeLifecycleBuildActionExecuter.lambda$execute$0(SessionScopeLifecycleBuildActionExecuter.java:54)
    at org.gradle.internal.session.BuildSessionState.run(BuildSessionState.java:67)
    at org.gradle.tooling.internal.provider.SessionScopeLifecycleBuildActionExecuter.execute(SessionScopeLifecycleBuildActionExecuter.java:50)
    at org.gradle.tooling.internal.provider.SessionScopeLifecycleBuildActionExecuter.execute(SessionScopeLifecycleBuildActionExecuter.java:36)
    at org.gradle.tooling.internal.provider.GradleThreadBuildActionExecuter.execute(GradleThreadBuildActionExecuter.java:36)
    at org.gradle.tooling.internal.provider.GradleThreadBuildActionExecuter.execute(GradleThreadBuildActionExecuter.java:25)
    at org.gradle.tooling.internal.provider.StartParamsValidatingActionExecuter.execute(StartParamsValidatingActionExecuter.java:59)
    at org.gradle.tooling.internal.provider.StartParamsValidatingActionExecuter.execute(StartParamsValidatingActionExecuter.java:31)
    at org.gradle.tooling.internal.provider.SessionFailureReportingActionExecuter.execute(SessionFailureReportingActionExecuter.java:55)
    at org.gradle.tooling.internal.provider.SessionFailureReportingActionExecuter.execute(SessionFailureReportingActionExecuter.java:41)
    at org.gradle.tooling.internal.provider.SetupLoggingActionExecuter.execute(SetupLoggingActionExecuter.java:47)
    at org.gradle.tooling.internal.provider.SetupLoggingActionExecuter.execute(SetupLoggingActionExecuter.java:31)
    at org.gradle.launcher.daemon.server.exec.ExecuteBuild.doBuild(ExecuteBuild.java:65)
    at org.gradle.launcher.daemon.server.exec.BuildCommandOnly.execute(BuildCommandOnly.java:37)
    at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:104)
    at org.gradle.launcher.daemon.server.exec.WatchForDisconnection.execute(WatchForDisconnection.java:39)
    at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:104)
    at org.gradle.launcher.daemon.server.exec.ResetDeprecationLogger.execute(ResetDeprecationLogger.java:29)
    at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:104)
    at org.gradle.launcher.daemon.server.exec.RequestStopIfSingleUsedDaemon.execute(RequestStopIfSingleUsedDaemon.java:35)
    at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:104)
    at org.gradle.launcher.daemon.server.exec.ForwardClientInput$2.create(ForwardClientInput.java:78)
    at org.gradle.launcher.daemon.server.exec.ForwardClientInput$2.create(ForwardClientInput.java:75)
    at org.gradle.util.Swapper.swap(Swapper.java:38)
    at org.gradle.launcher.daemon.server.exec.ForwardClientInput.execute(ForwardClientInput.java:75)
    at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:104)
    at org.gradle.launcher.daemon.server.exec.LogAndCheckHealth.execute(LogAndCheckHealth.java:55)
    at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:104)
    at org.gradle.launcher.daemon.server.exec.LogToClient.doBuild(LogToClient.java:63)
    at org.gradle.launcher.daemon.server.exec.BuildCommandOnly.execute(BuildCommandOnly.java:37)
    at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:104)
    at org.gradle.launcher.daemon.server.exec.EstablishBuildEnvironment.doBuild(EstablishBuildEnvironment.java:84)
    at org.gradle.launcher.daemon.server.exec.BuildCommandOnly.execute(BuildCommandOnly.java:37)
    at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:104)
    at org.gradle.launcher.daemon.server.exec.StartBuildOrRespondWithBusy$1.run(StartBuildOrRespondWithBusy.java:52)
    at org.gradle.launcher.daemon.server.DaemonStateCoordinator$1.run(DaemonStateCoordinator.java:297)
    at org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(ExecutorPolicy.java:64)
    at org.gradle.internal.concurrent.ManagedExecutorImpl$1.run(ManagedExecutorImpl.java:48)
    at org.gradle.internal.concurrent.ThreadFactoryImpl$ManagedThreadRunnable.run(ThreadFactoryImpl.java:56)
Caused by: groovy.lang.MissingMethodException: No signature of method: build_cnj2ja3g84zne9ohoyuvmflwu.android() is applicable for argument types: (build_cnj2ja3g84zne9ohoyuvmflwu$_run_closure1) values: [build_cnj2ja3g84zne9ohoyuvmflwu$_run_closure1@2abb6cb9]
    at build_cnj2ja3g84zne9ohoyuvmflwu.run(/Users/admin/Work/rn641/node_modules/@livekit/react-native/android/build.gradle:29)
    at org.gradle.groovy.scripts.internal.DefaultScriptRunnerFactory$ScriptRunnerImpl.run(DefaultScriptRunnerFactory.java:91)
    ... 140 more
Mihai-github commented 1 year ago

Looks like I've managed to fix the debug version but on release, I keep getting this error, maybe you have an idea why?

{path}.gradle/caches/modules-2/files-2.1/androidx.annotation/annotation/1.4.0/77e7b6bbe9803d890343716dd824dfdbc0f6fe77/annotation-1.4.0.jar!/META-INF/annotation.kotlin_module: Module was compiled with an incompatible version of Kotlin. The binary version of its metadata is 1.6.0, expected version is 1.4.0.
davidliu commented 1 year ago

Hmm, v0.64 is pretty old (over two years at this point), can you try upgrading to a newer version? I know v0.67 should work, though newer should be better.

Mihai-github commented 1 year ago

After finishing the version with v0.64.1 will try yes. The idea is the project I am trying to implement livekit SDK for mobile is pretty huge so upgrading the version to something like v.0.67 can bring many changes in many places sadly

Mihai-github commented 1 year ago

@davidliu I am unable to make a release build because of this error ... I tried several ways to provide the kotlin version, but nothing changes ... keep getting the above kotlin error again and again

Mihai-github commented 1 year ago

UPDATE:

Solved by upgrading to React Native version 0.67.5. Leaving this here for others that may sustain older projects and get this issue.