Skip to content

TurboModules Error: Duplicate @ReactMethod #832

Open
@Ullas-A-2000

Description

@Ullas-A-2000

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);
    }

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions