Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

com.facebook.react.internal.turbomodule.core.TurboModuleInteropUtils$ParsingException: Unable to parse @ReactMethod annotations from native module: RNCallKeep. Details: Module exports two methods to JavaScript with the same name: "displayIncomingCall #798

Open
1 of 3 tasks
kmamtora opened this issue Jul 24, 2024 · 15 comments

Comments

@kmamtora
Copy link

kmamtora commented Jul 24, 2024

Bug report

  • I've checked the example to reproduce the issue.

Error: Exception in HostObject::get for prop 'RNCallKeep': com.facebook.react.internal.turbomodule.core.TurboModuleInteropUtils$ParsingException: Unable to parse @ReactMethod annotations from native module: RNCallKeep. Details: Module exports two methods to JavaScript with the same name: "displayIncomingCall

  • Reproduced on:
  • Android
  • iOS

Description

Steps to Reproduce

Versions

- Callkeep:
- React Native:
- iOS:
- Android:
- Phone model: 

Logs

Paste here
@AsadAlihp
Copy link

having the same issue

@super-potion
Copy link

Same issue on latest "react-native": "^0.76.1", but not "react-native": "^0.75.4",

@shahzaib803
Copy link

having the same issue

@C0rren
Copy link

C0rren commented Nov 4, 2024

Same issue. RN 0.76.1. newArch enabled.

@dan-avg
Copy link

dan-avg commented Nov 4, 2024

Same issue. It happens only on Android when "new arch" is enabled.

To reproduce:

  • create a new React Native repo
  • make sure "new arch" is enabled newArchEnabled=true in gradle.properties
  • install CallKeep and import CallKeep in the index.js file import RNCallKeep from 'react-native-callkeep';
  • App crashes on start and the error message mentioned in the OP is displayed

Removing the CallKeep import gets rid of the error message.
Disabling "new arch" gets rid of the error message.

This happens on React Native 0.76 (where new architecture is enabled by default) and also happens in earlier versions if you enable the new architecture manually.

@MoamberRaza
Copy link

Same issue.

@marcosluizfp
Copy link

Same issue. RN 0.76.1. newArch enabled.

The issue below describes the problem:

facebook/react-native#45193


Temporarily disabled newArch on gradle.properties as workaround:
# newArchEnabled=true

@arungirivasan
Copy link

same issue.

there is one more issue.

com.facebook.react.internal.turbomodule.core.TurboModuleInteropUtils$ParsingException: Unable to parse @ReactMethod annotations from native module: RNCallKeep. Details: Module exports two methods to JavaScript with the same name: "startCall

@TSk198
Copy link

TSk198 commented Nov 22, 2024

i think RN Callkeep dose not support New Arch yet. Check here

@kavehmovahedi
Copy link

I was able to get around the error by commenting out one of the methods.
Here's how I did it:
edit the file node_modules/react-native-callkeep/android/src/main/java/io/wazo/callkeep/RNCallKeepModule.java
look for this:

@ReactMethod
public void displayIncomingCall(String uuid, String number, String callerName) {
        this.displayIncomingCall(uuid, number, callerName, false, null);
}

and this:

@ReactMethod
 public void startCall(String uuid, String number, String callerName) {
        this.startCall(uuid, number, callerName, false, null);
 }

comment or delete them and rebuilt, it should work.

@lpfrenette
Copy link

I was able to get around the error by commenting out one of the methods. Here's how I did it: edit the file node_modules/react-native-callkeep/android/src/main/java/io/wazo/callkeep/RNCallKeepModule.java look for this:

@ReactMethod
public void displayIncomingCall(String uuid, String number, String callerName) {
        this.displayIncomingCall(uuid, number, callerName, false, null);
}

and this:

@ReactMethod
 public void startCall(String uuid, String number, String callerName) {
        this.startCall(uuid, number, callerName, false, null);
 }

comment or delete them and rebuilt, it should work.
react-native-callkeep+4.3.16.patch
I've created the patch to be used with patch-package

@shais99
Copy link

shais99 commented Jan 16, 2025

same here

@shais99
Copy link

shais99 commented Jan 17, 2025

I was able to get around the error by commenting out one of the methods. Here's how I did it: edit the file node_modules/react-native-callkeep/android/src/main/java/io/wazo/callkeep/RNCallKeepModule.java look for this:

@ReactMethod
public void displayIncomingCall(String uuid, String number, String callerName) {
        this.displayIncomingCall(uuid, number, callerName, false, null);
}

and this:

@ReactMethod
 public void startCall(String uuid, String number, String callerName) {
        this.startCall(uuid, number, callerName, false, null);
 }

comment or delete them and rebuilt, it should work.
react-native-callkeep+4.3.16.patch
I've created the patch to be used with patch-package

I have tried that, still getting the error:

 (NOBRIDGE) ERROR  Error: Exception in HostObject::get for prop 'RNCallKeep': com.facebook.react.internal.turbomodule.core.TurboModuleInteropUtils$ParsingException: Unable to parse @ReactMethod annotations from native module: RNCallKeep. Details: Module exports two methods to JavaScript with the same name: "displayIncomingCall [Component Stack]

@MoamberRaza
Copy link

one another solution to turn new architecture in to False in gradle.properties or comment display incoming call and start call in node modules in Android folder. Thanks

@danilvalov
Copy link

danilvalov commented Jan 30, 2025

react-native-callkeep+4.3.16.patch
I've created the patch to be used with patch-package

Your patch is redundant. Your build folder got there.

Correct react-native-callkeep+4.3.16.patch:

diff --git a/node_modules/react-native-callkeep/android/src/main/java/io/wazo/callkeep/RNCallKeepModule.java b/node_modules/react-native-callkeep/android/src/main/java/io/wazo/callkeep/RNCallKeepModule.java
index 025480a..fb98e65 100644
--- a/node_modules/react-native-callkeep/android/src/main/java/io/wazo/callkeep/RNCallKeepModule.java
+++ b/node_modules/react-native-callkeep/android/src/main/java/io/wazo/callkeep/RNCallKeepModule.java
@@ -434,10 +434,10 @@ public class RNCallKeepModule extends ReactContextBaseJavaModule implements Life
         this.hasListeners = false;
     }
 
-    @ReactMethod
-    public void displayIncomingCall(String uuid, String number, String callerName) {
-        this.displayIncomingCall(uuid, number, callerName, false, null);
-    }
+//     @ReactMethod
+//     public void displayIncomingCall(String uuid, String number, String callerName) {
+//         this.displayIncomingCall(uuid, number, callerName, false, null);
+//     }
 
     @ReactMethod
     public void displayIncomingCall(String uuid, String number, String callerName, boolean hasVideo) {
@@ -483,10 +483,10 @@ public class RNCallKeepModule extends ReactContextBaseJavaModule implements Life
         conn.onAnswer();
     }
 
-    @ReactMethod
-    public void startCall(String uuid, String number, String callerName) {
-        this.startCall(uuid, number, callerName, false, null);
-    }
+//     @ReactMethod
+//     public void startCall(String uuid, String number, String callerName) {
+//         this.startCall(uuid, number, callerName, false, null);
+//     }
 
     @ReactMethod
     public void startCall(String uuid, String number, String callerName, boolean hasVideo) {

P.S. @kavehmovahedi Thanks for your solution! It works!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests