This repository was archived by the owner on Mar 16, 2019. It is now read-only.
This repository was archived by the owner on Mar 16, 2019. It is now read-only.
Crashes at first request using fetch() polyfill #288
Closed
Description
I'm using RN=0.42 and the latest version of this lib, testing on iOS simulator.
We're using the "fetch polyfill" approach mentioned at https://github.com/wkh237/react-native-fetch-blob/wiki/Fetch-API#fetch-replacement.
As soon as we call fetch() with a HTTPs url, it crashes. From the logs, it appears to be a native exception, and I'm not quite sure what's wrong, but I imagine the authors of this lib will know.
Logs:
*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[__NSCFNumber length]: unrecognized selector sent to instance 0xb000000000000073'
*** First throw call stack:
(
0 CoreFoundation 0x0000000109517d4b __exceptionPreprocess + 171
1 libobjc.A.dylib 0x0000000107e5421e objc_exception_throw + 48
2 CoreFoundation 0x0000000109587f04 -[NSObject(NSObject) doesNotRecognizeSelector:] + 132
3 CoreFoundation 0x000000010949d005 ___forwarding___ + 1013
4 CoreFoundation 0x000000010949cb88 _CF_forwarding_prep_0 + 120
5 CFNetwork 0x0000000108d28731 _ZN15HTTPHeaderValue7isValidEPK10__CFString + 19
6 CFNetwork 0x0000000108d2868d _ZN11HTTPMessage25setHeaderFieldStringValueEPK10__CFStringS2_ + 41
7 CFNetwork 0x0000000108d30a45 _ZN11HTTPMessage23setMultipleHeaderFieldsEPK14__CFDictionary + 127
8 CFNetwork 0x0000000108da8248 CFURLRequestSetMultipleHTTPHeaderFields + 123
9 Stardust 0x00000001070ba164 __85+[RNFetchBlobReqBuilder buildOctetRequest:taskId:method:url:headers:body:onComplete:]_block_invoke + 4660
10 libdispatch.dylib 0x000000010db7e808 _dispatch_call_block_and_release + 12
11 libdispatch.dylib 0x000000010dba012e _dispatch_client_callout + 8
12 libdispatch.dylib 0x000000010db87bd2 _dispatch_root_queue_drain + 1008
13 libdispatch.dylib 0x000000010db87782 _dispatch_worker_thread3 + 113
14 libsystem_pthread.dylib 0x000000010df464de _pthread_wqthread + 1129
15 libsystem_pthread.dylib 0x000000010df44341 start_wqthread + 13