Google-signin: Sporadic crash -> NSInvalidArgumentException

Created on 11 Sep 2018  路  12Comments  路  Source: react-native-google-signin/google-signin

Steps to Reproduce

The error occurs when i call the next function

GoogleSignin.signIn().then((user: any) => {
    }).catch((err: any) => {
    }).done();

Actual Behavior

This crash.
Terminating app due to an uncaught exception 'NSInvalidArgumentException', reason: '*** -[__NSPlaceholderDictionary initWithObjects:forKeys:count:]: attempt to insert nil object from objects[2]'

Environment

  • react-native: 0.51.0
  • react-native-google-signin: 0.12.0
  • react: 16.0.0
  • cocoapods->GoogleSignIn: pod 'GoogleSignIn'
- GoogleSignIn (4.1.2):
    - GoogleToolboxForMac/NSDictionary+URLArguments (~> 2.1)
    - GoogleToolboxForMac/NSString+URLArguments (~> 2.1)
    - GTMOAuth2 (~> 1.0)
    - GTMSessionFetcher/Core (~> 1.1)
needs repro / repro steps

Most helpful comment

released in rc6, thanks!

All 12 comments

hi, as the issue template explains, we require you to provide a runnable repro, otherwise this is not actionable. Can you please provide a repro?

also note that you're using an old version of this library, please upgrade to the newest one. There have been many improvements. And the repro, if you make one, should also use the newest version. Thanks.

hi @vonovak i can't replicate constantly this issue. Is this the reason why i put Sporadic in the title.

I could see the existence of this problem thanks to AppSee and its screen recordings.

captura de pantalla 2018-09-11 a la s 5 35 38 pm.

Anyway, I will try to update the version of this module and submit a new version and wait for the reports again.

But I would like to know if in the later versions that I am using this problem has been detected and if it has been solved.

Thanks

Hi, thanks for the screenshot. What makes you believe the error comes from this module? Is there any stacktrace? Thanks.

I realized, because AppSee makes recording in the sessions. In all the videos where this crash occurs, it is just pressing the login button with gmail. Pressing calls a function that only contains the following code.

captura de pantalla 2018-09-12 a la s 7 52 32 am

And the code inside the promise is not relevant, because in no case it reaches that point.

ok, thanks. Can you also provide the full stacktrace please? It helps other people who have the same problem with the googleability of this issue. Also, it helps us to know more about where the problem happened. thanks.

I have all the crash information, but unfortunately is not it completely symbolized

All Crash info

Last Exception Backtrace
--
0 | CoreFoundation | 0x182166d8c | __exceptionPreprocess + 228
1 | libobjc.A.dylib | 0x1813205ec | objc_exception_throw + 56
2 | CoreFoundation | 0x1820ff750 | _CFArgv + 0
3 | CoreFoundation | 0x1820380cc | -[__NSPlaceholderDictionary initWithObjects:forKeys:count:] + 352
4 | CoreFoundation | 0x182037f48 | +[NSDictionary dictionaryWithObjects:forKeys:count:] + 64
5 | myApp | 0x1043b479c | _ZN5folly6detail15str_to_integralIxEENS_8ExpectedIT_NS_14ConversionCodeEEEPNS_5RangeIPKcEE + 384836
6 | myApp | 0x1040fdfdc | myApp + 532444
7 | myApp | 0x1040f5f58 | myApp + 499544
8 | myApp | 0x1040fdbb0 | myApp + 531376
9 | myApp | 0x1040d8250 | myApp + 377424
10 | libdispatch.dylib | 0x181a58aa0 | _dispatch_call_block_and_release + 24
11 | libdispatch.dylib | 0x181a58a60 | _dispatch_client_callout + 16
12 | libdispatch.dylib | 0x181a6549c | _dispatch_main_queue_callback_4CF$VARIANT$mp + 564
13 | CoreFoundation | 0x18210f070 | __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 12
14 | CoreFoundation | 0x18210cbc8 | __CFRunLoopRun + 2272
15 | CoreFoundation | 0x18202cda8 | CFRunLoopRunSpecific + 552
16 | GraphicsServices | 0x184012020 | GSEventRunModal + 100
17 | UIKit | 0x18c04c758 | UIApplicationMain + 236
18 | myApp | 0x104092de8 | myApp + 93672
19 | libdyld.dylib | 0x181abdfc0 | start + 4

0 | CoreFoundation | 0x1821671c8 | __handleUncaughtException + 828
1 | libobjc.A.dylib | 0x1813208c8 | objc_terminate() + 112
2 | libc++abi.dylib | 0x18131137c | std::__terminate() + 16
3 | libc++abi.dylib | 0x181310ccc | _cxxabiv1::exception_cleanup_func() + 0
4 | libobjc.A.dylib | 0x181320720 | objc_exception_destructor() + 0
5 | CoreFoundation | 0x1820ff750 | _CFArgv + 0
6 | CoreFoundation | 0x1820380cc | -[__NSPlaceholderDictionary initWithObjects:forKeys:count:] + 352
7 | CoreFoundation | 0x182037f48 | +[NSDictionary dictionaryWithObjects:forKeys:count:] + 64
8 | myApp | 0x1043b479c | _ZN5folly6detail15str_to_integralIxEENS_8ExpectedIT_NS_14ConversionCodeEEEPNS_5RangeIPKcEE + 384836
9 | myApp | 0x1040fdfdc | myApp + 532444
10 | myApp | 0x1040f5f58 | myApp + 499544
11 | myApp | 0x1040fdbb0 | myApp + 531376
12 | myApp | 0x1040d8250 | myApp + 377424
13 | libdispatch.dylib | 0x181a58aa0 | _dispatch_call_block_and_release + 24
14 | libdispatch.dylib | 0x181a58a60 | _dispatch_client_callout + 16
15 | libdispatch.dylib | 0x181a6549c | _dispatch_main_queue_callback_4CF$VARIANT$mp + 564
16 | CoreFoundation | 0x18210f070 | __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 12
17 | CoreFoundation | 0x18210cbc8 | __CFRunLoopRun + 2272
18 | CoreFoundation | 0x18202cda8 | CFRunLoopRunSpecific + 552
19 | GraphicsServices | 0x184012020 | GSEventRunModal + 100
20 | UIKit | 0x18c04c758 | UIApplicationMain + 236
21 | myApp | 0x104092de8 | myApp + 93672
22 | libdyld.dylib | 0x181abdfc0 | start + 4

0 | libsystem_kernel.dylib | 0x181bedd78 | __workq_kernreturn + 8
1 | libsystem_pthread.dylib | 0x181d8bb08 | start_wqthread + 4

0 | libsystem_kernel.dylib | 0x181bedd78 | __workq_kernreturn + 8
1 | libsystem_pthread.dylib | 0x181d8bb08 | start_wqthread + 4

0 | libsystem_kernel.dylib | 0x181bec214 | __channel_sync + 8
1 | libsystem_network.dylib | 0x181c723f4 | __nw_channel_finalize_output_frames_block_invoke + 64
2 | libsystem_network.dylib | 0x181c71920 | nw_channel_finalize_output_frames + 172
3 | libnetwork.dylib | 0x1831412fc | nw_protocol_ipv4_finalize_output_frames + 144
4 | libusrtcp.dylib | 0x183225394 | tcp_ip_output + 524
5 | libusrtcp.dylib | 0x183222fd0 | tcp_output + 13160
6 | libusrtcp.dylib | 0x18321d4ac | tcp_disconnect + 268
7 | libusrtcp.dylib | 0x18321bd1c | tcp_usr_disconnect + 72
8 | libusrtcp.dylib | 0x18322f018 | tcp_close_locked + 720
9 | libusrtcp.dylib | 0x183200d44 | ____nw_protocol_tcp_disconnect_block_invoke + 48
10 | libdispatch.dylib | 0x181a58aa0 | _dispatch_call_block_and_release + 24
11 | libdispatch.dylib | 0x181a58a60 | _dispatch_client_callout + 16
12 | libdispatch.dylib | 0x181a629b4 | _dispatch_queue_serial_drain$VARIANT$mp + 608
13 | libdispatch.dylib | 0x181a632fc | _dispatch_queue_invoke$VARIANT$mp + 336
14 | libdispatch.dylib | 0x181a63cc8 | _dispatch_root_queue_drain_deferred_wlh$VARIANT$mp + 340
15 | libdispatch.dylib | 0x181a6c098 | _dispatch_workloop_worker_thread$VARIANT$mp + 668
16 | libsystem_pthread.dylib | 0x181d8be70 | _pthread_wqthread + 860
17 | libsystem_pthread.dylib | 0x181d8bb08 | start_wqthread + 4

0 | libsystem_kernel.dylib | 0x181bcbde8 | mach_msg_trap + 8
1 | CoreFoundation | 0x18210ee40 | __CFRunLoopServiceMachPort + 196
2 | CoreFoundation | 0x18210c908 | __CFRunLoopRun + 1568
3 | CoreFoundation | 0x18202cda8 | CFRunLoopRunSpecific + 552
4 | Foundation | 0x182aa1674 | -[NSRunLoop(NSRunLoop) runMode:beforeDate:] + 304
5 | Foundation | 0x182aa151c | -[NSRunLoop(NSRunLoop) runUntilDate:] + 148
6 | UIKit | 0x18bd31768 | -[UIEventFetcher threadMain] + 136
7 | Foundation | 0x182bb1efc | __NSThread__start__ + 1040
8 | libsystem_pthread.dylib | 0x181d8d220 | _pthread_body + 272
9 | libsystem_pthread.dylib | 0x181d8d110 | _pthread_body + 0
10 | libsystem_pthread.dylib | 0x181d8bb10 | thread_start + 4

0 | libsystem_kernel.dylib | 0x181bedd78 | __workq_kernreturn + 8
1 | libsystem_pthread.dylib | 0x181d8bb08 | start_wqthread + 4

0 | CFNetwork | 0x182935618 | ___ZN20HTTP2ConnectionCache15initCacheTimersEv_block_invoke_2 + 0
1 | libdispatch.dylib | 0x181a58a60 | _dispatch_client_callout + 16
2 | libdispatch.dylib | 0x181a60e94 | _dispatch_continuation_pop$VARIANT$mp + 424
3 | libdispatch.dylib | 0x181a6a62c | _dispatch_source_invoke$VARIANT$mp + 1020
4 | libdispatch.dylib | 0x181a65cac | _dispatch_root_queue_drain + 588
5 | libdispatch.dylib | 0x181a659fc | _dispatch_worker_thread3 + 120
6 | libsystem_pthread.dylib | 0x181d8bfac | _pthread_wqthread + 1176
7 | libsystem_pthread.dylib | 0x181d8bb08 | start_wqthread + 4

0 | libsystem_kernel.dylib | 0x181bcbde8 | mach_msg_trap + 8
1 | CoreFoundation | 0x18210ee40 | __CFRunLoopServiceMachPort + 196
2 | CoreFoundation | 0x18210c908 | __CFRunLoopRun + 1568
3 | CoreFoundation | 0x18202cda8 | CFRunLoopRunSpecific + 552
4 | myApp | 0x1042dc3e0 | 聽
5 | Foundation | 0x182bb1efc | __NSThread__start__ + 1040
6 | libsystem_pthread.dylib | 0x181d8d220 | _pthread_body + 272
7 | libsystem_pthread.dylib | 0x181d8d110 | _pthread_body + 0
8 | libsystem_pthread.dylib | 0x181d8bb10 | thread_start + 4

0 | libsystem_kernel.dylib | 0x181bed0e8 | __psynch_cvwait + 8
1 | libc++.1.dylib | 0x1812a42ec | std::__1::condition_variable::__do_timed_wait() + 96
2 | JavaScriptCore | 0x1897b56e8 | std::__1::condition_variable::wait_until<std::__1::chrono::steady_clock, std::__1::chrono::duration<long long, std::__1::ratio<1l, 1000000000l> > >() + 124
3 | JavaScriptCore | 0x1897b5598 | std::__1::condition_variable_any::wait_until<std::__1::unique_lock<bmalloc::Mutex>, std::__1::chrono::steady_clock, std::__1::chrono::duration<long long, std::__1::ratio<1l, 1000000000l> > >() + 112
4 | JavaScriptCore | 0x1897b50dc | bmalloc::Scavenger::threadRunLoop() + 272
5 | JavaScriptCore | 0x1897b4e18 | bmalloc::Scavenger::Scavenger() + 0
6 | JavaScriptCore | 0x1897b5234 | std::__1::__thread_proxy<std::__1::tuple<std::__1::unique_ptr<std::__1::__thread_struct, std::__1::default_delete<std::__1::__thread_struct> >, void (*)(bmalloc::Scavenger*), bmalloc::Scavenger*> >() + 44
7 | libsystem_pthread.dylib | 0x181d8d220 | _pthread_body + 272
8 | libsystem_pthread.dylib | 0x181d8d110 | _pthread_body + 0
9 | libsystem_pthread.dylib | 0x181d8bb10 | thread_start + 4

0 | libsystem_kernel.dylib | 0x181bed0e8 | __psynch_cvwait + 8
1 | JavaScriptCore | 0x188cee6b0 | WTF::ThreadCondition::timedWait() + 148
2 | JavaScriptCore | 0x18979a9d0 | WTF::ParkingLot::parkConditionallyImpl() + 2252
3 | JavaScriptCore | 0x189252188 | WTF::Condition::waitUntil<WTF::Lock>() + 184
4 | JavaScriptCore | 0x18977ffac | WTF::Function<void ()>::CallableWrapper<WTF::AutomaticThread::start(WTF::AbstractLocker const&)::$_0>::call() + 212
5 | JavaScriptCore | 0x1897ac2dc | WTF::Thread::entryPoint() + 224
6 | JavaScriptCore | 0x188ce9d74 | WTF::wtfThreadEntryPoint() + 12
7 | libsystem_pthread.dylib | 0x181d8d220 | _pthread_body + 272
8 | libsystem_pthread.dylib | 0x181d8d110 | _pthread_body + 0
9 | libsystem_pthread.dylib | 0x181d8bb10 | thread_start + 4

0 | libsystem_kernel.dylib | 0x181bcbde8 | mach_msg_trap + 8
1 | CoreFoundation | 0x18210ee40 | __CFRunLoopServiceMachPort + 196
2 | CoreFoundation | 0x18210c908 | __CFRunLoopRun + 1568
3 | CoreFoundation | 0x18202cda8 | CFRunLoopRunSpecific + 552
4 | Foundation | 0x182aa1674 | -[NSRunLoop(NSRunLoop) runMode:beforeDate:] + 304
5 | myApp | 0x1043b1a24 | 聽
6 | Foundation | 0x182bb1efc | __NSThread__start__ + 1040
7 | libsystem_pthread.dylib | 0x181d8d220 | _pthread_body + 272
8 | libsystem_pthread.dylib | 0x181d8d110 | _pthread_body + 0
9 | libsystem_pthread.dylib | 0x181d8bb10 | thread_start + 4

0 | libsystem_kernel.dylib | 0x181bcbde8 | mach_msg_trap + 8
1 | CoreFoundation | 0x18210ee40 | __CFRunLoopServiceMachPort + 196
2 | CoreFoundation | 0x18210c908 | __CFRunLoopRun + 1568
3 | CoreFoundation | 0x18202cda8 | CFRunLoopRunSpecific + 552
4 | CFNetwork | 0x18293a6e0 | -[__CoreSchedulingSetRunnable runForever] + 220
5 | Foundation | 0x182bb1efc | __NSThread__start__ + 1040
6 | libsystem_pthread.dylib | 0x181d8d220 | _pthread_body + 272
7 | libsystem_pthread.dylib | 0x181d8d110 | _pthread_body + 0
8 | libsystem_pthread.dylib | 0x181d8bb10 | thread_start + 4

0 | libsystem_pthread.dylib | 0x181d8bb04 | start_wqthread + 0

0 | libsystem_kernel.dylib | 0x181bedd78 | __workq_kernreturn + 8
1 | libsystem_pthread.dylib | 0x181d8bb08 | start_wqthread + 4

0 | libsystem_kernel.dylib | 0x181bcbde8 | mach_msg_trap + 8
1 | CoreFoundation | 0x18210ee40 | __CFRunLoopServiceMachPort + 196
2 | CoreFoundation | 0x18210c908 | __CFRunLoopRun + 1568
3 | CoreFoundation | 0x18202cda8 | CFRunLoopRunSpecific + 552
4 | myApp | 0x10440009c | 聽
5 | Foundation | 0x182bb1efc | __NSThread__start__ + 1040
6 | libsystem_pthread.dylib | 0x181d8d220 | _pthread_body + 272
7 | libsystem_pthread.dylib | 0x181d8d110 | _pthread_body + 0
8 | libsystem_pthread.dylib | 0x181d8bb10 | thread_start + 4

0 | libsystem_kernel.dylib | 0x181bcbe3c | semaphore_timedwait_trap + 8
1 | libdispatch.dylib | 0x181a5b8a0 | _dispatch_semaphore_wait_slow + 72
2 | libdispatch.dylib | 0x181a671b8 | _dispatch_worker_thread + 256
3 | libsystem_pthread.dylib | 0x181d8d220 | _pthread_body + 272
4 | libsystem_pthread.dylib | 0x181d8d110 | _pthread_body + 0
5 | libsystem_pthread.dylib | 0x181d8bb10 | thread_start + 4

0 | libsystem_kernel.dylib | 0x181bed604 | __semwait_signal + 8
1 | Foundation | 0x182bb1214 | +[NSThread sleepForTimeInterval:] + 136
2 | myApp | 0x1043b930c | 聽
3 | Foundation | 0x182bb1efc | __NSThread__start__ + 1040
4 | libsystem_pthread.dylib | 0x181d8d220 | _pthread_body + 272
5 | libsystem_pthread.dylib | 0x181d8d110 | _pthread_body + 0
6 | libsystem_pthread.dylib | 0x181d8bb10 | thread_start + 4

0 | libsystem_kernel.dylib | 0x181bcbde8 | mach_msg_trap + 8
1 | CoreFoundation | 0x18210ee40 | __CFRunLoopServiceMachPort + 196
2 | CoreFoundation | 0x18210c908 | __CFRunLoopRun + 1568
3 | CoreFoundation | 0x18202cda8 | CFRunLoopRunSpecific + 552
4 | WebCore | 0x18a2f02d4 | RunWebThread() + 592
5 | libsystem_pthread.dylib | 0x181d8d220 | _pthread_body + 272
6 | libsystem_pthread.dylib | 0x181d8d110 | _pthread_body + 0
7 | libsystem_pthread.dylib | 0x181d8bb10 | thread_start + 4

0 | libsystem_kernel.dylib | 0x181bed0e8 | __psynch_cvwait + 8
1 | JavaScriptCore | 0x188cee6b0 | WTF::ThreadCondition::timedWait() + 148
2 | JavaScriptCore | 0x18979a9d0 | WTF::ParkingLot::parkConditionallyImpl() + 2252
3 | JavaScriptCore | 0x189252188 | WTF::Condition::waitUntil<WTF::Lock>() + 184
4 | JavaScriptCore | 0x18977ffac | WTF::Function<void ()>::CallableWrapper<WTF::AutomaticThread::start(WTF::AbstractLocker const&)::$_0>::call() + 212
5 | JavaScriptCore | 0x1897ac2dc | WTF::Thread::entryPoint() + 224
6 | JavaScriptCore | 0x188ce9d74 | WTF::wtfThreadEntryPoint() + 12
7 | libsystem_pthread.dylib | 0x181d8d220 | _pthread_body + 272
8 | libsystem_pthread.dylib | 0x181d8d110 | _pthread_body + 0
9 | libsystem_pthread.dylib | 0x181d8bb10 | thread_start + 4

@vonovak , thanks 馃榾

Hi @vonovak This fix is already in v1.0.0-rc5?

We're getting the fix out but cannot promise any timeframe yet. @barbarosh has already made the fix which you can try out #505. :)

released in rc6, thanks!

Was this page helpful?
0 / 5 - 0 ratings