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

crash when running the sample app #208

Closed
massdonati opened this issue Nov 26, 2016 · 2 comments
Closed

crash when running the sample app #208

massdonati opened this issue Nov 26, 2016 · 2 comments

Comments

@massdonati
Copy link

massdonati commented Nov 26, 2016

Describe your environment

  • Objective C or Swift: objc
  • iOS version: 10.1 (simulator)
  • Firebase SDK version: 3.10
  • FirebaseUI version: FirebaseAuthUI 1.0.0
  • CocoaPods Version: 1.1.1

Describe the problem:

crash when trying to press the twitter login button

Steps to reproduce:

  1. clone the repo
  2. run pod install
  3. select the twitter raw
  4. press the twitter button

Observed Results:

Terminating app due to uncaught exception 'TWTRInvalidInitializationException', reason: 'Attempted to call TwitterKit methods before calling the requisite start methods; you must call +[Fabric with:@[Twitter class]] before using the methods on TwitterKit. If you are not storing your consumerKey and consumerSecret in your application's info.plist you must also call -[TwitterKit startWithConsumerKey:consumerSecret:] before calling +[Fabric with:]'
*** First throw call stack:
(
	0   CoreFoundation                      0x000000011012234b __exceptionPreprocess + 171
	1   libobjc.A.dylib                     0x000000010fb8321e objc_exception_throw + 48
	2   CoreFoundation                      0x000000011018b265 +[NSException raise:format:] + 197
	3   FirebaseUISample                    0x000000010a55da00 -[Twitter sessionStore] + 22
	4   FirebaseUISample                    0x000000010a53b0fe +[TWTRAPIClient clientWithCurrentUser] + 76
	5   FirebaseUISample                    0x000000010a2f0bee -[FUITwitterAuth signOut] + 46
	6   FirebaseUISample                    0x000000010a2d46ca -[FUIAuthPickerViewController signInWithProviderUI:] + 74
	7   FirebaseUISample                    0x000000010a2d4654 -[FUIAuthPickerViewController didTapSignInButton:] + 100
	8   UIKit                               0x000000010dd8c5b8 -[UIApplication sendAction:to:from:forEvent:] + 83
	9   UIKit                               0x000000010df11edd -[UIControl sendAction:to:forEvent:] + 67
	10  UIKit                               0x000000010df121f6 -[UIControl _sendActionsForEvents:withEvent:] + 444
	11  UIKit                               0x000000010df110f2 -[UIControl touchesEnded:withEvent:] + 668
	12  UIKit                               0x000000010ddf9ce1 -[UIWindow _sendTouchesForEvent:] + 2747
	13  UIKit                               0x000000010ddfb3cf -[UIWindow sendEvent:] + 4011
	14  UIKit                               0x000000010dda863f -[UIApplication sendEvent:] + 371
	15  UIKit                               0x000000010e59a71d __dispatchPreprocessedEventFromEventQueue + 3248
	16  UIKit                               0x000000010e5933c7 __handleEventQueue + 4879
	17  CoreFoundation                      0x00000001100c7311 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 17
	18  CoreFoundation                      0x00000001100ac59c __CFRunLoopDoSources0 + 556
	19  CoreFoundation                      0x00000001100aba86 __CFRunLoopRun + 918
	20  CoreFoundation                      0x00000001100ab494 CFRunLoopRunSpecific + 420
	21  GraphicsServices                    0x00000001117f2a6f GSEventRunModal + 161
	22  UIKit                               0x000000010dd8a964 UIApplicationMain + 159
	23  FirebaseUISample                    0x000000010a23c34f main + 111
	24  libdyld.dylib                       0x00000001106ab68d start + 1
)
libc++abi.dylib: terminating with uncaught exception of type NSException

Expected Results:

to be able to login with twitter

Relevant Code:

NA

@morganchen12
Copy link
Contributor

morganchen12 commented Nov 28, 2016

If you read the exception message, it expects you to initialize the TwitterKit class before making any calls to it. FirebaseUI doesn't do this for you.

Oops, didn't realize this was in our sample app. Thanks for reporting!

@morganchen12
Copy link
Contributor

I can't reproduce this crash. There is an error in console since we aren't using real API tokens in the sample, but the app doesn't crash.

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

2 participants