Giter Site home page Giter Site logo

Comments (9)

christocracy avatar christocracy commented on May 25, 2024

locationUpdateInterval

This is Android-only option.

You need to provide logs from before what you posted.

You mention "heartbeat" but provided no code of what you're doing with it.

from cordova-background-geolocation-lt.

danillo10 avatar danillo10 commented on May 25, 2024

What would be the ideal configuration for iOS to prevent it from blocking requests?

from cordova-background-geolocation-lt.

danillo10 avatar danillo10 commented on May 25, 2024

ℹī¸-[TSDBLogger db_save] Log committed
đŸ”ĩ-[TSLocationManager onHeartbeat] Heartbeat
⚡ī¸ TO JS {"location":{"uuid":"828D147B-B50D-45E4-976A-DC1CBBDA0E0E","battery":{"level":0.55000001192092896,"is_charging":true},"activity":{"type":"still","confidence":100},"event":"heartbeat","is_moving":false,"timestamp":"2024-02-27T19:00:49.708Z","age":0,"odomete
⚡ī¸ To Native -> BackgroundGeolocation getCurrentPosition 19903765
⚡ī¸ [log] - Registro - Heartbeat: {"location":{"uuid":"828D147B-B50D-45E4-976A-DC1CBBDA0E0E","battery":{"level":0.550000011920929,"is_charging":true},"activity":{"type":"still","confidence":100},"event":"heartbeat","is_moving":false,"timestamp":"2024-02-27T19:00:49.708Z","age":0,"odometer":2995.4,"extras":{},"coords":{"altitude":873.4,"ellipsoidal_altitude":0,"accuracy":23.7,"altitude_accuracy":1.4,"heading_accuracy":-1,"speed":-1,"latitude":-19.834561376805464,"speed_accuracy":-1,"longitude":-44.01713809980912,"floor":null,"heading":-1}}}
đŸ”ĩ-[TSLocationManager getCurrentPosition:]
🎾-[LocationManager startUpdatingLocation] ON
⚡ī¸ TO JS {"odometer":2995.4000000000001,"battery":{"is_charging":true,"level":0.55000001192092896},"timestamp":"2024-02-27T19:00:12.000Z","extras":{},"is_moving":false,"age":37734,"sample":true,"uuid":"7B6B2E64-4BED-4BE1-ADFA-DA658020DBED","coords":{"ellipsoidal_al
ℹī¸+[LocationAuthorization run:onCancel:] status: 3

📍<-19.83462667,-44.01698490> +/- 4.41m (speed 0.00 mps / course 113.91) @ 27/02/24, 16:00:12 Brasilia Standard Time

╔═══════════════════════════════════════════════════════════
║ -[LocationManager locationManager:didUpdateLocations:] Sample 1 of 3 (37734 ms old)
╚═══════════════════════════════════════════════════════════

📍<-19.83462667,-44.01698490> +/- 4.41m (speed 0.00 mps / course 113.91) @ 27/02/24, 16:00:20 Brasilia Standard Time
⚠ī¸-[LocationManager locationManager:didUpdateLocations:] (location-age -29737 ms)
⚡ī¸ To Native -> BackgroundGeolocation setConfig 19903766
ℹī¸-[TSConfig persist]
⚡ī¸ TO JS {"disableStopDetection":false,"maxBatchSize":-1,"locationsOrderDirection":"ASC","stopOnStationary":false,"url":"https://servicos24....","authorization":{"expires":-1,"strategy":"JWT","refreshHeaders":{"Authorization":"Bearer {acce

📍<-19.83456138,-44.01713810> +/- 23.70m (speed -1.00 mps / course -1.00) @ 27/02/24, 16:00:49 Brasilia Standard Time

╔═══════════════════════════════════════════════════════════
║ -[LocationManager locationManager:didUpdateLocations:] Sample 2 of 3 (17 ms old)
╚═══════════════════════════════════════════════════════════
⚡ī¸ TO JS {"battery":{"level":0.55000001192092896,"is_charging":true},"age":37782,"extras":{},"odometer":2995.4000000000001,"is_moving":false,"coords":{"accuracy":4.4000000000000004,"heading_accuracy":45.979999999999997,"floor":null,"latitude":-19.834626666288667,"s
⚡ī¸ To Native -> BackgroundGeolocation setConfig 19903767
ℹī¸-[TSConfig persist]
⚡ī¸ TO JS {"geofenceProximityRadius":2000,"persistMode":2,"desiredAccuracy":-1,"lastLocationAuthorizationStatus":3,"params":{"veiculo_id":1,"longitude":-44.016984896775348,"user_id":1,"motorista_id":1,"data_hora":"2024-02-27 19:00:12","status":"Viagem finalizada","e

╔═══════════════════════════════════════════════════════════
║ -[TSLocationManager createMotionTypeChangedHandler]_block_invoke | still/100 | isMoving: 0
╚═══════════════════════════════════════════════════════════

📍<-19.83456138,-44.01713810> +/- 23.70m (speed -1.00 mps / course -1.00) @ 27/02/24, 16:00:50 Brasilia Standard Time
🔴-[LocationManager stopUpdatingLocation] OFF

╔═══════════════════════════════════════════════════════════
║ -[LocationManager locationManager:didUpdateLocations:] Sample 3 of 3 (12 ms old)
╚═══════════════════════════════════════════════════════════
ℹī¸-[PolygonGeofencingService setLocation:] Already updating location
đŸ”ĩ-[TSLocationManager calculateMedianLocationAccuracy:] Median location accuracy: 14.1
ℹī¸-[PolygonGeofencingService setLocation:] Already updating location
⚡ī¸ TO JS {"uuid":"EDCC4E26-550A-4791-9B9A-EC72F752A2C2","age":38227,"coords":{"altitude_accuracy":4,"latitude":-19.834626666288667,"speed":0,"heading_accuracy":45.979999999999997,"heading":113.91,"speed_accuracy":0.070000000000000007,"longitude":-44.016984896775348
⚡ī¸ TO JS {"battery":{"is_charging":true,"level":0.55000001192092896},"age":38227,"activity":{"type":"still","confidence":100},"is_moving":false,"coords":{"altitude_accuracy":4,"speed":0,"floor":null,"heading":113.91,"speed_accuracy":0.070000000000000007,"accuracy":
⚡ī¸ To Native -> BackgroundGeolocation setConfig 19903768
⚡ī¸ To Native -> BackgroundGeolocation setConfig 19903769
ℹī¸-[TSConfig persist]
✅-[TSLocationManager persistLocation:]_block_invoke INSERT: EDCC4E26-550A-4791-9B9A-EC72F752A2C2

╔═══════════════════════════════════════════════════════════
║ -[TSHttpService flush:]
╚═══════════════════════════════════════════════════════════
✅-[BackgroundTaskManager createBackgroundTask] 8
✅-[TSHttpService schedulePost] LOCKED: 87B8CF5A-DBF5-47CD-B5AA-86EE5B149EC3
⚡ī¸ TO JS {"disableStopDetection":false,"maxBatchSize":-1,"locationsOrderDirection":"ASC","stopOnStationary":false,"url":"https://servicos24...","authorization":{"expires":-1,"strategy":"JWT","refreshHeaders":{"Authorization":"Bearer {acce
ℹī¸-[TSConfig persist]
⚡ī¸ TO JS {"geofenceProximityRadius":2000,"persistMode":2,"desiredAccuracy":-1,"lastLocationAuthorizationStatus":3,"params":{"veiculo_id":1,"longitude":-44.016984896775348,"user_id":1,"motorista_id":1,"data_hora":"2024-02-27 19:00:12","status":"Viagem finalizada","e
⚡ī¸ To Native -> BackgroundGeolocation getCount 19903770
⚡ī¸ TO JS {"count":449}

ATS failed system trust
Connection 6: system TLS Trust evaluation failed(-9802)
Connection 6: TLS Trust encountered error 3:-9802
Connection 6: encountered error(3:-9802)
Task <1C1C4F6F-771B-4349-9122-0F42AFFC0021>.<1> HTTP load failed, 0/0 bytes (error code: -1200 [3:-9802])
Task <1C1C4F6F-771B-4349-9122-0F42AFFC0021>.<1> finished with error [-1200] Error Domain=NSURLErrorDomain Code=-1200 "An SSL error has occurred and a secure connection to the server cannot be made." UserInfo={NSLocalizedRecoverySuggestion=Would you like to connect to the server anyway?, _kCFStreamErrorDomainKey=3, NSErrorPeerCertificateChainKey=(
"<cert(0x13c822a00) s: servicos24horas.com i: R3>",
"<cert(0x13c823200) s: R3 i: ISRG Root X1>",
"<cert(0x13c814400) s: ISRG Root X1 i: DST Root CA X3>"
), NSErrorClientCertificateStateKey=0, NSErrorFailingURLKey=https://servicos24..., NSErrorFailingURLStringKey=https://servicos24..., NSUnderlyingError=0x283f2f0c0 {Error Domain=kCFErrorDomainCFNetwork Code=-1200 "(null)" UserInfo={_kCFStreamPropertySSLClientCertificateState=0, kCFStreamPropertySSLPeerTrust=<SecTrustRef: 0x2800a9360>, _kCFNetworkCFStreamSSLErrorOriginalValue=-9802, _kCFStreamErrorDomainKey=3, _kCFStreamErrorCodeKey=-9802, kCFStreamPropertySSLPeerCertificates=(
"<cert(0x13c822a00) s: servicos24horas.com i: R3>",
"<cert(0x13c823200) s: R3 i: ISRG Root X1>",
"<cert(0x13c814400) s: ISRG Root X1 i: DST Root CA X3>"
)}}, _NSURLErrorRelatedURLSessionTaskErrorKey=(
"LocalDataTask <1C1C4F6F-771B-4349-9122-0F42AFFC0021>.<1>"
), _kCFStreamErrorCodeKey=-9802, _NSURLErrorFailingURLSessionTaskErrorKey=LocalDataTask <1C1C4F6F-771B-4349-9122-0F42AFFC0021>.<1>, NSURLErrorFailingURLPeerTrustErrorKey=<SecTrustRef: 0x2800a9360>, NSLocalizedDescription=An SSL error has occurred and a secure connection to the server cannot be made.}
⚠ī¸-[HttpResponse handleResponse] HTTP ERROR: 0


  • An SSL error has occurred and a secure connection to the server cannot be made.

{
NSErrorClientCertificateStateKey = 0;
NSErrorFailingURLKey = "https://...";
NSErrorFailingURLStringKey = "https://...";
NSErrorPeerCertificateChainKey = (
"<cert(0x13c822a00) s: servicos24horas.com i: R3>",
"<cert(0x13c823200) s: R3 i: ISRG Root X1>",
"<cert(0x13c814400) s: ISRG Root X1 i: DST Root CA X3>"
);
NSLocalizedDescription = "An SSL error has occurred and a secure connection to the server cannot be made.";
NSLocalizedRecoverySuggestion = "Would you like to connect to the server anyway?";
NSURLErrorFailingURLPeerTrustErrorKey = "<SecTrustRef: 0x2800a9360>";
NSUnderlyingError = "Error Domain=kCFErrorDomainCFNetwork Code=-1200 "(null)" UserInfo={_kCFStreamPropertySSLClientCertificateState=0, kCFStreamPropertySSLPeerTrust=<SecTrustRef: 0x2800a9360>, _kCFNetworkCFStreamSSLErrorOriginalValue=-9802, _kCFStreamErrorDomainKey=3, _kCFStreamErrorCodeKey=-9802, kCFStreamPropertySSLPeerCertificates=(\n "<cert(0x13c822a00) s: servicos24horas.com i: R3>",\n "<cert(0x13c823200) s: R3 i: ISRG Root X1>",\n "<cert(0x13c814400) s: ISRG Root X1 i: DST Root CA X3>"\n)}";
"_NSURLErrorFailingURLSessionTaskErrorKey" = "LocalDataTask <1C1C4F6F-771B-4349-9122-0F42AFFC0021>.<1>";
"_NSURLErrorRelatedURLSessionTaskErrorKey" = (
"LocalDataTask <1C1C4F6F-771B-4349-9122-0F42AFFC0021>.<1>"
);
"_kCFStreamErrorCodeKey" = "-9802";
"_kCFStreamErrorDomainKey" = 3;
}
✅-[TSHttpService post:]_block_invoke UNLOCKED: 87B8CF5A-DBF5-47CD-B5AA-86EE5B149EC3

╔═══════════════════════════════════════════════════════════
║ -[TSHttpService finish:error:] Success: 0
╚═══════════════════════════════════════════════════════════
✅-[BackgroundTaskManager stopBackgroundTask:]_block_invoke 8 OF (
3,
8
)
⚡ī¸ TO JS {"success":false,"responseText":"","status":0}
⚡ī¸ [log] - Registro - Http event: {"success":false,"responseText":"","status":0}
⚡ī¸ To Native -> Network getStatus 19903771
⚡ī¸ TO JS {"connectionType":"wifi","connected":true}
⚡ī¸ [log] - Registro - Http event convite offline: {"id":453,"status":"Viagem finalizada","origem":"belo horizonte / mg","destino":"belo horizonte / MG","material":"cobre","orientacoes":null,"data":"2024-02-27","pedido_id":34,"pedido_detalhe_id":483,"latitude":-19.834626917745762,"longitude":-44.01698456149922,"user_id":1,"motorista_id":1,"veiculo_id":1,"data_hora":"2024-02-27 19:00:06"}

⚡ī¸ [error] - ERROR Error: Uncaught (in promise): [object Boolean]

╔═══════════════════════════════════════════════════════════
║ -[TSLocationManager createMotionTypeChangedHandler]_block_invoke | still/100 | isMoving: 0
╚═══════════════════════════════════════════════════════════
đŸ”ĩ-[BackgroundTaskManager startPreventSuspendTimer:] BG time remaining: 20 | Total tasks: 1
đŸ”ĩ-[TSLocationManager onSuspend:] enabled? 1)
ℹī¸-[TSDBLogger db_save] Log committed
đŸ”ĩ-[BackgroundTaskManager onResume:] Current preventSuspend tasks: 1
đŸ”ĩ-[TSLocationManager onResume:] enabled? 1
ℹī¸-[LocationDAO purge:] 1
ℹī¸-[TSDBLogger db_save] Log committed

╔═══════════════════════════════════════════════════════════
║ -[TSHttpService flush:]
╚═══════════════════════════════════════════════════════════
✅-[BackgroundTaskManager createBackgroundTask] 13
✅-[TSHttpService schedulePost] LOCKED: 87B8CF5A-DBF5-47CD-B5AA-86EE5B149EC3

╔═══════════════════════════════════════════════════════════
║ -[TSLocationManager createMotionTypeChangedHandler]_block_invoke | still/33 | isMoving: 0
╚═══════════════════════════════════════════════════════════

╔═══════════════════════════════════════════════════════════
║ -[TSLocationManager createMotionTypeChangedHandler]_block_invoke | still/100 | isMoving: 0
╚═══════════════════════════════════════════════════════════

╔═══════════════════════════════════════════════════════════
║ -[TSLocationManager createMotionTypeChangedHandler]_block_invoke | still/100 | isMoving: 0
╚═══════════════════════════════════════════════════════════

╔═══════════════════════════════════════════════════════════
║ -[TSLocationManager createMotionTypeChangedHandler]block_invoke | still/100 | isMoving: 0
╚═══════════════════════════════════════════════════════════
ℹī¸-[TSDBLogger db_delete] maxAge: 604800
đŸ”ĩ-[TSLocationManager onHeartbeat] Heartbeat
⚡ī¸ TO JS {"location":{"coords":{"accuracy":23.699999999999999,"heading_accuracy":-1,"floor":null,"latitude":-19.834561376805464,"speed_accuracy":-1,"heading":-1,"longitude":-44.017138099809117,"speed":-1,"altitude_accuracy":1.3999999999999999,"altitude":873.3999999
⚡ī¸ [log] - Registro - Heartbeat: {"location":{"coords":{"accuracy":23.7,"heading_accuracy":-1,"floor":null,"latitude":-19.834561376805464,"speed_accuracy":-1,"heading":-1,"longitude":-44.01713809980912,"speed":-1,"altitude_accuracy":1.4,"altitude":873.4,"ellipsoidal_altitude":0},"uuid":"9614440B-BC1A-4727-A607-45FAA6CA77CE","timestamp":"2024-02-27T19:01:49.708Z","activity":{"confidence":100,"type":"still"},"odometer":2995.4,"battery":{"is_charging":true,"level":0.6000000238418579},"age":0,"extras":{},"event":"heartbeat","is_moving":false}}
Background Task 13 ("Called by App, from -[TSHttpService flush:]"), was created over 30 seconds ago. In applications running in the background, this creates a risk of termination. Remember to call UIApplication.endBackgroundTask(
:) for your task in a timely manner to avoid this.

from cordova-background-geolocation-lt.

christocracy avatar christocracy commented on May 25, 2024

An SSL error has occurred and a secure connection to the server cannot be made.

Are you not concerned about that?

from cordova-background-geolocation-lt.

danillo10 avatar danillo10 commented on May 25, 2024

An SSL error has occurred and a secure connection to the server cannot be made.

Are you not concerned about that?

The application is still in the testing phase, I would like to know only why it blocked and is no longer sending locations, and if there is a way to resolve this.

from cordova-background-geolocation-lt.

christocracy avatar christocracy commented on May 25, 2024

What makes you think there's a problem?

from cordova-background-geolocation-lt.

christocracy avatar christocracy commented on May 25, 2024

If you're relying on preventSuspend to do something every 30s, it's not guaranteed to happen. You should not rely on preventSuspend, it's a brittle hack.

from cordova-background-geolocation-lt.

danillo10 avatar danillo10 commented on May 25, 2024

I think the issue might be the certificate indeed, thank you!

from cordova-background-geolocation-lt.

danillo10 avatar danillo10 commented on May 25, 2024

Resolved, I renewed the SSL certificate and enabled it, and it worked fine.

from cordova-background-geolocation-lt.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤ī¸ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.