transistorsoft / react-native-background-geolocation

Sophisticated, battery-conscious background-geolocation with motion-detection
http://shop.transistorsoft.com/pages/react-native-background-geolocation
MIT License
2.55k stars 425 forks source link

Crash on ready() on latest version #1048

Closed brianfitzgerald closed 3 years ago

brianfitzgerald commented 4 years ago

The app crashes with "Thread 14: Exception: "data parameter is nil" when ready() is called/

Your Environment

Expected Behavior

The app should launch and run

Actual Behavior

The app crashes when calling ready() in a simulator.

Steps to Reproduce

  1. Add geolocation and background-fetch
  2. pod install
  3. call ready with
BackgroundGeolocation.ready(
            {
                desiredAccuracy: BackgroundGeolocation.DESIRED_ACCURACY_HIGH,
                distanceFilter: 10,
                stopTimeout: 1,
                debug: false,
                logLevel: BackgroundGeolocation.LOG_LEVEL_VERBOSE,
                stopOnTerminate: true,
                startOnBoot: false,
                url: arePingsEnabled ? AbstractDataSource.getUrl("/ping") : null,
                batchSync: false,
                autoSync: true,
                headers: {
                    Authorization: `Bearer ${token}`,
                },
                params: {
                    "device-uuid": deviceId,
                },
                locationAuthorizationRequest: "Always",
                locationAuthorizationAlert: {
                    titleWhenNotEnabled: "<value here>",
                    titleWhenOff: "<value here>",
                    instructions: "<value here>",
                    cancelButton: "<value here>",
                    settingsButton: "<value here>",
                },
            }

Debug logs

Logs ``` 0x105e29ecd <+0>: pushq %rbp 0x105e29ece <+1>: movq %rsp, %rbp 0x105e29ed1 <+4>: pushq %r15 0x105e29ed3 <+6>: pushq %r14 0x105e29ed5 <+8>: pushq %r13 0x105e29ed7 <+10>: pushq %r12 0x105e29ed9 <+12>: pushq %rbx 0x105e29eda <+13>: subq $0x38, %rsp 0x105e29ede <+17>: movq %rdi, %r13 0x105e29ee1 <+20>: movq %rdx, %rdi 0x105e29ee4 <+23>: callq *0x2f7506(%rip) ; (void *)0x000000010d77fc60: objc_retain 0x105e29eea <+29>: movq %rax, %r15 0x105e29eed <+32>: leaq 0x3403b4(%rip), %rdi ; kDispatchQueueSpecificKey 0x105e29ef4 <+39>: callq 0x105e3d6a8 ; symbol stub for: dispatch_get_specific 0x105e29ef9 <+44>: movq %rax, %rdi 0x105e29efc <+47>: callq 0x105e3ddb6 ; symbol stub for: objc_retainAutoreleasedReturnValue 0x105e29f01 <+52>: cmpq %r13, %rax 0x105e29f04 <+55>: je 0x105e29f81 ; <+180> at TSDatabaseQueue.m:185:5 0x105e29f06 <+57>: movq %rax, %r14 0x105e29f09 <+60>: movq 0x8(%r13), %r12 0x105e29f0d <+64>: movq 0x2f5a7c(%rip), %rax ; (void *)0x000000010f8eb030: _NSConcreteStackBlock 0x105e29f14 <+71>: leaq -0x58(%rbp), %rbx 0x105e29f18 <+75>: movq %rax, (%rbx) 0x105e29f1b <+78>: movl $0xc2000000, %eax ; imm = 0xC2000000 0x105e29f20 <+83>: movq %rax, 0x8(%rbx) 0x105e29f24 <+87>: leaq 0x5b(%rip), %rax ; __30-[TSDatabaseQueue inDatabase:]_block_invoke at TSDatabaseQueue.m:190 0x105e29f2b <+94>: movq %rax, 0x10(%rbx) 0x105e29f2f <+98>: leaq 0x2fff5a(%rip), %rax ; __block_descriptor_48_e8_32s40bs_e5_v8?0l 0x105e29f36 <+105>: movq %rax, 0x18(%rbx) 0x105e29f3a <+109>: movq %r13, 0x20(%rbx) 0x105e29f3e <+113>: movq %r15, 0x28(%rbx) 0x105e29f42 <+117>: movq %r15, %rdi 0x105e29f45 <+120>: callq *0x2f74a5(%rip) ; (void *)0x000000010d77fc60: objc_retain 0x105e29f4b <+126>: movq %rax, %r15 0x105e29f4e <+129>: movq %r12, %rdi 0x105e29f51 <+132>: movq %rbx, %rsi 0x105e29f54 <+135>: callq 0x105e3d762 ; symbol stub for: dispatch_sync -> 0x105e29f59 <+140>: movq 0x28(%rbx), %rdi Thread 14: Exception: "data parameter is nil" 0x105e29f5d <+144>: movq 0x2f7484(%rip), %rbx ; (void *)0x000000010d77f940: objc_release 0x105e29f64 <+151>: callq *%rbx 0x105e29f66 <+153>: movq %r15, %rdi 0x105e29f69 <+156>: callq *%rbx 0x105e29f6b <+158>: movq %r14, %rdi 0x105e29f6e <+161>: movq %rbx, %rax 0x105e29f71 <+164>: addq $0x38, %rsp 0x105e29f75 <+168>: popq %rbx 0x105e29f76 <+169>: popq %r12 0x105e29f78 <+171>: popq %r13 0x105e29f7a <+173>: popq %r14 0x105e29f7c <+175>: popq %r15 0x105e29f7e <+177>: popq %rbp 0x105e29f7f <+178>: jmpq *%rax 0x105e29f81 <+180>: callq 0x105e37efb ; -[TSDatabaseQueue inDatabase:].cold.1 0x105e0fcc4 <+0>: pushq %rbp 0x105e0fcc5 <+1>: movq %rsp, %rbp 0x105e0fcc8 <+4>: pushq %r15 0x105e0fcca <+6>: pushq %r14 0x105e0fccc <+8>: pushq %r12 0x105e0fcce <+10>: pushq %rbx 0x105e0fccf <+11>: subq $0x60, %rsp 0x105e0fcd3 <+15>: movq %rdi, %r14 0x105e0fcd6 <+18>: xorl %eax, %eax 0x105e0fcd8 <+20>: leaq -0x50(%rbp), %r12 0x105e0fcdc <+24>: movq %rax, (%r12) 0x105e0fce0 <+28>: movq %r12, 0x8(%r12) 0x105e0fce5 <+33>: movabsq $0x3032000000, %rcx ; imm = 0x3032000000 0x105e0fcef <+43>: movq %rcx, 0x10(%r12) 0x105e0fcf4 <+48>: leaq 0x121(%rip), %rcx ; __Block_byref_object_dispose_ at LocationDAO.m:451 0x105e0fcfb <+55>: movq %rcx, %xmm0 0x105e0fd00 <+60>: leaq 0xff(%rip), %rcx ; __Block_byref_object_copy_ at LocationDAO.m:451 0x105e0fd07 <+67>: movq %rcx, %xmm1 0x105e0fd0c <+72>: punpcklqdq %xmm0, %xmm1 ; xmm1 = xmm1[0],xmm0[0] 0x105e0fd10 <+76>: movdqu %xmm1, 0x18(%r12) 0x105e0fd17 <+83>: movq %rax, 0x28(%r12) 0x105e0fd1c <+88>: movq 0x6270a5(%rip), %rdi ; (void *)0x000000010647f258: DatabaseQueue 0x105e0fd23 <+95>: movq 0x5fedb6(%rip), %rsi ; "sharedInstance" 0x105e0fd2a <+102>: callq *0x311690(%rip) ; (void *)0x000000010d765400: objc_msgSend 0x105e0fd30 <+108>: movq %rax, %rdi 0x105e0fd33 <+111>: callq 0x105e3ddb6 ; symbol stub for: objc_retainAutoreleasedReturnValue 0x105e0fd38 <+116>: movq %rax, %r15 0x105e0fd3b <+119>: movq 0x60a17e(%rip), %rsi ; "queue" 0x105e0fd42 <+126>: movq %rax, %rdi 0x105e0fd45 <+129>: callq *0x311675(%rip) ; (void *)0x000000010d765400: objc_msgSend 0x105e0fd4b <+135>: movq %rax, %rdi 0x105e0fd4e <+138>: callq 0x105e3ddb6 ; symbol stub for: objc_retainAutoreleasedReturnValue 0x105e0fd53 <+143>: movq %rax, %rbx 0x105e0fd56 <+146>: movq 0x30fc33(%rip), %rax ; (void *)0x000000010f8eb030: _NSConcreteStackBlock 0x105e0fd5d <+153>: leaq -0x80(%rbp), %rdx 0x105e0fd61 <+157>: movq %rax, (%rdx) 0x105e0fd64 <+160>: movl $0xc2000000, %eax ; imm = 0xC2000000 0x105e0fd69 <+165>: movq %rax, 0x8(%rdx) 0x105e0fd6d <+169>: leaq 0xb7(%rip), %rax ; __20-[LocationDAO first]_block_invoke at LocationDAO.m:454 0x105e0fd74 <+176>: movq %rax, 0x10(%rdx) 0x105e0fd78 <+180>: leaq 0x35a0e1(%rip), %rax ; __block_descriptor_48_e8_32s40r_e20_v16?0"TSDatabase"8l 0x105e0fd7f <+187>: movq %rax, 0x18(%rdx) 0x105e0fd83 <+191>: movq %r12, 0x28(%rdx) 0x105e0fd87 <+195>: movq %r14, 0x20(%rdx) 0x105e0fd8b <+199>: movq 0x62143e(%rip), %rsi ; "inDatabase:" 0x105e0fd92 <+206>: movq %rbx, %rdi 0x105e0fd95 <+209>: callq *0x311625(%rip) ; (void *)0x000000010d765400: objc_msgSend -> 0x105e0fd9b <+215>: movq 0x311646(%rip), %r12 ; (void *)0x000000010d77f940: objc_release 0x105e0fda2 <+222>: movq %rbx, %rdi 0x105e0fda5 <+225>: callq *%r12 0x105e0fda8 <+228>: leaq -0x50(%rbp), %r14 0x105e0fdac <+232>: movq 0x8(%r14), %rax 0x105e0fdb0 <+236>: movq 0x28(%rax), %rdi 0x105e0fdb4 <+240>: callq *0x311636(%rip) ; (void *)0x000000010d77fc60: objc_retain 0x105e0fdba <+246>: movq %rax, %rbx 0x105e0fdbd <+249>: movq %r15, %rdi 0x105e0fdc0 <+252>: callq *%r12 0x105e0fdc3 <+255>: movq %r14, %rdi 0x105e0fdc6 <+258>: movl $0x8, %esi 0x105e0fdcb <+263>: callq 0x105e38a8e ; symbol stub for: _Block_object_dispose 0x105e0fdd0 <+268>: movq 0x28(%r14), %rdi 0x105e0fdd4 <+272>: callq *%r12 0x105e0fdd7 <+275>: movq %rbx, %rdi 0x105e0fdda <+278>: addq $0x60, %rsp 0x105e0fdde <+282>: popq %rbx 0x105e0fddf <+283>: popq %r12 0x105e0fde1 <+285>: popq %r14 0x105e0fde3 <+287>: popq %r15 0x105e0fde5 <+289>: popq %rbp 0x105e0fde6 <+290>: jmp 0x105e3dd08 ; symbol stub for: objc_autoreleaseReturnValue 0x105e0fdeb <+295>: movq %rax, %rbx 0x105e0fdee <+298>: leaq -0x50(%rbp), %rdi 0x105e0fdf2 <+302>: movl $0x8, %esi 0x105e0fdf7 <+307>: callq 0x105e38a8e ; symbol stub for: _Block_object_dispose 0x105e0fdfc <+312>: movq %rbx, %rdi 0x105e0fdff <+315>: callq 0x105e38aa6 ; symbol stub for: _Unwind_Resume 0x105e0fe04 <+320>: ud2 ```
christocracy commented 4 years ago

Never heard of this. Is it repeatable?

brianfitzgerald commented 4 years ago

Yes, I was able to reproduce it again just now. I can send my podfile or a longer stacktrace if you'd like

christocracy commented 4 years ago

What other plugin API methods are you using? Are you using the method insertLocation?

brianfitzgerald commented 4 years ago

We're just using BackgroundGeolocation.ready(), start(), stop(), and getCurrentLocation().

brianfitzgerald commented 4 years ago

We are not using insertLocation.

christocracy commented 4 years ago

Comment out the call to #ready and #start. Execute the following:

let count = await BackgroundGeolocation.getCount()
console.log('- count: ', count);

What's the count?

christocracy commented 4 years ago

Are you executing #getCurrentPosition when the app boots?

brianfitzgerald commented 4 years ago

We're calling it on a componentDidMount on user login, so within a second or two of boot.

christocracy commented 4 years ago

Are you sure that #ready resolves before calling #getCurrentPosition?


BackgroundGeolocation.ready(config).then((state) => {
  // Good.
  BackgroundGeolocation.getCurrentPosition();
});
// Bad.  Wait for #ready to resolve
BackgroundGeolocation.getCurrentPosition();
brianfitzgerald commented 4 years ago

Let me double check.

brianfitzgerald commented 4 years ago

The value from that log is "- count: 25"

brianfitzgerald commented 4 years ago

Can confirm it's from ready(), disabled every other call in the app, and it crashes. Also works fine if I run it with no config passed to ready(). It also works if I change the bundle identifier.

christocracy commented 4 years ago

I want that sqlite database file.

brianfitzgerald commented 4 years ago

ts_location_manager.sqlite.zip

brianfitzgerald commented 4 years ago

If I run with ready() having no config, and then change the config and reload the RN bundle, it works.

christocracy commented 4 years ago

That database file is empty.

christocracy commented 4 years ago

Do not provide null to any config option. Give it an empty string ""

url: arePingsEnabled ? AbstractDataSource.getUrl("/ping") : null,
christocracy commented 4 years ago

A better way to implement your arePingsEnabled would be with maxRecordsToPersist.

maxRecordsToPersist: ? arePingsEnabled ? -1 : 0

brianfitzgerald commented 4 years ago

Made those changes, still no luck.

christocracy commented 4 years ago

Can you reproduce this in a Hello World? Or give me access to your app so I can build it locally?

brianfitzgerald commented 4 years ago

It's hosted on our corporate gitlab instance, so I'll talk with my team and get back to you Monday.

christocracy commented 4 years ago

In the meantime, it'd be wonderful if this could be reproduced in a simple Hello World, using the same config provided to #ready.

Also, are you booting this in XCode? Does the plugin log anything before the crash occurs?

christocracy commented 4 years ago

Also, I'd like to see the result of the Object you're providing to config. Save it to a var first and console.log the result.

let config = {
                desiredAccuracy: BackgroundGeolocation.DESIRED_ACCURACY_HIGH,
                distanceFilter: 10,
                stopTimeout: 1,
                debug: false,
                logLevel: BackgroundGeolocation.LOG_LEVEL_VERBOSE,
                stopOnTerminate: true,
                startOnBoot: false,
                url: arePingsEnabled ? AbstractDataSource.getUrl("/ping") : null,
                batchSync: false,
                autoSync: true,
                headers: {
                    Authorization: `Bearer ${token}`,
                },
                params: {
                    "device-uuid": deviceId,
                },
                locationAuthorizationRequest: "Always",
                locationAuthorizationAlert: {
                    titleWhenNotEnabled: "<value here>",
                    titleWhenOff: "<value here>",
                    instructions: "<value here>",
                    cancelButton: "<value here>",
                    settingsButton: "<value here>",
                },
            };
console.log('- Config: ', config);
brianfitzgerald commented 4 years ago
{"autoSync": true, "batchSync": false, "debug": false, "desiredAccuracy": -1, "distanceFilter": 10, "headers": {"Accept": "application/vnd.<companyname>.api.v2+json", "Authorization": "Bearer <token>"}, "locationAuthorizationAlert": {"cancelButton": "Cancel", "instructions": "To use background location, you must enable 'Always' in the Location Services settings", "settingsButton": "Settings", "titleWhenNotEnabled": "Location services are not enabled", "titleWhenOff": "Location services are off"}, "locationAuthorizationRequest": "Always", "logLevel": 5, "params": {"device-uuid": "<deviceID>"}, "startOnBoot": false, "stopOnTerminate": true, "stopTimeout": 1, "url": "https://companyname.com/mobile/ping"}
christocracy commented 4 years ago

Config looks valid

brianfitzgerald commented 4 years ago

Where is TSDatabaseQueue.m located? Is there a way of telling what the 'data' parameter comes from?

christocracy commented 4 years ago

You can’t see it. It’s not likely a problem there. More likely a problem with the data itself.

superawe commented 4 years ago

I'm having the same issue with simulator (iOs) after upgrade from 3.4.2 to 3.6.2. I tried different configs without luck. It seems to work fine on device though.

christocracy commented 4 years ago

@superawe Can you show me the logs from XCode of your app booting?

superawe commented 4 years ago

@christocracy sorry, I downgraded to 3.4.2 again to keep on working, can try to reproduce and send logs tomorrow

brianfitzgerald commented 4 years ago

Downgraded to 3.4.2 per your suggestion and still getting the same crash.

christocracy commented 4 years ago

Please show me the entire log from XCode when launching the app.

brianfitzgerald commented 4 years ago
2020-05-11 10:05:31.303890-0500 appname[1142:7697250]  - <AppMeasurement>[I-ACS036002] Analytics screen reporting is enabled. Call +[FIRAnalytics setScreenName:setScreenClass:] to set the screen name or override the default screen class name. To disable screen reporting, set the flag FirebaseScreenReportingEnabled to NO (boolean) in the Info.plist
2020-05-11 10:05:31.694172-0500 appname[1142:7696193] You've implemented -[<UIApplicationDelegate> application:didReceiveRemoteNotification:fetchCompletionHandler:], but you still need to add "remote-notification" to the list of your supported UIBackgroundModes in your Info.plist.
2020-05-11 10:05:31.752571-0500 appname[1142:7697257] [Client] Updating selectors failed with: Error Domain=NSCocoaErrorDomain Code=4099 "The connection to service on pid 0 named com.apple.commcenter.coretelephony.xpc was invalidated." UserInfo={NSDebugDescription=The connection to service on pid 0 named com.apple.commcenter.coretelephony.xpc was invalidated.}
2020-05-11 10:05:31.752572-0500 appname[1142:7697258] [Client] Synchronous remote object proxy returned error: Error Domain=NSCocoaErrorDomain Code=4099 "The connection to service on pid 0 named com.apple.commcenter.coretelephony.xpc was invalidated." UserInfo={NSDebugDescription=The connection to service on pid 0 named com.apple.commcenter.coretelephony.xpc was invalidated.}
2020-05-11 10:05:31.752768-0500 appname[1142:7697257] [Client] Updating selectors after delegate addition failed with: Error Domain=NSCocoaErrorDomain Code=4099 "The connection to service on pid 0 named com.apple.commcenter.coretelephony.xpc was invalidated." UserInfo={NSDebugDescription=The connection to service on pid 0 named com.apple.commcenter.coretelephony.xpc was invalidated.}
2020-05-11 10:05:31.756201-0500 appname[1142:7697258] [Client] Synchronous remote object proxy returned error: Error Domain=NSCocoaErrorDomain Code=4099 "The connection to service on pid 0 named com.apple.commcenter.coretelephony.xpc was invalidated." UserInfo={NSDebugDescription=The connection to service on pid 0 named com.apple.commcenter.coretelephony.xpc was invalidated.}
2020-05-11 10:05:31.756865-0500 appname[1142:7697257] [Client] Updating selectors failed with: Error Domain=NSCocoaErrorDomain Code=4099 "The connection to service on pid 0 named com.apple.commcenter.coretelephony.xpc was invalidated." UserInfo={NSDebugDescription=The connection to service on pid 0 named com.apple.commcenter.coretelephony.xpc was invalidated.}
2020-05-11 10:05:31.763188-0500 appname[1142:7697258] [Client] Synchronous remote object proxy returned error: Error Domain=NSCocoaErrorDomain Code=4099 "The connection to service on pid 0 named com.apple.commcenter.coretelephony.xpc was invalidated." UserInfo={NSDebugDescription=The connection to service on pid 0 named com.apple.commcenter.coretelephony.xpc was invalidated.}
2020-05-11 10:05:31.763561-0500 appname[1142:7697259] [Client] Updating selectors failed with: Error Domain=NSCocoaErrorDomain Code=4099 "The connection to service on pid 0 named com.apple.commcenter.coretelephony.xpc was invalidated." UserInfo={NSDebugDescription=The connection to service on pid 0 named com.apple.commcenter.coretelephony.xpc was invalidated.}
2020-05-11 10:05:31.767694-0500 appname[1142:7697257] [Client] Updating selectors failed with: Error Domain=NSCocoaErrorDomain Code=4099 "The connection to service on pid 0 named com.apple.commcenter.coretelephony.xpc was invalidated." UserInfo={NSDebugDescription=The connection to service on pid 0 named com.apple.commcenter.coretelephony.xpc was invalidated.}
2020-05-11 10:05:31.767851-0500 appname[1142:7697257] [Client] Updating selectors after delegate removal failed with: Error Domain=NSCocoaErrorDomain Code=4099 "The connection to service on pid 0 named com.apple.commcenter.coretelephony.xpc was invalidated." UserInfo={NSDebugDescription=The connection to service on pid 0 named com.apple.commcenter.coretelephony.xpc was invalidated.}
2020-05-11 10:05:31.897952-0500 appname[1142:7697248] 6.13.0 - [Firebase/Analytics][I-ACS023007] Analytics v.60106000 started
2020-05-11 10:05:31.898253-0500 appname[1142:7697248] 6.13.0 - [Firebase/Analytics][I-ACS023008] To enable debug logging set the following application argument: -FIRAnalyticsDebugEnabled (see http://goo.gl/RfcP7r)
2020-05-11 10:05:31.926 [info][tid:main][RCTRootView.m:294] Running application appname ({
    initialProps =     {
    };
    rootTag = 1;
})
2020-05-11 10:05:31.967502-0500 appname[1142:7696193] [Crashlytics] Version 3.14.0 (144)
ℹ️-[TSDBLogger db_delete] maxAge: 259200
2020-05-11 10:05:32.021878-0500 appname[1142:7697361] ℹ️-[TSDBLogger db_delete] maxAge: 259200
ℹ️-[TSLocationManager init] 
╔═════════════════════════════════════════════
║ TSLocationManager (build 344)
╠══════════════════════════════════════════════
{
    activityRecognitionInterval = 10000;
    activityType = 1;
    authorization =     {
    };
    autoSync = 1;
    autoSyncThreshold = 0;
    batchSync = 0;
    debug = 0;
    desiredAccuracy = "-1";
    desiredOdometerAccuracy = 100;
    didLaunchInBackground = 0;
    disableAutoSyncOnCellular = 0;
    disableElasticity = 0;
    disableLocationAuthorizationAlert = 0;
    disableMotionActivityUpdates = 0;
    disableStopDetection = 0;
    distanceFilter = 10;
    elasticityMultiplier = 1;
    enableTimestampMeta = 0;
    enabled = 1;
    encrypt = 0;
    extras =     {
    };
    geofenceInitialTriggerEntry = 1;
    geofenceProximityRadius = 1000;
    geofenceTemplate = "";
    headers =     {
        Accept = "application/vnd.company.api.v2+json";
        Authorization = "Bearer";
    };
    heartbeatInterval = 60;
    httpRootProperty = location;
    httpTimeout = 60000;
    iOSHasWarnedLocationServicesOff = 0;
    isFirstBoot = 0;
    isMoving = 0;
    lastLocationAuthorizationStatus = 3;
    locationAuthorizationAlert =     {
        cancelButton = Cancel;
        instructions = "To use background location, you must enable 'Always' in the Location Services settings";
        settingsButton = Settings;
        titleWhenNotEnabled = "Location services are not enabled";
        titleWhenOff = "Location services are off";
    };
    locationAuthorizationRequest = Always;
    locationTemplate = "";
    locationTimeout = 60;
    locationsOrderDirection = ASC;
    logLevel = 5;
    logMaxDays = 3;
    maxBatchSize = "-1";
    maxDaysToPersist = 1;
    maxRecordsToPersist = "-1";
    method = POST;
    minimumActivityRecognitionConfidence = 70;
    odometer = 0;
    params =     {
        "device-uuid" = "3DE9A352-3507-412B-BB27-7BBB58E996E2";
    };
    pausesLocationUpdatesAutomatically = 0;
    persistMode = 2;
    preventSuspend = 0;
    schedule =     (
    );
    schedulerEnabled = 0;
    startOnBoot = 0;
    stationaryRadius = 25;
    stopAfterElapsedMinutes = "-1";
    stopDetectionDelay = 0;
    stopOnStationary = 0;
    stopOnTerminate = 1;
    stopTimeout = 1;
    trackingMode = 1;
    url = "https://api.company.com/subdomain/mobile/ping";
    useSignificantChangesOnly = 0;
}
2020-05-11 10:05:32.023239-0500 appname[1142:7697357] ℹ️-[TSLocationManager init] 
╔═════════════════════════════════════════════
║ TSLocationManager (build 344)
╠══════════════════════════════════════════════
{
    activityRecognitionInterval = 10000;
    activityType = 1;
    authorization =     {
    };
    autoSync = 1;
    autoSyncThreshold = 0;
    batchSync = 0;
    debug = 0;
    desiredAccuracy = "-1";
    desiredOdometerAccuracy = 100;
    didLaunchInBackground = 0;
    disableAutoSyncOnCellular = 0;
    disableElasticity = 0;
    disableLocationAuthorizationAlert = 0;
    disableMotionActivityUpdates = 0;
    disableStopDetection = 0;
    distanceFilter = 10;
    elasticityMultiplier = 1;
    enableTimestampMeta = 0;
    enabled = 1;
    encrypt = 0;
    extras =     {
    };
    geofenceInitialTriggerEntry = 1;
    geofenceProximityRadius = 1000;
    geofenceTe
✅-[LocationDAO unlock]_block_invoke UNLOCKED ALL RECORDS
2020-05-11 10:05:32.025373-0500 appname[1142:7697362] ✅-[LocationDAO unlock]_block_invoke UNLOCKED ALL RECORDS
ℹ️-[GeofenceDAO init] CREATE TABLE IF NOT EXISTS geofences (id INTEGER PRIMARY KEY AUTOINCREMENT, identifier TEXT NOT NULL UNIQUE, latitude DOUBLE NOT NULL, sin_latitude DOUBLE NOT NULL, cos_latitude DOUBLE NOT NULL, longitude DOUBLE NOT NULL, sin_longitude DOUBLE NOT NULL, cos_longitude DOUBLE NOT NULL, radius DOUBLE NOT NULL, notifyOnEntry BOOLEAN NOT NULL DEFAULT 0, notifyOnExit BOOLEAN NOT NULL DEFAULT 0, notifyOnDwell BOOLEAN NOT NULL DEFAULT 0, loiteringDelay DOUBLE NOT NULL DEFAULT 0, extras TEXT)
2020-05-11 10:05:32.046993-0500 appname[1142:7697357] ℹ️-[GeofenceDAO init] CREATE TABLE IF NOT EXISTS geofences (id INTEGER PRIMARY KEY AUTOINCREMENT, identifier TEXT NOT NULL UNIQUE, latitude DOUBLE NOT NULL, sin_latitude DOUBLE NOT NULL, cos_latitude DOUBLE NOT NULL, longitude DOUBLE NOT NULL, sin_longitude DOUBLE NOT NULL, cos_longitude DOUBLE NOT NULL, radius DOUBLE NOT NULL, notifyOnEntry BOOLEAN NOT NULL DEFAULT 0, notifyOnExit BOOLEAN NOT NULL DEFAULT 0, notifyOnDwell BOOLEAN NOT NULL DEFAULT 0, loiteringDelay DOUBLE NOT NULL DEFAULT 0, extras TEXT)
ℹ️-[GeofenceDAO init] CREATE index IF NOT EXISTS identifier ON geofences (identifier);CREATE index IF NOT EXISTS latitude ON geofences (latitude);CREATE index IF NOT EXISTS longitude ON geofences (longitude);CREATE index IF NOT EXISTS sin_latitude ON geofences (sin_latitude);CREATE index IF NOT EXISTS cos_latitude ON geofences (cos_latitude);CREATE index IF NOT EXISTS sin_longitude ON geofences (sin_longitude);CREATE index IF NOT EXISTS cos_longitude ON geofences (cos_longitude);
2020-05-11 10:05:32.072950-0500 appname[1142:7697371] ℹ️-[GeofenceDAO init] CREATE index IF NOT EXISTS identifier ON geofences (identifier);CREATE index IF NOT EXISTS latitude ON geofences (latitude);CREATE index IF NOT EXISTS longitude ON geofences (longitude);CREATE index IF NOT EXISTS sin_latitude ON geofences (sin_latitude);CREATE index IF NOT EXISTS cos_latitude ON geofences (cos_latitude);CREATE index IF NOT EXISTS sin_longitude ON geofences (si2020-05-11 10:05:32.076477-0500 appname[1142:7696193] [Client] Synchronous remote object proxy returned error: Error Domain=NSCocoaErrorDomain Code=4099 "The connection to service on pid 0 named com.apple.commcenter.coretelephony.xpc was invalidated." UserInfo={NSDebugDescription=The connection to service on pid 0 named com.apple.commcenter.coretelephony.xpc was invalidated.}
2020-05-11 10:05:32.076638-0500 appname[1142:7697357] [Client] Updating selectors failed with: Error Domain=NSCocoaErrorDomain Code=4099 "The connection to service on pid 0 named com.apple.commcenter.coretelephony.xpc was invalidated." UserInfo={NSDebugDescription=The connection to service on pid 0 named com.apple.commcenter.coretelephony.xpc was invalidated.}
n_longitude);CREATE index IF NOT EXISTS cos_longitude ON geofences (cos_longitude);
2020-05-11 10:05:32.089632-0500 appname[1142:7697357] [Client] Updating selectors after delegate addition failed with: Error Domain=NSCocoaErrorDomain Code=4099 "The connection to service on pid 0 named com.apple.commcenter.coretelephony.xpc was invalidated." UserInfo={NSDebugDescription=The connection to service on pid 0 named com.apple.commcenter.coretelephony.xpc was invalidated.}
2020-05-11 10:05:32.092500-0500 appname[1142:7696193] [Client] Synchronous remote object proxy returned error: Error Domain=NSCocoaErrorDomain Code=4099 "The connection to service on pid 0 named com.apple.commcenter.coretelephony.xpc was invalidated." UserInfo={NSDebugDescription=The connection to service on pid 0 named com.apple.commcenter.coretelephony.xpc was invalidated.}
2020-05-11 10:05:32.093041-0500 appname[1142:7697357] [Client] Updating selectors failed with: Error Domain=NSCocoaErrorDomain Code=4099 "The connection to service on pid 0 named com.apple.commcenter.coretelephony.xpc was invalidated." UserInfo={NSDebugDescription=The connection to service on pid 0 named com.apple.commcenter.coretelephony.xpc was invalidated.}
2020-05-11 10:05:32.096618-0500 appname[1142:7696193] [Client] Synchronous remote object proxy returned error: Error Domain=NSCocoaErrorDomain Code=4099 "The connection to service on pid 0 named com.apple.commcenter.coretelephony.xpc was invalidated." UserInfo={NSDebugDescription=The connection to service on pid 0 named com.apple.commcenter.coretelephony.xpc was invalidated.}
2020-05-11 10:05:32.097084-0500 appname[1142:7697357] [Client] Updating selectors failed with: Error Domain=NSCocoaErrorDomain Code=4099 "The connection to service on pid 0 named com.apple.commcenter.coretelephony.xpc was invalidated." UserInfo={NSDebugDescription=The connection to service on pid 0 named com.apple.commcenter.coretelephony.xpc was invalidated.}
2020-05-11 10:05:32.137606-0500 appname[1142:7697357] [Client] Updating selectors failed with: Error Domain=NSCocoaErrorDomain Code=4099 "The connection to service on pid 0 named com.apple.commcenter.coretelephony.xpc was invalidated." UserInfo={NSDebugDescription=The connection to service on pid 0 named com.apple.commcenter.coretelephony.xpc was invalidated.}
2020-05-11 10:05:32.138015-0500 appname[1142:7697357] [Client] Updating selectors after delegate removal failed with: Error Domain=NSCocoaErrorDomain Code=4099 "The connection to service on pid 0 named com.apple.commcenter.coretelephony.xpc was invalidated." UserInfo={NSDebugDescription=The connection to service on pid 0 named com.apple.commcenter.coretelephony.xpc was invalidated.}
2020-05-11 10:05:32.270 [warn][tid:NSOperationQueue 0x7ff6c0f09390 (QOS: UNSPECIFIED)][RCTModuleData.mm:290] RCTBridge required dispatch_sync to load RCTDevLoadingView. This may lead to deadlocks
2020-05-11 10:05:32.339660-0500 appname[1142:7697352] Request <OSRequestRegisterUser: 0x600002609440> success result {
    id = "471410c6-223d-49c5-9225-70b80c94ac09";
    success = 1;
}
🔵-[LocationManager locationManager:didChangeAuthorizationStatus:] 3
2020-05-11 10:05:32.377900-0500 appname[1142:7697352] 🔵-[LocationManager locationManager:didChangeAuthorizationStatus:] 3
🔵-[LocationManager locationManager:didChangeAuthorizationStatus:] 3
2020-05-11 10:05:32.378843-0500 appname[1142:7697259] 🔵-[LocationManager locationManager:didChangeAuthorizationStatus:] 3
🔵-[LocationManager locationManager:didChangeAuthorizationStatus:] 3
2020-05-11 10:05:32.381362-0500 appname[1142:7697338] 🔵-[LocationManager locationManager:didChangeAuthorizationStatus:] 3
🔵-[TSLocationManager locationManager:didChangeAuthorizationStatus:] status 3
2020-05-11 10:05:32.382024-0500 appname[1142:7697352] 🔵-[TSLocationManager locationManager:didChangeAuthorizationStatus:] status 3
🔵-[BackgroundTaskManager locationManager:didChangeAuthorizationStatus:] 3
2020-05-11 10:05:32.384226-0500 appname[1142:7697338] 🔵-[BackgroundTaskManager locationManager:didChangeAuthorizationStatus:] 3
2020-05-11 10:05:32.426878-0500 appname[1142:7696193] ERROR: Error! iOS Simulator does not support push! Please test on a real iOS device. Error: Error Domain=NSCocoaErrorDomain Code=3010 "remote notifications are not supported in the simulator" UserInfo={NSLocalizedDescription=remote notifications are not supported in the simulator}
ℹ️+[LocationAuthorization run:onCancel:] status: 3
2020-05-11 10:05:32.455044-0500 appname[1142:7697363] ℹ️+[LocationAuthorization run:onCancel:] status: 3
2020-05-11 10:05:33.868 [warn][tid:com.facebook.react.JavaScript] Require cycle: node_modules/rn-fetch-blob/index.js -> node_modules/rn-fetch-blob/polyfill/index.js -> node_modules/rn-fetch-blob/polyfill/Blob.js -> node_modules/rn-fetch-blob/index.js

Require cycles are allowed, but can result in uninitialized values. Consider refactoring to remove the need for a cycle.
2020-05-11 10:05:33.870 [warn][tid:com.facebook.react.JavaScript] Require cycle: node_modules/rn-fetch-blob/index.js -> node_modules/rn-fetch-blob/polyfill/index.js -> node_modules/rn-fetch-blob/polyfill/XMLHttpRequest.js -> node_modules/rn-fetch-blob/index.js

Require cycles are allowed, but can result in uninitialized values. Consider refactoring to remove the need for a cycle.
2020-05-11 10:05:33.871 [warn][tid:com.facebook.react.JavaScript] Require cycle: node_modules/rn-fetch-blob/index.js -> node_modules/rn-fetch-blob/polyfill/index.js -> node_modules/rn-fetch-blob/polyfill/Fetch.js -> node_modules/rn-fetch-blob/index.js

Require cycles are allowed, but can result in uninitialized values. Consider refactoring to remove the need for a cycle.
2020-05-11 10:05:34.272 [warn][tid:com.facebook.react.JavaScript] Require cycle: src/App.tsx -> src/navigation/AppNavigator.tsx -> src/navigation/Drawer.tsx -> src/navigation/HomeNavigator.tsx -> src/navigation/TabNavigator.tsx -> src/screens/home/Home.tsx -> src/App.tsx

Require cycles are allowed, but can result in uninitialized values. Consider refactoring to remove the need for a cycle.
2020-05-11 10:05:34.296 [warn][tid:com.facebook.react.JavaScript] Require cycle: node_modules/react-native-maps/lib/components/MapView.js -> node_modules/react-native-maps/lib/components/MapPolygon.js -> node_modules/react-native-maps/lib/components/MapView.js

Require cycles are allowed, but can result in uninitialized values. Consider refactoring to remove the need for a cycle.
2020-05-11 10:05:34.301 [warn][tid:com.facebook.react.JavaScript] Require cycle: node_modules/react-native-maps/lib/components/MapView.js -> node_modules/react-native-maps/lib/components/Geojson.js -> node_modules/react-native-maps/lib/components/MapView.js

Require cycles are allowed, but can result in uninitialized values. Consider refactoring to remove the need for a cycle.
2020-05-11 10:05:34.353 [info][tid:com.facebook.react.JavaScript] Running "appname" with {"rootTag":1,"initialProps":{}}
2020-05-11 10:05:34.425 [warn][tid:com.facebook.react.JavaScript] RCTBridge required dispatch_sync to load RCTDevLoadingView. This may lead to deadlocks
2020-05-11 10:05:34.430 [info][tid:main][RNGestureHandlerManager.m:136] [GESTURE HANDLER] Initialize gesture handler for root view <RCTRootContentView: 0x7ff6c0e0b720; reactTag: 1; frame = (0 0; 375 667); gestureRecognizers = <NSArray: 0x60000263a160>; layer = <CALayer: 0x600002915c80>>
2020-05-11 10:05:34.492 [info][tid:com.facebook.react.JavaScript] INFO: POST(/subdomain/mobile/resume)
2020-05-11 10:05:34.507 [info][tid:com.facebook.react.JavaScript] INFO: GET(/models)
2020-05-11 10:05:34.508 [info][tid:com.facebook.react.JavaScript] INFO: GET(/makes)
2020-05-11 10:05:34.515 [info][tid:com.facebook.react.JavaScript] INFO: App hydrated
2020-05-11 10:05:34.516 [info][tid:com.facebook.react.JavaScript] INFO: OneSignalHelper.playerIdHandler device={"pushToken":null,"userId":"471410c6-223d-49c5-9225-70b80c94ac09"}
2020-05-11 10:05:34.516 [info][tid:com.facebook.react.JavaScript] INFO: OneSignalHelper.playerIdHandler playerId=471410c6-223d-49c5-9225-70b80c94ac09
2020-05-11 10:05:34.789 [info][tid:com.apple.root.default-qos][RCTImageLoader.mm:817] [PERF ASSETS] Loading image at size {1268, 1902}, which is larger than the screen size {750, 1334}
2020-05-11 10:05:35.155 [info][tid:com.facebook.react.JavaScript] INFO: Response: status=200 url=https://api.company.com/subdomain/mobile/resume
2020-05-11 10:05:35.167108-0500 appname[1142:7697339] registerIdentifiedUser with {
    userId = 34037;
}
2020-05-11 10:05:35.236 [warn][tid:com.facebook.react.JavaScript] 'Animated.event now requires a second argument for options', '\n    in ReactNativeModal (at ModalWrapper.tsx:62)\n    in ModalWrapper (at ExemptionDetailsModal.tsx:159)\n    in ExemptionDetailsComponent (at ExemptionDetailsModal.tsx:209)\n    in Context.Consumer (at ExemptionDetailsModal.tsx:207)\n    in ExemptionDetails (created by inject-ExemptionDetails-with-logStore-driverStore)\n    in inject-ExemptionDetails-with-logStore-driverStore (at Home.tsx:302)\n    in HomeComponent (at Home.tsx:467)\n    in Context.Consumer (at Home.tsx:466)\n    in Home (created by inject-Home-with-appStore-dashboardViewModel)\n    in inject-Home-with-appStore-dashboardViewModel (created by SceneView)\n    in SceneView (created by TabNavigationView)\n    in TabNavigationView (created by NavigationView)\n    in NavigationView (created by Navigator)\n    in Navigator (created by SceneView)\n    in SceneView (at StackViewLayout.tsx:900)\n    in StackViewLayout (created by withOrientation)\n    in withOrientation (at StackView.tsx:104)\n    in Transitioner (at StackView.tsx:41)\n    in StackView (created by Navigator)\n    in Navigator (created by KeyboardAwareNavigator)\n    in KeyboardAwareNavigator (created by SceneView)\n    in SceneView (created by Drawer)\n    in Drawer (created by DrawerView)\n    in DrawerView (created by Navigator)\n    in Navigator (created by SceneView)\n    in SceneView (at StackViewLayout.tsx:900)\n    in StackViewLayout (created by withOrientation)\n    in withOrientation (at StackView.tsx:104)\n    in Transitioner (at StackView.tsx:41)\n    in StackView (created by Navigator)\n    in Navigator (created by KeyboardAwareNavigator)\n    in KeyboardAwareNavigator (created by NavigationContainer)\n    in NavigationContainer (at App.tsx:214)\n    in App (at renderApplication.js:45)'
2020-05-11 10:05:35.238 [warn][tid:com.facebook.react.JavaScript] 'Animated: `useNativeDriver` was not specified. This is a required option and must be explicitly set to `true` or `false`', '\n    in ReactNativeModal (at ModalWrapper.tsx:62)\n    in ModalWrapper (at ExemptionDetailsModal.tsx:159)\n    in ExemptionDetailsComponent (at ExemptionDetailsModal.tsx:209)\n    in Context.Consumer (at ExemptionDetailsModal.tsx:207)\n    in ExemptionDetails (created by inject-ExemptionDetails-with-logStore-driverStore)\n    in inject-ExemptionDetails-with-logStore-driverStore (at Home.tsx:302)\n    in HomeComponent (at Home.tsx:467)\n    in Context.Consumer (at Home.tsx:466)\n    in Home (created by inject-Home-with-appStore-dashboardViewModel)\n    in inject-Home-with-appStore-dashboardViewModel (created by SceneView)\n    in SceneView (created by TabNavigationView)\n    in TabNavigationView (created by NavigationView)\n    in NavigationView (created by Navigator)\n    in Navigator (created by SceneView)\n    in SceneView (at StackViewLayout.tsx:900)\n    in StackViewLayout (created by withOrientation)\n    in withOrientation (at StackView.tsx:104)\n    in Transitioner (at StackView.tsx:41)\n    in StackView (created by Navigator)\n    in Navigator (created by KeyboardAwareNavigator)\n    in KeyboardAwareNavigator (created by SceneView)\n    in SceneView (created by Drawer)\n    in Drawer (created by DrawerView)\n    in DrawerView (created by Navigator)\n    in Navigator (created by SceneView)\n    in SceneView (at StackViewLayout.tsx:900)\n    in StackViewLayout (created by withOrientation)\n    in withOrientation (at StackView.tsx:104)\n    in Transitioner (at StackView.tsx:41)\n    in StackView (created by Navigator)\n    in Navigator (created by KeyboardAwareNavigator)\n    in KeyboardAwareNavigator (created by NavigationContainer)\n    in NavigationContainer (at App.tsx:214)\n    in App (at renderApplication.js:45)'
2020-05-11 10:05:35.353 [warn][tid:com.facebook.react.JavaScript] Warning: componentWillReceiveProps has been renamed, and is not recommended for use. See https://fb.me/react-unsafe-component-lifecycles for details.

* Move data fetching code or side effects to componentDidUpdate.
* If you're updating state whenever props change, refactor your code to use memoization techniques or move it to static getDerivedStateFromProps. Learn more at: https://fb.me/react-derived-state
* Rename componentWillReceiveProps to UNSAFE_componentWillReceiveProps to suppress this warning in non-strict mode. In React 17.x, only the UNSAFE_ name will work. To rename all deprecated lifecycles to their new names, you can run `npx react-codemod rename-unsafe-lifecycles` in your project source folder.

Please update the following components: HomeComponent, ThemedHeader
2020-05-11 10:05:35.357 [info][tid:com.facebook.react.JavaScript] INFO: GET(/subdomain/drivers/status)
2020-05-11 10:05:35.358 [info][tid:com.facebook.react.JavaScript] INFO: GET(/subdomain/drivers/realtime/timers)
2020-05-11 10:05:35.359 [info][tid:com.facebook.react.JavaScript] INFO: GET(/subdomain/drivers/realtime/timers)
2020-05-11 10:05:35.362 [info][tid:com.facebook.react.JavaScript] INFO: GET(/subdomain/drivers/logs?start_date=2020-05-11&end_date=2020-05-11)
2020-05-11 10:05:35.363 [info][tid:com.facebook.react.JavaScript] INFO: GET(/time-tracking/users/34037/status)
2020-05-11 10:05:35.368 [info][tid:com.facebook.react.JavaScript] INFO: GET(/subdomain/drivers/paired-vehicle)
🔵-[TSLocationManager getCurrentPosition:] 
2020-05-11 10:05:35.368011-0500 appname[1142:7697250] 🔵-[TSLocationManager getCurrentPosition:] 
🎾-[LocationManager startUpdatingLocation] ON
2020-05-11 10:05:35.368292-0500 appname[1142:7697339] 🎾-[LocationManager startUpdatingLocation] ON
2020-05-11 10:05:35.368 [info][tid:com.facebook.react.JavaScript] INFO: GET(/hours-of-service-types)
2020-05-11 10:05:35.369 [info][tid:com.facebook.react.JavaScript] INFO: GET(/exemption-types)
ℹ️+[LocationAuthorization run:onCancel:] status: 3
2020-05-11 10:05:35.369609-0500 appname[1142:7697371] ℹ️+[LocationAuthorization run:onCancel:] status: 3
2020-05-11 10:05:35.370 [info][tid:com.facebook.react.JavaScript] INFO: GET(/users/34037/locations)
2020-05-11 10:05:35.371 [info][tid:com.facebook.react.JavaScript] INFO: GET(/subdomain/drivers/trailers)
2020-05-11 10:05:35.378 [info][tid:com.facebook.react.JavaScript] INFO: GET(/subdomain/logs/tracker/unclaimed?uuid=86A4E5D9-CA87-4298-8507-F4DEAED3DF2B)
2020-05-11 10:05:35.379 [info][tid:com.facebook.react.JavaScript] INFO: GET(/subdomain/drivers/34037/logs/revisions/suggestions)
2020-05-11 10:05:35.381 [info][tid:com.facebook.react.JavaScript] INFO: GET(/subdomain/drivers/status)
2020-05-11 10:05:35.382 [info][tid:com.facebook.react.JavaScript] INFO: GET(/subdomain/drivers/realtime/timers)
2020-05-11 10:05:35.385 [info][tid:com.facebook.react.JavaScript] INFO: GET(/subdomain/drivers/realtime/timers)
2020-05-11 10:05:35.386 [info][tid:com.facebook.react.JavaScript] INFO: GET(/subdomain/drivers/logs?start_date=2020-05-11&end_date=2020-05-11)
2020-05-11 10:05:35.386 [info][tid:com.facebook.react.JavaScript] INFO: GET(/time-tracking/users/34037/status)
2020-05-11 10:05:35.402 [info][tid:com.facebook.react.JavaScript] INFO: GET(/subdomain/drivers/status)
2020-05-11 10:05:35.403 [info][tid:com.facebook.react.JavaScript] INFO: GET(/subdomain/drivers/realtime/timers)
2020-05-11 10:05:35.403 [info][tid:com.facebook.react.JavaScript] INFO: GET(/subdomain/drivers/realtime/timers)
2020-05-11 10:05:35.404 [info][tid:com.facebook.react.JavaScript] INFO: GET(/subdomain/drivers/logs?start_date=2020-05-11&end_date=2020-05-11)
2020-05-11 10:05:35.404 [info][tid:com.facebook.react.JavaScript] INFO: GET(/time-tracking/users/34037/status)

📍<+30.23113000,-97.88947900> +/- 5.00m (speed -1.00 mps / course -1.00) @ 5/11/20, 10:05:34 AM Central Daylight Time
2020-05-11 10:05:35.409625-0500 appname[1142:7697314] 
📍<+30.23113000,-97.88947900> +/- 5.00m (speed -1.00 mps / course -1.00) @ 5/11/20, 10:05:34 AM Central Daylight Time
🔴-[LocationManager stopUpdatingLocation] OFF
2020-05-11 10:05:35.409927-0500 appname[1142:7697248] 🔴-[LocationManager stopUpdatingLocation] OFF

╔═══════════════════════════════════════════════════════════
║ -[LocationManager locationManager:didUpdateLocations:] Sample 1 of 1
╚═══════════════════════════════════════════════════════════
2020-05-11 10:05:35.410782-0500 appname[1142:7697353] 
╔═══════════════════════════════════════════════════════════
║ -[LocationManager locationManager:didUpdateLocations:] Sample 1 of 1
╚═══════════════════════════════════════════════════════════
🔵-[TSLocationManager calculateMedianLocationAccuracy:] Median location accuracy: 5.0
2020-05-11 10:05:35.413046-0500 appname[1142:7697250] 🔵-[TSLocationManager calculateMedianLocationAccuracy:] Median location accuracy: 5.0
✅-[TSLocationManager persistLocation:]_block_invoke INSERT: AD950414-1DE0-4DDF-BD4F-B5D3B7F60E4D
2020-05-11 10:05:35.434974-0500 appname[1142:7697338] ✅-[TSLocationManager persistLocation:]_block_invoke INSERT: AD950414-1DE0-4DDF-BD4F-B5D3B7F60E4D

╔═══════════════════════════════════════════════════════════
║ -[TSHttpService flush:] 
╚═══════════════════════════════════════════════════════════
2020-05-11 10:05:35.435221-0500 appname[1142:7697314] 
╔═══════════════════════════════════════════════════════════
║ -[TSHttpService flush:] 
╚═══════════════════════════════════════════════════════════
✅-[BackgroundTaskManager createBackgroundTask] 10
2020-05-11 10:05:35.457927-0500 appname[1142:7697250] ✅-[BackgroundTaskManager createBackgroundTask] 10
2020-05-11 10:05:35.465853-0500 appname[1142:7697314] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: 'data parameter is nil'
*** First throw call stack:
(
    0   CoreFoundation                      0x000000010cf17cce __exceptionPreprocess + 350
    1   libobjc.A.dylib                     0x000000010c1bb9b2 objc_exception_throw + 48
    2   Foundation                          0x0000000108c3412c +[NSJSONSerialization writeJSONObject:toStream:options:error:] + 0
    3   appname                    0x000000010497980f -[LocationDAO decodeJSON:encrypted:] + 263
    4   appname                    0x0000000104979329 __20-[LocationDAO first]_block_invoke + 512
    5   appname                    0x0000000104991f5d __30-[TSDatabaseQueue inDatabase:]_block_invoke + 55
    6   libdispatch.dylib                   0x000000010e381e8e _dispatch_client_callout + 8
    7   libdispatch.dylib                   0x000000010e390ae2 _dispatch_lane_barrier_sync_invoke_and_complete + 132
    8   appname                    0x0000000104991ef9 -[TSDatabaseQueue inDatabase:] + 140
    9   appname                    0x0000000104979099 -[LocationDAO first] + 215
    10  appname                    0x000000010499462d -[TSHttpService schedulePost] + 34
    11  libdispatch.dylib                   0x000000010e380f11 _dispatch_call_block_and_release + 12
    12  libdispatch.dylib                   0x000000010e381e8e _dispatch_client_callout + 8
    13  libdispatch.dylib                   0x000000010e3886fd _dispatch_lane_serial_drain + 788
    14  libdispatch.dylib                   0x000000010e38928f _dispatch_lane_invoke + 422
    15  libdispatch.dylib                   0x000000010e394b65 _dispatch_workloop_worker_thread + 719
    16  libsystem_pthread.dylib             0x000000010e7876fc _pthread_wqthread + 290
    17  libsystem_pthread.dylib             0x000000010e786827 start_wqthread + 15
)
libc++abi.dylib: terminating with uncaught exception of type NSException
(lldb) 
brianfitzgerald commented 4 years ago

Here is what our API responds with:

HTTP/1.1 200 OK Date: Mon, 11 May 2020 15:16:20 GMT Content-Type: application/json Content-Length: 5 Connection: close server: envoy request_id: 3ff7b5df-88d9-4f40-b3da-528d5ce432d9 access-control-expose-headers: request_id access-control-allow-origin: https://staging-app.companyname.com x-envoy-upstream-service-time: 54

null

christocracy commented 4 years ago

When your app boots, you should see:

2020-05-11 11:18:28.534751-0400 BGGeolocation[68700:72555823] 🔵-[TSLocationManager ready] 

Your app is not executing BackgroundGeolocation.ready before getCurrentPosition.

brianfitzgerald commented 4 years ago

It also seems to be working fine on a physical device.

brianfitzgerald commented 4 years ago

I disabled the getCurrentPosition call and still no luck.

christocracy commented 4 years ago

Why is your app not calling BackgroundGeolocation.ready?

brianfitzgerald commented 4 years ago

I believe it's crashing on the ready() call.

brianfitzgerald commented 4 years ago

Just confirmed, I'm only experiencing a crash when ready() is called, to our backend, on a simulator. Every other configuration works fine.

brianfitzgerald commented 4 years ago

This is on 3.4.2 with react-native-background-fetch version 2.7.1.

christocracy commented 4 years ago

Can you reproduce this in a simple RN Hello World app and share that repo with me? I cannot reproduce this on my local machine.

What is your XCode version?

brianfitzgerald commented 4 years ago

I'll try that and post it when it's done. I am on version 11.4.

christocracy commented 4 years ago

Use latest version 3.6.2

brianfitzgerald commented 4 years ago

Think I fixed it. Our backend was not returning a body with the response from the ping request, so I added a text body with some filler and the ready() call is no longer crashing.

brianfitzgerald commented 4 years ago

Hmm, still experiencing crashes when calling any other method. What does the data parameter of "LocationDAO decodeJSON:encrypted" represent?

christocracy commented 4 years ago

Before calling #ready, execute BackgroundGeolocation.destroyLocations()

brianfitzgerald commented 4 years ago

Looks like it's working again, after running that.

christocracy commented 4 years ago

After removing destroyLocations, try and break it again.

brianfitzgerald commented 4 years ago

Looks good so far. I'll let you know if it fails again. Thank you for helping me troubleshoot this.