react-native-webrtc / react-native-webrtc/react-native-callkeep
TurboModules Error: Duplicate @ReactMethod
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 1.1k
- Forks
- 511
- Avg merge
- 9h 12m
- Merged PRs (30d)
- 2
Description
i'm not sure why this code was added but so as same name cannot exist for a method its throwing error in new arch
react-native > 0.76.0
Exact error was
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
removed below code
- @ReactMethod
- public void startCall(String uuid, String number, String callerName) {
- this.startCall(uuid, number, callerName, false, null);
- }
-
- @ReactMethod
- public void displayIncomingCall(String uuid, String number, String callerName) {
- this.displayIncomingCall(uuid, number, callerName, false, null);
- }
-
Because already these methods existed
@ReactMethod
public void startCall(String uuid, String number, String callerName, boolean hasVideo) {
this.startCall(uuid, number, callerName, hasVideo, null);
}
@ReactMethod
public void displayIncomingCall(String uuid, String number, String callerName, boolean hasVideo) {
this.displayIncomingCall(uuid, number, callerName, hasVideo, null);
}
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Inspect the Android native module that exports RNCallKeep and compare the @ReactMethod declarations for startCall and displayIncomingCall. Reproduce with React Native above 0.76 using the new architecture, then verify that each JavaScript method name is exported only once and the TurboModules parsing error is gone.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java, react-native
- Domain
- mobile
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Quiet
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100