RonRadtke / react-native-blob-util

A project committed to making file access and data transfer easier, efficient for React Native developers.
MIT License
760 stars 130 forks source link

react-native-blob-util v0.17.0 crashes #197

Open keremoge opened 1 year ago

keremoge commented 1 year ago

Our app crashes on RN 0.68.5 with react-native-blob-util v0.17.0 Our app is not written with new architecture so maybe it is the problem

When I downgrade to react-native-blob-util v0.16.4, it is working

RonRadtke commented 1 year ago

What error do you get when your app crashes?

keremoge commented 1 year ago

Here is XCode StackTrace when the app starts on simulator:

MyApp[12623:67414] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[UIView bridge]: unrecognized selector sent to instance 0x7fe8c20103f0'
*** First throw call stack:
(
    0   CoreFoundation                      0x00007fff20405604 __exceptionPreprocess + 242
    1   libobjc.A.dylib                     0x00007fff201a4a45 objc_exception_throw + 48
    2   CoreFoundation                      0x00007fff204145ba +[NSObject(NSObject) instanceMethodSignatureForSelector:] + 0
    3   UIKitCore                           0x00007fff250d62d5 -[UIResponder doesNotRecognizeSelector:] + 264
    4   CoreFoundation                      0x00007fff20409bbf ___forwarding___ + 1471
    5   CoreFoundation                      0x00007fff2040bd48 _CF_forwarding_prep_0 + 120
    6   MyApp                         0x0000000100d23b84 +[ReactNativeBlobUtil getRCTEventDispatcher] + 244
    7   MyApp                         0x0000000100d24044 __27-[ReactNativeBlobUtil init]_block_invoke + 36
    8   libdispatch.dylib                   0x000000010536a816 _dispatch_call_block_and_release + 12
    9   libdispatch.dylib                   0x000000010536ba5b _dispatch_client_callout + 8
    10  libdispatch.dylib                   0x000000010537a325 _dispatch_main_queue_drain + 1169
    11  libdispatch.dylib                   0x0000000105379e86 _dispatch_main_queue_callback_4CF + 31
    12  CoreFoundation                      0x00007fff20371ed5 __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 9
    13  CoreFoundation                      0x00007fff2036c6ca __CFRunLoopRun + 2761
    14  CoreFoundation                      0x00007fff2036b704 CFRunLoopRunSpecific + 562
    15  GraphicsServices                    0x00007fff2cba9c8e GSEventRunModal + 139
    16  UIKitCore                           0x00007fff2509e65a -[UIApplication _run] + 928
    17  UIKitCore                           0x00007fff250a32b5 UIApplicationMain + 101
    18  MyApp                         0x00000001007c85d8 main + 104
    19  dyld                                0x0000000103dacf21 start_sim + 10
    20  ???                                 0x000000010819a52e 0x0 + 4430865710
)
libc++abi: terminating with uncaught exception of type NSException
dyld4 config: DYLD_ROOT_PATH=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot DYLD_LIBRARY_PATH=/Users/myname/Library/Developer/Xcode/DerivedData/MyApp-atztyvegdfrmeegzdwwlarrlkdbw/Build/Products/Debug-iphonesimulator:/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/usr/lib/system/introspection DYLD_INSERT_LIBRARIES=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/usr/lib/libBacktraceRecording.dylib:/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/usr/lib/libMainThreadChecker.dylib:/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/Developer/Library/PrivateFrameworks/DTDDISupport.framework/libViewDebuggerSupport.dylib DYLD_FRAMEWORK_PATH=/Users/myname/Library/Developer/Xcode/DerivedData/MyApp-atztyvegdfrmeegzdwwlarrlkdbw/Build/Products/Debug-iphonesimulator
terminating with uncaught exception of type NSException
*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[UIView bridge]: unrecognized selector sent to instance 0x7fe8c20103f0'
CoreSimulator 857.7 - Device: iPhone 12 (15687DDA-75EA-425B-981F-621C23ACFAE1) - Runtime: iOS 15.5 (19F70) - DeviceType: iPhone 12
RonRadtke commented 1 year ago

IS the cras hhappening on start up or when you're calling a certain function?

If the later, please provide a code snippet so I can try to reproduce it

hellforever commented 1 year ago

On start up

keremoge commented 1 year ago

IS the cras hhappening on start up or when you're calling a certain function?

If the later, please provide a code snippet so I can try to reproduce it

It happens on startup

RonRadtke commented 1 year ago

I can't reproduce the problem in a new project. You sure you run the pod install correctly and your podfile isn't problematic somewhere?

jinshin1013 commented 1 year ago

I can also see my app crashing after the 0.17.0 update. Had to revert back.

RonRadtke commented 1 year ago

@jinshin1013 which react-native version? Android or iOS? Do you get the same error message? And if iOS, did you run a pod isntall?

RonRadtke commented 1 year ago

@cortinico sorry to bother you, do you have any idea what might be going on here? I can't reproduce it on my devices with a new project...

FluffyDiscord commented 1 year ago

In my case I get similar error on iOS

Terminating app due to uncaught exception 'NSRangeException', reason: '*** -[__NSArrayM objectAtIndex:]: index 0 beyond bounds for empty array'
*** First throw call stack:
(0x196893a84 0x194ce5958 0x196a21554 0x1968a3a54 0x1055b4bc8 0x1055b338c 0x107ccc08c 0x107ccd8c4 0x107cd00ac 0x107cdfaa4 0x107ce0414 0x1e303ab14 0x1e303a67c)
libc++abi: terminating with uncaught exception of type NSException
terminating with uncaught exception of type NSException
*** Terminating app due to uncaught exception 'NSRangeException', reason: '*** -[__NSArrayM objectAtIndex:]: index 0 beyond bounds for empty array'

Something about

// generate boundary
  __block NSString * boundary = [NSString stringWithFormat:@"ReactNativeBlobUtil%d", timeStampObj];
  dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{

This might be an issue of using the .fetch() with empty array body since when I add a dummy file, it starts working again.

const requestFiles = []

ReactNativeBlobUtil.fetch("POST", WEB_BASE_API_URL, headers, requestFiles).uploadProgress((written, total) => {
        onUploadProgress({
            loaded: written,
            total
        })
    })

Versions tested: 0.16.4, 0.17.0 RN: 0.69.7 xcode 14 ios 16.1

RonRadtke commented 1 year ago

In my case I get similar error on iOS

Terminating app due to uncaught exception 'NSRangeException', reason: '*** -[__NSArrayM objectAtIndex:]: index 0 beyond bounds for empty array'
*** First throw call stack:
(0x196893a84 0x194ce5958 0x196a21554 0x1968a3a54 0x1055b4bc8 0x1055b338c 0x107ccc08c 0x107ccd8c4 0x107cd00ac 0x107cdfaa4 0x107ce0414 0x1e303ab14 0x1e303a67c)
libc++abi: terminating with uncaught exception of type NSException
terminating with uncaught exception of type NSException
*** Terminating app due to uncaught exception 'NSRangeException', reason: '*** -[__NSArrayM objectAtIndex:]: index 0 beyond bounds for empty array'

Something about

// generate boundary
  __block NSString * boundary = [NSString stringWithFormat:@"ReactNativeBlobUtil%d", timeStampObj];
  dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{

This might be an issue of using the .fetch() with empty array body since when I add a dummy file, it starts working again.

const requestFiles = []

ReactNativeBlobUtil.fetch("POST", WEB_BASE_API_URL, headers, requestFiles).uploadProgress((written, total) => {
        onUploadProgress({
            loaded: written,
            total
        })
    })

Versions tested: 0.16.4, 0.17.0 RN: 0.69.7 xcode 14 ios 16.1

Thank you - but I think this is another issue. In 0.16.4 it works, in 0.17.0 it doesn't? So like we lost the check on the length

RonRadtke commented 1 year ago

I still can't reproduce your issue @keremoge. Any additional info on it?

FluffyDiscord commented 1 year ago

In my case I get similar error on iOS

Terminating app due to uncaught exception 'NSRangeException', reason: '*** -[__NSArrayM objectAtIndex:]: index 0 beyond bounds for empty array'
*** First throw call stack:
(0x196893a84 0x194ce5958 0x196a21554 0x1968a3a54 0x1055b4bc8 0x1055b338c 0x107ccc08c 0x107ccd8c4 0x107cd00ac 0x107cdfaa4 0x107ce0414 0x1e303ab14 0x1e303a67c)
libc++abi: terminating with uncaught exception of type NSException
terminating with uncaught exception of type NSException
*** Terminating app due to uncaught exception 'NSRangeException', reason: '*** -[__NSArrayM objectAtIndex:]: index 0 beyond bounds for empty array'

Something about

// generate boundary
  __block NSString * boundary = [NSString stringWithFormat:@"ReactNativeBlobUtil%d", timeStampObj];
  dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{

This might be an issue of using the .fetch() with empty array body since when I add a dummy file, it starts working again.

const requestFiles = []

ReactNativeBlobUtil.fetch("POST", WEB_BASE_API_URL, headers, requestFiles).uploadProgress((written, total) => {
        onUploadProgress({
            loaded: written,
            total
        })
    })

Versions tested: 0.16.4, 0.17.0 RN: 0.69.7 xcode 14 ios 16.1

Thank you - but I think this is another issue. In 0.16.4 it works, in 0.17.0 it doesn't? So like we lost the check on the length

None of those two versions work, when passing empty array.

keremoge commented 1 year ago

I still can't reproduce your issue @keremoge. Any additional info on it?

Here is detailed error info: Is it related to UIKit? (in main.m)

image
Thread 1 Queue : com.apple.main-thread (serial)
#0  0x00007fff7017300e in __pthread_kill ()
#1  0x00007fff701cb1ff in pthread_kill ()
#2  0x00007fff2010b6b7 in abort ()
#3  0x00007fff2025a5a2 in abort_message ()
#4  0x00007fff2024b73d in demangling_terminate_handler() ()
#5  0x00007fff20189d74 in _objc_terminate() ()
#6  0x00007fff202599c7 in std::__terminate(void (*)()) ()
#7  0x00007fff20259978 in std::terminate() ()
#8  0x00007fff201a4bc4 in objc_terminate ()
#9  0x0000000108eb6a6f in _dispatch_client_callout ()
#10 0x0000000108ec5325 in _dispatch_main_queue_drain ()
#11 0x0000000108ec4e86 in _dispatch_main_queue_callback_4CF ()
#12 0x00007fff20371ed5 in __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ ()
#13 0x00007fff2036c6ca in __CFRunLoopRun ()
#14 0x00007fff2036b704 in CFRunLoopRunSpecific ()
#15 0x00007fff2cba9c8e in GSEventRunModal ()
#16 0x00007fff2509e65a in -[UIApplication _run] ()
#17 0x00007fff250a32b5 in UIApplicationMain ()
#18 0x0000000104536dd8 in main at /Users/abdullahkeremoge/Coding/MobileClient/mobile-branch/ios/AlbarakaApp/main.m:8
#19 0x0000000107b1ef21 in start_sim ()
#20 0x0000000108ce752e in start ()
Enqueued from com.apple.root.default-qos.overcommit (Thread 14) Queue : com.apple.root.default-qos.overcommit (serial)
#0  0x0000000108eba913 in dispatch_async ()
#1  0x0000000104a9214f in -[ReactNativeBlobUtil init] at /Users/abdullahkeremoge/Coding/MobileClient/mobile-branch/node_modules/react-native-blob-util/ios/ReactNativeBlobUtil/ReactNativeBlobUtil.mm:69
#2  0x000000010472f4d4 in __115-[RCTModuleData initWithModuleClass:bridge:moduleRegistry:viewRegistry_DEPRECATED:bundleManager:callableJSModules:]_block_invoke at /Users/abdullahkeremoge/Coding/MobileClient/mobile-branch/node_modules/react-native/React/Base/RCTModuleData.mm:115
#3  0x0000000104730171 in -[RCTModuleData setUpInstanceAndBridge:] at /Users/abdullahkeremoge/Coding/MobileClient/mobile-branch/node_modules/react-native/React/Base/RCTModuleData.mm:189
#4  0x0000000104733330 in -[RCTModuleData instance] at /Users/abdullahkeremoge/Coding/MobileClient/mobile-branch/node_modules/react-native/React/Base/RCTModuleData.mm:471
#5  0x00000001047338d9 in -[RCTModuleData gatherConstantsAndSignalJSRequireEnding:] at /Users/abdullahkeremoge/Coding/MobileClient/mobile-branch/node_modules/react-native/React/Base/RCTModuleData.mm:515
#6  0x0000000104733d29 in -[RCTModuleData exportedConstants] at /Users/abdullahkeremoge/Coding/MobileClient/mobile-branch/node_modules/react-native/React/Base/RCTModuleData.mm:553
#7  0x0000000104740809 in facebook::react::RCTNativeModule::getConstants() at /Users/abdullahkeremoge/Coding/MobileClient/mobile-branch/node_modules/react-native/React/CxxModule/RCTNativeModule.mm:68
#8  0x00000001048e57f7 in facebook::react::ModuleRegistry::getConfig(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&) at /Users/abdullahkeremoge/Coding/MobileClient/mobile-branch/node_modules/react-native/ReactCommon/cxxreact/ModuleRegistry.cpp:156
#9  0x0000000104952475 in facebook::react::JSINativeModules::createModule(facebook::jsi::Runtime&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&) at /Users/abdullahkeremoge/Coding/MobileClient/mobile-branch/node_modules/react-native/ReactCommon/jsiexecutor/jsireact/JSINativeModules.cpp:82
#10 0x000000010495201c in facebook::react::JSINativeModules::getModule(facebook::jsi::Runtime&, facebook::jsi::PropNameID const&) at /Users/abdullahkeremoge/Coding/MobileClient/mobile-branch/node_modules/react-native/ReactCommon/jsiexecutor/jsireact/JSINativeModules.cpp:47
#11 0x000000010493e1ea in facebook::react::JSIExecutor::NativeModuleProxy::get(facebook::jsi::Runtime&, facebook::jsi::PropNameID const&) at /Users/abdullahkeremoge/Coding/MobileClient/mobile-branch/node_modules/react-native/ReactCommon/jsiexecutor/jsireact/JSIExecutor.cpp:45
#12 0x000000010491d2b7 in facebook::jsc::JSCRuntime::createObject(std::__1::shared_ptr<facebook::jsi::HostObject>)::HostObjectProxy::getProperty(OpaqueJSContext const*, OpaqueJSValue*, OpaqueJSString*, OpaqueJSValue const**) at /Users/abdullahkeremoge/Coding/MobileClient/mobile-branch/node_modules/react-native/ReactCommon/jsi/JSCRuntime.cpp:723
#13 0x00007fff32daeb2a in JSC::JSCallbackObject<JSC::JSNonFinalObject>::getOwnPropertySlot(JSC::JSObject*, JSC::JSGlobalObject*, JSC::PropertyName, JSC::PropertySlot&) ()
#14 0x00007fff336b3ad5 in llint_slow_path_get_by_val ()
#15 0x00007fff32d17fbd in llint_entry ()
#16 0x00007fff32d298d0 in llint_entry ()
#17 0x00007fff32d29947 in llint_entry ()
#18 0x000024d1a62542cd in 0x24d1a62542cd ()
#19 0x00007fff32d29947 in llint_entry ()
#20 0x000024d1a62542cd in 0x24d1a62542cd ()
#21 0x00007fff32d29947 in llint_entry ()
#22 0x000024d1a62542cd in 0x24d1a62542cd ()
#23 0x00007fff32d29947 in llint_entry ()
#24 0x000024d1a62542cd in 0x24d1a62542cd ()
#25 0x00007fff32d29947 in llint_entry ()
#26 0x000024d1a62542cd in 0x24d1a62542cd ()
#27 0x00007fff32d29947 in llint_entry ()
#28 0x000024d1a62542cd in 0x24d1a62542cd ()
#29 0x00007fff32d29947 in llint_entry ()
#30 0x000024d1a62542cd in 0x24d1a62542cd ()
#31 0x000024d1a6250c63 in 0x24d1a6250c63 ()
#32 0x00007fff32d29ad2 in llint_entry ()
#33 0x00007fff32d0c646 in vmEntryToJavaScript ()
#34 0x00007fff3356623e in JSC::Interpreter::executeProgram(JSC::SourceCode const&, JSC::JSGlobalObject*, JSC::JSObject*) ()
#35 0x00007fff33879cf3 in JSC::evaluate(JSC::JSGlobalObject*, JSC::SourceCode const&, JSC::JSValue, WTF::NakedPtr<JSC::Exception>&) ()
#36 0x00007fff32da9410 in JSEvaluateScript ()
#37 0x00000001049156c5 in facebook::jsc::JSCRuntime::evaluateJavaScript(std::__1::shared_ptr<facebook::jsi::Buffer const> const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&) at /Users/abdullahkeremoge/Coding/MobileClient/mobile-branch/node_modules/react-native/ReactCommon/jsi/JSCRuntime.cpp:429
#38 0x000000010493671b in facebook::react::JSIExecutor::loadBundle(std::__1::unique_ptr<facebook::react::JSBigString const, std::__1::default_delete<facebook::react::JSBigString const> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) at /Users/abdullahkeremoge/Coding/MobileClient/mobile-branch/node_modules/react-native/ReactCommon/jsiexecutor/jsireact/JSIExecutor.cpp:159
#39 0x00000001048fe2c1 in facebook::react::NativeToJsBridge::loadBundle(std::__1::unique_ptr<facebook::react::RAMBundleRegistry, std::__1::default_delete<facebook::react::RAMBundleRegistry> >, std::__1::unique_ptr<facebook::react::JSBigString const, std::__1::default_delete<facebook::react::JSBigString const> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >)::$_1::operator()(facebook::react::JSExecutor*) at /Users/abdullahkeremoge/Coding/MobileClient/mobile-branch/node_modules/react-native/ReactCommon/cxxreact/NativeToJsBridge.cpp:146
#40 0x00000001048fe180 in decltype(static_cast<facebook::react::NativeToJsBridge::loadBundle(std::__1::unique_ptr<facebook::react::RAMBundleRegistry, std::__1::default_delete<facebook::react::RAMBundleRegistry> >, std::__1::unique_ptr<facebook::react::JSBigString const, std::__1::default_delete<facebook::react::JSBigString const> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >)::$_1&>(fp)(static_cast<facebook::react::JSExecutor*>(fp0))) std::__1::__invoke<facebook::react::NativeToJsBridge::loadBundle(std::__1::unique_ptr<facebook::react::RAMBundleRegistry, std::__1::default_delete<facebook::react::RAMBundleRegistry> >, std::__1::unique_ptr<facebook::react::JSBigString const, std::__1::default_delete<facebook::react::JSBigString const> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >)::$_1&, facebook::react::JSExecutor*>(facebook::react::NativeToJsBridge::loadBundle(std::__1::unique_ptr<facebook::react::RAMBundleRegistry, std::__1::default_delete<facebook::react::RAMBundleRegistry> >, std::__1::unique_ptr<facebook::react::JSBigString const, std::__1::default_delete<facebook::react::JSBigString const> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >)::$_1&, facebook::react::JSExecutor*&&) at /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator15.5.sdk/usr/include/c++/v1/type_traits:3918
#41 0x00000001048fe132 in void std::__1::__invoke_void_return_wrapper<void, true>::__call<facebook::react::NativeToJsBridge::loadBundle(std::__1::unique_ptr<facebook::react::RAMBundleRegistry, std::__1::default_delete<facebook::react::RAMBundleRegistry> >, std::__1::unique_ptr<facebook::react::JSBigString const, std::__1::default_delete<facebook::react::JSBigString const> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >)::$_1&, facebook::react::JSExecutor*>(facebook::react::NativeToJsBridge::loadBundle(std::__1::unique_ptr<facebook::react::RAMBundleRegistry, std::__1::default_delete<facebook::react::RAMBundleRegistry> >, std::__1::unique_ptr<facebook::react::JSBigString const, std::__1::default_delete<facebook::react::JSBigString const> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >)::$_1&, facebook::react::JSExecutor*&&) at /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator15.5.sdk/usr/include/c++/v1/__functional/invoke.h:61
#42 0x00000001048fe0f2 in std::__1::__function::__alloc_func<facebook::react::NativeToJsBridge::loadBundle(std::__1::unique_ptr<facebook::react::RAMBundleRegistry, std::__1::default_delete<facebook::react::RAMBundleRegistry> >, std::__1::unique_ptr<facebook::react::JSBigString const, std::__1::default_delete<facebook::react::JSBigString const> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >)::$_1, std::__1::allocator<facebook::react::NativeToJsBridge::loadBundle(std::__1::unique_ptr<facebook::react::RAMBundleRegistry, std::__1::default_delete<facebook::react::RAMBundleRegistry> >, std::__1::unique_ptr<facebook::react::JSBigString const, std::__1::default_delete<facebook::react::JSBigString const> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >)::$_1>, void (facebook::react::JSExecutor*)>::operator()(facebook::react::JSExecutor*&&) at /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator15.5.sdk/usr/include/c++/v1/__functional/function.h:178
#43 0x00000001048fcbf1 in std::__1::__function::__func<facebook::react::NativeToJsBridge::loadBundle(std::__1::unique_ptr<facebook::react::RAMBundleRegistry, std::__1::default_delete<facebook::react::RAMBundleRegistry> >, std::__1::unique_ptr<facebook::react::JSBigString const, std::__1::default_delete<facebook::react::JSBigString const> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >)::$_1, std::__1::allocator<facebook::react::NativeToJsBridge::loadBundle(std::__1::unique_ptr<facebook::react::RAMBundleRegistry, std::__1::default_delete<facebook::react::RAMBundleRegistry> >, std::__1::unique_ptr<facebook::react::JSBigString const, std::__1::default_delete<facebook::react::JSBigString const> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >)::$_1>, void (facebook::react::JSExecutor*)>::operator()(facebook::react::JSExecutor*&&) at /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator15.5.sdk/usr/include/c++/v1/__functional/function.h:352
#44 0x000000010490b5ca in std::__1::__function::__value_func<void (facebook::react::JSExecutor*)>::operator()(facebook::react::JSExecutor*&&) const at /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator15.5.sdk/usr/include/c++/v1/__functional/function.h:505
#45 0x000000010490b54d in std::__1::function<void (facebook::react::JSExecutor*)>::operator()(facebook::react::JSExecutor*) const at /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator15.5.sdk/usr/include/c++/v1/__functional/function.h:1182
#46 0x000000010490b517 in facebook::react::NativeToJsBridge::runOnExecutorQueue(std::__1::function<void (facebook::react::JSExecutor*)>)::$_8::operator()() const at /Users/abdullahkeremoge/Coding/MobileClient/mobile-branch/node_modules/react-native/ReactCommon/cxxreact/NativeToJsBridge.cpp:310
#47 0x000000010490b4a5 in decltype(static_cast<facebook::react::NativeToJsBridge::runOnExecutorQueue(std::__1::function<void (facebook::react::JSExecutor*)>)::$_8&>(fp)()) std::__1::__invoke<facebook::react::NativeToJsBridge::runOnExecutorQueue(std::__1::function<void (facebook::react::JSExecutor*)>)::$_8&>(facebook::react::NativeToJsBridge::runOnExecutorQueue(std::__1::function<void (facebook::react::JSExecutor*)>)::$_8&) at /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator15.5.sdk/usr/include/c++/v1/type_traits:3918
#48 0x000000010490b45d in void std::__1::__invoke_void_return_wrapper<void, true>::__call<facebook::react::NativeToJsBridge::runOnExecutorQueue(std::__1::function<void (facebook::react::JSExecutor*)>)::$_8&>(facebook::react::NativeToJsBridge::runOnExecutorQueue(std::__1::function<void (facebook::react::JSExecutor*)>)::$_8&) at /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator15.5.sdk/usr/include/c++/v1/__functional/invoke.h:61
#49 0x000000010490b42d in std::__1::__function::__alloc_func<facebook::react::NativeToJsBridge::runOnExecutorQueue(std::__1::function<void (facebook::react::JSExecutor*)>)::$_8, std::__1::allocator<facebook::react::NativeToJsBridge::runOnExecutorQueue(std::__1::function<void (facebook::react::JSExecutor*)>)::$_8>, void ()>::operator()() at /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator15.5.sdk/usr/include/c++/v1/__functional/function.h:178
#50 0x0000000104909fc9 in std::__1::__function::__func<facebook::react::NativeToJsBridge::runOnExecutorQueue(std::__1::function<void (facebook::react::JSExecutor*)>)::$_8, std::__1::allocator<facebook::react::NativeToJsBridge::runOnExecutorQueue(std::__1::function<void (facebook::react::JSExecutor*)>)::$_8>, void ()>::operator()() at /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator15.5.sdk/usr/include/c++/v1/__functional/function.h:352
#51 0x0000000104985c72 in std::__1::__function::__value_func<void ()>::operator()() const at /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator15.5.sdk/usr/include/c++/v1/__functional/function.h:505
#52 0x0000000104985ba5 in std::__1::function<void ()>::operator()() const at /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator15.5.sdk/usr/include/c++/v1/__functional/function.h:1182
#53 0x00000001046f3955 in facebook::react::tryAndReturnError(std::__1::function<void ()> const&) at /Users/abdullahkeremoge/Coding/MobileClient/mobile-branch/node_modules/react-native/React/CxxModule/RCTCxxUtils.mm:74
#54 0x0000000104722ad1 in facebook::react::RCTMessageThread::tryFunc(std::__1::function<void ()> const&) at /Users/abdullahkeremoge/Coding/MobileClient/mobile-branch/node_modules/react-native/React/CxxBridge/RCTMessageThread.mm:69
#55 0x0000000104727d63 in facebook::react::RCTMessageThread::runOnQueue(std::__1::function<void ()>&&)::$_1::operator()() const at /Users/abdullahkeremoge/Coding/MobileClient/mobile-branch/node_modules/react-native/React/CxxBridge/RCTMessageThread.mm:82
#56 0x0000000104727cf5 in decltype(static_cast<facebook::react::RCTMessageThread::runOnQueue(std::__1::function<void ()>&&)::$_1&>(fp)()) std::__1::__invoke<facebook::react::RCTMessageThread::runOnQueue(std::__1::function<void ()>&&)::$_1&>(facebook::react::RCTMessageThread::runOnQueue(std::__1::function<void ()>&&)::$_1&) at /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator15.5.sdk/usr/include/c++/v1/type_traits:3918
#57 0x0000000104727cad in void std::__1::__invoke_void_return_wrapper<void, true>::__call<facebook::react::RCTMessageThread::runOnQueue(std::__1::function<void ()>&&)::$_1&>(facebook::react::RCTMessageThread::runOnQueue(std::__1::function<void ()>&&)::$_1&) at /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator15.5.sdk/usr/include/c++/v1/__functional/invoke.h:61
#58 0x0000000104727c7d in std::__1::__function::__alloc_func<facebook::react::RCTMessageThread::runOnQueue(std::__1::function<void ()>&&)::$_1, std::__1::allocator<facebook::react::RCTMessageThread::runOnQueue(std::__1::function<void ()>&&)::$_1>, void ()>::operator()() at /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator15.5.sdk/usr/include/c++/v1/__functional/function.h:178
#59 0x0000000104726919 in std::__1::__function::__func<facebook::react::RCTMessageThread::runOnQueue(std::__1::function<void ()>&&)::$_1, std::__1::allocator<facebook::react::RCTMessageThread::runOnQueue(std::__1::function<void ()>&&)::$_1>, void ()>::operator()() at /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator15.5.sdk/usr/include/c++/v1/__functional/function.h:352
#60 0x0000000104985c72 in std::__1::__function::__value_func<void ()>::operator()() const at /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator15.5.sdk/usr/include/c++/v1/__functional/function.h:505
#61 0x0000000104985ba5 in std::__1::function<void ()>::operator()() const at /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator15.5.sdk/usr/include/c++/v1/__functional/function.h:1182
#62 0x000000010472283a in invocation function for block in facebook::react::RCTMessageThread::runAsync(std::__1::function<void ()>) at /Users/abdullahkeremoge/Coding/MobileClient/mobile-branch/node_modules/react-native/React/CxxBridge/RCTMessageThread.mm:45
#63 0x00007fff2037223d in __CFRUNLOOP_IS_CALLING_OUT_TO_A_BLOCK__ ()
#64 0x00007fff2037163b in __CFRunLoopDoBlocks ()
#65 0x00007fff2036c628 in __CFRunLoopRun ()
#66 0x00007fff2036b704 in CFRunLoopRunSpecific ()
#67 0x00000001046c4595 in +[RCTCxxBridge runRunLoop] at /Users/abdullahkeremoge/Coding/MobileClient/mobile-branch/node_modules/react-native/React/CxxBridge/RCTCxxBridge.mm:378
#68 0x00007fff208511a1 in __NSThread__start__ ()
#69 0x00007fff701cb4e1 in _pthread_start ()
#70 0x00007fff701c6f6b in thread_start ()
romanonthego commented 1 year ago

can confirm, happens on iPhone 14Pro simulator and device, but weirdly not on iPhone14 simulator (no device at hand)

Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[UIView bridge]: unrecognized selector sent to instance 0x139825dd0'
*** First throw call stack:
(
0   CoreFoundation                      0x000000018040e7ec __exceptionPreprocess + 172
1   libobjc.A.dylib                     0x0000000180051144 objc_exception_throw + 56
2   CoreFoundation                      0x000000018041d49c +[NSObject(NSObject) instanceMethodSignatureForSelector:] + 0
3   UIKitCore                           0x000000010f9e5fd8 -[UIResponder doesNotRecognizeSelector:] + 232
4   CoreFoundation                      0x00000001804126ec ___forwarding___ + 1308
5   CoreFoundation                      0x0000000180414b6c _CF_forwarding_prep_0 + 92
6   app-dev                       0x0000000100d7efb4 +[ReactNativeBlobUtil getRCTEventDispatcher] + 184
7   app-dev                       0x0000000100d7f41c __27-[ReactNativeBlobUtil init]_block_invoke + 36
8   libdispatch.dylib             <…>
julestruong commented 1 year ago

Same thing, downgrading to 0.16.4 works

my env :

xcode 14 "react": "17.0.2", "react-native": "0.67.5",

cortinico commented 1 year ago

@cortinico sorry to bother you, do you have any idea what might be going on here? I can't reproduce it on my devices with a new project...

Same also can't reproduce. @romanonthego are you able to reproduce in any form? Also is the issue happening only on iOS or also on Android?

simon-abbott commented 1 year ago

This error is happening to us intermittently in production, but I also can't reproduce it locally.

From investigating the stacktrace I have determined that the error is being thrown from this line:

https://github.com/RonRadtke/react-native-blob-util/blob/977a5a908116ae8afa8b7d59efae4ffde81aaa56/ios/ReactNativeBlobUtil/ReactNativeBlobUtil.mm#L47

I suspect that what's happening is that the view returned by

https://github.com/RonRadtke/react-native-blob-util/blob/977a5a908116ae8afa8b7d59efae4ffde81aaa56/ios/ReactNativeBlobUtil/ReactNativeBlobUtil.mm#L43

is somehow not actually of type RCTRootView, which then causes the call to .bridge to fail. However I have no idea why it would (only sometimes) be a different type.

only1chi commented 1 year ago

I'm also having problems running 0.17.0 on react-native 0.70.6 using the new architecture. I'm building on an android platform and the app is crashing on start. The log error I get is different though:

[16:51:33] E | ReactNativeJS ▶︎ Error: Exception in HostFunction: java.lang.IllegalStateException: Native Module Flow doesn't declare constants: [LegacyMusicDir, LegacyRingtoneDir, LegacyPictureDir, LegacyMovieDir, LegacySDCardDir, LegacyDownloadDir, LegacyDCIMDir], js engine: hermes

[16:51:33] F | ReactNative ▶︎ /Users/redacted/Desktop/Git_Repo/janus/node_modules/react-native/ReactCommon/react/renderer/uimanager/bindingUtils.cpp:29: function getModule: assertion failed (moduleAsValue.isObject())

Versions tested: 0.17.0 RN: 0.70.6 Android 9 NewArchiteture = true

I did try it on an emulator running Android 11 and it worked.

walterholohan commented 1 year ago

Same here, I just upgraded to 0.17.1 and the app crashed when I tried to read a file from FS

Crash report

NSInvalidArgumentException: -[__NSArrayM bytes]: unrecognized selector sent to instance 0x282b7cb10

Offending line

const workoutFile = await ReactNativeBlobUtil.fs.readFile(filePath, 'ascii')
MCervenka commented 1 year ago

Hello, I find this crash only in crashlytics, but it started after updating the version to 0.17.0. It affects like 2% of my ios users. The error name is: ReactNativeBlobUtil.mm line 47 +[ReactNativeBlobUtil getRCTEventDispatcher]

Snímek obrazovky 2023-01-31 v 10 01 55
code-by commented 1 year ago

Same here project was upgraded from RN 0.60.5

xCode 12.5.1

"react": "17.0.2",
"react-native": "0.67.4",
"react-native-navigation": "^7.26.0",
"react-native-blob-util": "^0.17.1"

Any solutions?

WadhahEssam commented 1 year ago

Same here, I am using 0.17.2

I am not sure how to reproduce this issue, but there is around 1% of our users are facing it immediately after startup

herarya commented 1 year ago

same hare, using after upgraded to "react-native": "0.71.3","react-native-blob-util": "^0.17.0",

RonRadtke commented 1 year ago

@herarya @WadhahEssam @MCervenka @simon-abbott are you all using react-native-navigation? I managed to reproduce it using react-native-navigation....

keremoge commented 1 year ago

@herarya @WadhahEssam @MCervenka @simon-abbott are you all using react-native-navigation? I managed to reproduce it using react-native-navigation....

I use react-native-navigation

simon-abbott commented 1 year ago

We use @react-navigation/native (together with @react-navigation/stack), not react-native-navigation.

yuanshan commented 1 year ago

v0.17.0, v0.17.2 still crash in iphone 14 pro model

RonRadtke commented 1 year ago

I managed to reproduce it now and created a repo for testing: https://github.com/RonRadtke/RNBlob_bug_rootview

The issue seems to be that some libraries are exchanging the rootview with an own UIView and therefor I can't access the bridge via it anymore. But I don't have a solution for it yet. If anyone has a good idea, I would be very happy about some help.

RonRadtke commented 1 year ago

Okay I think I should rework the whole EventEmitter logic to fix this so we are independant on the bridge and remove deprecated APIs in addition I put it on the todo for the next bigger update https://github.com/RonRadtke/react-native-blob-util/issues/226

RonRadtke commented 1 year ago

As mentioned, I plan on rewriting the whole Eventemitter part, so sending events form native to js. But this will do as a band-aid till then. I tested it with RNN and it worked fine.

walterholohan commented 1 year ago

Hey @RonRadtke any update on this issue? I just upgraded to 0.18.3 and still happening. Will revert back to 0.16.4 for now. But would be great to be able to upgrade this lib in the future.

RonRadtke commented 1 year ago

Hey @RonRadtke any update on this issue? I just upgraded to 0.18.3 and still happening. Will revert back to 0.16.4 for now. But would be great to be able to upgrade this lib in the future.

What's the stack trace? The initial error with the bridge and event emmiting should not exist anymore

walterholohan commented 1 year ago

@RonRadtke thanks for the quick reply, very much appreciated. same one as this https://github.com/RonRadtke/react-native-blob-util/issues/197#issuecomment-1385618007

OS Version: iOS 16.5.1 (20F75) Report Version: 104

Exception Type: EXC_CRASH (SIGABRT) Crashed Thread: 5

Application Specific Information: -[__NSArrayM bytes]: unrecognized selector sent to instance 0x281b6d080

Thread 5 Crashed: 0 CoreFoundation 0x34f08bcb4 exceptionPreprocess 1 libobjc.A.dylib 0x3411cc3cc objc_exception_throw 2 CoreFoundation 0x34f200ab4 -[NSObject(NSObject) doesNotRecognizeSelector:] 3 CoreFoundation 0x34f0a20e4 __forwarding 4 CoreFoundation 0x34f1088fc forwarding_prep_0_ 5 CoreFoundation 0x34f12d260 CFStringCreateFromExternalRepresentation 6 RunBuddyApp 0x201154e10 70-[ReactNativeBlobUtil readFile:encoding:transformFile:resolve:reject:]_block_invoke (ReactNativeBlobUtil.mm:687) 7 RunBuddyApp 0x201159924 68+[ReactNativeBlobUtilFS readFile:encoding:transformFile:onComplete:]_block_invoke (ReactNativeBlobUtilFS.mm:571) 8 RunBuddyApp 0x20115bd40 +[ReactNativeBlobUtilFS getPathFromUri:completionHandler:] (ReactNativeBlobUtilFS.mm:934) 9 RunBuddyApp 0x2011593d0 +[ReactNativeBlobUtilFS readFile:encoding:transformFile:onComplete:] (ReactNativeBlobUtilFS.mm:499) 10 RunBuddyApp 0x201154ca4 -[ReactNativeBlobUtil readFile:encoding:transformFile:resolve:reject:] (ReactNativeBlobUtil.mm:676) 11 RunBuddyApp 0x201154bd4 -[ReactNativeBlobUtil readFile:encoding:transformFile:resolver:rejecter:] (ReactNativeBlobUtil.mm:664) 12 CoreFoundation 0x34f0f4c00 invoking_ 13 CoreFoundation 0x34f0a2cb0 -[NSInvocation invoke] 14 CoreFoundation 0x34f0a26c8 -[NSInvocation invokeWithTarget:] 15 RunBuddyApp 0x200d2d4c8 -[RCTModuleMethod invokeWithBridge:module:arguments:] (RCTModuleMethod.mm:584) 16 RunBuddyApp 0x200d2f518 facebook::react::invokeInner (RCTNativeModule.mm:196) 17 RunBuddyApp 0x200d2f168 [inlined] facebook::react::RCTNativeModule::invoke::lambda::operator() (RCTNativeModule.mm:113) 18 RunBuddyApp 0x200d2f168 facebook::react::RCTNativeModule::invoke (RCTNativeModule.mm:104) 19 libdispatch.dylib 0x35da1c31c _dispatch_call_block_and_release 20 libdispatch.dylib 0x35da1dea8 _dispatch_client_callout 21 libdispatch.dylib 0x35da25530 _dispatch_lane_serial_drain 22 libdispatch.dylib 0x35da260a0 _dispatch_lane_invoke 23 libdispatch.dylib 0x35da30cd8 _dispatch_workloop_worker_thread 24 libsystem_pthread.dylib 0x40eb9cdd8 _pthread_wqthread 25 libsystem_pthread.dylib 0x40eb9cb78 start_wqthread

Thread 0 0 libsystem_kernel.dylib 0x3ccf0ac84 mach_msg2_trap 1 libsystem_kernel.dylib 0x3ccf1db50 mach_msg2_internal 2 libsystem_kernel.dylib 0x3ccf1de28 mach_msg_overwrite 3 libsystem_kernel.dylib 0x3ccf0b1c4 mach_msg 4 CoreFoundation 0x34f0fb020 CFRunLoopServiceMachPort 5 CoreFoundation 0x34f0fc24c CFRunLoopRun 6 CoreFoundation 0x34f1013e8 CFRunLoopRunSpecific 7 GraphicsServices 0x3c5ab9358 GSEventRunModal 8 UIKitCore 0x3534fd6e4 -[UIApplication _run] 9 UIKitCore 0x3534fd348 UIApplicationMain 10 RunBuddyApp 0x200aa3f58 main (main.m:8) 11 0x1e75badec

Thread 1 0 libsystem_kernel.dylib 0x3ccf0b18c __workq_kernreturn 1 libsystem_pthread.dylib 0x40eb9ce24 _pthread_wqthread

Thread 2 0 libsystem_kernel.dylib 0x3ccf0b18c __workq_kernreturn 1 libsystem_pthread.dylib 0x40eb9ce24 _pthread_wqthread

Thread 3 name: com.apple.uikit.eventfetch-thread 0 libsystem_kernel.dylib 0x3ccf0ac84 mach_msg2_trap 1 libsystem_kernel.dylib 0x3ccf1db50 mach_msg2_internal 2 libsystem_kernel.dylib 0x3ccf1de28 mach_msg_overwrite 3 libsystem_kernel.dylib 0x3ccf0b1c4 mach_msg 4 CoreFoundation 0x34f0fb020 CFRunLoopServiceMachPort 5 CoreFoundation 0x34f0fc24c CFRunLoopRun 6 CoreFoundation 0x34f1013e8 CFRunLoopRunSpecific 7 Foundation 0x34364ffd0 -[NSRunLoop(NSRunLoop) runMode:beforeDate:] 8 Foundation 0x34364feb8 -[NSRunLoop(NSRunLoop) runUntilDate:] 9 UIKitCore 0x3536303f8 -[UIEventFetcher threadMain] 10 Foundation 0x343669540 NSThreadstart__ 11 libsystem_pthread.dylib 0x40eb9d6b4 _pthread_start

Thread 4 0 libsystem_kernel.dylib 0x3ccf0b18c __workq_kernreturn 1 libsystem_pthread.dylib 0x40eb9ce24 _pthread_wqthread

Thread 5 Crashed: 0 CoreFoundation 0x34f08bcb4 exceptionPreprocess 1 libobjc.A.dylib 0x3411cc3cc objc_exception_throw 2 CoreFoundation 0x34f200ab4 -[NSObject(NSObject) doesNotRecognizeSelector:] 3 CoreFoundation 0x34f0a20e4 __forwarding 4 CoreFoundation 0x34f1088fc forwarding_prep_0_ 5 CoreFoundation 0x34f12d260 CFStringCreateFromExternalRepresentation 6 RunBuddyApp 0x201154e10 70-[ReactNativeBlobUtil readFile:encoding:transformFile:resolve:reject:]_block_invoke (ReactNativeBlobUtil.mm:687) 7 RunBuddyApp 0x201159924 68+[ReactNativeBlobUtilFS readFile:encoding:transformFile:onComplete:]_block_invoke (ReactNativeBlobUtilFS.mm:571) 8 RunBuddyApp 0x20115bd40 +[ReactNativeBlobUtilFS getPathFromUri:completionHandler:] (ReactNativeBlobUtilFS.mm:934) 9 RunBuddyApp 0x2011593d0 +[ReactNativeBlobUtilFS readFile:encoding:transformFile:onComplete:] (ReactNativeBlobUtilFS.mm:499) 10 RunBuddyApp 0x201154ca4 -[ReactNativeBlobUtil readFile:encoding:transformFile:resolve:reject:] (ReactNativeBlobUtil.mm:676) 11 RunBuddyApp 0x201154bd4 -[ReactNativeBlobUtil readFile:encoding:transformFile:resolver:rejecter:] (ReactNativeBlobUtil.mm:664) 12 CoreFoundation 0x34f0f4c00 invoking_ 13 CoreFoundation 0x34f0a2cb0 -[NSInvocation invoke] 14 CoreFoundation 0x34f0a26c8 -[NSInvocation invokeWithTarget:] 15 RunBuddyApp 0x200d2d4c8 -[RCTModuleMethod invokeWithBridge:module:arguments:] (RCTModuleMethod.mm:584) 16 RunBuddyApp 0x200d2f518 facebook::react::invokeInner (RCTNativeModule.mm:196) 17 RunBuddyApp 0x200d2f168 [inlined] facebook::react::RCTNativeModule::invoke::lambda::operator() (RCTNativeModule.mm:113) 18 RunBuddyApp 0x200d2f168 facebook::react::RCTNativeModule::invoke (RCTNativeModule.mm:104) 19 libdispatch.dylib 0x35da1c31c _dispatch_call_block_and_release 20 libdispatch.dylib 0x35da1dea8 _dispatch_client_callout 21 libdispatch.dylib 0x35da25530 _dispatch_lane_serial_drain 22 libdispatch.dylib 0x35da260a0 _dispatch_lane_invoke 23 libdispatch.dylib 0x35da30cd8 _dispatch_workloop_worker_thread 24 libsystem_pthread.dylib 0x40eb9cdd8 _pthread_wqthread 25 libsystem_pthread.dylib 0x40eb9cb78 start_wqthread

Thread 6 0 libsystem_kernel.dylib 0x3ccf0b18c __workq_kernreturn 1 libsystem_pthread.dylib 0x40eb9ce24 _pthread_wqthread

Thread 7 0 libsystem_kernel.dylib 0x3ccf0b18c __workq_kernreturn 1 libsystem_pthread.dylib 0x40eb9ce24 _pthread_wqthread

Thread 8 name: com.facebook.react.JavaScript 0 hermes 0x103218744 facebook::jsi::JSError::~JSError 1 hermes 0x1031fd718 facebook::jsi::JSError::~JSError 2 hermes 0x1031dfcfc facebook::jsi::JSError::~JSError 3 hermes 0x10328324c facebook::jsi::JSError::~JSError 4 hermes 0x1031df02c facebook::jsi::JSError::~JSError 5 hermes 0x1031fe25c facebook::jsi::JSError::~JSError 6 hermes 0x1031fd718 facebook::jsi::JSError::~JSError 7 hermes 0x1031df2d4 facebook::jsi::JSError::~JSError 8 hermes 0x1031ddbf0 facebook::jsi::JSError::~JSError 9 hermes 0x1032aef44 facebook::jsi::JSError::~JSError 10 hermes 0x1031df02c facebook::jsi::JSError::~JSError 11 hermes 0x1031fe25c facebook::jsi::JSError::~JSError 12 hermes 0x1031fd718 facebook::jsi::JSError::~JSError 13 hermes 0x1031df2d4 facebook::jsi::JSError::~JSError 14 hermes 0x1031deb3c facebook::jsi::JSError::~JSError 15 hermes 0x1031fe280 facebook::jsi::JSError::~JSError 16 hermes 0x1031fd718 facebook::jsi::JSError::~JSError 17 hermes 0x1031df2d4 facebook::jsi::JSError::~JSError 18 hermes 0x1031deb3c facebook::jsi::JSError::~JSError 19 hermes 0x1031c3ce0 facebook::hermes::HermesRuntime::rootsListLength 20 RunBuddyApp 0x200dea844 [inlined] facebook::jsi::RuntimeDecorator::call (decorator.h:337) 21 RunBuddyApp 0x200dea844 facebook::jsi::WithRuntimeDecorator::call (decorator.h:747) 22 RunBuddyApp 0x200e19648 [inlined] facebook::jsi::Function::call (jsi-inl.h:257) 23 RunBuddyApp 0x200e19648 [inlined] facebook::jsi::Function::call (jsi-inl.h:262) 24 RunBuddyApp 0x200e19648 [inlined] facebook::jsi::Function::call (jsi-inl.h:270) 25 RunBuddyApp 0x200e19648 facebook::react::JSIExecutor::invokeCallback (JSIExecutor.cpp:279) 26 RunBuddyApp 0x200dbda60 [inlined] std::1::function::value_func::operator()[abi:v15006] (function.h:512) 27 RunBuddyApp 0x200dbda60 [inlined] std::1::function::operator() (function.h:1197) 28 RunBuddyApp 0x200dbda60 [inlined] facebook::react::NativeToJsBridge::runOnExecutorQueue::lambda::operator() (NativeToJsBridge.cpp:310) 29 RunBuddyApp 0x200dbda60 [inlined] std::1::invoke[abi:v15006] (invoke.h:394) 30 RunBuddyApp 0x200dbda60 [inlined] std::1::__invoke_void_return_wrapper::call (invoke.h:479) 31 RunBuddyApp 0x200dbda60 [inlined] std::1::function::alloc_func::operator()[abi:v15006] (function.h:185) 32 RunBuddyApp 0x200dbda60 std::1::function::func::operator() (function.h:359) 33 RunBuddyApp 0x200d1a050 [inlined] std::1::function::value_func::operator()[abi:v15006] (function.h:512) 34 RunBuddyApp 0x200d1a050 [inlined] std::1::function::operator() (function.h:1197) 35 RunBuddyApp 0x200d1a050 facebook::react::tryAndReturnError (RCTCxxUtils.mm:74) 36 RunBuddyApp 0x200d25ef0 facebook::react::RCTMessageThread::tryFunc (RCTMessageThread.mm:69) 37 RunBuddyApp 0x200d25cc8 [inlined] std::1::function::__value_func::operator()[abi:v15006] (function.h:512) 38 RunBuddyApp 0x200d25cc8 [inlined] std::1::function::operator() (function.h:1197) 39 RunBuddyApp 0x200d25cc8 facebook::react::RCTMessageThread::runAsync (RCTMessageThread.mm:45) 40 CoreFoundation 0x34f0c56dc CFRUNLOOP_IS_CALLING_OUT_TO_A_BLOCK 41 CoreFoundation 0x34f12c20c CFRunLoopDoBlocks 42 CoreFoundation 0x34f0fc714 CFRunLoopRun 43 CoreFoundation 0x34f1013e8 CFRunLoopRunSpecific 44 RunBuddyApp 0x200d0fc24 +[RCTCxxBridge runRunLoop] (RCTCxxBridge.mm:336) 45 Foundation 0x343669540 NSThreadstart 46 libsystem_pthread.dylib 0x40eb9d6b4 _pthread_start

Thread 9 name: hades 0 libsystem_kernel.dylib 0x3ccf0b558 __psynch_cvwait 1 libsystem_pthread.dylib 0x40eba4074 _pthread_cond_wait 2 libc++.1.dylib 0x36bd08ef4 std::__1::condition_variable::wait 3 hermes 0x1032d4ca4 facebook::jsi::JSError::~JSError 4 hermes 0x1032d4a58 facebook::jsi::JSError::~JSError 5 libsystem_pthread.dylib 0x40eb9d6b4 _pthread_start

Thread 10 name: hermes-chrome-inspector-conn 0 libsystem_kernel.dylib 0x3ccf0b558 psynch_cvwait 1 libsystem_pthread.dylib 0x40eba4074 _pthread_cond_wait 2 libc++.1.dylib 0x36bd08ef4 std::__1::condition_variable::wait 3 RunBuddyApp 0x200e1558c [inlined] std::1::condition_variable::wait (mutex_base:398) 4 RunBuddyApp 0x200e1558c facebook::hermes::inspector::detail::SerialExecutor::runLoop (SerialExecutor.cpp:41) 5 RunBuddyApp 0x200dcf2c0 [inlined] std::1::invoke[abi:v15006] (invoke.h:394) 6 RunBuddyApp 0x200dcf2c0 [inlined] std::1::thread_execute[abi:v15006] (thread:290) 7 RunBuddyApp 0x200dcf2c0 std::1::__thread_proxy[abi:v15006] (thread:301) 8 libsystem_pthread.dylib 0x40eb9d6b4 _pthread_start

Thread 11 name: hermes-inspector 0 libsystem_kernel.dylib 0x3ccf0b558 psynch_cvwait 1 libsystem_pthread.dylib 0x40eba4074 _pthread_cond_wait 2 libc++.1.dylib 0x36bd08ef4 std::__1::condition_variable::wait 3 RunBuddyApp 0x200e1558c [inlined] std::1::condition_variable::wait (mutex_base:398) 4 RunBuddyApp 0x200e1558c facebook::hermes::inspector::detail::SerialExecutor::runLoop (SerialExecutor.cpp:41) 5 RunBuddyApp 0x200dcf2c0 [inlined] std::1::invoke[abi:v15006] (invoke.h:394) 6 RunBuddyApp 0x200dcf2c0 [inlined] std::1::thread_execute[abi:v15006] (thread:290) 7 RunBuddyApp 0x200dcf2c0 std::1::__thread_proxy[abi:v15006] (thread:301) 8 libsystem_pthread.dylib 0x40eb9d6b4 _pthread_start

Thread 12 0 libsystem_pthread.dylib 0x40eb9cb74 start_wqthread

Thread 13 name: com.apple.CoreMotion.MotionThread 0 libsystem_kernel.dylib 0x3ccf0ac84 mach_msg2_trap 1 libsystem_kernel.dylib 0x3ccf1db50 mach_msg2_internal 2 libsystem_kernel.dylib 0x3ccf1de28 mach_msg_overwrite 3 libsystem_kernel.dylib 0x3ccf0b1c4 mach_msg 4 CoreFoundation 0x34f0fb020 CFRunLoopServiceMachPort 5 CoreFoundation 0x34f0fc24c CFRunLoopRun 6 CoreFoundation 0x34f1013e8 CFRunLoopRunSpecific 7 CoreFoundation 0x34f143ea0 CFRunLoopRun 8 CoreMotion 0x365c75244 CLMotionActivity::isTypeInVehicle 9 libsystem_pthread.dylib 0x40eb9d6b4 _pthread_start

Thread 14 name: com.apple.NSURLConnectionLoader 0 libsystem_kernel.dylib 0x3ccf0ac84 mach_msg2_trap 1 libsystem_kernel.dylib 0x3ccf1db50 mach_msg2_internal 2 libsystem_kernel.dylib 0x3ccf1de28 mach_msg_overwrite 3 libsystem_kernel.dylib 0x3ccf0b1c4 mach_msg 4 CoreFoundation 0x34f0fb020 CFRunLoopServiceMachPort 5 CoreFoundation 0x34f0fc24c CFRunLoopRun 6 CoreFoundation 0x34f1013e8 CFRunLoopRunSpecific 7 CFNetwork 0x3512fd57c _CFURLStorageSessionDisableCache 8 Foundation 0x343669540 NSThreadstart__ 9 libsystem_pthread.dylib 0x40eb9d6b4 _pthread_start

Thread 15 name: AXSpeech 0 libsystem_kernel.dylib 0x3ccf0ac84 mach_msg2_trap 1 libsystem_kernel.dylib 0x3ccf1db50 mach_msg2_internal 2 libsystem_kernel.dylib 0x3ccf1de28 mach_msg_overwrite 3 libsystem_kernel.dylib 0x3ccf0b1c4 mach_msg 4 CoreFoundation 0x34f0fb020 CFRunLoopServiceMachPort 5 CoreFoundation 0x34f0fc24c CFRunLoopRun 6 CoreFoundation 0x34f1013e8 CFRunLoopRunSpecific 7 Foundation 0x34364ffd0 -[NSRunLoop(NSRunLoop) runMode:beforeDate:] 8 libAXSpeechManager.dylib 0x41e89338c -[AXSpeechThread main] 9 Foundation 0x343669540 NSThreadstart__ 10 libsystem_pthread.dylib 0x40eb9d6b4 _pthread_start

Thread 16 0 libsystem_kernel.dylib 0x3ccf0b18c __workq_kernreturn 1 libsystem_pthread.dylib 0x40eb9ce24 _pthread_wqthread

Thread 17 name: hades 0 libsystem_kernel.dylib 0x3ccf0b558 __psynch_cvwait 1 libsystem_pthread.dylib 0x40eba4074 _pthread_cond_wait 2 libc++.1.dylib 0x36bd08ef4 std::__1::condition_variable::wait 3 hermes 0x1032d4ca4 facebook::jsi::JSError::~JSError 4 hermes 0x1032d4a58 facebook::jsi::JSError::~JSError 5 libsystem_pthread.dylib 0x40eb9d6b4 _pthread_start

Thread 18 name: hermes-chrome-inspector-conn 0 libsystem_kernel.dylib 0x3ccf0b558 psynch_cvwait 1 libsystem_pthread.dylib 0x40eba4074 _pthread_cond_wait 2 libc++.1.dylib 0x36bd08ef4 std::__1::condition_variable::wait 3 RunBuddyApp 0x200e1558c [inlined] std::1::condition_variable::wait (mutex_base:398) 4 RunBuddyApp 0x200e1558c facebook::hermes::inspector::detail::SerialExecutor::runLoop (SerialExecutor.cpp:41) 5 RunBuddyApp 0x200dcf2c0 [inlined] std::1::invoke[abi:v15006] (invoke.h:394) 6 RunBuddyApp 0x200dcf2c0 [inlined] std::1::thread_execute[abi:v15006] (thread:290) 7 RunBuddyApp 0x200dcf2c0 std::1::__thread_proxy[abi:v15006] (thread:301) 8 libsystem_pthread.dylib 0x40eb9d6b4 _pthread_start

Thread 19 name: hermes-inspector 0 libsystem_kernel.dylib 0x3ccf0b558 psynch_cvwait 1 libsystem_pthread.dylib 0x40eba4074 _pthread_cond_wait 2 libc++.1.dylib 0x36bd08ef4 std::__1::condition_variable::wait 3 RunBuddyApp 0x200e1558c [inlined] std::1::condition_variable::wait (mutex_base:398) 4 RunBuddyApp 0x200e1558c facebook::hermes::inspector::detail::SerialExecutor::runLoop (SerialExecutor.cpp:41) 5 RunBuddyApp 0x200dcf2c0 [inlined] std::1::invoke[abi:v15006] (invoke.h:394) 6 RunBuddyApp 0x200dcf2c0 [inlined] std::1::thread_execute[abi:v15006] (thread:290) 7 RunBuddyApp 0x200dcf2c0 std::1::__thread_proxy[abi:v15006] (thread:301) 8 libsystem_pthread.dylib 0x40eb9d6b4 _pthread_start

Thread 20 0 libsystem_kernel.dylib 0x3ccf0b144 __semwait_signal 1 libsystem_c.dylib 0x35daad884 nanosleep 2 libsystem_c.dylib 0x35dabeb18 sleep 3 RunBuddyApp 0x200f94208 monitorCachedData (SentryCrashCachedData.c:145) 4 libsystem_pthread.dylib 0x40eb9d6b4 _pthread_start

Thread 21 name: SentryCrash Exception Handler (Secondary) 0 libsystem_kernel.dylib 0x3ccf0ac84 mach_msg2_trap 1 libsystem_kernel.dylib 0x3ccf1db50 mach_msg2_internal 2 libsystem_kernel.dylib 0x3ccf17860 thread_suspend 3 RunBuddyApp 0x200f9fefc handleExceptions (SentryCrashMonitor_MachException.c:306) 4 libsystem_pthread.dylib 0x40eb9d6b4 _pthread_start

Thread 22 name: SentryCrash Exception Handler (Primary) 0 libsystem_kernel.dylib 0x3ccf0ac84 mach_msg2_trap 1 libsystem_kernel.dylib 0x3ccf1db50 mach_msg2_internal 2 libsystem_kernel.dylib 0x3ccf1de28 mach_msg_overwrite 3 libsystem_kernel.dylib 0x3ccf0b1c4 mach_msg 4 RunBuddyApp 0x200f9ff28 handleExceptions (SentryCrashMonitor_MachException.c:314) 5 libsystem_pthread.dylib 0x40eb9d6b4 _pthread_start

Thread 23 name: io.sentry.app-hang-tracker 0 libsystem_kernel.dylib 0x3ccf0b144 semwait_signal 1 libsystem_c.dylib 0x35daad884 nanosleep 2 Foundation 0x3436c07c8 +[NSThread sleepForTimeInterval:] 3 RunBuddyApp 0x200f8475c -[SentryANRTracker detectANRs] (SentryANRTracker.m:104) 4 Foundation 0x343669540 NSThreadstart 5 libsystem_pthread.dylib 0x40eb9d6b4 _pthread_start

Thread 24 name: JavaScriptCore libpas scavenger 0 libsystem_kernel.dylib 0x3ccf0b558 __psynch_cvwait 1 libsystem_pthread.dylib 0x40eba4074 _pthread_cond_wait 2 JavaScriptCore 0x376000068 scavenger_thread_main 3 libsystem_pthread.dylib 0x40eb9d6b4 _pthread_start

EOF

RonRadtke commented 1 year ago

@walterholohan thank you. That's an issue not related to the event emitting. I'll have to take a look. I'm sorry I missed it completely. I only had the event emitting issue in my mind here. I'll move it to a new issue later so we can keep easier track of it. Do you by chance know if the issue only occurs for certain paths / encodings or in general?

walterholohan commented 1 year ago

Thank you. I think its only for the encoding but will double check later. This is the only place in the app where we use library

Duduzera1997 commented 1 year ago

@RonRadtke I was experiencing this problem, when I updated to version 0.19.2 the problem was resolved.

walterholohan commented 10 months ago

@RonRadtke can we reopen please? As I just updated from 0.16.4 to 0.19.5 and got the same crash as above

image
RonRadtke commented 10 months ago

@walterholohan does it crash on 0.19.6 as well?

walterholohan commented 10 months ago

Hey @RonRadtke , yep sorry I should have said 0.19.6. I got the same crash as a few months back. I.e. when trying to read a binary file from file storage

walterholohan commented 10 months ago

@chj-damon thanks for this. maybe that was my issue as I had the below headers. Just to clarify you had to include 'Tenant-Id' header?

image
chj-damon commented 10 months ago

@walterholohan I'm sorry that i made a mistake. it works fine

walterholohan commented 10 months ago

@RonRadtke can you reopen please?

walterholohan commented 10 months ago

I tried with above headers from @chj-damon but it still didn't work. Is it because my file I'm trying to upload as no filetype associated to it?

RonRadtke commented 10 months ago

I tried with above headers from @chj-damon but it still didn't work. Is it because my file I'm trying to upload as no filetype associated to it?

Can you try to download a file the same way that has a file type assosciated?

walterholohan commented 8 months ago

@RonRadtke do you think latest release will fix this issue?