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

App Crashes with NSInvalidArgumentException Invalid number value (infinite) in JSON write #3421

Closed
4 of 11 tasks
tao-qian opened this issue Nov 24, 2023 · 11 comments · Fixed by getsentry/sentry-cocoa#3458
Closed
4 of 11 tasks

Comments

@tao-qian
Copy link

OS:

  • Windows
  • MacOS
  • Linux

Platform:

  • iOS
  • Android

SDK:

  • @sentry/react-native (>= 1.0.0)
  • react-native-sentry (<= 0.43.2)

SDK version: 5.14.1

react-native version: 0.71.4

Are you using Expo?

  • Yes
  • No

Are you using sentry.io or on-premise?

  • sentry.io (SaaS)
  • on-premise

If you are using sentry.io, please post a link to your issue so we can take a look:
https://brightgo-inc.sentry.io/issues/4646869833/?project=4504906435330048&query=is%3Aunresolved&referrer=issue-stream&statsPeriod=1h&stream_index=0

Configuration:

(@sentry/react-native)

Sentry.init({
  dsn: 'https://...@sentry.io/...'
   environment: "production",
});

I have the following issue:
App would crash with NSInvalidArgumentException Invalid number value (infinite) in JSON write.

Steps to reproduce:
This is reproducible consistently for us in a particular user flow of sending images while offline. See GetStream/stream-chat-react-native#2326 where we reported the issue to Stream (the chat SDK we are using) initially.

I assume a specific non-Sentry error was triggered during that user flow, and while Sentry is trying to handle the error, it causes the crash.

Actual result:
Our app would crash.

@tao-qian
Copy link
Author

Exception traces from XCode

285113741-6a346a93-3765-4532-96fe-ab147a0b99ea
Incident Identifier: 51E2C8D7-7596-428D-9F49-32ED9716A2FF
Beta Identifier:     5B1C2972-7E41-4BE2-AEBE-F529C0654D1C
Hardware Model:      iPhone14,2
Process:             BrightGoProject [66704]
Path:                /private/var/containers/Bundle/Application/F37677B0-816E-4267-B877-6F663C368553/BrightGoProject.app/BrightGoProject
Identifier:          org.reactjs.native.brightgo
Version:             0.4.1 (0.4.1.0)
AppStoreTools:       15A240a
AppVariant:          1:iPhone14,2:16
Beta:                YES
Code Type:           ARM-64 (Native)
Role:                Foreground
Parent Process:      launchd [1]
Coalition:           org.reactjs.native.brightgo [16032]

Date/Time:           2023-11-22 22:14:09.8885 -0800
Launch Time:         2023-11-22 22:13:54.9585 -0800
OS Version:          iPhone OS 16.6.1 (20G81)
Release Type:        User
Baseband Version:    2.80.01
Report Version:      104

Exception Type:  EXC_CRASH (SIGABRT)
Exception Codes: 0x0000000000000000, 0x0000000000000000
Termination Reason: SIGNAL 6 Abort trap: 6
Terminating Process: BrightGoProject [66704]

Triggered by Thread:  0

Application Specific Information:
abort() called


Last Exception Backtrace:
0   CoreFoundation                	       0x1b333ccb4 __exceptionPreprocess + 164
1   libobjc.A.dylib               	       0x1ac3d03d0 objc_exception_throw + 60
2   Foundation                    	       0x1ad6048cc __CFBasicHashRehash + 0
3   Foundation                    	       0x1ad6ab0dc ___writeJSONObject_block_invoke + 388
4   CoreFoundation                	       0x1b334669c __NSDICTIONARY_IS_CALLING_OUT_TO_A_BLOCK__ + 24
5   CoreFoundation                	       0x1b33cf0f0 -[__NSDictionaryM enumerateKeysAndObjectsWithOptions:usingBlock:] + 212
6   Foundation                    	       0x1ad60ce60 _writeJSONObject + 512
7   Foundation                    	       0x1ad6ab0dc ___writeJSONObject_block_invoke + 388
8   CoreFoundation                	       0x1b334669c __NSDICTIONARY_IS_CALLING_OUT_TO_A_BLOCK__ + 24
9   CoreFoundation                	       0x1b33cf0f0 -[__NSDictionaryM enumerateKeysAndObjectsWithOptions:usingBlock:] + 212
10  Foundation                    	       0x1ad60ce60 _writeJSONObject + 512
11  Foundation                    	       0x1ad6b98d0 ___writeJSONArray_block_invoke + 260
12  CoreFoundation                	       0x1b333d1cc __NSARRAY_IS_CALLING_OUT_TO_A_BLOCK__ + 24
13  CoreFoundation                	       0x1b3358824 -[__NSArrayM enumerateObjectsWithOptions:usingBlock:] + 196
14  Foundation                    	       0x1ad68dbf8 _writeJSONArray + 348
15  Foundation                    	       0x1ad6ab0dc ___writeJSONObject_block_invoke + 388
16  CoreFoundation                	       0x1b334669c __NSDICTIONARY_IS_CALLING_OUT_TO_A_BLOCK__ + 24
17  CoreFoundation                	       0x1b33cf0f0 -[__NSDictionaryM enumerateKeysAndObjectsWithOptions:usingBlock:] + 212
18  Foundation                    	       0x1ad60ce60 _writeJSONObject + 512
19  Foundation                    	       0x1ad6ab0dc ___writeJSONObject_block_invoke + 388
20  CoreFoundation                	       0x1b334669c __NSDICTIONARY_IS_CALLING_OUT_TO_A_BLOCK__ + 24
21  CoreFoundation                	       0x1b33cf0f0 -[__NSDictionaryM enumerateKeysAndObjectsWithOptions:usingBlock:] + 212
22  Foundation                    	       0x1ad60ce60 _writeJSONObject + 512
23  Foundation                    	       0x1ad6363bc -[_NSJSONWriter dataWithRootObject:options:] + 88
24  Foundation                    	       0x1ad635df0 +[NSJSONSerialization dataWithJSONObject:options:error:] + 112
25  BrightGoProject               	       0x100d09cbc 0x100a88000 + 2628796
26  BrightGoProject               	       0x100ceb664 0x100a88000 + 2504292
27  BrightGoProject               	       0x100c0bc70 0x100a88000 + 1588336
28  BrightGoProject               	       0x100cd0f98 0x100a88000 + 2396056
29  BrightGoProject               	       0x100cefca4 0x100a88000 + 2522276
30  BrightGoProject               	       0x100c0baa0 0x100a88000 + 1587872
31  CoreFoundation                	       0x1b33a5c04 __invoking___ + 148
32  CoreFoundation                	       0x1b3353cb4 -[NSInvocation invoke] + 428
33  CoreFoundation                	       0x1b33536cc -[NSInvocation invokeWithTarget:] + 64
34  BrightGoProject               	       0x100c3c410 0x100a88000 + 1786896
35  BrightGoProject               	       0x100c3e5f4 0x100a88000 + 1795572
36  BrightGoProject               	       0x100c3e27c 0x100a88000 + 1794684
37  libdispatch.dylib             	       0x1ba802320 _dispatch_call_block_and_release + 32
38  libdispatch.dylib             	       0x1ba803eac _dispatch_client_callout + 20
39  libdispatch.dylib             	       0x1ba8126a4 _dispatch_main_queue_drain + 928
40  libdispatch.dylib             	       0x1ba8122f4 _dispatch_main_queue_callback_4CF + 44
41  CoreFoundation                	       0x1b33cbc28 __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 16
42  CoreFoundation                	       0x1b33ad560 __CFRunLoopRun + 1992
43  CoreFoundation                	       0x1b33b23ec CFRunLoopRunSpecific + 612
44  GraphicsServices              	       0x1ee8c835c GSEventRunModal + 164
45  UIKitCore                     	       0x1b573ef58 -[UIApplication _run] + 888
46  UIKitCore                     	       0x1b573ebbc UIApplicationMain + 340
47  BrightGoProject               	       0x100a8eb78 0x100a88000 + 27512
48  dyld                          	       0x1d28e4dec start + 2220

Thread 0 name:   Dispatch queue: com.apple.main-thread
Thread 0 Crashed:
0   libsystem_kernel.dylib        	       0x1f22f9578 __pthread_kill + 8
1   libsystem_pthread.dylib       	       0x213174118 pthread_kill + 268
2   libsystem_c.dylib             	       0x1ba864178 abort + 180
3   libc++abi.dylib               	       0x2130b2bf8 abort_message + 132
4   libc++abi.dylib               	       0x2130a2444 demangling_terminate_handler() + 348
5   libobjc.A.dylib               	       0x1ac3d5ea4 _objc_terminate() + 144
6   BrightGoProject               	       0x100cae6c4 0x100a88000 + 2254532
7   libc++abi.dylib               	       0x2130b1fbc std::__terminate(void (*)()) + 16
8   libc++abi.dylib               	       0x2130b1f60 std::terminate() + 56
9   libdispatch.dylib             	       0x1ba803ec0 _dispatch_client_callout + 40
10  libdispatch.dylib             	       0x1ba8126a4 _dispatch_main_queue_drain + 928
11  libdispatch.dylib             	       0x1ba8122f4 _dispatch_main_queue_callback_4CF + 44
12  CoreFoundation                	       0x1b33cbc28 __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 16
13  CoreFoundation                	       0x1b33ad560 __CFRunLoopRun + 1992
14  CoreFoundation                	       0x1b33b23ec CFRunLoopRunSpecific + 612
15  GraphicsServices              	       0x1ee8c835c GSEventRunModal + 164
16  UIKitCore                     	       0x1b573ef58 -[UIApplication _run] + 888
17  UIKitCore                     	       0x1b573ebbc UIApplicationMain + 340
18  BrightGoProject               	       0x100a8eb78 0x100a88000 + 27512
19  dyld                          	       0x1d28e4dec start + 2220

Thread 1:
0   libsystem_pthread.dylib       	       0x21316db74 start_wqthread + 0

Thread 2 name:  com.apple.uikit.eventfetch-thread
Thread 2:
0   libsystem_kernel.dylib        	       0x1f22f2ca4 mach_msg2_trap + 8
1   libsystem_kernel.dylib        	       0x1f2305b74 mach_msg2_internal + 80
2   libsystem_kernel.dylib        	       0x1f2305e4c mach_msg_overwrite + 540
3   libsystem_kernel.dylib        	       0x1f22f31e8 mach_msg + 24
4   CoreFoundation                	       0x1b33ac024 __CFRunLoopServiceMachPort + 160
5   CoreFoundation                	       0x1b33ad250 __CFRunLoopRun + 1208
6   CoreFoundation                	       0x1b33b23ec CFRunLoopRunSpecific + 612
7   Foundation                    	       0x1ad626fb4 -[NSRunLoop(NSRunLoop) runMode:beforeDate:] + 212
8   Foundation                    	       0x1ad626e9c -[NSRunLoop(NSRunLoop) runUntilDate:] + 64
9   UIKitCore                     	       0x1b5871cc8 -[UIEventFetcher threadMain] + 416
10  Foundation                    	       0x1ad640524 __NSThread__start__ + 716
11  libsystem_pthread.dylib       	       0x21316e6b8 _pthread_start + 148
12  libsystem_pthread.dylib       	       0x21316db88 thread_start + 8

Thread 3:
0   libsystem_pthread.dylib       	       0x21316db74 start_wqthread + 0

Thread 4 name:  com.facebook.react.JavaScript
Thread 4:
0   hermes                        	       0x101448e4c 0x101420000 + 167500
1   hermes                        	       0x10145e734 0x101420000 + 255796
2   hermes                        	       0x10147fd4c 0x101420000 + 392524
3   hermes                        	       0x101482c58 0x101420000 + 404568
4   hermes                        	       0x101507a14 0x101420000 + 948756
5   hermes                        	       0x101447030 0x101420000 + 159792
6   hermes                        	       0x101466260 0x101420000 + 287328
7   hermes                        	       0x10146571c 0x101420000 + 284444
8   hermes                        	       0x1014472d8 0x101420000 + 160472
9   hermes                        	       0x101446b40 0x101420000 + 158528
10  hermes                        	       0x101466284 0x101420000 + 287364
11  hermes                        	       0x10146571c 0x101420000 + 284444
12  hermes                        	       0x1014472d8 0x101420000 + 160472
13  hermes                        	       0x101446b40 0x101420000 + 158528
14  hermes                        	       0x101466284 0x101420000 + 287364
15  hermes                        	       0x10146571c 0x101420000 + 284444
16  hermes                        	       0x101447d00 0x101420000 + 163072
17  hermes                        	       0x1014eb4fc 0x101420000 + 832764
18  hermes                        	       0x101447030 0x101420000 + 159792
19  hermes                        	       0x101466260 0x101420000 + 287328
20  hermes                        	       0x10146571c 0x101420000 + 284444
21  hermes                        	       0x1014472d8 0x101420000 + 160472
22  hermes                        	       0x101445bf4 0x101420000 + 154612
23  hermes                        	       0x101516f48 0x101420000 + 1011528
24  hermes                        	       0x101447030 0x101420000 + 159792
25  hermes                        	       0x101466260 0x101420000 + 287328
26  hermes                        	       0x10146571c 0x101420000 + 284444
27  hermes                        	       0x1014472d8 0x101420000 + 160472
28  hermes                        	       0x101446b40 0x101420000 + 158528
29  hermes                        	       0x101466284 0x101420000 + 287364
30  hermes                        	       0x10146571c 0x101420000 + 284444
31  hermes                        	       0x1014472d8 0x101420000 + 160472
32  hermes                        	       0x101446b40 0x101420000 + 158528
33  hermes                        	       0x10142bce4 0x101420000 + 48356
34  BrightGoProject               	       0x100dc635c 0x100a88000 + 3400540
35  BrightGoProject               	       0x100d5c2c0 0x100a88000 + 2966208
36  BrightGoProject               	       0x100d5c124 0x100a88000 + 2965796
37  BrightGoProject               	       0x100c26218 0x100a88000 + 1696280
38  BrightGoProject               	       0x100d592d8 0x100a88000 + 2953944
39  BrightGoProject               	       0x100d30ccc 0x100a88000 + 2788556
40  BrightGoProject               	       0x100c28fa4 0x100a88000 + 1707940
41  BrightGoProject               	       0x100c34dc8 0x100a88000 + 1756616
42  BrightGoProject               	       0x100c34b7c 0x100a88000 + 1756028
43  CoreFoundation                	       0x1b33766e0 __CFRUNLOOP_IS_CALLING_OUT_TO_A_BLOCK__ + 28
44  CoreFoundation                	       0x1b33dd210 __CFRunLoopDoBlocks + 364
45  CoreFoundation                	       0x1b33ad718 __CFRunLoopRun + 2432
46  CoreFoundation                	       0x1b33b23ec CFRunLoopRunSpecific + 612
47  BrightGoProject               	       0x100c1e964 0x100a88000 + 1665380
48  Foundation                    	       0x1ad640524 __NSThread__start__ + 716
49  libsystem_pthread.dylib       	       0x21316e6b8 _pthread_start + 148
50  libsystem_pthread.dylib       	       0x21316db88 thread_start + 8

Thread 5 name:  hades
Thread 5:
0   libsystem_kernel.dylib        	       0x1f22f3578 __psynch_cvwait + 8
1   libsystem_pthread.dylib       	       0x213175078 _pthread_cond_wait + 1232
2   libc++.1.dylib                	       0x1c198cef8 std::__1::condition_variable::wait(std::__1::unique_lock<std::__1::mutex>&) + 28
3   hermes                        	       0x10153cca8 0x101420000 + 1166504
4   hermes                        	       0x10153ca5c 0x101420000 + 1165916
5   libsystem_pthread.dylib       	       0x21316e6b8 _pthread_start + 148
6   libsystem_pthread.dylib       	       0x21316db88 thread_start + 8

Thread 6 name:  hermes-chrome-inspector-conn
Thread 6:
0   libsystem_kernel.dylib        	       0x1f22f3578 __psynch_cvwait + 8
1   libsystem_pthread.dylib       	       0x213175078 _pthread_cond_wait + 1232
2   libc++.1.dylib                	       0x1c198cef8 std::__1::condition_variable::wait(std::__1::unique_lock<std::__1::mutex>&) + 28
3   BrightGoProject               	       0x100df3d34 0x100a88000 + 3587380
4   BrightGoProject               	       0x100dab3e0 0x100a88000 + 3290080
5   libsystem_pthread.dylib       	       0x21316e6b8 _pthread_start + 148
6   libsystem_pthread.dylib       	       0x21316db88 thread_start + 8

Thread 7 name:  hermes-inspector
Thread 7:
0   libsystem_kernel.dylib        	       0x1f22f3578 __psynch_cvwait + 8
1   libsystem_pthread.dylib       	       0x213175078 _pthread_cond_wait + 1232
2   libc++.1.dylib                	       0x1c198cef8 std::__1::condition_variable::wait(std::__1::unique_lock<std::__1::mutex>&) + 28
3   BrightGoProject               	       0x100df3d34 0x100a88000 + 3587380
4   BrightGoProject               	       0x100dab3e0 0x100a88000 + 3290080
5   libsystem_pthread.dylib       	       0x21316e6b8 _pthread_start + 148
6   libsystem_pthread.dylib       	       0x21316db88 thread_start + 8

Thread 8 name:  hades
Thread 8:
0   libsystem_kernel.dylib        	       0x1f22f3578 __psynch_cvwait + 8
1   libsystem_pthread.dylib       	       0x213175078 _pthread_cond_wait + 1232
2   libc++.1.dylib                	       0x1c198cef8 std::__1::condition_variable::wait(std::__1::unique_lock<std::__1::mutex>&) + 28
3   hermes                        	       0x10153cca8 0x101420000 + 1166504
4   hermes                        	       0x10153ca5c 0x101420000 + 1165916
5   libsystem_pthread.dylib       	       0x21316e6b8 _pthread_start + 148
6   libsystem_pthread.dylib       	       0x21316db88 thread_start + 8

Thread 9 name:  hermes-chrome-inspector-conn
Thread 9:
0   libsystem_kernel.dylib        	       0x1f22f3578 __psynch_cvwait + 8
1   libsystem_pthread.dylib       	       0x213175078 _pthread_cond_wait + 1232
2   libc++.1.dylib                	       0x1c198cef8 std::__1::condition_variable::wait(std::__1::unique_lock<std::__1::mutex>&) + 28
3   BrightGoProject               	       0x100df3d34 0x100a88000 + 3587380
4   BrightGoProject               	       0x100dab3e0 0x100a88000 + 3290080
5   libsystem_pthread.dylib       	       0x21316e6b8 _pthread_start + 148
6   libsystem_pthread.dylib       	       0x21316db88 thread_start + 8

Thread 10 name:  hermes-inspector
Thread 10:
0   libsystem_kernel.dylib        	       0x1f22f3578 __psynch_cvwait + 8
1   libsystem_pthread.dylib       	       0x213175078 _pthread_cond_wait + 1232
2   libc++.1.dylib                	       0x1c198cef8 std::__1::condition_variable::wait(std::__1::unique_lock<std::__1::mutex>&) + 28
3   BrightGoProject               	       0x100df3d34 0x100a88000 + 3587380
4   BrightGoProject               	       0x100dab3e0 0x100a88000 + 3290080
5   libsystem_pthread.dylib       	       0x21316e6b8 _pthread_start + 148
6   libsystem_pthread.dylib       	       0x21316db88 thread_start + 8

Thread 11:
0   libsystem_kernel.dylib        	       0x1f22f3164 __semwait_signal + 8
1   libsystem_c.dylib             	       0x1ba84c888 nanosleep + 220
2   libsystem_c.dylib             	       0x1ba85db1c sleep + 52
3   BrightGoProject               	       0x100ca2f78 0x100a88000 + 2207608
4   libsystem_pthread.dylib       	       0x21316e6b8 _pthread_start + 148
5   libsystem_pthread.dylib       	       0x21316db88 thread_start + 8

Thread 12 name:  SentryCrash Exception Handler (Secondary)
Thread 12:
0   libsystem_kernel.dylib        	       0x1f22f2ca4 mach_msg2_trap + 8
1   libsystem_kernel.dylib        	       0x1f2305b74 mach_msg2_internal + 80
2   libsystem_kernel.dylib        	       0x1f22ff884 thread_suspend + 112
3   BrightGoProject               	       0x100caee68 0x100a88000 + 2256488
4   libsystem_pthread.dylib       	       0x21316e6b8 _pthread_start + 148
5   libsystem_pthread.dylib       	       0x21316db88 thread_start + 8

Thread 13 name:  SentryCrash Exception Handler (Primary)
Thread 13:
0   libsystem_kernel.dylib        	       0x1f22f2ca4 mach_msg2_trap + 8
1   libsystem_kernel.dylib        	       0x1f2305b74 mach_msg2_internal + 80
2   libsystem_kernel.dylib        	       0x1f2305e4c mach_msg_overwrite + 540
3   libsystem_kernel.dylib        	       0x1f22f31e8 mach_msg + 24
4   BrightGoProject               	       0x100caee94 0x100a88000 + 2256532
5   libsystem_pthread.dylib       	       0x21316e6b8 _pthread_start + 148
6   libsystem_pthread.dylib       	       0x21316db88 thread_start + 8

Thread 14 name:  io.sentry.app-hang-tracker
Thread 14:
0   libsystem_kernel.dylib        	       0x1f22f3164 __semwait_signal + 8
1   libsystem_c.dylib             	       0x1ba84c888 nanosleep + 220
2   Foundation                    	       0x1ad6977ac +[NSThread sleepForTimeInterval:] + 160
3   BrightGoProject               	       0x100c93a20 0x100a88000 + 2144800
4   Foundation                    	       0x1ad640524 __NSThread__start__ + 716
5   libsystem_pthread.dylib       	       0x21316e6b8 _pthread_start + 148
6   libsystem_pthread.dylib       	       0x21316db88 thread_start + 8

Thread 15 name:  com.apple.NSURLConnectionLoader
Thread 15:
0   libsystem_kernel.dylib        	       0x1f22f2ca4 mach_msg2_trap + 8
1   libsystem_kernel.dylib        	       0x1f2305b74 mach_msg2_internal + 80
2   libsystem_kernel.dylib        	       0x1f2305e4c mach_msg_overwrite + 540
3   libsystem_kernel.dylib        	       0x1f22f31e8 mach_msg + 24
4   CoreFoundation                	       0x1b33ac024 __CFRunLoopServiceMachPort + 160
5   CoreFoundation                	       0x1b33ad250 __CFRunLoopRun + 1208
6   CoreFoundation                	       0x1b33b23ec CFRunLoopRunSpecific + 612
7   CFNetwork                     	       0x1b459d6f0 0x1b4345000 + 2459376
8   Foundation                    	       0x1ad640524 __NSThread__start__ + 716
9   libsystem_pthread.dylib       	       0x21316e6b8 _pthread_start + 148
10  libsystem_pthread.dylib       	       0x21316db88 thread_start + 8

Thread 16 name:  com.squareup.SocketRocket.NetworkThread
Thread 16:
0   libsystem_kernel.dylib        	       0x1f22f2ca4 mach_msg2_trap + 8
1   libsystem_kernel.dylib        	       0x1f2305b74 mach_msg2_internal + 80
2   libsystem_kernel.dylib        	       0x1f2305e4c mach_msg_overwrite + 540
3   libsystem_kernel.dylib        	       0x1f22f31e8 mach_msg + 24
4   CoreFoundation                	       0x1b33ac024 __CFRunLoopServiceMachPort + 160
5   CoreFoundation                	       0x1b33ad250 __CFRunLoopRun + 1208
6   CoreFoundation                	       0x1b33b23ec CFRunLoopRunSpecific + 612
7   Foundation                    	       0x1ad626fb4 -[NSRunLoop(NSRunLoop) runMode:beforeDate:] + 212
8   BrightGoProject               	       0x100c54ea8 0x100a88000 + 1887912
9   Foundation                    	       0x1ad640524 __NSThread__start__ + 716
10  libsystem_pthread.dylib       	       0x21316e6b8 _pthread_start + 148
11  libsystem_pthread.dylib       	       0x21316db88 thread_start + 8

Thread 17 name:  com.apple.CFSocket.private
Thread 17:
0   libsystem_kernel.dylib        	       0x1f22f3808 __select + 8
1   CoreFoundation                	       0x1b33fb99c __CFSocketManager + 636
2   libsystem_pthread.dylib       	       0x21316e6b8 _pthread_start + 148
3   libsystem_pthread.dylib       	       0x21316db88 thread_start + 8

Thread 18:
0   libsystem_kernel.dylib        	       0x1f22f3578 __psynch_cvwait + 8
1   libsystem_pthread.dylib       	       0x213175078 _pthread_cond_wait + 1232
2   libc++.1.dylib                	       0x1c198cef8 std::__1::condition_variable::wait(std::__1::unique_lock<std::__1::mutex>&) + 28
3   BrightGoProject               	       0x100d8bbf0 0x100a88000 + 3161072
4   BrightGoProject               	       0x100d8ae44 0x100a88000 + 3157572
5   BrightGoProject               	       0x100d8b4c0 0x100a88000 + 3159232
6   libsystem_pthread.dylib       	       0x21316e6b8 _pthread_start + 148
7   libsystem_pthread.dylib       	       0x21316db88 thread_start + 8

Thread 19:
0   libsystem_kernel.dylib        	       0x1f22f3578 __psynch_cvwait + 8
1   libsystem_pthread.dylib       	       0x213175078 _pthread_cond_wait + 1232
2   libc++.1.dylib                	       0x1c198cef8 std::__1::condition_variable::wait(std::__1::unique_lock<std::__1::mutex>&) + 28
3   BrightGoProject               	       0x100d8bbf0 0x100a88000 + 3161072
4   BrightGoProject               	       0x100d8ae44 0x100a88000 + 3157572
5   BrightGoProject               	       0x100d8b4c0 0x100a88000 + 3159232
6   libsystem_pthread.dylib       	       0x21316e6b8 _pthread_start + 148
7   libsystem_pthread.dylib       	       0x21316db88 thread_start + 8

Thread 20:
0   libsystem_kernel.dylib        	       0x1f22f3578 __psynch_cvwait + 8
1   libsystem_pthread.dylib       	       0x213175078 _pthread_cond_wait + 1232
2   libc++.1.dylib                	       0x1c198cef8 std::__1::condition_variable::wait(std::__1::unique_lock<std::__1::mutex>&) + 28
3   BrightGoProject               	       0x100d8bbf0 0x100a88000 + 3161072
4   BrightGoProject               	       0x100d8ae44 0x100a88000 + 3157572
5   BrightGoProject               	       0x100d8b4c0 0x100a88000 + 3159232
6   libsystem_pthread.dylib       	       0x21316e6b8 _pthread_start + 148
7   libsystem_pthread.dylib       	       0x21316db88 thread_start + 8

Thread 21:
0   libsystem_kernel.dylib        	       0x1f22f3578 __psynch_cvwait + 8
1   libsystem_pthread.dylib       	       0x213175078 _pthread_cond_wait + 1232
2   libc++.1.dylib                	       0x1c198cef8 std::__1::condition_variable::wait(std::__1::unique_lock<std::__1::mutex>&) + 28
3   BrightGoProject               	       0x100d8bbf0 0x100a88000 + 3161072
4   BrightGoProject               	       0x100d8ae44 0x100a88000 + 3157572
5   BrightGoProject               	       0x100d8b4c0 0x100a88000 + 3159232
6   libsystem_pthread.dylib       	       0x21316e6b8 _pthread_start + 148
7   libsystem_pthread.dylib       	       0x21316db88 thread_start + 8

Thread 22:
0   libsystem_kernel.dylib        	       0x1f22f3578 __psynch_cvwait + 8
1   libsystem_pthread.dylib       	       0x213175078 _pthread_cond_wait + 1232
2   libc++.1.dylib                	       0x1c198cef8 std::__1::condition_variable::wait(std::__1::unique_lock<std::__1::mutex>&) + 28
3   BrightGoProject               	       0x100d8bbf0 0x100a88000 + 3161072
4   BrightGoProject               	       0x100d8ae44 0x100a88000 + 3157572
5   BrightGoProject               	       0x100d8b4c0 0x100a88000 + 3159232
6   libsystem_pthread.dylib       	       0x21316e6b8 _pthread_start + 148
7   libsystem_pthread.dylib       	       0x21316db88 thread_start + 8

Thread 23:
0   libsystem_kernel.dylib        	       0x1f22f3578 __psynch_cvwait + 8
1   libsystem_pthread.dylib       	       0x213175078 _pthread_cond_wait + 1232
2   libc++.1.dylib                	       0x1c198cef8 std::__1::condition_variable::wait(std::__1::unique_lock<std::__1::mutex>&) + 28
3   BrightGoProject               	       0x100d8bbf0 0x100a88000 + 3161072
4   BrightGoProject               	       0x100d8ae44 0x100a88000 + 3157572
5   BrightGoProject               	       0x100d8b4c0 0x100a88000 + 3159232
6   libsystem_pthread.dylib       	       0x21316e6b8 _pthread_start + 148
7   libsystem_pthread.dylib       	       0x21316db88 thread_start + 8

Thread 24:
0   libsystem_pthread.dylib       	       0x21316db74 start_wqthread + 0

Thread 25:
0   libsystem_pthread.dylib       	       0x21316db74 start_wqthread + 0

Thread 26:
0   libsystem_pthread.dylib       	       0x21316db74 start_wqthread + 0

Thread 27:
0   libsystem_pthread.dylib       	       0x21316db74 start_wqthread + 0

Thread 28:
0   libsystem_pthread.dylib       	       0x21316db74 start_wqthread + 0

Thread 29:
0   libsystem_pthread.dylib       	       0x21316db74 start_wqthread + 0

Thread 30:
0   libsystem_pthread.dylib       	       0x21316db74 start_wqthread + 0


Thread 0 crashed with ARM Thread State (64-bit):
    x0: 0x0000000000000000   x1: 0x0000000000000000   x2: 0x0000000000000000   x3: 0x0000000000000000
    x4: 0x00000002130b6647   x5: 0x000000016f376290   x6: 0x000000000000006e   x7: 0x000000010393553c
    x8: 0x649e1c7aa99a6404   x9: 0x649e1c78a0546d44  x10: 0x0000000000000200  x11: 0x000000000000000b
   x12: 0x000000000000000b  x13: 0x00000000001ff800  x14: 0x00000000000007fb  x15: 0x00000000b9a2300f
   x16: 0x0000000000000148  x17: 0x0000000209ce0940  x18: 0x0000000000000000  x19: 0x0000000000000006
   x20: 0x0000000000000103  x21: 0x0000000209ce0a20  x22: 0x0000000000000000  x23: 0x0000000000000114
   x24: 0x0000000000000000  x25: 0x0000000209ce0a20  x26: 0x000000028318b3c0  x27: 0x000000000000000f
   x28: 0x0000000000000000   fp: 0x000000016f376200   lr: 0x0000000213174118
    sp: 0x000000016f3761e0   pc: 0x00000001f22f9578 cpsr: 0x40001000
   far: 0x0000000245a98930  esr: 0x56000080  Address size fault

Binary Images:
       0x100a88000 -        0x100f47fff BrightGoProject arm64  <a24963241e6830f492651d6b8ee5270d> /private/var/containers/Bundle/Application/F37677B0-816E-4267-B877-6F663C368553/BrightGoProject.app/BrightGoProject
       0x101420000 -        0x1016fbfff hermes arm64  <bb9f954c2cb635289d45d5e177f2d7cc> /private/var/containers/Bundle/Application/F37677B0-816E-4267-B877-6F663C368553/BrightGoProject.app/Frameworks/hermes.framework/hermes
       0x10130c000 -        0x101317fff libobjc-trampolines.dylib arm64e  <7e77fc541c3331c086e81fb7bf12836c> /private/preboot/Cryptexes/OS/usr/lib/libobjc-trampolines.dylib
       0x10173c000 -        0x10174ffff GAXClient arm64e  <7226047f1e1e3e938faf03b459d94129> /System/Library/AccessibilityBundles/GAXClient.bundle/GAXClient
       0x1f22f2000 -        0x1f2329fe7 libsystem_kernel.dylib arm64e  <681b06a07f6b3fa3a2ce063dc1da7b1b> /usr/lib/system/libsystem_kernel.dylib
       0x21316d000 -        0x213178ff3 libsystem_pthread.dylib arm64e  <aa302f5affe5327aa0033b288b935de1> /usr/lib/system/libsystem_pthread.dylib
       0x1ba847000 -        0x1ba8c4ff3 libsystem_c.dylib arm64e  <073251d1d4c937748cee75210751a5d8> /usr/lib/system/libsystem_c.dylib
       0x2130a1000 -        0x2130b8fff libc++abi.dylib arm64e  <1e834588aca6327a9a965aa8b13a2ae2> /usr/lib/libc++abi.dylib
       0x1ac3b8000 -        0x1ac3fbf9f libobjc.A.dylib arm64e  <eb7faf215c9f37848907affa6d92bc3b> /usr/lib/libobjc.A.dylib
       0x1ba800000 -        0x1ba846fff libdispatch.dylib arm64e  <5d16936b4e4c3276ba7a69c9bc760aba> /usr/lib/system/libdispatch.dylib
       0x1b3333000 -        0x1b371afff CoreFoundation arm64e  <a900b4590127379e9cba0eab9c5d559f> /System/Library/Frameworks/CoreFoundation.framework/CoreFoundation
       0x1ee8c7000 -        0x1ee8cffff GraphicsServices arm64e  <cd8d719514e13c7ca8c950ccea9f2a17> /System/Library/PrivateFrameworks/GraphicsServices.framework/GraphicsServices
       0x1b53a2000 -        0x1b6bc6fff UIKitCore arm64e  <7d57a1d1856f338d97db880c4ec8b02e> /System/Library/PrivateFrameworks/UIKitCore.framework/UIKitCore
       0x1d28cf000 -        0x1d2954a53 dyld arm64e  <c3fc2ee4367f3086beb8420ad442bf88> /usr/lib/dyld
       0x1ad5e5000 -        0x1adec2fff Foundation arm64e  <1715de5d08933af0b0c0550bb14f91ec> /System/Library/Frameworks/Foundation.framework/Foundation
       0x1c197a000 -        0x1c1a06ff7 libc++.1.dylib arm64e  <73d4f57ea1293e3794408eeb0d608273> /usr/lib/libc++.1.dylib
       0x1b4345000 -        0x1b470ffff CFNetwork arm64e  <045d4271e64e3229a49fcaff707aa77f> /System/Library/Frameworks/CFNetwork.framework/CFNetwork

EOF

@tao-qian
Copy link
Author

We added this to the setup code for now to disable breadcrumb

    beforeBreadcrumb(breadcrumb, hint) {
      return null;
    },

And that seemed to fix the issue for us.

The other thing to call out is that our repro step (e.g. that specific image upload flow we have) would:

So I assume this issue is actually related to #2744, even though it seems like nobody but us are having the issue in the release build.

@krystofwoldrich
Copy link
Member

Hi, thank you for the message and details,
a certain breadcrumb created during the image upload caused the crash.

Just to make the investigation scope smaller, do you manually add some breadcrumbs in your RN code?

@tao-qian
Copy link
Author

Hi, thank you for the message and details, a certain breadcrumb created during the image upload caused the crash.

Just to make the investigation scope smaller, do you manually add some breadcrumbs in your RN code?

No we are not creating breadcrumbs manually. And I assume the Stream SDK library isn't doing that either.

@krystofwoldrich
Copy link
Member

Based on the Stack Trace it looks like serializing a Breadcrumb created by the RN SDK failed in sentry-cocoa.

@Arashadmin
Copy link

@krystofwoldrich can I assume to find the fix in the @sentry/react-native: 5.15.1 version or how is it handled? I'm a bit confused since the fix you mentioned was merged into the getSentry/sentry-cocoa package.

Since it is a serious production issue, I'd be happy about your fast reply, thx! :)

@kahest
Copy link
Member

kahest commented Dec 11, 2023

Hi @Arashadmin! The fix is part of sentry-react-native 5.15.0. The fix on the iOS SDK was part of the sentry-cocoa 8.17.1 release, and sentry-react-native 5.15.0 bumped the dependency to that version. :)

@tao-qian
Copy link
Author

This seems to have fixed the problem on iOS. However, for Android, now I am getting the issue described in #2744.

I was only able to test a non-release Android build though (since I don't have the signing key for our app), so it is possible that the #2744 issue isn't reproducible on release build, per the discussion in #2744.

@kahest
Copy link
Member

kahest commented Dec 19, 2023

@tao-qian #2744 was fixed in PR #2852 which is part of release 5.15.0 - so the issue should not come up with this version. Please note that you need to rebuild the native app for the fix to be effective. If this doesn't work and you can reproduce the issue in develop mode, please follow up by creating a new issue referring to this conversation - thank you!

@Arashadmin
Copy link

Arashadmin commented Dec 19, 2023

@kahest release 5.15.0 is not yet available for expo users, see here: https://github.com/expo/sentry-expo/blob/main/CHANGELOG.md#master:~:text=%F0%9F%A7%B9%20Chores-,7.1.1%20%2D%202023%2D10%2D18,-%F0%9F%8E%89%20New%20features . 5.10.0 is the latest supported version there. I turned off Sentry until it is available due to prod crashes

@tao-qian
Copy link
Author

@kahest unfortunately we are still seeing the issue after updating to 5.15.1. Not sure what's the best way to rebuild the app so I tried cd android && ./gradlew clean and that didn't help.

I opened #3485 with more details.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
Archived in project
4 participants