joltup / react-native-threads

Create new JS processes for CPU intensive work
MIT License
754 stars 141 forks source link

Calling JS function after bridge has been destroyed #52

Open lpongetti opened 6 years ago

lpongetti commented 6 years ago

Hi, i call a native module in my thread but the callback doesn't response All works perfectly, also if i call other functions of this module, but with this the callback was never emitted.

net.query('SELECT LinkedEntityId, ContentDocument.LatestPublishedVersion.VersionData FROM ContentDocumentLink WHERE LinkedEntityId IN (SELECT Id FROM SM_News__c WHERE Active__c = true)', (resultQuery: any) => console.log(resultQuery));

In logcat i saw this.

W/unknown:ReactNative: Calling JS function after bridge has been destroyed: RCTDeviceEventEmitter.emit(["websocketFailed",{"message":"connect timed out","id":5}])

"react": "^16.4.1", "react-native": "^0.55.4", "react-native-threads": "0.0.13",

In main thread works.

What can it be? Thanks

Traviskn commented 5 years ago

the websocketFailed part of your error message is interesting, are you running a remote debugger by chance? you will need to disable remote debugging in order for react-native-threads to work.