I use react-native-oauth
and get this error (see red image below) when trying to log in. I searched and found only this similar unanswered question . I looked at the source and found where the error was raised on line 954, and it looks like moduleIDs.count
should equal methodIDs.count
and paramsArrays.count
:
if (RCT_DEBUG && (moduleIDs.count != methodIDs.count || moduleIDs.count != paramsArrays.count)) { RCTLogError(@"Invalid data message - all must be length: %zd", moduleIDs.count);
So, still in the source , I search for these objects and find them defined a little higher, on lines 943-945, and they use RCTConvert, whose functions "... everyone takes a JSON value as input and matches it with a native type or class Objective-C ". - React docs
So it looks like this is a transmission related and / or network error. But I have basically 0 knowledge in these areas, and I feel like I’m in a hurdle to investigate and wondered if anyone has any ideas to move forward. Being new to React Native and never doing any Objective-C can't help me.
Also, here my code generates errors.
import OAuthManager from 'react-native-oauth'; import { Alert } from 'react-native' var env = require('../environment.js') const config = { facebook: { client_id: env.getKey("FB_ID"), client_Secret: env.getKey("FB_SECRET") } } const manager = new OAuthManager('myAppName') manager.configure(config); exports.authWithFb = () => { manager.authorize('facebook') .then(resp => Alert.alert('response!' + resp)) .catch(err => Alert.alert('error msg here: ' + err)); }
I assume that this undefined error is related to the RCTBridge error, but not sure. You can see when I warn of the manager.authorize
error. TypeError: undefined is not an object (evaluating 'fn')
:

Edit:
When I try to notify the config
object, I get a message that there is no way to reinforce it with a sub-object. 
When you view the console in the chrome debugger, I get “Can't read the configureProvider property from undefined” and configureProvider()
is what react-native-oauth
, so it looks like the manager is not configured correctly, so, maybe i did well link the library. Check if the link works.
Im delving into errors a bit, and this seems like a promise / callback problem from NativeModules.OAuthManager
. Accuracy: TypeError: Cannot read property 'authorize' of undefined
. When I go into the stack trace, I find: 
Any help is much appreciated, thanks.