polarofficial / polar-ble-sdk

Repository includes SDK and code examples. More info https://polar.com/en/developers
Other
447 stars 147 forks source link

PmdOfflineTriggerStatus parsing failed no matching status for byte 0x4 #425

Closed orestesgaolin closed 3 months ago

orestesgaolin commented 7 months ago

Platform on which you observed the bug:

Device on which you observed the bug:

Describe the bug

Device with firmware 2.1.1 reports unsupported status when using SDK (I think it's SDK 5.5.0) when setting or checking the offline trigger status.

How to Reproduce

n/a

Expected behavior

Unknown status is handled gracefully

Screenshots and logs

Non-fatal Exception: fg.e: PmdOfflineTriggerStatus parsing failed no matching status for byte 0x4
       at com.polar.androidcommunications.api.ble.model.gatt.client.pmd.PmdOfflineRecTriggerStatus$Companion.parseFromResponse(PmdOfflineTrigger.kt:27)
       at com.polar.androidcommunications.api.ble.model.gatt.client.pmd.PmdOfflineTrigger$Companion.parseFromResponse(PmdOfflineTrigger.kt:53)
       at com.polar.androidcommunications.api.ble.model.gatt.client.pmd.BlePMDClient$getOfflineRecordingTriggerStatus$1.apply(BlePMDClient.kt:457)
       at com.polar.androidcommunications.api.ble.model.gatt.client.pmd.BlePMDClient$getOfflineRecordingTriggerStatus$1.apply(BlePMDClient.kt:456)
       at io.reactivex.rxjava3.internal.operators.single.SingleMap$MapSingleObserver.onSuccess(SingleMap.java:58)
       at io.reactivex.rxjava3.internal.operators.single.SingleSubscribeOn$SubscribeOnObserver.onSuccess(SingleSubscribeOn.java:68)
       at io.reactivex.rxjava3.internal.operators.single.SingleCreate$Emitter.onSuccess(SingleCreate.java:68)
       at com.polar.androidcommunications.api.ble.model.gatt.client.pmd.BlePMDClient.sendControlPointCommand$lambda$16(BlePMDClient.kt:268)
       at io.reactivex.rxjava3.internal.operators.single.SingleCreate.subscribeActual(SingleCreate.java:40)
       at io.reactivex.rxjava3.core.Single.subscribe(Single.java:4855)
       at io.reactivex.rxjava3.internal.operators.single.SingleSubscribeOn$SubscribeOnObserver.run(SingleSubscribeOn.java:89)
       at io.reactivex.rxjava3.core.Scheduler$DisposeTask.run(Scheduler.java:644)
       at io.reactivex.rxjava3.internal.schedulers.ScheduledRunnable.run(ScheduledRunnable.java:65)
       at io.reactivex.rxjava3.internal.schedulers.ScheduledRunnable.call(ScheduledRunnable.java:56)
       at java.util.concurrent.FutureTask.run(FutureTask.java:264)
       at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:307)
       at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
       at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:644)
       at java.lang.Thread.run(Thread.java:1012)
jimmyzumthurm commented 5 months ago

Hi @orestesgaolin Did you come across this issue again ? I suspect that doing a factory defaults would solve this issue. Device version you have 2.1.1 could have been updated from an older version without doing a factory defaults, which would have some incompatibilities with the trigger storing.

jimmyzumthurm commented 3 months ago

@orestesgaolin I will close now, but please re-open if this happens again. I'm really suspecting device 2.1.1 didn't have proper factory defaults made after it was upgraded from older version in production, and that resulted in some file incompatibilities. Hopefully this doesn't occur anymore.