NSInvalidArgumentException when user clicks on "Done" button
chmiiller opened this issue · comments
Hi @hansemannn ,
first of all thanks for the module! It works perfectly on iOS.
Feels 100% native, easy setup, instructions, documentation and retrieves needed information from the user.
The only thing is that the app is crashing when you click the "Done" button on Top Left corner.
The error message is:
The application has crashed with an uncaught exception 'NSInvalidArgumentException'.
Reason:
*** -[__NSPlaceholderDictionary initWithObjects:forKeys:count:]: attempt to insert nil object from objects[0]
Stack trace:
CoreFoundation -> __exceptionPreprocess + 147
libobjc.A.dylib -> objc_exception_throw + 48
CoreFoundation -> -[__NSPlaceholderDictionary initWithObjects:forKeys:count:] + 351
CoreFoundation -> +[NSDictionary dictionaryWithObjects:forKeys:count:] + 59
building -> +[TiGooglesigninModule dictionaryFromUser:] + 823
building -> -[TiGooglesigninModule signIn:didSignInForUser:withError:] + 115
building -> -[GIDSignIn safariViewControllerDidFinish:] + 129
SafariServices -> -[SFSafariViewController remoteViewControllerWillDismiss:] + 128
SafariServices -> -[SFBrowserRemoteViewController willDismissServiceViewController] + 47
CoreFoundation -> __invoking___ + 140
CoreFoundation -> -[NSInvocation invoke] + 289
FrontBoardServices -> __FBSSERIALQUEUE_IS_CALLING_OUT_TO_A_BLOCK__ + 24
FrontBoardServices -> -[FBSSerialQueue _performNext] + 189
FrontBoardServices -> -[FBSSerialQueue _performNextFromRunLoopSource] + 45
CoreFoundation -> __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 17
CoreFoundation -> __CFRunLoopDoSources0 + 556
CoreFoundation -> __CFRunLoopRun + 918
CoreFoundation -> CFRunLoopRunSpecific + 420
GraphicsServices -> GSEventRunModal + 161
UIKit -> UIApplicationMain + 159
building -> main + 100
libdyld.dylib -> start + 1
??? -> 0x0 + 1
Do you have any clue?
My Configurations:
Ti SDK: 6.0.1.GA
iOS: 10.2.1
Development build
Also crashing on Simulator =/
Thanks again! 😁
Hey man, let me check. Did you use the example code? EDIT: Looks like some of the values passed to dictionaryFromUser:
are nil, so it crashes. Please provide some testing steps of what exactly you used to reproduce it.
Ahn sorry. Yes, I'm using exactly the same code from the example app.js
Fixed as part of https://github.com/hansemannn/ti.googlesignin/releases/tag/v1.1.1
Awesome!
Tested and it's working now.
Thank you so much 😊