Skip to content

[Bug]: After some time plugin enters the strange loop/state where it doesn't send "still" event #2460

@Razikus

Description

@Razikus

Required Reading

  • Confirmed

Plugin Version

5.0.0-beta.4

Mobile operating-system(s)

  • iOS
  • Android

Device Manufacturer(s) and Model(s)

POCO F5

Device operating-systems(s)

Android 14

React Native / Expo version

Expo 54.0.20

What happened?

While testing application and implementation around I found out that sometimes plugin is not sending "final" still event
So when parking in garage, im going to home, put the phone on table, and it never sends typical event motion change
Then location is somehow in very strange state, and adb logcat is bombarded

I will soon deliver more logs, because it happen pretty often

I set to "no battery optimization"
Tracking is set to always

Last http event I got was

{"location":{"activity":{"confidence":100,"type":"in_vehicle"},"age":4.67,"battery":{"is_charging":false,"level":0.72},"coords":{"accuracy":3.79,"altitude":301.8,"ellipsoidal_altitude":301.8,"heading":293,"latitude":X,"longitude":X,"speed":8.31},"extras":{},"is_moving":true,"odometer":202311.83,"odometer_error":215.61,"timestamp":"2026-01-10T19:02:36.947Z","uuid":"960eafd5-52a7-478d-9075-58b735f4a741"}}

In the full test device already was in still mode, and wake up again.
Example here

{"location":{"activity":{"confidence":100,"type":"still"},"age":0.867,"battery":{"is_charging":false,"level":0.79},"coords":{"accuracy":3.79,"altitude":276.6,"ellipsoidal_altitude":276.6,"heading":-1,"latitude":X,"longitude":X,"speed":0},"event":"motionchange","extras":{},"is_moving":false,"odometer":107259.47,"odometer_error":173.7,"timestamp":"2026-01-10T11:45:10.82Z","uuid":"7db4f565-6c7e-4273-bd0c-5541b51c78de"}}
{"location":{"activity":{"confidence":100,"type":"in_vehicle"},"age":276.62,"battery":{"is_charging":false,"level":0.76},"coords":{"accuracy":4.2,"altitude":272.1,"ellipsoidal_altitude":272.1,"heading":311,"latitude":X,"longitude":X,"speed":12.53},"event":"motionchange","extras":{},"is_moving":true,"odometer":107630.62,"odometer_error":180.86,"timestamp":"2026-01-10T17:21:00.93Z","uuid":"b38e5a69-5459-46c2-a94c-360f5dd50aa2"}}

I see a pattern on this, because that happen to me at least twice before in the same way
Go back into garage, put phone on table, then its bombarding logs and it's in strange state

Im going to test 2 more things:
1 - im going to check if I will go with this phone somewhere it will report location, then go back, maybe it will auto-heal
2 - im going to build app in full-verbose mode to send you more logs

1 - Indeed plugin auto-heals, I mean I think again it reported location, then I came back, then it enters still mode

NEXT event after "in_vehicle"

{"location":{"activity":{"confidence":100,"type":"walking"},"age":0.05,"battery":{"is_charging":false,"level":0.75},"coords":{"accuracy":3,"altitude":302.5,"ellipsoidal_altitude":302.5,"heading":313.38,"latitude":X,"longitude":X,"speed":1.43},"extras":{},"is_moving":true,"odometer":202462.19,"odometer_error":215.65,"timestamp":"2026-01-10T19:50:23.354Z","uuid":"0e3649e2-532b-4786-b705-683470eecf8d"}}

Still event

{"location":{"activity":{"confidence":100,"type":"still"},"age":0.4,"battery":{"is_charging":false,"level":0.73},"coords":{"accuracy":14.79,"altitude":302.3,"ellipsoidal_altitude":302.3,"heading":54.84,"latitude":X,"longitude":X,"speed":0.22},"extras":{},"is_moving":true,"odometer":202892.22,"odometer_error":218.12,"timestamp":"2026-01-10T20:15:12.954Z","uuid":"c38fa355-28f4-49b9-bf1c-43671e74bc01"}}

Finally motionchange

{"location":{"activity":{"confidence":100,"type":"still"},"age":0.763,"battery":{"is_charging":false,"level":0.73},"coords":{"accuracy":11.82,"altitude":302.3,"ellipsoidal_altitude":302.3,"heading":-1,"latitude":X,"longitude":X,"speed":0.06},"event":"motionchange","extras":{},"is_moving":false,"odometer":202902.64,"odometer_error":218.76,"timestamp":"2026-01-10T20:20:10.955Z","uuid":"eb75887d-4e1a-4ccb-8b60-b688bcdf3620"}}

And these logs are gone

Plugin Code and/or Config

{
            reset: false,
            geolocation: {
                desiredAccuracy: BackgroundGeolocation.DesiredAccuracy.High,
                distanceFilter: 100,
                stationaryRadius: 100,
                stopTimeout: 5,
            },
            persistence: {
                maxRecordsToPersist: 1
            },
            http: {
                url: 'X',
                method: 'POST',
                autoSync: true,
                batchSync: false,
                maxBatchSize: 1,
                headers: {
                    'Content-Type': 'application/json',
                    'X-LOCATION-TOKEN': token,
                },
            },
            logger: {
                debug: __DEV__,
                logLevel: __DEV__
                    ? BackgroundGeolocation.LogLevel.Verbose
                    : BackgroundGeolocation.LogLevel.Off,
            },
            app: {
                stopOnTerminate: false,
                startOnBoot: true,
                enableHeadless: true,
                heartbeatInterval: 180,
                preventSuspend: true,
                notification: {
                    title: "X",
                    text: "X!",
                    channelName: "X,
                    priority: BackgroundGeolocation.NotificationPriority.Low,
                    sticky: true,
                },
                backgroundPermissionRationale: {
                    title: "X",
                    message:
                        'X"{backgroundPermissionOptionLabel}" X.',
                    positiveAction: "X",
                    negativeAction: "X",
                },
            },
        }

Relevant log output

adb logcat is BOMBARDED with these logs

01-10 20:23:13.901  1393 15868 W libc    : Access denied finding property "persist.vendor.sensors.hal.log"
01-10 20:23:13.929  1393 15884 W libc    : Access denied finding property "persist.vendor.sensors.hal.log"
01-10 20:23:13.929  1393 15860 W libc    : Access denied finding property "persist.vendor.sensors.hal.log"
01-10 20:23:13.943  1393 15868 W libc    : Access denied finding property "persist.vendor.sensors.hal.log"
01-10 20:23:13.954  1393  2527 E LocSvc_GnssAdapter: 0 !!!! is mRecordLoseCount  sv report
01-10 20:23:13.954  1393  2851 E power   : ISystemSuspend::getService() failed.
01-10 20:23:13.969  1393 15860 W libc    : Access denied finding property "persist.vendor.sensors.hal.log"
01-10 20:23:13.969  1393 15884 W libc    : Access denied finding property "persist.vendor.sensors.hal.log"
01-10 20:23:13.982  1393 15868 W libc    : Access denied finding property "persist.vendor.sensors.hal.log"
01-10 20:23:14.009  1393 15884 W libc    : Access denied finding property "persist.vendor.sensors.hal.log"
01-10 20:23:14.010  1393 15860 W libc    : Access denied finding property "persist.vendor.sensors.hal.log"
01-10 20:23:14.013  1393  2851 I LocSvc_GnssAdapter: mixdr: 1 0 0 0 0 0 0 0 0 1 0.000000 X.992844 X.394915 X.096680 X.992844 X.394915 0.000000
01-10 20:23:14.022  1393 15868 W libc    : Access denied finding property "persist.vendor.sensors.hal.log"
01-10 20:23:14.024  5225  5286 I FusedLocation: (REDACTED) location delivery to %s blocked - too fast
01-10 20:23:14.024  5225  5286 I FusedLocation: (REDACTED) location delivery to %s blocked - too fast
01-10 20:23:14.025  5225  5286 I FusedLocation: (REDACTED) location delivery to %s blocked - too close
01-10 20:23:14.026  5225  5286 I FusedLocation: (REDACTED) location delivery to %s blocked - too fast
01-10 20:23:14.026  5225  5286 I FusedLocation: (REDACTED) location delivery to %s blocked - too close
01-10 20:23:14.051  1393 15884 W libc    : Access denied finding property "persist.vendor.sensors.hal.log"
01-10 20:23:14.051  1393 15860 W libc    : Access denied finding property "persist.vendor.sensors.hal.log"
01-10 20:23:14.064  1393 15868 W libc    : Access denied finding property "persist.vendor.sensors.hal.log"
01-10 20:23:14.088  1393 15884 W libc    : Access denied finding property "persist.vendor.sensors.hal.log"
01-10 20:23:14.089  1393 15860 W libc    : Access denied finding property "persist.vendor.sensors.hal.log"
01-10 20:23:14.103  1393 15868 W libc    : Access denied finding property "persist.vendor.sensors.hal.log"
01-10 20:23:14.130  1393 15860 W libc    : Access denied finding property "persist.vendor.sensors.hal.log"
01-10 20:23:14.131  1393 15884 W libc    : Access denied finding property "persist.vendor.sensors.hal.log"
01-10 20:23:14.143  1393 15868 W libc    : Access denied finding property "persist.vendor.sensors.hal.log"
01-10 20:23:14.170  1393 15884 W libc    : Access denied finding property "persist.vendor.sensors.hal.log"
01-10 20:23:14.171  1393 15860 W libc    : Access denied finding property "persist.vendor.sensors.hal.log"
01-10 20:23:14.182  1393 15868 W libc    : Access denied finding property "persist.vendor.sensors.hal.log"
01-10 20:23:14.213  1393 15884 W libc    : Access denied finding property "persist.vendor.sensors.hal.log"
01-10 20:23:14.213  1393 15860 W libc    : Access denied finding property "persist.vendor.sensors.hal.log"
01-10 20:23:14.221  1393 15868 W libc    : Access denied finding property "persist.vendor.sensors.hal.log"
01-10 20:23:14.253  1393 15884 W libc    : Access denied finding property "persist.vendor.sensors.hal.log"
01-10 20:23:14.254  1393 15860 W libc    : Access denied finding property "persist.vendor.sensors.hal.log"
01-10 20:23:14.261  1393 15868 W libc    : Access denied finding property "persist.vendor.sensors.hal.log"
01-10 20:23:14.292  1393 15884 W libc    : Access denied finding property "persist.vendor.sensors.hal.log"
01-10 20:23:14.293  1393 15860 W libc    : Access denied finding property "persist.vendor.sensors.hal.log"
01-10 20:23:14.301  1393 15868 W libc    : Access denied finding property "persist.vendor.sensors.hal.log"
01-10 20:23:14.333  1393 15860 W libc    : Access denied finding property "persist.vendor.sensors.hal.log"
01-10 20:23:14.333  1393 15884 W libc    : Access denied finding property "persist.vendor.sensors.hal.log"
01-10 20:23:14.341  1393 15868 W libc    : Access denied finding property "persist.vendor.sensors.hal.log"
01-10 20:23:14.374  1393 15884 W libc    : Access denied finding property "persist.vendor.sensors.hal.log"
01-10 20:23:14.374  1393 15860 W libc    : Access denied finding property "persist.vendor.sensors.hal.log"
01-10 20:23:14.382  1393 15868 W libc    : Access denied finding property "persist.vendor.sensors.hal.log"
01-10 20:23:14.414  1393 15860 W libc    : Access denied finding property "persist.vendor.sensors.hal.log"
01-10 20:23:14.415  1393 15884 W libc    : Access denied finding property "persist.vendor.sensors.hal.log"
01-10 20:23:14.422  1393 15868 W libc    : Access denied finding property "persist.vendor.sensors.hal.log"
01-10 20:23:14.452  1393 15860 W libc    : Access denied finding property "persist.vendor.sensors.hal.log"
01-10 20:23:14.452  1393 15884 W libc    : Access denied finding property "persist.vendor.sensors.hal.log"
01-10 20:23:14.463  1393 15868 W libc    : Access denied finding property "persist.vendor.sensors.hal.log"
01-10 20:23:14.493  1393 15860 W libc    : Access denied finding property "persist.vendor.sensors.hal.log"
01-10 20:23:14.493  1393 15884 W libc    : Access denied finding property "persist.vendor.sensors.hal.log"
01-10 20:23:14.503  1393 15868 W libc    : Access denied finding property "persist.vendor.sensors.hal.log"
01-10 20:23:14.533  1393 15884 W libc    : Access denied finding property "persist.vendor.sensors.hal.log"
01-10 20:23:14.534  1393 15860 W libc    : Access denied finding property "persist.vendor.sensors.hal.log"
01-10 20:23:14.544  1393 15868 W libc    : Access denied finding property "persist.vendor.sensors.hal.log"
01-10 20:23:14.574  1393 15884 W libc    : Access denied finding property "persist.vendor.sensors.hal.log"
01-10 20:23:14.574  1393 15860 W libc    : Access denied finding property "persist.vendor.sensors.hal.log"
01-10 20:23:14.583  1393 15868 W libc    : Access denied finding property "persist.vendor.sensors.hal.log"
01-10 20:23:14.615  1393 15860 W libc    : Access denied finding property "persist.vendor.sensors.hal.log"
01-10 20:23:14.616  1393 15884 W libc    : Access denied finding property "persist.vendor.sensors.hal.log"
01-10 20:23:14.623  1393 15868 W libc    : Access denied finding property "persist.vendor.sensors.hal.log"

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions