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.66k stars 426 forks source link

Polygon Geofence add via RPC call crashes the plugin #2183

Closed jwaldrip closed 3 weeks ago

jwaldrip commented 1 month ago

Your Environment


## Expected Behavior
When the device received the following RPC call. The device should add the polygon geofence and start reporting the geofence events.

```json
{
  "ok": true,
  "background_geolocation": [
    [
      "setConfig",
      {
        "extras": { "rationale": "PREONSITE_TRACKING" },
        "schedule": ["2024-10-21-21:45 2024-10-22-05:00 location"],
        "desiredAccuracy": 10,
        "locationAuthorizationRequest": "Always"
      }
    ],
    [
      "addGeofence",
      {
        "vertices": [
          [39.67896291339058, -104.82659579000001],
          [39.678115073358825, -104.82925519493935],
          [39.67606824934767, -104.83035664508222],
          [39.67402148598885, -104.82925503733252],
          [39.67317370660943, -104.82659579000001],
          [39.67402148598885, -104.82393654266748],
          [39.67606824934767, -104.8228349349178],
          [39.678115073358825, -104.82393638506066]
        ],
        "identifier": "9334ee0b-4a08-4d68-9b17-a1dce7d4fbe8",
        "extras": { "rationale": "PREONSITE_TRACKING" },
        "notifyOnEntry": true,
        "notifyOnExit": true
      }
    ],
    ["start"]
  ]
}

Actual Behavior

The plugin crashes and stops reporting all events.

Steps to Reproduce

  1. Respond to location report with RPC call
  2. Observe logs
  3. Get crash dialog
  4. Nothing reported to logs regarding onhttp or ongeofenceschange hooks.

Context

Trying to add polygon geofence via RPC call.

Debug logs

Logs ``` Unable to get ```
christocracy commented 1 month ago

Where’s your stacktrace?

jwaldrip commented 1 month ago

Due to issues building locally, I cannot produce one. And for some reason the background tasks are also not sending them to firebase or sentry

christocracy commented 1 month ago

Due to issues building locally

What issues?

You can view $ adb logcat for any device plugged into usb.

jwaldrip commented 1 month ago

On iOS I cannot do that. This is crashing iOS and not android as far as I can tell.

christocracy commented 4 weeks ago

Try latest version 4.17.3 released yesterday.

jwaldrip commented 3 weeks ago

Confirmed fixed!

christocracy commented 3 weeks ago

Awesome