Problem after sign in on google - 'GTMOAuth2Authentication: No parser available'

154 views
Skip to first unread message

Tiago Duarte

unread,
Apr 13, 2012, 9:17:19 AM4/13/12
to GTM OAuth 2 Discussion
I get this error after correctly loggin in on google account

Assertion failure in -[GTMOAuth2Authentication
dictionaryWithJSONData:], GTMOAuth2Authentication.m:332
*** Terminating app due to uncaught exception
'NSInternalInconsistencyException', reason: 'GTMOAuth2Authentication:
No parser available'
*** Call stack at first throw:
(
0 CoreFoundation 0x010565a9
__exceptionPreprocess + 185
1 libobjc.A.dylib 0x013e5313
objc_exception_throw + 44
2 CoreFoundation 0x0100eef8 +[NSException
raise:format:arguments:] + 136
3 Foundation 0x00aab3bb -
[NSAssertionHandler
handleFailureInMethod:object:file:lineNumber:description:] + 116
4 CW App 0x0000a60f -
[GTMOAuth2Authentication dictionaryWithJSONData:] + 815
5 CW App 0x0000a2ae -
[GTMOAuth2Authentication setKeysForResponseJSONData:] + 62
6 CW App 0x0000ca0d -
[GTMOAuth2Authentication tokenFetcher:finishedWithData:error:] + 845
7 CoreFoundation 0x00fc6c7d __invoking___ + 29
8 CoreFoundation 0x00fc6b51 -[NSInvocation
invoke] + 145
9 CW App 0x000166fe -[GTMHTTPFetcher
invokeFetchCallback:target:data:error:] + 414
10 CW App 0x00016510 -[GTMHTTPFetcher
invokeFetchCallbacksWithData:error:] + 160
11 CW App 0x000175aa -[GTMHTTPFetcher
connectionDidFinishLoading:] + 986
12 Foundation 0x00a52112 -
[NSURLConnection(NSURLConnectionReallyInternal) sendDidFinishLoading]
+ 108
13 Foundation 0x00a5206b
_NSURLConnectionDidFinishLoading + 133
14 CFNetwork 0x0185748e
_ZN19URLConnectionClient23_clientDidFinishLoadingEPNS_26ClientConnectionEventQueueE
+ 220
15 CFNetwork 0x019226e1
_ZN19URLConnectionClient26ClientConnectionEventQueue33processAllEventsAndConsumePayloadEP20XConnectionEventInfoI12XClientEvent18XClientEventParamsEl
+ 293
16 CFNetwork 0x0184dc80
_ZN19URLConnectionClient13processEventsEv + 100
17 CFNetwork 0x0184dacf
_ZN17MultiplexerSource7performEv + 251
18 CoreFoundation 0x010378ff
__CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 15
19 CoreFoundation 0x00f9588b
__CFRunLoopDoSources0 + 571
20 CoreFoundation 0x00f94d86 __CFRunLoopRun +
470
21 CoreFoundation 0x00f94840
CFRunLoopRunSpecific + 208
22 CoreFoundation 0x00f94761 CFRunLoopRunInMode
+ 97
23 GraphicsServices 0x01aa81c4 GSEventRunModal +
217
24 GraphicsServices 0x01aa8289 GSEventRun + 115
25 UIKit 0x002b6c93 UIApplicationMain
+ 1160
26 CW App 0x0000216a main + 170
27 CW App 0x000020b5 start + 53
28 ??? 0x00000001 0x0 + 1
)
terminate called throwing an exception(lldb)

Tiago Duarte

unread,
Apr 13, 2012, 9:40:14 AM4/13/12
to gtm-o...@googlegroups.com
I have figured it out, I added the JSON files to the project but it I had to add the files by hand to the compile sources!

Greg Robbins

unread,
Apr 13, 2012, 9:57:19 AM4/13/12
to gtm-o...@googlegroups.com
gtm-oauth2 requires that it be linked against the SBJSON parser when running on iOS 4 or Mac OS X 10.6. Checking out SBJSON via subversion should also check out the sources for SBJSON.

Tiago Duarte

unread,
Apr 17, 2012, 2:56:19 AM4/17/12
to gtm-o...@googlegroups.com
Yes that's it Greg, thanks for the reply
Reply all
Reply to author
Forward
0 new messages