Closed Yrsafam closed 3 years ago
In my case it was fixed httpHeader: 'Access-Control-Allow-Credentials': true -> 'Access-Control-Allow-Credentials': 'true'. Previously, I removed this header altogether and the problem persisted...
Wow this issue is old.
Your Environment
Context
when you try to initialize the library on ios, the app crashes. I apply the Call stack from XCode. I would be grateful for at least a hint in which direction to look. The problem is only on ios. Works on android.
}
componentWillUnmount() { // unregister all event listeners BackgroundGeolocation.removeAllListeners(); } render() { return <></>; } }
export default BgTracking; `
Expected Behavior
Actual Behavior
Possible Fix
Steps to Reproduce
1. 2. 3. 4.
Context
Debug logs
2020-09-24 14:25:05.359950+0700 StayHome[17874:281546] Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[__NSCFBoolean length]: unrecognized selector sent to instance 0x7fff80634318' First throw call stack: ( 0 CoreFoundation 0x00007fff23e3cf0e exceptionPreprocess + 350 1 libobjc.A.dylib 0x00007fff50ba89b2 objc_exception_throw + 48 2 CoreFoundation 0x00007fff23e5dc34 -[NSObject(NSObject) doesNotRecognizeSelector:] + 132 3 CoreFoundation 0x00007fff23e4190c __forwarding + 1436 4 CoreFoundation 0x00007fff23e43bf8 _CF_forwarding_prep_0 + 120 5 CFNetwork 0x00007fff23115bbb _CFHTTPServerResponseEnqueue + 42745 6 CFNetwork 0x00007fff2300c121 _CFStreamErrorFromCFError + 7271 7 CFNetwork 0x00007fff22fa13ba CFURLRequestAppendHTTPHeaderFieldValue + 229 8 StayHome 0x0000000102e0f471 -[MAURPostLocationTask post:toUrl:withTemplate:withHttpHeaders:error:] + 1025 9 StayHome 0x0000000102e0ebab __28-[MAURPostLocationTask add:]_block_invoke + 891 10 libdispatch.dylib 0x0000000106737f11 _dispatch_call_block_and_release + 12 11 libdispatch.dylib 0x0000000106738e8e _dispatch_client_callout + 8 12 libdispatch.dylib 0x000000010674a56d _dispatch_root_queue_drain + 819 13 libdispatch.dylib 0x000000010674aca6 _dispatch_worker_thread2 + 135 14 libsystem_pthread.dylib 0x00007fff51c089f7 _pthread_wqthread + 220 15 libsystem_pthread.dylib 0x00007fff51c07b77 start_wqthread + 15 ) libc++abi.dylib: terminating with uncaught exception of type NSException (lldb)