Skip to content

Bug in full sync #1494

Description

@1080818283a-cloud

Preflight Check (Required)

Bug Description

When im click on sync all services or sync with health connect it says in the unexpected error occurred sorry for the inconvenience

Steps to Reproduce

1 open the app
2 click on sync all services or click on sync with the health connect
3 the error will happen

Debug Log (Required)

Build version: 0.6.2 
Current date: 2026-08-27 07:56:01 
Device: Xiaomi 2107113SG 
OS version: Android 14 (SDK 34) 
 
Stack trace:  
java.lang.IllegalArgumentException: Record time must not be in the future, record time: 2026-08-27T08:19:00Z currentTime: 2026-08-27T04:25:47.584332Z
	at android.health.connect.datatypes.InstantRecord.<init>(InstantRecord.java:50)
	at android.health.connect.datatypes.WeightRecord.<init>(WeightRecord.java:82)
	at android.health.connect.datatypes.WeightRecord.<init>(WeightRecord.java:0)
	at android.health.connect.datatypes.WeightRecord$Builder.build(WeightRecord.java:173)
	at androidx.health.connect.client.impl.platform.records.RecordConvertersKt$$ExternalSyntheticApiModelOutline127.m(r8-map-id-58d6fab343006fc8158418c5344e0d9d29433db6177c4d48a6a62970fe43c6ab:25)
	at androidx.health.connect.client.impl.platform.records.RecordConvertersKt.toPlatformWeightRecord(r8-map-id-58d6fab343006fc8158418c5344e0d9d29433db6177c4d48a6a62970fe43c6ab:37)
	at androidx.health.connect.client.impl.platform.records.RecordConvertersKt.toPlatformRecord(r8-map-id-58d6fab343006fc8158418c5344e0d9d29433db6177c4d48a6a62970fe43c6ab:562)
	at androidx.health.connect.client.records.WeightRecord.<init>(r8-map-id-58d6fab343006fc8158418c5344e0d9d29433db6177c4d48a6a62970fe43c6ab:27)
	at com.health.openscale.sync.core.sync.HealthConnectSync.buildWeightRecord(r8-map-id-58d6fab343006fc8158418c5344e0d9d29433db6177c4d48a6a62970fe43c6ab:43)
	at com.health.openscale.sync.core.sync.HealthConnectSync.buildRecords(r8-map-id-58d6fab343006fc8158418c5344e0d9d29433db6177c4d48a6a62970fe43c6ab:6)
	at com.health.openscale.sync.core.sync.HealthConnectSync.fullSync(r8-map-id-58d6fab343006fc8158418c5344e0d9d29433db6177c4d48a6a62970fe43c6ab:22)
	at com.health.openscale.sync.core.service.HealthConnectService.insertAll(r8-map-id-58d6fab343006fc8158418c5344e0d9d29433db6177c4d48a6a62970fe43c6ab:120)
	at com.health.openscale.sync.core.service.ServiceInterface.reconcile(r8-map-id-58d6fab343006fc8158418c5344e0d9d29433db6177c4d48a6a62970fe43c6ab:35)
	at com.health.openscale.sync.core.service.ServiceInterface.runFullSync(r8-map-id-58d6fab343006fc8158418c5344e0d9d29433db6177c4d48a6a62970fe43c6ab:184)
	at com.health.openscale.sync.gui.components.SyncUiComponentsKt$SyncActionButtons$3$1$1.invokeSuspend(r8-map-id-58d6fab343006fc8158418c5344e0d9d29433db6177c4d48a6a62970fe43c6ab:30)
	at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(r8-map-id-58d6fab343006fc8158418c5344e0d9d29433db6177c4d48a6a62970fe43c6ab:11)
	at kotlinx.coroutines.internal.DispatchedContinuationKt.resumeCancellableWith(r8-map-id-58d6fab343006fc8158418c5344e0d9d29433db6177c4d48a6a62970fe43c6ab:130)
	at kotlinx.coroutines.intrinsics.CancellableKt.startCoroutineCancellable(r8-map-id-58d6fab343006fc8158418c5344e0d9d29433db6177c4d48a6a62970fe43c6ab:17)
	at kotlinx.coroutines.CoroutineStart.invoke(r8-map-id-58d6fab343006fc8158418c5344e0d9d29433db6177c4d48a6a62970fe43c6ab:34)
	at kotlinx.coroutines.AbstractCoroutine.start(r8-map-id-58d6fab343006fc8158418c5344e0d9d29433db6177c4d48a6a62970fe43c6ab:1)
	at kotlinx.coroutines.BuildersKt__Builders_commonKt.launch(r8-map-id-58d6fab343006fc8158418c5344e0d9d29433db6177c4d48a6a62970fe43c6ab:23)
	at kotlinx.coroutines.BuildersKt.launch(dex-id-ef5be388164b32df983a014b0c0d112eac8f253c:1)
	at kotlinx.coroutines.BuildersKt__Builders_commonKt.launch$default(r8-map-id-58d6fab343006fc8158418c5344e0d9d29433db6177c4d48a6a62970fe43c6ab:13)
	at kotlinx.coroutines.BuildersKt.launch$default(dex-id-ef5be388164b32df983a014b0c0d112eac8f253c:1)
	at com.health.openscale.sync.gui.components.SyncUiComponentsKt.SyncActionButtons$lambda$5$0(r8-map-id-58d6fab343006fc8158418c5344e0d9d29433db6177c4d48a6a62970fe43c6ab:30)
	at com.health.openscale.sync.gui.components.SyncUiComponentsKt.$r8$lambda$_Wa0BsAHQzLzgFtOTyxL1hgohkg(r8-map-id-58d6fab343006fc8158418c5344e0d9d29433db6177c4d48a6a62970fe43c6ab:1)
	at androidx.compose.runtime.GapComposer$$ExternalSyntheticLambda3.invoke(r8-map-id-58d6fab343006fc8158418c5344e0d9d29433db6177c4d48a6a62970fe43c6ab:22)
	at androidx.compose.foundation.ClickableNode.handleUpEvent(r8-map-id-58d6fab343006fc8158418c5344e0d9d29433db6177c4d48a6a62970fe43c6ab:27)
	at androidx.compose.foundation.ClickableNode.onPointerEvent-H0pRuoY(r8-map-id-58d6fab343006fc8158418c5344e0d9d29433db6177c4d48a6a62970fe43c6ab:76)
	at androidx.compose.ui.input.pointer.Node.dispatchMainEventPass(r8-map-id-58d6fab343006fc8158418c5344e0d9d29433db6177c4d48a6a62970fe43c6ab:210)
	at androidx.compose.ui.input.pointer.Node.dispatchMainEventPass(r8-map-id-58d6fab343006fc8158418c5344e0d9d29433db6177c4d48a6a62970fe43c6ab:179)
	at androidx.compose.ui.input.pointer.Node.dispatchMainEventPass(r8-map-id-58d6fab343006fc8158418c5344e0d9d29433db6177c4d48a6a62970fe43c6ab:179)
	at androidx.compose.ui.input.pointer.Node.dispatchMainEventPass(r8-map-id-58d6fab343006fc8158418c5344e0d9d29433db6177c4d48a6a62970fe43c6ab:179)
	at androidx.compose.ui.input.pointer.NodeParent.dispatchMainEventPass(r8-map-id-58d6fab343006fc8158418c5344e0d9d29433db6177c4d48a6a62970fe43c6ab:18)
	at androidx.compose.ui.input.pointer.HitPathTracker.dispatchChanges(r8-map-id-58d6fab343006fc8158418c5344e0d9d29433db6177c4d48a6a62970fe43c6ab:28)
	at androidx.compose.ui.input.pointer.PointerInputEventProcessor.process-BIzXfog(r8-map-id-58d6fab343006fc8158418c5344e0d9d29433db6177c4d48a6a62970fe43c6ab:152)
	at androidx.compose.ui.platform.AndroidComposeView.sendMotionEvent-8iAsVTc(r8-map-id-58d6fab343006fc8158418c5344e0d9d29433db6177c4d48a6a62970fe43c6ab:113)
	at androidx.compose.ui.platform.AndroidComposeView.handleMotionEvent-8iAsVTc(r8-map-id-58d6fab343006fc8158418c5344e0d9d29433db6177c4d48a6a62970fe43c6ab:284)
	at androidx.compose.ui.platform.AndroidComposeView.dispatchTouchEvent(r8-map-id-58d6fab343006fc8158418c5344e0d9d29433db6177c4d48a6a62970fe43c6ab:65)
	at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:3160)
	at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2828)
	at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:3160)
	at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2828)
	at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:3160)
	at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2828)
	at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:3160)
	at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2828)
	at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:3160)
	at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2828)
	at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:3160)
	at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2828)
	at com.android.internal.policy.DecorView.superDispatchTouchEvent(DecorView.java:577)
	at com.android.internal.policy.PhoneWindow.superDispatchTouchEvent(PhoneWindow.java:1908)
	at android.app.Activity.dispatchTouchEvent(Activity.java:4584)
	at androidx.appcompat.view.WindowCallbackWrapper.dispatchTouchEvent(r8-map-id-58d6fab343006fc8158418c5344e0d9d29433db6177c4d48a6a62970fe43c6ab:3)
	at com.android.internal.policy.DecorView.dispatchTouchEvent(DecorView.java:535)
	at android.view.View.dispatchPointerEvent(View.java:16154)
	at com.xiaomi.mirror.MiuiMirrorImpl.isHandled(MiuiMirrorImpl.java:152)
	at android.view.ViewRootImpl$ViewPostImeInputStage.processPointerEvent(ViewRootImpl.java:7911)
	at android.view.ViewRootImpl$ViewPostImeInputStage.onProcess(ViewRootImpl.java:7677)
	at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:7049)
	at android.view.ViewRootImpl$InputStage.onDeliverToNext(ViewRootImpl.java:7106)
	at android.view.ViewRootImpl$InputStage.forward(ViewRootImpl.java:7072)
	at android.view.ViewRootImpl$AsyncInputStage.forward(ViewRootImpl.java:7237)
	at android.view.ViewRootImpl$InputStage.apply(ViewRootImpl.java:7080)
	at android.view.ViewRootImpl$AsyncInputStage.apply(ViewRootImpl.java:7294)
	at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:7053)
	at android.view.ViewRootImpl$InputStage.onDeliverToNext(ViewRootImpl.java:7106)
	at android.view.ViewRootImpl$InputStage.forward(ViewRootImpl.java:7072)
	at android.view.ViewRootImpl$InputStage.apply(ViewRootImpl.java:7080)
	at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:7053)
	at android.view.ViewRootImpl.deliverInputEvent(ViewRootImpl.java:10202)
	at android.view.ViewRootImpl.doProcessInputEvents(ViewRootImpl.java:10153)
	at android.view.ViewRootImpl.enqueueInputEvent(ViewRootImpl.java:10117)
	at android.view.ViewRootImpl$WindowInputEventReceiver.onInputEvent(ViewRootImpl.java:10365)
	at android.view.InputEventReceiver.dispatchInputEvent(InputEventReceiver.java:306)
	at android.os.MessageQueue.nativePollOnce(Native Method)
	at android.os.MessageQueue.next(MessageQueue.java:341)
	at android.os.Looper.loopOnce(Looper.java:176)
	at android.os.Looper.loop(Looper.java:318)
	at android.app.ActivityThread.main(ActivityThread.java:8790)
	at java.lang.reflect.Method.invoke(Native Method)
	at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:561)
	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1013)
	Suppressed: kotlinx.coroutines.internal.DiagnosticCoroutineContextException: [StandaloneCoroutine{Cancelling}@ac940a, Dispatchers.Main.immediate]

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions