React native 76 new architecture error

Hey, I have just updated our app with the RN 0.76, and I'm trying to enable the new Architecture on it.

I'm getting the error below even after upgrading to "rn-pendo-sdk": "3.5.1"

Other posts like this one, this one and this one suggest that one of the `@ReactMethod` on methods with the same name should be removed.

Note: Previously, I had RN 76 with newArch = false and rn-pendo-sdk 3.3.0, and it was working fine

```

Error: Exception in HostObject::get for prop 'ReactNativePendo': com.facebook.react.internal.turbomodule.core.TurboModuleInteropUtils$ParsingException: Unable to parse @ReactMethod annotations from native module: ReactNativePendo. Details: Module exports two methods to JavaScript with the same name: "setup
anonymous @ console.js:589
reactConsoleErrorHandler @ ExceptionsManager.js:168
anonymous @ setUpDeveloperTools.js:67
registerError @ LogBox.js:198
anonymous @ LogBox.js:68
anonymous @ console.js:38
overrideMethod @ backend.js:14284
anonymous @ logger.ts:230
anonymous @ logger.ts:114
anonymous @ logger.ts:221
anonymous @ logger.ts:324
reportException @ ExceptionsManager.js:110
handleException @ ExceptionsManager.js:158
handleError @ setUpErrorHandling.js:24
?anon_0_ @ reactnativeerrorhandlers.js:116
fulfilled @ tslib.js:166
Show 12 more frames
Show less

0

コメント

1件のコメント
  • Pretty easy to fix:

    diff --git a/node_modules/rn-pendo-sdk/android/src/main/java/pendo/io/reactnative/ReactNativePendoModule.java b/node_modules/rn-pendo-sdk/android/src/main/java/pendo/io/reactnative/ReactNativePendoModule.java
    index 6c41d78..54482e5 100644
    --- a/node_modules/rn-pendo-sdk/android/src/main/java/pendo/io/reactnative/ReactNativePendoModule.java
    +++ b/node_modules/rn-pendo-sdk/android/src/main/java/pendo/io/reactnative/ReactNativePendoModule.java
    @@ -142,7 +142,6 @@ public class ReactNativePendoModule extends ReactContextBaseJavaModule {
             sendFailureInfo(toMap(userInfo), shouldSendErrorToBE);
         }
     
    -    @ReactMethod
         public void setup(@NonNull String appKey, int navigationLibrary) {
             setup(appKey, navigationLibrary, null);
         }
    0

サインインしてコメントを残してください。

お探しのものを見つけられませんでしたか?

新規投稿