Closed hmolotsi closed 3 years ago
What version of XCode are you using?
Version 12.1 (12A7403)
What version react-native-background-fetch
do you have installed?
2.5.4
React Native's auto-linking is problematic for dependencies, such as react-native-background-fetch
.
According to the package.json
for react-native-background-geolocation@3.9.1
, react-native-background-fetch@3.1.0
is required.
$ yarn add react-native-background-fetch@3.1.0
OK, thank you - I'll try that.
btw, react-native-background-geolocation 3.9.3
was released last Friday with important bug-fixes for requesting permission on both iOS and Android.
Thanks for letting me know!
Thanks again Chris. Closing since that looks like it solved the problem.
Your Environment
react-native -v
): 0.61.5Expected Behavior
App should track location
Actual Behavior
App sometimes crashes when tracking starts in background mode. Please note that crashes only started after upgrading plugin from 3.0.9 to 3.9.1 I'm so far unable to reproduce the crash in the simulator.
Crash: EXC_BAD_ACCESS KERN_INVALID_ADDRESS 0x0000000961746590 __51-[TSLocationManager startMonitoringBackgroundFetch]_block_invoke
Steps to Reproduce
Context
Debug logs
Logs
``` PASTE_YOUR_LOGS_HERE ``` Incident Identifier: 3D2A2516-19DA-4C89-A262-750FFC2AF59C Hardware Model: iPhone12,3 Process: Ujama [17471] Path: /private/var/containers/Bundle/Application/187672D7-960F-4C53-A064-19C88FA34656/Ujama.app/Ujama Identifier: co.ujama.app Version: 5 (3.50) AppStoreTools: 12A7604b AppVariant: 1:iPhone12,3:14 Beta: YES Code Type: ARM-64 (Native) Role: Non UI Parent Process: launchd [1] Coalition: co.ujama.app [9024] Date/Time: 2020-11-05 13:51:29.7889 -0800 Launch Time: 2020-11-05 13:13:43.1509 -0800 OS Version: iPhone OS 14.1 (18A8395) Release Type: User Baseband Version: 2.01.05 Report Version: 104 Exception Type: EXC_BAD_ACCESS (SIGSEGV) Exception Subtype: KERN_INVALID_ADDRESS at 0x0000000961746590 VM Region Info: 0x961746590 is not in any region. Bytes after previous region: 29015434641 Bytes before following region: 27356011120 REGION TYPE START - END [ VSIZE] PRT/MAX SHRMOD REGION DETAIL MALLOC_NANO 280000000-2a0000000 [512.0M] rw-/rwx SM=PRV ---> GAP OF 0xd20000000 BYTES commpage (reserved) fc0000000-1000000000 [ 1.0G] ---/--- SM=NUL ...(unallocated) Termination Signal: Segmentation fault: 11 Termination Reason: Namespace SIGNAL, Code 0xb Terminating Process: exc handler [17471] Triggered by Thread: 0 Thread 0 name: Thread 0 Crashed: 0 libobjc.A.dylib 0x000000019f6de010 objc_retain + 16 (objc-runtime-new.h:1585) 1 Ujama 0x0000000102ab63a4 __51-[TSLocationManager startMonitoringBackgroundFetch]_block_invoke + 36 (TSLocationManager.m:481) 2 Ujama 0x0000000102a9de24 -[TSBackgroundFetch performFetchWithCompletionHandler:applicationState:] + 432 (TSBackgroundFetch.m:155) 3 Ujama 0x00000001023ca63c -[AppDelegate(AppDelegate) application:performFetchWithCompletionHandler:] + 140 (RNBackgroundFetch+AppDelegate.m:19) 4 UIKitCore 0x000000018df0f490 -[UIApplication _handleNonLaunchSpecificActions:forScene:withTransitionContext:completion:] + 2292 (UIApplication.m:10162) 5 UIKitCore 0x000000018d3c51f0 -[UIScene _emitSceneSettingsUpdateResponseForCompletion:afterSceneUpdateWork:] + 492 (UIScene.m:1118) 6 UIKitCore 0x000000018d3c6370 -[UIScene scene:didUpdateWithDiff:transitionContext:completion:] + 248 (UIScene.m:1380) 7 UIKitCore 0x000000018da108f8 -[UIApplicationSceneClientAgent scene:handleEvent:withCompletion:] + 492 (UIApplicationSceneClientAgent.m:80) 8 FrontBoardServices 0x000000019a5bcb78 -[FBSScene updater:didUpdateSettings:withDiff:transitionContext:completion:] + 484 (FBSScene.m:547) 9 FrontBoardServices 0x000000019a5e8194 __94-[FBSWorkspaceScenesClient _queue_updateScene:withSettings:diff:transitionContext:completion:]_block_invoke_2 + 152 (FBSWorkspaceScenesClient.m:533) 10 FrontBoardServices 0x000000019a5cad24 -[FBSWorkspace _calloutQueue_executeCalloutFromSource:withBlock:] + 240 (FBSWorkspace.m:355) 11 FrontBoardServices 0x000000019a5e80c0 __94-[FBSWorkspaceScenesClient _queue_updateScene:withSettings:diff:transitionContext:completion:]_block_invoke + 384 (FBSWorkspaceScenesClient.m:532) 12 libdispatch.dylib 0x000000018b1d0ac8 _dispatch_client_callout + 20 (object.m:559) 13 libdispatch.dylib 0x000000018b1d4348 _dispatch_block_invoke_direct + 268 (queue.c:468) 14 FrontBoardServices 0x000000019a60e0e0 __FBSSERIALQUEUE_IS_CALLING_OUT_TO_A_BLOCK__ + 48 (FBSSerialQueue.m:184) 15 FrontBoardServices 0x000000019a60dd88 -[FBSSerialQueue _targetQueue_performNextIfPossible] + 448 (FBSSerialQueue.m:227) 16 FrontBoardServices 0x000000019a60e2ac -[FBSSerialQueue _performNextFromRunLoopSource] + 32 (FBSSerialQueue.m:258) 17 CoreFoundation 0x000000018b54f81c __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 28 (CFRunLoop.c:1967) 18 CoreFoundation 0x000000018b54f718 __CFRunLoopDoSource0 + 208 (CFRunLoop.c:2011) 19 CoreFoundation 0x000000018b54ea28 __CFRunLoopDoSources0 + 268 (CFRunLoop.c:2048) 20 CoreFoundation 0x000000018b548d20 __CFRunLoopRun + 824 (CFRunLoop.c:2925) 21 CoreFoundation 0x000000018b5484bc CFRunLoopRunSpecific + 600 (CFRunLoop.c:3242) 22 GraphicsServices 0x00000001a205a820 GSEventRunModal + 164 (GSEvent.c:2259) 23 UIKitCore 0x000000018def5164 -[UIApplication _run] + 1072 (UIApplication.m:3270) 24 UIKitCore 0x000000018defa840 UIApplicationMain + 168 (UIApplication.m:4739) 25 Ujama 0x00000001023cad2c main + 88 (main.m:16) 26 libdyld.dylib 0x000000018b20fe40 start + 4 Thread 1 name: Thread 1: 0 libsystem_kernel.dylib 0x00000001b7710dd0 mach_msg_trap + 8 1 libsystem_kernel.dylib 0x00000001b7710184 mach_msg + 76 (mach_msg.c:103) 2 CoreFoundation 0x000000018b54ecf8 __CFRunLoopServiceMachPort + 380 (CFRunLoop.c:2641) 3 CoreFoundation 0x000000018b548ea8 __CFRunLoopRun + 1216 (CFRunLoop.c:2974) 4 CoreFoundation 0x000000018b5484bc CFRunLoopRunSpecific + 600 (CFRunLoop.c:3242) 5 Foundation 0x000000018c7c9e30 -[NSRunLoop(NSRunLoop) runMode:beforeDate:] + 232 (NSRunLoop.m:374) 6 Foundation 0x000000018c7c9d08 -[NSRunLoop(NSRunLoop) runUntilDate:] + 92 (NSRunLoop.m:421) 7 UIKitCore 0x000000018dfa5a4c -[UIEventFetcher threadMain] + 516 (UIEventFetcher.m:836) 8 Foundation 0x000000018c9340f0 __NSThread__start__ + 864 (NSThread.m:724) 9 libsystem_pthread.dylib 0x00000001d34c1ca8 _pthread_start + 320 (pthread.c:880) 10 libsystem_pthread.dylib 0x00000001d34ca788 thread_start + 8 Thread 2 name: Thread 2: 0 libsystem_kernel.dylib 0x00000001b7710dd0 mach_msg_trap + 8 1 libsystem_kernel.dylib 0x00000001b7710184 mach_msg + 76 (mach_msg.c:103) 2 Ujama 0x000000010252ac40 FIRCLSMachExceptionReadMessage + 52 (FIRCLSMachException.c:194) 3 Ujama 0x000000010252ac40 FIRCLSMachExceptionServer + 1048 (FIRCLSMachException.c:170) 4 libsystem_pthread.dylib 0x00000001d34c1ca8 _pthread_start + 320 (pthread.c:880) 5 libsystem_pthread.dylib 0x00000001d34ca788 thread_start + 8 Thread 3 name: Thread 3: 0 libsystem_kernel.dylib 0x00000001b7710dd0 mach_msg_trap + 8 1 libsystem_kernel.dylib 0x00000001b7710184 mach_msg + 76 (mach_msg.c:103) 2 CoreFoundation 0x000000018b54ecf8 __CFRunLoopServiceMachPort + 380 (CFRunLoop.c:2641) 3 CoreFoundation 0x000000018b548ea8 __CFRunLoopRun + 1216 (CFRunLoop.c:2974) 4 CoreFoundation 0x000000018b5484bc CFRunLoopRunSpecific + 600 (CFRunLoop.c:3242) 5 Ujama 0x000000010275f4bc +[RCTCxxBridge runRunLoop] + 264 (RCTCxxBridge.mm:268) 6 Foundation 0x000000018c9340f0 __NSThread__start__ + 864 (NSThread.m:724) 7 libsystem_pthread.dylib 0x00000001d34c1ca8 _pthread_start + 320 (pthread.c:880) 8 libsystem_pthread.dylib 0x00000001d34ca788 thread_start + 8 Thread 4 name: Thread 4: 0 libsystem_kernel.dylib 0x00000001b773475c __psynch_cvwait + 8 1 libsystem_pthread.dylib 0x00000001d34c5550 _pthread_cond_wait + 1192 (pthread_cond.c:636) 2 libc++.1.dylib 0x000000019f75ec8c std::__1::condition_variable::wait(std::__1::unique_lock