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

TurboModules Error: Duplicate @ReactMethod #832

Open
Ullas-A-2000 opened this issue Feb 16, 2025 · 1 comment
Open

TurboModules Error: Duplicate @ReactMethod #832

Ullas-A-2000 opened this issue Feb 16, 2025 · 1 comment

Comments

@Ullas-A-2000
Copy link

Ullas-A-2000 commented Feb 16, 2025

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);
    }
@Kumargaurav11998
Copy link

comment out first method for displayIncomingCall and startCall

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

2 participants