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

Crashing with 5.0.0 / Lastest commit hash on iOS #121

Closed
dgoenka opened this issue Jan 15, 2019 · 2 comments
Closed

Crashing with 5.0.0 / Lastest commit hash on iOS #121

dgoenka opened this issue Jan 15, 2019 · 2 comments

Comments

@dgoenka
Copy link

dgoenka commented Jan 15, 2019

My app is constantly crashing on specifically calling the startUpload method on iOS.

From the logs I'm able to get this:

 *** Terminating app due to uncaught exception of class '__NSCFConstantString'
libc++abi.dylib: terminating with uncaught exception of type __NSCFConstantString

I would love to use your library given the features it can offer. Please help, thanks.

@dgoenka
Copy link
Author

dgoenka commented Jan 15, 2019

For what its worth I got this crash log as well:

screenshot at jan 15 17-31-20

#0	0x00000001811e7104 in __pthread_kill ()
#1	0x0000000181262070 in pthread_kill$VARIANT$mp ()
#2	0x000000018113ed78 in abort ()
#3	0x0000000180808f78 in abort_message ()
#4	0x0000000180809120 in default_terminate_handler() ()
#5	0x0000000180821e48 in _objc_terminate() ()
#6	0x00000001808150fc in std::__terminate(void (*)()) ()
#7	0x0000000180815188 in std::terminate() ()
#8	0x0000000180821da4 in objc_terminate ()
#9	0x0000000103404ddc in _dispatch_client_callout ()
#10	0x000000010340ce6c in _dispatch_lane_serial_drain ()
#11	0x000000010340db60 in _dispatch_lane_invoke ()
#12	0x0000000103417bfc in _dispatch_workloop_worker_thread ()
#13	0x000000018126c0dc in _pthread_wqthread ()
#14	0x000000018126ecec in start_wqthread ()
Enqueued from com.apple.root.default-qos.overcommit (Thread 13) Queue : com.apple.root.default-qos.overcommit (serial)
#0	0x0000000103409c08 in dispatch_async ()
#1	0x000000010254d298 in facebook::react::RCTNativeModule::invoke(unsigned int, folly::dynamic&&, int) at /Users/dgoenka/ReactNativeProjects/VedaryReactNative/VedaryReactNative/node_modules/react-native/React/CxxModule/RCTNativeModule.mm:79
#2	0x00000001025f3ca0 in facebook::react::ModuleRegistry::callNativeMethod(unsigned int, unsigned int, folly::dynamic&&, int) at /Users/dgoenka/ReactNativeProjects/VedaryReactNative/VedaryReactNative/node_modules/react-native/ReactCommon/cxxreact/ModuleRegistry.cpp:157
#3	0x000000010262b034 in facebook::react::JsToNativeBridge::callNativeModules(facebook::react::JSExecutor&, folly::dynamic&&, bool) at /Users/dgoenka/ReactNativeProjects/VedaryReactNative/VedaryReactNative/node_modules/react-native/ReactCommon/cxxreact/NativeToJsBridge.cpp:52
#4	0x00000001026153c8 in facebook::react::JSCExecutor::flushQueueImmediate(facebook::react::Value&&) at /Users/dgoenka/ReactNativeProjects/VedaryReactNative/VedaryReactNative/node_modules/react-native/ReactCommon/cxxreact/JSCExecutor.cpp:703
#5	0x00000001026161b4 in facebook::react::JSCExecutor::nativeFlushQueueImmediate(unsigned long, OpaqueJSValue const* const*) at /Users/dgoenka/ReactNativeProjects/VedaryReactNative/VedaryReactNative/node_modules/react-native/ReactCommon/cxxreact/JSCExecutor.cpp:756
#6	0x000000010261ad0c in OpaqueJSValue const* (*facebook::react::(anonymous namespace)::exceptionWrapMethod<&(facebook::react::JSCExecutor::nativeFlushQueueImmediate(unsigned long, OpaqueJSValue const* const*))>())(OpaqueJSContext const*, OpaqueJSValue*, OpaqueJSValue*, unsigned long, OpaqueJSValue const* const*, OpaqueJSValue const**)::funcWrapper::call(OpaqueJSContext const*, OpaqueJSValue*, OpaqueJSValue*, unsigned long, OpaqueJSValue const* const*, OpaqueJSValue const**) at /Users/dgoenka/ReactNativeProjects/VedaryReactNative/VedaryReactNative/node_modules/react-native/ReactCommon/cxxreact/JSCExecutor.cpp:68
#7	0x00000001889b1d30 in long long JSC::APICallbackFunction::call<JSC::JSCallbackFunction>(JSC::ExecState*) ()
#8	0x0000000188990930 in llint_entry ()
#9	0x000000018898fd8c in llint_entry ()
#10	0x000000018898fd8c in llint_entry ()
#11	0x000000018898fd8c in llint_entry ()
#12	0x000000018898fd24 in llint_entry ()
#13	0x000000018898fd24 in llint_entry ()
#14	0x0000000188990138 in llint_entry ()
#15	0x000000018898fd8c in llint_entry ()
#16	0x000000018898fd8c in llint_entry ()
#17	0x000000018898fd8c in llint_entry ()
#18	0x000000018898fd24 in llint_entry ()
#19	0x000000018898fd8c in llint_entry ()
#20	0x000000018898fd24 in llint_entry ()
#21	0x000000018898fd8c in llint_entry ()
#22	0x000000018898fd8c in llint_entry ()
#23	0x000000018898fd24 in llint_entry ()
#24	0x000000018898fd8c in llint_entry ()
#25	0x000000018898fd24 in llint_entry ()
#26	0x000000018898fd24 in llint_entry ()
#27	0x0000000188988654 in vmEntryToJavaScript ()
#28	0x0000000189000070 in JSC::Interpreter::executeCall(JSC::ExecState*, JSC::JSObject*, JSC::CallType, JSC::CallData const&, JSC::JSValue, JSC::ArgList const&) ()
#29	0x0000000189231508 in JSC::boundThisNoArgsFunctionCall(JSC::ExecState*) ()
#30	0x0000000188990804 in llint_entry ()
#31	0x000000018898fd24 in llint_entry ()
#32	0x000000018898fd24 in llint_entry ()
#33	0x000000018898fd8c in llint_entry ()
#34	0x000000018898fd24 in llint_entry ()
#35	0x0000000188988654 in vmEntryToJavaScript ()
#36	0x0000000189000070 in JSC::Interpreter::executeCall(JSC::ExecState*, JSC::JSObject*, JSC::CallType, JSC::CallData const&, JSC::JSValue, JSC::ArgList const&) ()
#37	0x0000000189231508 in JSC::boundThisNoArgsFunctionCall(JSC::ExecState*) ()
#38	0x0000000188990804 in llint_entry ()
#39	0x0000000188988654 in vmEntryToJavaScript ()
#40	0x0000000189000070 in JSC::Interpreter::executeCall(JSC::ExecState*, JSC::JSObject*, JSC::CallType, JSC::CallData const&, JSC::JSValue, JSC::ArgList const&) ()
#41	0x0000000189231508 in JSC::boundThisNoArgsFunctionCall(JSC::ExecState*) ()
#42	0x00000001889887cc in vmEntryToNative ()
#43	0x00000001890000cc in JSC::Interpreter::executeCall(JSC::ExecState*, JSC::JSObject*, JSC::CallType, JSC::CallData const&, JSC::JSValue, JSC::ArgList const&) ()
#44	0x00000001891b6a2c in JSC::profiledCall(JSC::ExecState*, JSC::ProfilingReason, JSC::JSValue, JSC::CallType, JSC::CallData const&, JSC::JSValue, JSC::ArgList const&) ()
#45	0x00000001889be02c in JSObjectCallAsFunction ()
#46	0x000000010258e2c8 in facebook::react::Object::callAsFunction(OpaqueJSValue*, int, OpaqueJSValue const* const*) const at /Users/dgoenka/ReactNativeProjects/VedaryReactNative/VedaryReactNative/node_modules/react-native/ReactCommon/jschelpers/Value.cpp:228
#47	0x000000010258e248 in facebook::react::Object::callAsFunction(std::initializer_list<OpaqueJSValue const*>) const at /Users/dgoenka/ReactNativeProjects/VedaryReactNative/VedaryReactNative/node_modules/react-native/ReactCommon/jschelpers/Value.cpp:211
#48	0x0000000102614ae0 in facebook::react::JSCExecutor::invokeCallback(double, folly::dynamic const&)::$_4::operator()() const at /Users/dgoenka/ReactNativeProjects/VedaryReactNative/VedaryReactNative/node_modules/react-native/ReactCommon/cxxreact/JSCExecutor.cpp:634
#49	0x0000000102614914 in facebook::react::JSCExecutor::invokeCallback(double, folly::dynamic const&) at /Users/dgoenka/ReactNativeProjects/VedaryReactNative/VedaryReactNative/node_modules/react-native/ReactCommon/cxxreact/JSCExecutor.cpp:628
#50	0x000000010263160c in facebook::react::NativeToJsBridge::invokeCallback(double, folly::dynamic&&)::$_2::operator()(facebook::react::JSExecutor*) const at /Users/dgoenka/ReactNativeProjects/VedaryReactNative/VedaryReactNative/node_modules/react-native/ReactCommon/cxxreact/NativeToJsBridge.cpp:195
#51	0x00000001026314dc in decltype(std::__1::forward<facebook::react::NativeToJsBridge::invokeCallback(double, folly::dynamic&&)::$_2&>(fp)(std::__1::forward<facebook::react::JSExecutor*>(fp0))) std::__1::__invoke<facebook::react::NativeToJsBridge::invokeCallback(double, folly::dynamic&&)::$_2&, facebook::react::JSExecutor*>(facebook::react::NativeToJsBridge::invokeCallback(double, folly::dynamic&&)::$_2&&&, facebook::react::JSExecutor*&&) [inlined] at /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/type_traits:4428
#52	0x00000001026314bc in void std::__1::__invoke_void_return_wrapper<void>::__call<facebook::react::NativeToJsBridge::invokeCallback(double, folly::dynamic&&)::$_2&, facebook::react::JSExecutor*>(facebook::react::NativeToJsBridge::invokeCallback(double, folly::dynamic&&)::$_2&&&, facebook::react::JSExecutor*&&) at /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/__functional_base:349
#53	0x0000000102631114 in std::__1::__function::__func<facebook::react::NativeToJsBridge::invokeCallback(double, folly::dynamic&&)::$_2, std::__1::allocator<facebook::react::NativeToJsBridge::invokeCallback(double, folly::dynamic&&)::$_2>, void (facebook::react::JSExecutor*)>::operator()(facebook::react::JSExecutor*&&) at /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/functional:1562
#54	0x00000001026379fc in std::__1::function<void (facebook::react::JSExecutor*)>::operator()(facebook::react::JSExecutor*) const at /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/functional:1913
#55	0x0000000102637974 in facebook::react::NativeToJsBridge::runOnExecutorQueue(std::__1::function<void (facebook::react::JSExecutor*)>)::$_7::operator()() const at /Users/dgoenka/ReactNativeProjects/VedaryReactNative/VedaryReactNative/node_modules/react-native/ReactCommon/cxxreact/NativeToJsBridge.cpp:255
#56	0x00000001026378fc in decltype(std::__1::forward<facebook::react::NativeToJsBridge::runOnExecutorQueue(std::__1::function<void (facebook::react::JSExecutor*)>)::$_7&>(fp)(std::__1::forward<>(fp0))) std::__1::__invoke<facebook::react::NativeToJsBridge::runOnExecutorQueue(std::__1::function<void (facebook::react::JSExecutor*)>)::$_7&>(facebook::react::NativeToJsBridge::runOnExecutorQueue(std::__1::function<void (facebook::react::JSExecutor*)>)::$_7&&&) [inlined] at /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/type_traits:4428
#57	0x00000001026378ec in void std::__1::__invoke_void_return_wrapper<void>::__call<facebook::react::NativeToJsBridge::runOnExecutorQueue(std::__1::function<void (facebook::react::JSExecutor*)>)::$_7&>(facebook::react::NativeToJsBridge::runOnExecutorQueue(std::__1::function<void (facebook::react::JSExecutor*)>)::$_7&&&) at /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/__functional_base:349
#58	0x0000000102637360 in std::__1::__function::__func<facebook::react::NativeToJsBridge::runOnExecutorQueue(std::__1::function<void (facebook::react::JSExecutor*)>)::$_7, std::__1::allocator<facebook::react::NativeToJsBridge::runOnExecutorQueue(std::__1::function<void (facebook::react::JSExecutor*)>)::$_7>, void ()>::operator()() at /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/functional:1562
#59	0x0000000102490e28 in std::__1::function<void ()>::operator()() const at /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/functional:1913
#60	0x0000000102490b44 in facebook::react::tryAndReturnError(std::__1::function<void ()> const&) at /Users/dgoenka/ReactNativeProjects/VedaryReactNative/VedaryReactNative/node_modules/react-native/React/CxxModule/RCTCxxUtils.mm:95
#61	0x0000000102479558 in facebook::react::RCTMessageThread::tryFunc(std::__1::function<void ()> const&) at /Users/dgoenka/ReactNativeProjects/VedaryReactNative/VedaryReactNative/node_modules/react-native/React/CxxBridge/RCTMessageThread.mm:60
#62	0x000000010247d06c in facebook::react::RCTMessageThread::runOnQueue(std::__1::function<void ()>&&)::$_1::operator()() const at /Users/dgoenka/ReactNativeProjects/VedaryReactNative/VedaryReactNative/node_modules/react-native/React/CxxBridge/RCTMessageThread.mm:73
#63	0x000000010247cf98 in decltype(std::__1::forward<facebook::react::RCTMessageThread::runOnQueue(std::__1::function<void ()>&&)::$_1&>(fp)(std::__1::forward<>(fp0))) std::__1::__invoke<facebook::react::RCTMessageThread::runOnQueue(std::__1::function<void ()>&&)::$_1&>(facebook::react::RCTMessageThread::runOnQueue(std::__1::function<void ()>&&)::$_1&&&) [inlined] at /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/type_traits:4428
#64	0x000000010247cf88 in void std::__1::__invoke_void_return_wrapper<void>::__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/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/__functional_base:349
#65	0x000000010247cb68 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/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/functional:1562
#66	0x0000000102490e28 in std::__1::function<void ()>::operator()() const at /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/functional:1913
#67	0x00000001024792b8 in ::___ZN8facebook5react16RCTMessageThread8runAsyncENSt3__18functionIFvvEEE_block_invoke() at /Users/dgoenka/ReactNativeProjects/VedaryReactNative/VedaryReactNative/node_modules/react-native/React/CxxBridge/RCTMessageThread.mm:40
#68	0x00000001815e001c in __CFRUNLOOP_IS_CALLING_OUT_TO_A_BLOCK__ ()
#69	0x00000001815df91c in __CFRunLoopDoBlocks ()
#70	0x00000001815dae34 in __CFRunLoopRun ()
#71	0x00000001815da1cc in CFRunLoopRunSpecific ()
#72	0x0000000102422cd0 in ::+[RCTCxxBridge runRunLoop]() at /Users/dgoenka/ReactNativeProjects/VedaryReactNative/VedaryReactNative/node_modules/react-native/React/CxxBridge/RCTCxxBridge.mm:252
#73	0x00000001821021ac in __NSThread__start__ ()
#74	0x000000018126b2ac in _pthread_body ()
#75	0x000000018126b20c in _pthread_start ()
#76	0x000000018126ecf4 in thread_start ()

@StevePotter
Copy link
Contributor

@dgoenka I'm sorry, but I can't offer much help here. It could be a million things, like the combination of packages you are using. Nothing from the stacktrace tells me much information. Sorry, but I have to close this because there isn't anything for me to go on. I suggest trying with a fresh project, or upgrade some package versions, start pulling out npm packages one-by-one until the error goes away, or try to get more information from the crash.

reime005 pushed a commit that referenced this issue Mar 22, 2020
Due to NSURL checking compliance with RFC 2396 while parsing the url, sometimes when the URL is not compilant with the RFC it is considered `nil` and code throws this error. The problem is that this error is not caught anywhere, therefore crashing with a very unhelpful stack trace, as seen here: #121
benjamin777dev pushed a commit to benjamin777dev/react-native-upload that referenced this issue Jun 10, 2024
Due to NSURL checking compliance with RFC 2396 while parsing the url, sometimes when the URL is not compilant with the RFC it is considered `nil` and code throws this error. The problem is that this error is not caught anywhere, therefore crashing with a very unhelpful stack trace, as seen here: Vydia/react-native-background-upload#121
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants