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.62k stars 428 forks source link

onGeofence events firing multiple times #1687

Closed LudovicoRighi closed 3 months ago

LudovicoRighi commented 1 year ago

Your Environment

// import {useProfile} from '../../../context/ProfileContext';

const Geolocator = () => { const [enabled, setEnabled] = React.useState(false); const [location, setLocation] = React.useState(''); const [lastGeofenceEvent, setLastGeofenceEvent] = React.useState('none');

useEffect(() => { const geofences = [ { identifier: 'MY OFFICE', radius: 450, latitude: 47.383156511956315, longitude: 8.528031749979121, notifyOnEntry: true, notifyOnExit: true, extras: { radius: 450, center: { latitude: 47.383156511956315, longitude: 8.528031749979121, }, }, }, // { // identifier: 'CENTRAL TRAM STATION', // radius: 200, // latitude: 47.37734323917535, // longitude: 8.543918305474431, // notifyOnEntry: true, // notifyOnExit: true, // extras: { // radius: 200, // center: { // latitude: 47.37734323917535, // longitude: 8.543918305474431, // }, // }, // }, ];

const onLocation: Subscription = BackgroundGeolocation.onLocation(
  (newLocation: Location) => {
    console.log('[onLocation]', newLocation);
    setLocation(JSON.stringify(newLocation, null, 2));
  },
);

const onMotionChange: Subscription = BackgroundGeolocation.onMotionChange(
  (event: MotionChangeEvent) => {
    console.log('[onMotionChange]', event);
  },
);

const onActivityChange: Subscription =
  BackgroundGeolocation.onActivityChange((event: MotionActivityEvent) => {
    console.log('[onActivityChange]', event);
  });

const onProviderChange: Subscription =
  BackgroundGeolocation.onProviderChange((event: ProviderChangeEvent) => {
    console.log('[onProviderChange]', event);
  });

BackgroundGeolocation.addGeofences(geofences)
  .then(() => {
    console.log('[addGeofences] success');
  })
  .catch(error => {
    console.log('[addGeofences] FAILURE: ', error);
  });

const onGeofence = BackgroundGeolocation.onGeofence(
  (geofence: GeofenceEvent) => {
    console.log('[onGeofence] ', geofence.identifier, geofence.action);
    if (geofence.action === 'ENTER') {
      setLastGeofenceEvent('ENTER GEOFENCE: '.concat(geofence.identifier));
      BackgroundGeolocation.start().catch(err => console.log(err));
    } else if (geofence.action === 'EXIT') {
      setLastGeofenceEvent('EXIT GEOFENCE: '.concat(geofence.identifier));
      BackgroundGeolocation.startGeofences().catch(err => console.log(err));
    }
  },
);

const configureBackendToken = async () => {
  const authToken: TransistorAuthorizationToken =
    await BackgroundGeolocation.findOrCreateTransistorAuthorizationToken(
      'MyAmazingOrg',
      'Ludovico',
    );

  /// 2. ready the plugin.
  BackgroundGeolocation.ready({
    transistorAuthorizationToken: authToken,
    desiredAccuracy: BackgroundGeolocation.DESIRED_ACCURACY_HIGH,
    distanceFilter: 100,
    stopTimeout: 5,
    debug: true,
    logLevel: BackgroundGeolocation.LOG_LEVEL_VERBOSE,
    stopOnTerminate: false,
    startOnBoot: true,
    // url: 'http://yourserver.com/locations',
    batchSync: false,
    autoSync: true,
    headers: {
      // <-- Optional HTTP headers
      'X-FOO': 'bar',
    },
    params: {
      // <-- Optional HTTP params
      auth_token: 'maybe_your_server_authenticates_via_token_YES?',
    },
  })
    .then(state => {
      setEnabled(state.enabled);
      console.log(
        '- BackgroundGeolocation is configured and ready: ',
        state.enabled,
      );
    })
    .catch(err => console.log(err));

  const createdGeofences = await BackgroundGeolocation.getGeofences();
  for (let i = 0; i < createdGeofences.length; i++) {
    const curGeof = createdGeofences[i];
    console.log(
      '[- LISTATA GEOF]',
      curGeof.identifier,
      curGeof.latitude.toString(),
    );
  }
};

configureBackendToken()
  .then(() => {
    console.log('Configured and ready the plugin');
  })
  .catch(err => console.log(err));

return () => {
  onLocation.remove();
  onMotionChange.remove();
  onActivityChange.remove();
  onProviderChange.remove();
  onGeofence.remove();
  BackgroundGeolocation.removeGeofences()
    .then(() => {
      console.log('[removeGeofences] all geofences have been destroyed');
    })
    .catch(err => console.log(err));
};

}, []);

/// 3. start / stop BackgroundGeolocation React.useEffect(() => { if (enabled) { BackgroundGeolocation.startGeofences().catch(err => console.log(err)); } else { BackgroundGeolocation.stop().catch(err => console.log(err)); setLocation(''); } }, [enabled]);

return (

Click to enable BackgroundGeolocation {lastGeofenceEvent} {location}

); };

const styles = StyleSheet.create({ container: {flex: 1, marginLeft: 16}, });

export default Geolocator;



## Expected Behavior
<!--- Tell us what should happen -->
For a single geofence I would expect only a single ENTRY event and a single EXIT event.

## Actual Behavior
<!--- Tell us what happens instead -->
For a single geofence, I get multiple ENTRY and EXIT events. They are not event consistent: for example, in this specific case, I got 2 ENTRY and 3 EXIT.

## Steps to Reproduce
<!--- reproduce this issue; include code to reproduce, if relevant -->
1.
2.
3.
4.

## Context
<!--- What were you trying to do? -->
My goal is to create a geofence and then toggle between "start" and "startGeofences" methods whenever I ENTER and EXIT a geofence. (i.e. when I'm inside a geofence I want to track the locations)

<img width="1619" alt="image" src="https://github.com/transistorsoft/react-native-background-geolocation/assets/52406034/270d1350-ef83-425a-a35e-90ca1036f792">

## Debug logs
<!-- include iOS / Android logs
- ios XCode logs,
- use #getLog #emailLog methods (@see docs)
- Android: $ adb logcat -s TSLocationManager
-->
<details><summary>Logs</summary>

``` <!-- Syntax highlighting:  DO NOT REMOVE -->
 LOG  [removeGeofences] all geofences have been destroyed
 LOG  [addGeofences] success
 LOG  - BackgroundGeolocation is configured and ready:  true
 LOG  [- GEOFENCE MONITORED] MY OFFICE 47.383156511956315
 LOG  Configured and ready the plugin
 DEBUG  App state changed to inactive
 DEBUG  App state changed to background
 LOG  [onLocation] {"activity": {"confidence": 100, "type": "unknown"}, "battery": {"is_charging": false, "level": -1}, "coords": {"accuracy": 5, "altitude": 0, "altitude_accuracy": -1, "ellipsoidal_altitude": 0, "floor": null, "heading": -1, "heading_accuracy": -1, "latitude": 47.389661657556445, "longitude": 8.514152686928243, "speed": -1, "speed_accuracy": -1}, "extras": {}, "is_moving": false, "odometer": 779057.3, "sample": true, "timestamp": "2023-05-23T10:32:36.078Z", "uuid": "2D8C182F-E535-40D5-949A-22B5EE1664BB"}
 LOG  [onLocation] {"activity": {"confidence": 100, "type": "unknown"}, "battery": {"is_charging": false, "level": -1}, "coords": {"accuracy": 5, "altitude": 0, "altitude_accuracy": -1, "ellipsoidal_altitude": 0, "floor": null, "heading": -1, "heading_accuracy": -1, "latitude": 47.390766001016885, "longitude": 8.510233354720791, "speed": -1, "speed_accuracy": -1}, "extras": {}, "is_moving": false, "mock": true, "odometer": 779057.3, "timestamp": "2023-05-23T10:32:24.800Z", "uuid": "3A3B19AB-035C-4857-B85C-FBAAA00C5F84"}
 LOG  [onLocation] {"error": 0}
 LOG  [onMotionChange] {"isMoving": false, "location": {"activity": {"confidence": 100, "type": "unknown"}, "battery": {"is_charging": false, "level": -1}, "coords": {"accuracy": 5, "altitude": 0, "altitude_accuracy": -1, "ellipsoidal_altitude": 0, "floor": null, "heading": -1, "heading_accuracy": -1, "latitude": 47.389559573311445, "longitude": 8.514508290412095, "speed": -1, "speed_accuracy": -1}, "event": "motionchange", "extras": {}, "is_moving": false, "mock": true, "odometer": 779057.3, "timestamp": "2023-05-23T10:32:36.793Z", "uuid": "73707B33-7E69-45B4-A6D0-BBEF90853325"}}
 LOG  [onLocation] {"activity": {"confidence": 100, "type": "unknown"}, "battery": {"is_charging": false, "level": -1}, "coords": {"accuracy": 5, "altitude": 0, "altitude_accuracy": -1, "ellipsoidal_altitude": 0, "floor": null, "heading": -1, "heading_accuracy": -1, "latitude": 47.389559573311445, "longitude": 8.514508290412095, "speed": -1, "speed_accuracy": -1}, "event": "motionchange", "extras": {}, "is_moving": false, "mock": true, "odometer": 779057.3, "timestamp": "2023-05-23T10:32:36.793Z", "uuid": "73707B33-7E69-45B4-A6D0-BBEF90853325"}
 LOG  [onLocation] {"activity": {"confidence": 100, "type": "unknown"}, "battery": {"is_charging": false, "level": -1}, "coords": {"accuracy": 5, "altitude": 0, "altitude_accuracy": -1, "ellipsoidal_altitude": 0, "floor": null, "heading": -1, "heading_accuracy": -1, "latitude": 47.38745055499948, "longitude": 8.521591129100806, "speed": -1, "speed_accuracy": -1}, "extras": {}, "is_moving": false, "odometer": 779057.3, "sample": true, "timestamp": "2023-05-23T10:32:57.296Z", "uuid": "B8EFBB74-2264-4067-B014-1AEFB1EE7E48"}
 LOG  [onLocation] {"activity": {"confidence": 100, "type": "unknown"}, "battery": {"is_charging": false, "level": -1}, "coords": {"accuracy": 5, "altitude": 0, "altitude_accuracy": -1, "ellipsoidal_altitude": 0, "floor": null, "heading": -1, "heading_accuracy": -1, "latitude": 47.387667719323574, "longitude": 8.52088564467045, "speed": -1, "speed_accuracy": -1}, "extras": {}, "is_moving": false, "mock": true, "odometer": 779057.3, "timestamp": "2023-05-23T10:32:54.800Z", "uuid": "7B540D48-824D-4224-B478-C7E52D0E8667"}
 LOG  [onLocation] {"error": 0}
 LOG  [onMotionChange] {"isMoving": false, "location": {"activity": {"confidence": 100, "type": "unknown"}, "battery": {"is_charging": false, "level": -1}, "coords": {"accuracy": 5, "altitude": 0, "altitude_accuracy": -1, "ellipsoidal_altitude": 0, "floor": null, "heading": -1, "heading_accuracy": -1, "latitude": 47.387341399625505, "longitude": 8.521943606487746, "speed": -1, "speed_accuracy": -1}, "event": "motionchange", "extras": {}, "is_moving": false, "mock": true, "odometer": 779057.3, "timestamp": "2023-05-23T10:32:57.796Z", "uuid": "255F0FB6-DB25-4256-A703-CE39DA6919DA"}}
 LOG  [onLocation] {"activity": {"confidence": 100, "type": "unknown"}, "battery": {"is_charging": false, "level": -1}, "coords": {"accuracy": 5, "altitude": 0, "altitude_accuracy": -1, "ellipsoidal_altitude": 0, "floor": null, "heading": -1, "heading_accuracy": -1, "latitude": 47.387341399625505, "longitude": 8.521943606487746, "speed": -1, "speed_accuracy": -1}, "event": "motionchange", "extras": {}, "is_moving": false, "mock": true, "odometer": 779057.3, "timestamp": "2023-05-23T10:32:57.796Z", "uuid": "255F0FB6-DB25-4256-A703-CE39DA6919DA"}
 LOG  [onGeofence]  MY OFFICE ENTER
 LOG  [onLocation] {"activity": {"confidence": 100, "type": "unknown"}, "battery": {"is_charging": false, "level": -1}, "coords": {"accuracy": 5, "altitude": 0, "altitude_accuracy": -1, "ellipsoidal_altitude": 0, "floor": null, "heading": -1, "heading_accuracy": -1, "latitude": 47.38645362987267, "longitude": 8.524756579390735, "speed": -1, "speed_accuracy": -1}, "extras": {}, "is_moving": false, "odometer": 779057.3, "sample": true, "timestamp": "2023-05-23T10:33:05.842Z", "uuid": "5AAE97B9-01AE-46AF-B251-692F9EC8B25E"}
 LOG  [onMotionChange] {"isMoving": false, "location": {"activity": {"confidence": 100, "type": "unknown"}, "battery": {"is_charging": false, "level": -1}, "coords": {"accuracy": 5, "altitude": 0, "altitude_accuracy": -1, "ellipsoidal_altitude": 0, "floor": null, "heading": -1, "heading_accuracy": -1, "latitude": 47.38645362987267, "longitude": 8.524756579390735, "speed": -1, "speed_accuracy": -1}, "event": "motionchange", "extras": {}, "is_moving": false, "mock": true, "odometer": 779057.3, "timestamp": "2023-05-23T10:33:05.827Z", "uuid": "FEE2276F-7032-4F3E-96BF-E8ACF33B539A"}}
 LOG  [onLocation] {"activity": {"confidence": 100, "type": "unknown"}, "battery": {"is_charging": false, "level": -1}, "coords": {"accuracy": 5, "altitude": 0, "altitude_accuracy": -1, "ellipsoidal_altitude": 0, "floor": null, "heading": -1, "heading_accuracy": -1, "latitude": 47.38645362987267, "longitude": 8.524756579390735, "speed": -1, "speed_accuracy": -1}, "event": "motionchange", "extras": {}, "is_moving": false, "mock": true, "odometer": 779057.3, "timestamp": "2023-05-23T10:33:05.827Z", "uuid": "FEE2276F-7032-4F3E-96BF-E8ACF33B539A"}
 LOG  [onGeofence]  MY OFFICE ENTER
 LOG  [onLocation] {"activity": {"confidence": 100, "type": "unknown"}, "battery": {"is_charging": false, "level": -1}, "coords": {"accuracy": 5, "altitude": 0, "altitude_accuracy": -1, "ellipsoidal_altitude": 0, "floor": null, "heading": -1, "heading_accuracy": -1, "latitude": 47.38553762764472, "longitude": 8.527555804417778, "speed": -1, "speed_accuracy": -1}, "extras": {}, "is_moving": true, "odometer": 779057.3, "sample": true, "timestamp": "2023-05-23T10:33:13.818Z", "uuid": "B80E7B27-EF6A-47DF-9451-26B3BDE20C7B"}
 LOG  [onMotionChange] {"isMoving": true, "location": {"activity": {"confidence": 100, "type": "unknown"}, "battery": {"is_charging": false, "level": -1}, "coords": {"accuracy": 5, "altitude": 0, "altitude_accuracy": -1, "ellipsoidal_altitude": 0, "floor": null, "heading": -1, "heading_accuracy": -1, "latitude": 47.38553762764472, "longitude": 8.527555804417778, "speed": -1, "speed_accuracy": -1}, "event": "motionchange", "extras": {}, "is_moving": true, "mock": true, "odometer": 779291.9, "timestamp": "2023-05-23T10:33:13.794Z", "uuid": "65409D99-F94C-47EF-A331-8EDFC98F0BC4"}}
 LOG  [onLocation] {"activity": {"confidence": 100, "type": "unknown"}, "battery": {"is_charging": false, "level": -1}, "coords": {"accuracy": 5, "altitude": 0, "altitude_accuracy": -1, "ellipsoidal_altitude": 0, "floor": null, "heading": -1, "heading_accuracy": -1, "latitude": 47.38553762764472, "longitude": 8.527555804417778, "speed": -1, "speed_accuracy": -1}, "event": "motionchange", "extras": {}, "is_moving": true, "mock": true, "odometer": 779291.9, "timestamp": "2023-05-23T10:33:13.794Z", "uuid": "65409D99-F94C-47EF-A331-8EDFC98F0BC4"}
 LOG  [onLocation] {"error": 0}
 LOG  [onLocation] {"activity": {"confidence": 100, "type": "unknown"}, "battery": {"is_charging": false, "level": -1}, "coords": {"accuracy": 5, "altitude": 0, "altitude_accuracy": -1, "ellipsoidal_altitude": 0, "floor": null, "heading": -1, "heading_accuracy": -1, "latitude": 47.385420950191744, "longitude": 8.5279046116492, "speed": -1, "speed_accuracy": -1}, "extras": {}, "is_moving": true, "mock": true, "odometer": 779321.2, "timestamp": "2023-05-23T10:33:14.798Z", "uuid": "C00D95D3-C8F7-4C52-9962-56C674C414C0"}
 LOG  [onLocation] {"activity": {"confidence": 100, "type": "unknown"}, "battery": {"is_charging": false, "level": -1}, "coords": {"accuracy": 5, "altitude": 0, "altitude_accuracy": -1, "ellipsoidal_altitude": 0, "floor": null, "heading": -1, "heading_accuracy": -1, "latitude": 47.384949021527724, "longitude": 8.529297140675324, "speed": -1, "speed_accuracy": -1}, "extras": {}, "is_moving": true, "mock": true, "odometer": 779438.7, "timestamp": "2023-05-23T10:33:18.798Z", "uuid": "DBE74762-57F2-4961-BC06-A4702636B397"}
 LOG  [onLocation] {"activity": {"confidence": 100, "type": "unknown"}, "battery": {"is_charging": false, "level": -1}, "coords": {"accuracy": 5, "altitude": 0, "altitude_accuracy": -1, "ellipsoidal_altitude": 0, "floor": null, "heading": -1, "heading_accuracy": -1, "latitude": 47.3844682606656, "longitude": 8.530685005167554, "speed": -1, "speed_accuracy": -1}, "extras": {}, "is_moving": true, "mock": true, "odometer": 779556.4, "timestamp": "2023-05-23T10:33:22.796Z", "uuid": "26676F23-53F5-4B29-9B39-09877B534A0E"}
 LOG  [onLocation] {"activity": {"confidence": 100, "type": "unknown"}, "battery": {"is_charging": false, "level": -1}, "coords": {"accuracy": 5, "altitude": 0, "altitude_accuracy": -1, "ellipsoidal_altitude": 0, "floor": null, "heading": -1, "heading_accuracy": -1, "latitude": 47.38422434795019, "longitude": 8.531377027575774, "speed": -1, "speed_accuracy": -1}, "extras": {}, "is_moving": true, "mock": true, "odometer": 779615.3, "timestamp": "2023-05-23T10:33:24.807Z", "uuid": "5417F6DC-0488-4556-B8C7-97109AC83FE2"}
 LOG  [onLocation] {"activity": {"confidence": 100, "type": "unknown"}, "battery": {"is_charging": false, "level": -1}, "coords": {"accuracy": 5, "altitude": 0, "altitude_accuracy": -1, "ellipsoidal_altitude": 0, "floor": null, "heading": -1, "heading_accuracy": -1, "latitude": 47.38397795014699, "longitude": 8.532067679622545, "speed": -1, "speed_accuracy": -1}, "extras": {}, "is_moving": true, "mock": true, "odometer": 779674.2, "timestamp": "2023-05-23T10:33:26.798Z", "uuid": "CEE6731A-C730-4DBD-8C68-700B511F14E5"}
 LOG  [onLocation] {"activity": {"confidence": 100, "type": "unknown"}, "battery": {"is_charging": false, "level": -1}, "coords": {"accuracy": 5, "altitude": 0, "altitude_accuracy": -1, "ellipsoidal_altitude": 0, "floor": null, "heading": -1, "heading_accuracy": -1, "latitude": 47.383477263467704, "longitude": 8.533444539724382, "speed": -1, "speed_accuracy": -1}, "extras": {}, "is_moving": true, "mock": true, "odometer": 779792.1, "timestamp": "2023-05-23T10:33:30.796Z", "uuid": "8F6F99B3-5E42-4C16-837B-1EB9DEACDE15"}
 LOG  [onGeofence]  MY OFFICE EXIT
 LOG  [onLocation] {"activity": {"confidence": 100, "type": "unknown"}, "battery": {"is_charging": false, "level": -1}, "coords": {"accuracy": 5, "altitude": 0, "altitude_accuracy": -1, "ellipsoidal_altitude": 0, "floor": null, "heading": -1, "heading_accuracy": -1, "latitude": 47.383094366979144, "longitude": 8.534472923496834, "speed": -1, "speed_accuracy": -1}, "extras": {}, "is_moving": false, "odometer": 779792.1, "sample": true, "timestamp": "2023-05-23T10:33:33.845Z", "uuid": "0B2C04DD-C983-42EB-B87E-89431242E33A"}
 LOG  [onMotionChange] {"isMoving": false, "location": {"activity": {"confidence": 100, "type": "unknown"}, "battery": {"is_charging": false, "level": -1}, "coords": {"accuracy": 5, "altitude": 0, "altitude_accuracy": -1, "ellipsoidal_altitude": 0, "floor": null, "heading": -1, "heading_accuracy": -1, "latitude": 47.383094366979144, "longitude": 8.534472923496834, "speed": -1, "speed_accuracy": -1}, "event": "motionchange", "extras": {}, "is_moving": false, "mock": true, "odometer": 779792.1, "timestamp": "2023-05-23T10:33:33.797Z", "uuid": "B611312A-A55D-4CDB-BC2B-D1A973D28CD4"}}
 LOG  [onLocation] {"activity": {"confidence": 100, "type": "unknown"}, "battery": {"is_charging": false, "level": -1}, "coords": {"accuracy": 5, "altitude": 0, "altitude_accuracy": -1, "ellipsoidal_altitude": 0, "floor": null, "heading": -1, "heading_accuracy": -1, "latitude": 47.383094366979144, "longitude": 8.534472923496834, "speed": -1, "speed_accuracy": -1}, "event": "motionchange", "extras": {}, "is_moving": false, "mock": true, "odometer": 779792.1, "timestamp": "2023-05-23T10:33:33.797Z", "uuid": "B611312A-A55D-4CDB-BC2B-D1A973D28CD4"}
 LOG  [onGeofence]  MY OFFICE EXIT
 LOG  [onGeofence]  MY OFFICE EXIT
 DEBUG  App became active. Sending WebSocket heartbeat
 DEBUG  App state changed to active
 DEBUG  [Axios][Request] 12:05:46.812 GET https://ludovico.beneticsapi.com/authorized/users/0a87c197-338c-4dc5-87db-46fdbd698fab/profile
 DEBUG  [Axios][Request] 12:05:46.815 GET https://ludovico.beneticsapi.com/authorized/feed
 DEBUG  App is active. Sending token el3nprKrTUQZjVa5cAN_xq:APA91bGkz5lwfMRZLeSfJsqcsofaTdK8u_slLUN8_SVLeV1OjZbGqX5o5_j6TMQY8avaZq5J-gEik_UraKm3Td37AQzDfKzJAXLNceaPzN8nDoWYf8_nbs1xff0Equ8jmzxkdWj47Tca to the backend.
 DEBUG  App is active. Sending token el3nprKrTUQZjVa5cAN_xq:APA91bGkz5lwfMRZLeSfJsqcsofaTdK8u_slLUN8_SVLeV1OjZbGqX5o5_j6TMQY8avaZq5J-gEik_UraKm3Td37AQzDfKzJAXLNceaPzN8nDoWYf8_nbs1xff0Equ8jmzxkdWj47Tca to the backend and setting badge count to 0
 DEBUG  [Axios][Request] 12:05:46.886 PUT https://ludovico.beneticsapi.com/authorized/users/0a87c197-338c-4dc5-87db-46fdbd698fab/connections/el3nprKrTUQZjVa5cAN_xq:APA91bGkz5lwfMRZLeSfJsqcsofaTdK8u_slLUN8_SVLeV1OjZbGqX5o5_j6TMQY8avaZq5J-gEik_UraKm3Td37AQzDfKzJAXLNceaPzN8nDoWYf8_nbs1xff0Equ8jmzxkdWj47Tca {"token":"el3nprKrTUQZjVa5cAN_xq:APA91bGkz5lwfMRZLeSfJsqcsofaTdK8u_slLUN8_SVLeV1OjZbGqX5o5_j6TMQY8avaZq5J-gEik_UraKm3Td37AQzDfKzJAXLNceaPzN8nDoWYf8_nbs1xff0Equ8jmzxkdWj47Tca"}
 DEBUG  [Axios][Error] 12:05:46.933 GET https://ludovico.beneticsapi.com/authorized/users/0a87c197-338c-4dc5-87db-46fdbd698fab/profile 404 {"detail":"Not Found"}
 WARN  [AxiosError: Request failed with status code 404]
 DEBUG  [Axios][Response] 12:05:47.115 GET https://ludovico.beneticsapi.com/authorized/feed 200 [{"chat":{"chat_type":"task","task":{"name":"Ciao","label":"NONE","public":true,"id":"8iU6Q9heBS0","created_at":"2023-05-15T16:19:59.229177+00:00","state":"OPEN","project":{"address":"1800 Ellis St, San Francisco, CA 94115, USA","name":"Ddd","created_at":"2023-05-12T16:23:29.597849+00:00","id":"om8LYkKicF0","address_components":{"place_id":"ChIJq25aW7eAhYAR3e73MndCrZ4","latitude":"37.782144","longitude":"-122.436059","street_address":"1800 Ellis St","postal_code":"94115","city":"San Francisco","country":"United States"},"general_channel_id":"FBXZOeEECYQ"}}},"created_at":"2023-05-15T16:19:59.229177+00:00","last_entry":{"content":{"subject":{"id":"0a87c197-338c-4dc5-87db-46fdbd698fab","first_name":"Ludovico","last_name":"Righi"},"entry_type":"system_task_action","object":null,"objects":null,"action":"REOPENED"},"created_at":"2023-05-16T14:43:44.149848+00:00","id":"01H0JG8RCNX1BV8V8J20PRNBWK"},"unread":0},{"chat":{"chat_type":"channel","channel":{"name":"General","public":true,"created_at":"2023-05-12T16:23:29.597849+00:00","id":"FBXZOeEECYQ","project":{"address":"1800 Ellis St, San Francisco, CA 94115, USA","name":"Ddd","created_at":"2023-05-12T16:23:29.597849+00:00","id":"om8LYkKicF0","address_components":{"place_id":"ChIJq25aW7eAhYAR3e73MndCrZ4","latitude":"37.782144","longitude":"-122.436059","street_address":"1800 Ellis St","postal_code":"94115","city":"San Francisco","country":"United States"},"general_channel_id":"FBXZOeEECYQ"}}},"created_at":"2023-05-12T16:23:29.597849+00:00","last_entry":{"content":{"detected_language":"it","entry_type":"message","text":"Ciao","ui_language":"en-US","author_id":"0a87c197-338c-4dc5-87db-46fdbd698fab","author":{"id":"0a87c197-338c-4dc5-87db-46fdbd698fab","first_name":"Ludovico","last_name":"Righi","profile_picture_preview_url":null},"translations":{"en":"Hi","de":"Hallo","pt-PT":"Olá","it":"Ciao","es":"Hola","sr":"Zdravo"}},"created_at":"2023-05-16T14:10:59.015992+00:00","id":"01H0JECSA7R9KEYSGKAHTN9BXQ"},"unread":0},{"chat":{"chat_type":"channel","channel":{"name":"General","public":true,"created_at":"2023-05-16T12:23:49.421360+00:00","id":"Dh0Y2PrJcx8","project":{"address":"Bahnhofstrasse 9, 8001 Zürich, Switzerland","name":"Ok","created_at":"2023-05-16T12:23:49.421360+00:00","id":"4lKy1ezoZPo","address_components":{"place_id":"ChIJHVU_awAKkEcRuwzdNqWfn-M","latitude":"47.36816160000001","longitude":"8.539703099999999","street_address":"Bahnhofstrasse 9","postal_code":"8001","city":"Zürich","country":"Switzerland"},"general_channel_id":"Dh0Y2PrJcx8"}}},"created_at":"2023-05-16T12:23:49.421360+00:00","last_entry":{"content":{"subject":{"id":"0a87c197-338c-4dc5-87db-46fdbd698fab","first_name":"Ludovico","last_name":"Righi"},"entry_type":"system_channel_action","object":null,"objects":null,"action":"CREATED"},"created_at":"2023-05-16T12:23:49.421360+00:00","id":"01H0J88JDDXHNW7RZRW9G46KY0"},"unread":0},{"chat":{"chat_type":"channel","channel":{"name":"Dd","public":true,"created_at":"2023-05-12T16:23:38.767133+00:00","id":"a8EQPA2rZlg","project":{"address":"1800 Ellis St, San Francisco, CA 94115, USA","name":"Ddd","created_at":"2023-05-12T16:23:29.597849+00:00","id":"om8LYkKicF0","address_components":{"place_id":"ChIJq25aW7eAhYAR3e73MndCrZ4","latitude":"37.782144","longitude":"-122.436059","street_address":"1800 Ellis St","postal_code":"94115","city":"San Francisco","country":"United States"},"general_channel_id":"FBXZOeEECYQ"}}},"created_at":"2023-05-12T16:23:38.767133+00:00","last_entry":{"content":{"author":{"id":"0a87c197-338c-4dc5-87db-46fdbd698fab","first_name":"Ludovico","last_name":"Righi","profile_picture_preview_url":null},"author_id":"0a87c197-338c-4dc5-87db-46fdbd698fab","url":"https://ludovico.beneticsapi.com/authorized/media/RyvQas8c1Ag/file/images/d2237c0f60b334e38664b29b0a3f3d1b9603cf6a6d5cfe75d5b5b2d30148120a.jpeg","media_id":"RyvQas8c1Ag","mime_type":"image/jpeg","ui_language":"en-US","caption":"","entry_type":"image","width":260,"height":195,"preview_url":"https://ludovico.beneticsapi.com/authorized/media/RyvQas8c1Ag/file/thumbnails/d2237c0f60b334e38664b29b0a3f3d1b9603cf6a6d5cfe75d5b5b2d30148120a.jpeg","caption_translations":null,"detected_language":null},"created_at":"2023-05-15T08:24:20.372161+00:00","id":"01H0F85B4MQ03A45TK2GEZC2W5"},"unread":0}]
 DEBUG  [Axios][Response] 12:05:47.154 PUT https://ludovico.beneticsapi.com/authorized/users/0a87c197-338c-4dc5-87db-46fdbd698fab/connections/el3nprKrTUQZjVa5cAN_xq:APA91bGkz5lwfMRZLeSfJsqcsofaTdK8u_slLUN8_SVLeV1OjZbGqX5o5_j6TMQY8avaZq5J-gEik_UraKm3Td37AQzDfKzJAXLNceaPzN8nDoWYf8_nbs1xff0Equ8jmzxkdWj47Tca 200
 DEBUG  Sending WebSocket heartbeat```

</details>
christocracy commented 1 year ago

Are you observing the plugin's own native logs? See Wiki Debugging and learn to use the method .emailLog. Also see API docs Logger.

github-actions[bot] commented 3 months ago

This issue is stale because it has been open for 30 days with no activity.

github-actions[bot] commented 3 months ago

This issue was closed because it has been inactive for 14 days since being marked as stale.