facebook / react-native

A framework for building native applications using React
https://reactnative.dev
MIT License
118.46k stars 24.26k forks source link

ios crash in RCTFileRequestHandler.mm -[RCTFileRequestHandler invalidate] + 29 #46596

Open kingzeng opened 6 days ago

kingzeng commented 6 days ago

Description

firbase crash 已崩溃:com.facebook.react.FileRequestHandlerQueue EXC_BREAKPOINT 0x000000021a48f100 ios crash in RCTFileRequestHandler.mm - 第 29 行 -[RCTFileRequestHandler invalidate] + 29

Steps to reproduce

image

React Native Version

0.74.3

Affected Platforms

Runtime - iOS

Output of npx react-native info

System:
  OS: macOS 14.6
  CPU: (8) arm64 Apple M1
  Memory: 189.44 MB / 16.00 GB
  Shell:
    version: "5.9"
    path: /bin/zsh
Binaries:
  Node:
    version: 18.18.0
    path: ~/.nvm/versions/node/v18.18.0/bin/node
  Yarn:
    version: 1.22.21
    path: /opt/homebrew/bin/yarn
  npm:
    version: 9.8.1
    path: ~/.nvm/versions/node/v18.18.0/bin/npm
  Watchman:
    version: 2024.05.06.00
    path: /opt/homebrew/bin/watchman
Managers:
  CocoaPods:
    version: 1.14.3
    path: /usr/local/bin/pod
SDKs:
  iOS SDK:
    Platforms:
      - DriverKit 23.4
      - iOS 17.4
      - macOS 14.4
      - tvOS 17.4
      - visionOS 1.1
      - watchOS 10.4
  Android SDK:
    API Levels:
      - "23"
      - "25"
      - "26"
      - "28"
      - "30"
      - "31"
      - "32"
      - "33"
    Build Tools:
      - 28.0.3
      - 30.0.2
      - 30.0.3
      - 31.0.0
      - 33.0.0
      - 34.0.0
    System Images:
      - android-33 | Google APIs ARM 64 v8a
    Android NDK: Not Found
IDEs:
  Android Studio: 2023.2 AI-232.10300.40.2321.11567975
  Xcode:
    version: 15.3/15E204a
    path: /usr/bin/xcodebuild
Languages:
  Java:
    version: 11.0.15
    path: /usr/bin/javac
  Ruby:
    version: 3.0.6
    path: /opt/homebrew/opt/ruby@3.0/bin/ruby
npmPackages:
  "@react-native-community/cli": Not Found
  react:
    installed: 18.3.1
    wanted: ^18.2.0
  react-native:
    installed: 0.74.3
    wanted: 0.74.3
  react-native-macos: Not Found
npmGlobalPackages:
  "*react-native*": Not Found
Android:
  hermesEnabled: false
  newArchEnabled: false
iOS:
  hermesEnabled: true
  newArchEnabled: false

Stacktrace or Logs

com.apple.usernotifications.PKUserNotificationsRemoteNotificationServiceConnection
0  libsystem_kernel.dylib         0x1728 mach_msg2_trap + 8
1  libsystem_kernel.dylib         0x4e38 mach_msg2_internal + 80
2  libsystem_kernel.dylib         0x4d50 mach_msg_overwrite + 424
3  libsystem_kernel.dylib         0x4b9c mach_msg + 24
4  libdispatch.dylib              0x1ef14 _dispatch_mach_send_and_wait_for_reply + 544
5  libdispatch.dylib              0x1f2b4 dispatch_mach_send_with_result_and_wait_for_reply + 60
6  libxpc.dylib                   0x109a0 xpc_connection_send_message_with_reply_sync + 256
7  Foundation                     0x60e2c <redacted> + 16
8  Foundation                     0x5d594 <redacted> + 2160
9  Foundation                     0xc4adc <redacted> + 128
10 Foundation                     0xc4898 <redacted> + 68
11 PushKit                        0x2f5c <redacted> + 156
12 libdispatch.dylib              0x40d0 _dispatch_client_callout + 20
13 libdispatch.dylib              0x13750 _dispatch_lane_barrier_sync_invoke_and_complete + 56
14 PushKit                        0x2e98 <redacted> + 132
15 UIKitCore                      0x1141a80 <redacted> + 40
16 xpayApp                        0x314694 -[RNFBMessagingModule constantsToExport] + 68 (RNFBMessagingModule.m:68)
17 xpayApp                        0x3c23a4 __57-[RCTModuleData gatherConstantsAndSignalJSRequireEnding:]_block_invoke + 445 (RCTModuleData.mm:445)
18 xpayApp                        0x3e83f8 RCTUnsafeExecuteOnMainQueueSync + 289 (RCTUtils.m:289)
19 xpayApp                        0x3c2318 -[RCTModuleData gatherConstantsAndSignalJSRequireEnding:] + 444 (RCTModuleData.mm:444)
20 xpayApp                        0x3a9cd4 __49-[RCTCxxBridge _prepareModulesWithDispatchGroup:]_block_invoke + 1009 (RCTCxxBridge.mm:1009)
21 libdispatch.dylib              0x2370 _dispatch_call_block_and_release + 32
22 libdispatch.dylib              0x40d0 _dispatch_client_callout + 20
23 libdispatch.dylib              0x12a28 _dispatch_main_queue_drain + 1052
24 libdispatch.dylib              0x125fc _dispatch_main_queue_callback_4CF + 44
25 CoreFoundation                 0x56f64 <redacted> + 16
26 CoreFoundation                 0x54188 <redacted> + 1996
27 CoreFoundation                 0x535b8 CFRunLoopRunSpecific + 572
28 GraphicsServices               0x11c4 GSEventRunModal + 164
29 UIKitCore                      0x3de5f0 <redacted> + 816
30 UIKitCore                      0x48d10c UIApplicationMain + 340
31 xpayApp                        0x2a2a0 main + 8 (main.m:8)
32 ???                            0x1b896bd34 (缺少)

Thread
0  libsystem_kernel.dylib         0x14b0 __workq_kernreturn + 8
1  libsystem_pthread.dylib        0x4cc8 _pthread_wqthread + 364
2  libsystem_pthread.dylib        0x1488 start_wqthread + 8

Crashed: com.facebook.react.FileRequestHandlerQueue
0  libsystem_platform.dylib       0x7100 _os_unfair_lock_corruption_abort + 52
1  libsystem_platform.dylib       0x42f4 _os_unfair_lock_lock_slow + 336
2  Foundation                     0x156f68 <redacted> + 48
3  Foundation                     0x156d88 <redacted> + 88
4  xpayApp                        0x2dfa18 -[RCTFileRequestHandler invalidate] + 29 (RCTFileRequestHandler.mm:29)
5  xpayApp                        0x3ab038 __26-[RCTCxxBridge invalidate]_block_invoke_2 + 1240 (RCTCxxBridge.mm:1240)
6  libdispatch.dylib              0x2370 _dispatch_call_block_and_release + 32
7  libdispatch.dylib              0x40d0 _dispatch_client_callout + 20
8  libdispatch.dylib              0xb6d8 _dispatch_lane_serial_drain + 744
9  libdispatch.dylib              0xc1e0 _dispatch_lane_invoke + 380
10 libdispatch.dylib              0x17258 _dispatch_root_queue_drain_deferred_wlh + 288
11 libdispatch.dylib              0x16aa4 _dispatch_workloop_worker_thread + 540
12 libsystem_pthread.dylib        0x4c7c _pthread_wqthread + 288
13 libsystem_pthread.dylib        0x1488 start_wqthread + 8

Thread
0  libsystem_kernel.dylib         0x14b0 __workq_kernreturn + 8
1  libsystem_pthread.dylib        0x4cc8 _pthread_wqthread + 364
2  libsystem_pthread.dylib        0x1488 start_wqthread + 8

com.apple.uikit.eventfetch-thread
0  libsystem_kernel.dylib         0x1728 mach_msg2_trap + 8
1  libsystem_kernel.dylib         0x4e38 mach_msg2_internal + 80
2  libsystem_kernel.dylib         0x4d50 mach_msg_overwrite + 424
3  libsystem_kernel.dylib         0x4b9c mach_msg + 24
4  CoreFoundation                 0x547cc <redacted> + 160
5  CoreFoundation                 0x53e78 <redacted> + 1212
6  CoreFoundation                 0x535b8 CFRunLoopRunSpecific + 572
7  Foundation                     0xb6f00 <redacted> + 212
8  Foundation                     0xb6d50 <redacted> + 64
9  UIKitCore                      0x3f1a44 <redacted> + 420
10 Foundation                     0xc8058 <redacted> + 724
11 libsystem_pthread.dylib        0x637c _pthread_start + 136
12 libsystem_pthread.dylib        0x1494 thread_start + 8

Thread
0  libsystem_pthread.dylib        0x1480 start_wqthread + 9031615614

Thread
0  libsystem_kernel.dylib         0x14b0 __workq_kernreturn + 8
1  libsystem_pthread.dylib        0x4cc8 _pthread_wqthread + 364
2  libsystem_pthread.dylib        0x1488 start_wqthread + 8

Thread
0  libsystem_kernel.dylib         0x14b0 __workq_kernreturn + 8
1  libsystem_pthread.dylib        0x4cc8 _pthread_wqthread + 364
2  libsystem_pthread.dylib        0x1488 start_wqthread + 8

com.google.firebase.crashlytics.MachExceptionServer
0  xpayApp                        0x1542b8 FIRCLSProcessRecordAllThreads + 393 (FIRCLSProcess.c:393)
1  xpayApp                        0x154698 FIRCLSProcessRecordAllThreads + 424 (FIRCLSProcess.c:424)
2  xpayApp                        0x14bcbc FIRCLSHandler + 34 (FIRCLSHandler.m:34)
3  xpayApp                        0x14e410 FIRCLSMachExceptionServer + 521 (FIRCLSMachException.c:521)
4  libsystem_pthread.dylib        0x637c _pthread_start + 136
5  libsystem_pthread.dylib        0x1494 thread_start + 8

com.facebook.react.JavaScript
0  libsystem_kernel.dylib         0x7b70 __ulock_wait + 8
1  libdispatch.dylib              0x4ac0 _dlock_wait + 56
2  libdispatch.dylib              0x47bc _dispatch_wait_on_address + 140
3  libdispatch.dylib              0x4e90 _dispatch_group_wait_slow + 56
4  xpayApp                        0x3aade0 __26-[RCTCxxBridge invalidate]_block_invoke + 1248 (RCTCxxBridge.mm:1248)
5  xpayApp                        0x3b1244 facebook::react::tryAndReturnError(std::__1::function<void ()> const&) + 518 (function.h:518)
6  xpayApp                        0x3a6988 -[RCTCxxBridge _tryAndHandleError:] + 335 (RCTCxxBridge.mm:335)
7  Foundation                     0xa787c <redacted> + 264
8  CoreFoundation                 0x57088 <redacted> + 28
9  CoreFoundation                 0x5701c <redacted> + 176
10 CoreFoundation                 0x54b08 <redacted> + 244
11 CoreFoundation                 0x53d04 <redacted> + 840
12 CoreFoundation                 0x535b8 CFRunLoopRunSpecific + 572
13 xpayApp                        0x3a68b8 +[RCTCxxBridge runRunLoop] + 326 (RCTCxxBridge.mm:326)
14 Foundation                     0xc8058 <redacted> + 724
15 libsystem_pthread.dylib        0x637c _pthread_start + 136
16 libsystem_pthread.dylib        0x1494 thread_start + 8

hades
0  libsystem_kernel.dylib         0x7030 __psynch_cvwait + 8
1  libsystem_pthread.dylib        0x3a50 _pthread_cond_wait + 1204
2  libc++.1.dylib                 0x21584 std::__1::condition_variable::wait(std::__1::unique_lock<std::__1::mutex>&) + 28
3  hermes                         0xcbf60 hermes::vm::HadesGC::Executor::worker() + 116
4  hermes                         0xcbec8 void* std::__1::__thread_proxy[abi:v160006]<std::__1::tuple<std::__1::unique_ptr<std::__1::__thread_struct, std::__1::default_delete<std::__1::__thread_struct>>, hermes::vm::HadesGC::Executor::Executor()::'lambda'()>>(void*) + 44
5  libsystem_pthread.dylib        0x637c _pthread_start + 136
6  libsystem_pthread.dylib        0x1494 thread_start + 8

com.apple.NSURLConnectionLoader
0  libsystem_kernel.dylib         0x1728 mach_msg2_trap + 8
1  libsystem_kernel.dylib         0x4e38 mach_msg2_internal + 80
2  libsystem_kernel.dylib         0x4d50 mach_msg_overwrite + 424
3  libsystem_kernel.dylib         0x4b9c mach_msg + 24
4  CoreFoundation                 0x547cc <redacted> + 160
5  CoreFoundation                 0x53e78 <redacted> + 1212
6  CoreFoundation                 0x535b8 CFRunLoopRunSpecific + 572
7  CFNetwork                      0xfdf44 <redacted> + 416
8  Foundation                     0xc8058 <redacted> + 724
9  libsystem_pthread.dylib        0x637c _pthread_start + 136
10 libsystem_pthread.dylib        0x1494 thread_start + 8

com.apple.CoreMotion.MotionThread
0  libsystem_kernel.dylib         0x1728 mach_msg2_trap + 8
1  libsystem_kernel.dylib         0x4e38 mach_msg2_internal + 80
2  libsystem_kernel.dylib         0x4d50 mach_msg_overwrite + 424
3  libsystem_kernel.dylib         0x4b9c mach_msg + 24
4  CoreFoundation                 0x547cc <redacted> + 160
5  CoreFoundation                 0x53e78 <redacted> + 1212
6  CoreFoundation                 0x535b8 CFRunLoopRunSpecific + 572
7  CoreFoundation                 0xbf850 CFRunLoopRun + 64
8  CoreMotion                     0x101e4 (缺少 UUID 7aeb7b0926d136b0b3a8c7a5eb06db42)
9  libsystem_pthread.dylib        0x637c _pthread_start + 136
10 libsystem_pthread.dylib        0x1494 thread_start + 8

com.facebook.react.JavaScript
0  libsystem_kernel.dylib         0x1728 mach_msg2_trap + 8
1  libsystem_kernel.dylib         0x4e38 mach_msg2_internal + 80
2  libsystem_kernel.dylib         0x4d50 mach_msg_overwrite + 424
3  libsystem_kernel.dylib         0x4b9c mach_msg + 24
4  CoreFoundation                 0x547cc <redacted> + 160
5  CoreFoundation                 0x53e78 <redacted> + 1212
6  CoreFoundation                 0x535b8 CFRunLoopRunSpecific + 572
7  xpayApp                        0x3a68b8 +[RCTCxxBridge runRunLoop] + 326 (RCTCxxBridge.mm:326)
8  Foundation                     0xc8058 <redacted> + 724
9  libsystem_pthread.dylib        0x637c _pthread_start + 136
10 libsystem_pthread.dylib        0x1494 thread_start + 8

Thread
0  libsystem_kernel.dylib         0x14b0 __workq_kernreturn + 8
1  libsystem_pthread.dylib        0x4cc8 _pthread_wqthread + 364
2  libsystem_pthread.dylib        0x1488 start_wqthread + 8

hades
0  libsystem_kernel.dylib         0x7030 __psynch_cvwait + 8
1  libsystem_pthread.dylib        0x3a50 _pthread_cond_wait + 1204
2  libc++.1.dylib                 0x21584 std::__1::condition_variable::wait(std::__1::unique_lock<std::__1::mutex>&) + 28
3  hermes                         0xcbf60 hermes::vm::HadesGC::Executor::worker() + 116
4  hermes                         0xcbec8 void* std::__1::__thread_proxy[abi:v160006]<std::__1::tuple<std::__1::unique_ptr<std::__1::__thread_struct, std::__1::default_delete<std::__1::__thread_struct>>, hermes::vm::HadesGC::Executor::Executor()::'lambda'()>>(void*) + 44
5  libsystem_pthread.dylib        0x637c _pthread_start + 136
6  libsystem_pthread.dylib        0x1494 thread_start + 8

Reproducer

nil

Screenshots and Videos

No response

react-native-bot commented 6 days ago
:warning: Newer Version of React Native is Available!
:information_source: You are on a supported minor version, but it looks like there's a newer patch available - 0.74.5. Please upgrade to the highest patch for your minor or latest and verify if the issue persists (alternatively, create a new project and repro the issue in it). If it does not repro, please let us know so we can close out this issue. This helps us ensure we are looking at issues that still exist in the most recent releases.
react-native-bot commented 6 days ago
:warning: Missing Reproducible Example
:information_source: We could not detect a reproducible example in your issue report. Please provide either:
  • If your bug is UI related: a Snack
  • If your bug is build/update related: use our Reproducer Template. A reproducer needs to be in a GitHub repository under your username.
react-native-bot commented 6 days ago
:warning: Missing Reproducible Example
:information_source: We could not detect a reproducible example in your issue report. Please provide either:
react-native-bot commented 6 days ago
:warning: Newer Version of React Native is Available!
:information_source: You are on a supported minor version, but it looks like there's a newer patch available - undefined. Please upgrade to the highest patch for your minor or latest and verify if the issue persists (alternatively, create a new project and repro the issue in it). If it does not repro, please let us know so we can close out this issue. This helps us ensure we are looking at issues that still exist in the most recent releases.
cipolleschi commented 6 days ago

Can you provide a reproducer using this template?

Without it, we can't help you out.

kingzeng commented 5 days ago

Can you provide a reproducer using this template?您能提供使用此模板的复制器吗?

Without it, we can't help you out.没有它,我们无法帮助您。

Because it is an exception occurred in the release version, there are more than 10 abnormal users, and this exception cannot be reproduced in normal debugging

cortinico commented 5 days ago

Because it is an exception occurred in the release version, there are more than 10 abnormal users, and this exception cannot be reproduced in normal debugging

Without a reproducer there is literally no information for us here to help you debug the issue