Quantcast
Channel: Active questions tagged react-native+android - Stack Overflow
Viewing all articles
Browse latest Browse all 28476

Error: Map already consumed - React Native

$
0
0

Basically I am connecting native android module with react native and passing information from native to js.

try {
    WritableMap params = new WritableNativeMap();
    params.putInt("connectionStatus", 2);
    sendEvent(mreactContext, "bleConnectionStatus", params);
    promise.resolve(params);
} catch (Exception exe) {
    Log.d(TAG, "Exception--: " + exe);
    promise.reject(exe);
}

It is showing exception

Exception--: com.facebook.react.bridge.ObjectAlreadyConsumedException: Map already consumed

Note : I have already gone through this answer ObjectAlreadyConsumedException: Receiving map already consumed but it seems it was about ordering a line. I have written code in that order only still shows exception.


Viewing all articles
Browse latest Browse all 28476

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>