ground-android icon indicating copy to clipboard operation
ground-android copied to clipboard

[Data sync] Improve sync status UX

Open gino-m opened this issue 2 years ago • 1 comments

Ideas:

  • [ ] Auto-retry only on failures due to connectivity
  • [ ] All other issues should be discoverable via the sync status UI
  • [ ] Allow users to manually retry failed jobs

gino-m avatar Nov 30 '23 15:11 gino-m

My sync failed, this is the log for it:

---------------------------- PROCESS STARTED (22866) for package com.google.android.ground ----------------------------
10:45:17.767  E  Error parsing JSON string
                 org.json.JSONException: No value for altitude
                 	at org.json.JSONObject.get(JSONObject.java:398)
                 	at org.json.JSONObject.getDouble(JSONObject.java:453)
                 	at com.google.android.ground.persistence.local.room.converter.ValueJsonConverter.captureLocationResultFromJsonObject-IoAF18A(ValueJsonConverter.kt:124)
                 	at com.google.android.ground.persistence.local.room.converter.ValueJsonConverter.toResponse(ValueJsonConverter.kt:113)
                 	at com.google.android.ground.persistence.local.room.converter.SubmissionDeltasConverter.fromString(SubmissionDeltasConverter.kt:73)
                 	at com.google.android.ground.persistence.local.room.converter.ConverterExtKt.toModelObject(ConverterExt.kt:336)
                 	at com.google.android.ground.repository.MutationRepository.toSubmissionMutation(MutationRepository.kt:79)
                 	at com.google.android.ground.repository.MutationRepository.access$toSubmissionMutation(MutationRepository.kt:39)
                 	at com.google.android.ground.repository.MutationRepository$toSubmissionMutation$1.invokeSuspend(Unknown Source:15)
                 	at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
                 	at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:106)
                 	at kotlinx.coroutines.internal.LimitedDispatcher$Worker.run(LimitedDispatcher.kt:115)
                 	at kotlinx.coroutines.scheduling.TaskImpl.run(Tasks.kt:100)
                 	at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:584)
                 	at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:793)
                 	at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:697)
                 	at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:684)
10:55:18.366  E  Unsupported task type: draw_area
10:55:18.367  E  Unsupported task type: drop_pin
10:56:20.570  E  Error parsing JSON string
                 org.json.JSONException: No value for altitude
                 	at org.json.JSONObject.get(JSONObject.java:398)
                 	at org.json.JSONObject.getDouble(JSONObject.java:453)
                 	at com.google.android.ground.persistence.local.room.converter.ValueJsonConverter.captureLocationResultFromJsonObject-IoAF18A(ValueJsonConverter.kt:124)
                 	at com.google.android.ground.persistence.local.room.converter.ValueJsonConverter.toResponse(ValueJsonConverter.kt:113)
                 	at com.google.android.ground.persistence.local.room.converter.SubmissionDeltasConverter.fromString(SubmissionDeltasConverter.kt:73)
                 	at com.google.android.ground.persistence.local.room.converter.ConverterExtKt.toModelObject(ConverterExt.kt:336)
                 	at com.google.android.ground.persistence.local.room.stores.RoomSubmissionStore$getAllSurveyMutationsFlow$$inlined$map$1$2.emit(Emitters.kt:224)
                 	at kotlinx.coroutines.flow.internal.SafeCollectorKt$emitFun$1.invoke(SafeCollector.kt:15)
                 	at kotlinx.coroutines.flow.internal.SafeCollectorKt$emitFun$1.invoke(SafeCollector.kt:15)
                 	at kotlinx.coroutines.flow.internal.SafeCollector.emit(SafeCollector.kt:87)
                 	at kotlinx.coroutines.flow.internal.SafeCollector.emit(SafeCollector.kt:66)
                 	at kotlinx.coroutines.flow.FlowKt__ChannelsKt.emitAllImpl$FlowKt__ChannelsKt(Channels.kt:37)
                 	at kotlinx.coroutines.flow.FlowKt__ChannelsKt.access$emitAllImpl$FlowKt__ChannelsKt(Channels.kt:1)
                 	at kotlinx.coroutines.flow.FlowKt__ChannelsKt$emitAllImpl$1.invokeSuspend(Unknown Source:14)
                 	at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
                 	at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:106)
                 	at android.os.Handler.handleCallback(Handler.java:942)
                 	at android.os.Handler.dispatchMessage(Handler.java:99)
                 	at android.os.Looper.loopOnce(Looper.java:201)
                 	at android.os.Looper.loop(Looper.java:288)
                 	at android.app.ActivityThread.main(ActivityThread.java:7872)
                 	at java.lang.reflect.Method.invoke(Native Method)
                 	at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:548)
                 	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:936)
10:56:33.791  E  Error parsing JSON string
                 org.json.JSONException: No value for altitude
                 	at org.json.JSONObject.get(JSONObject.java:398)
                 	at org.json.JSONObject.getDouble(JSONObject.java:453)
                 	at com.google.android.ground.persistence.local.room.converter.ValueJsonConverter.captureLocationResultFromJsonObject-IoAF18A(ValueJsonConverter.kt:124)
                 	at com.google.android.ground.persistence.local.room.converter.ValueJsonConverter.toResponse(ValueJsonConverter.kt:113)
                 	at com.google.android.ground.persistence.local.room.converter.SubmissionDeltasConverter.fromString(SubmissionDeltasConverter.kt:73)
                 	at com.google.android.ground.persistence.local.room.converter.ConverterExtKt.toModelObject(ConverterExt.kt:336)
                 	at com.google.android.ground.repository.MutationRepository.toSubmissionMutation(MutationRepository.kt:79)
                 	at com.google.android.ground.repository.MutationRepository.access$toSubmissionMutation(MutationRepository.kt:39)
                 	at com.google.android.ground.repository.MutationRepository$toSubmissionMutation$1.invokeSuspend(Unknown Source:15)
                 	at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
                 	at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:106)
                 	at kotlinx.coroutines.internal.LimitedDispatcher$Worker.run(LimitedDispatcher.kt:115)
                 	at kotlinx.coroutines.scheduling.TaskImpl.run(Tasks.kt:100)
                 	at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:584)
                 	at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:793)
                 	at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:697)
                 	at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:684)

amysorto avatar Nov 30 '23 15:11 amysorto

@scolsen has already made improvements to the sync status screen and this FR is too general to be useful. Closing.

gino-m avatar Nov 22 '24 20:11 gino-m