skip to Main Content

Exception in HostObject::get for prop ‘ExtSdkApiRN’: com.facebook.react.internal.turbomodule.core.TurboModuleInteropUtils$ParsingException: Unable to parse @ReactMethod annotation from native module method: ExtSdkApiRN.listeners(). Details: Unable to parse JNI signature. Detected unsupported return class: java.lang.Object[] [Component Stack] when usng react-native-agora-chat–1.3.0-alpha-0 && react-natve –0.76.1

Please help me how to solve
it shows error in the line
const chatClient = ChatClient.getInstance();
TypeError: Cannot read property ‘ChatClient’ of undefined

2

Answers


  1. The error is in the external SDK used in the module. I can’t raise a PR because the repo isn’t on Github or I’m not sure where they publish the source.

    Error Detail:

    Unable to parse JNI signature. Detected unsupported return class: java.lang.Object[]

    So the return type java.lang.Object[] is unsupported.

    Solution:

    Return a supported type which is WritableArray

    Quick Fix:

    1. Go to node_modulesreact-native-agora-chatnative_srcjavacomeasemobext_sdkrnExtSdkApiRN.java

    2. Import WritableArray

    import com.facebook.react.bridge.WritableArray;
    
    1. Change the return type of listeners() from Object[] to WritableArray
    // Line: 154
    
        @ReactMethod
        public WritableArray listeners(String methodType) throws Exception {
            // Keep: Required for RN built in Event Emitter Calls.
            throw new Exception("Required for RN built in Event Emitter Calls.");
        }
    
    
    1. Clear cache and rebuild the app.
    Login or Signup to reply.
  2. There’s a support issue for many libraries in the new RN architecture at the moment (RN 0.76 >). You might have to check for patches or downgrade.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search