Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Running configure throws exception #8

Closed
batuhan opened this issue Aug 24, 2016 · 4 comments
Closed

Running configure throws exception #8

batuhan opened this issue Aug 24, 2016 · 4 comments

Comments

@batuhan
Copy link

batuhan commented Aug 24, 2016

I'm not an iOS developer so I don't know how to debug this.

2016-08-24 04:24:48.811 Proco[60852:8079959] *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'GIPReachability should be used from the main thread'
*** First throw call stack:
(
    0   CoreFoundation                      0x000000010d94cd85 __exceptionPreprocess + 165
    1   libobjc.A.dylib                     0x000000010d049deb objc_exception_throw + 48
    2   CoreFoundation                      0x000000010d94cbea +[NSException raise:format:arguments:] + 106
    3   Foundation                          0x000000010af53e1e -[NSAssertionHandler handleFailureInFunction:file:lineNumber:description:] + 169
    4   libFirestack.a                      0x000000010cd5f870 -[GIPReachability startWithCompletionHandler:] + 159
    5   libFirestack.a                      0x000000010cd28a0f -[FIRMessaging startWithConfig:] + 212
    6   libFirestack.a                      0x000000010cd287ca __25+[FIRMessaging messaging]_block_invoke + 124
    7   libdispatch.dylib                   0x000000010f2543eb _dispatch_client_callout + 8
    8   libdispatch.dylib                   0x000000010f23fd68 dispatch_once_f + 543
    9   libFirestack.a                      0x000000010cd2874c +[FIRMessaging messaging] + 46
    10  libFirestack.a                      0x000000010cd28393 +[FIRMessaging(FIRApp) didReceiveConfigureSDKNotification:] + 127
    11  CoreFoundation                      0x000000010d916c8c __CFNOTIFICATIONCENTER_IS_CALLING_OUT_TO_AN_OBSERVER__ + 12
    12  CoreFoundation                      0x000000010d9169cb _CFXRegistrationPost + 427
    13  CoreFoundation                      0x000000010d916732 ___CFXNotificationPost_block_invoke + 50
    14  CoreFoundation                      0x000000010d95f1e2 -[_CFXNotificationRegistrar find:object:observer:enumerator:] + 1986
    15  CoreFoundation                      0x000000010d80e679 _CFXNotificationPost + 633
    16  Foundation                          0x000000010ae95cd9 -[NSNotificationCenter postNotificationName:object:userInfo:] + 66
    17  libFirestack.a                      0x000000010cc5e134 +[FIRApp sendNotificationsToSDKs:] + 296
    18  libFirestack.a                      0x000000010cc5d09b +[FIRApp configureDefaultAppWithOptions:sendingNotifications:] + 324
    19  libFirestack.a                      0x000000010cc5ce13 +[FIRApp configureWithOptions:] + 90
    20  libFirestack.a                      0x000000010cc0eac6 -[Firestack configureWithOptions:callback:] + 3366
    21  CoreFoundation                      0x000000010d8355cc __invoking___ + 140
    22  CoreFoundation                      0x000000010d83541e -[NSInvocation invoke] + 286
    23  CoreFoundation                      0x000000010d8c4d26 -[NSInvocation invokeWithTarget:] + 54
    24  Proco                               0x0000000108db702f -[RCTModuleMethod invokeWithBridge:module:arguments:] + 1887
    25  Proco                               0x0000000108e09848 -[RCTBatchedBridge _handleRequestNumber:moduleID:methodID:params:] + 680
    26  Proco                               0x0000000108e0898a __33-[RCTBatchedBridge handleBuffer:]_block_invoke.457 + 1274
    27  libdispatch.dylib                   0x000000010f233d9d _dispatch_call_block_and_release + 12
    28  libdispatch.dylib                   0x000000010f2543eb _dispatch_client_callout + 8
    29  libdispatch.dylib                   0x000000010f23a82c _dispatch_queue_drain + 2215
    30  libdispatch.dylib                   0x000000010f239d4d _dispatch_queue_invoke + 601
    31  libdispatch.dylib                   0x000000010f23c996 _dispatch_root_queue_drain + 1420
    32  libdispatch.dylib                   0x000000010f23c405 _dispatch_worker_thread3 + 111
    33  libsystem_pthread.dylib             0x000000010f5914de _pthread_wqthread + 1129
    34  libsystem_pthread.dylib             0x000000010f58f341 start_wqthread + 13
)
libc++abi.dylib: terminating with uncaught exception of type NSException
(lldb) 

screen shot 2016-08-24 at 04 26 08

Code I'm running:

import Firestack from 'react-native-firestack'

const firestack = new Firestack({
apiKey: '[reducted]',
authDomain: '[reducted].firebaseapp.com',
storageBucket: '[reducted].appspot.com',
databaseURL: 'https://[reducted].firebaseio.com',
});

firestack.configure()
.then(() => console.log("Project configured and ready to boot"));

@linuxing3
Copy link

I just got the same problem.
I found that the key definition is different in Object-C and js.
So instead of using apiKey, I changed to `APIKey

@linuxing3
Copy link

And to avoid conflict problem, don't add GoogleService-Info.plist.
This worked for me.

@linuxing3
Copy link

NSArray *keyOptions = @[@"APIKey", @"clientID", @"trackingID",
                        @"GCMSenderID", @"androidClientID",
                        @"googleAppID", @"databaseURL",
                        @"deepLinkURLScheme", @"storageBucket"];

@auser
Copy link
Contributor

auser commented Aug 24, 2016

Hey guys -- Sorry about the bug. I have been working on a big refactor based on a conversation I had with the Firebase guys. I should have a big update coming. I'll also update the APIKey value. Thanks for catching that @linuxing3

This should be fixed with the latest version v2.1.0 on npm

@auser auser closed this as completed Aug 25, 2016
Salakar added a commit that referenced this issue Dec 29, 2016
Update Java database module to simplify reference handling
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants