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

Field 7 not found in proto Survey

Open anandwana001 opened this issue 1 year ago • 2 comments

Describe the bug Sort of log which needs a confirmation if something is pending or breaking

java.lang.IllegalArgumentException: Field 7 not found in class com.google.android.ground.proto.Survey
                                                                                                    	at com.google.android.ground.persistence.remote.firebase.protobuf.MessageLiteReflectionExtKt.getFieldName(MessageLiteReflectionExt.kt:136)
                                                                                                    	at com.google.android.ground.persistence.remote.firebase.protobuf.FirestoreToProtobufExtKt.toMessageField(FirestoreToProtobufExt.kt:78)
                                                                                                    	at com.google.android.ground.persistence.remote.firebase.protobuf.FirestoreToProtobufExtKt.copyInto(FirestoreToProtobufExt.kt:64)
                                                                                                    	at com.google.android.ground.persistence.remote.firebase.protobuf.FirestoreToProtobufExtKt.copyInto(FirestoreToProtobufExt.kt:60)
                                                                                                    	at com.google.android.ground.persistence.remote.firebase.protobuf.FirestoreToProtobufExtKt.parseFrom(FirestoreToProtobufExt.kt:49)
                                                                                                    	at com.google.android.ground.persistence.remote.firebase.schema.SurveyConverter.toSurvey(SurveyConverter.kt:35)
                                                                                                    	at com.google.android.ground.persistence.remote.firebase.schema.SurveyConverter.toSurvey$default(SurveyConverter.kt:32)
                                                                                                    	at com.google.android.ground.persistence.remote.firebase.schema.SurveysCollectionReference$getReadable$$inlined$map$1$2.emit(Emitters.kt:224)
                                                                                                    	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:108)
                                                                                                    	at android.os.Handler.handleCallback(Handler.java:873)
                                                                                                    	at android.os.Handler.dispatchMessage(Handler.java:99)
                                                                                                    	at android.os.Looper.loop(Looper.java:193)
                                                                                                    	at android.app.ActivityThread.main(ActivityThread.java:6669)
                                                                                                    	at java.lang.reflect.Method.invoke(Native Method)
                                                                                                    	at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493)
                                                                                                    	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858)
2024-08-27 11:54:00.252 22507-22507 FirestoreT...tobufExtKt com.google.android.ground            V  Skipping incompatible Firestore value. class java.util.HashMap$Node: 7=2 (Ask Gemini)
                                                                                                    java.lang.IllegalArgumentException: Field 7 not found in class com.google.android.ground.proto.Survey
                                                                                                    	at com.google.android.ground.persistence.remote.firebase.protobuf.MessageLiteReflectionExtKt.getFieldName(MessageLiteReflectionExt.kt:136)
                                                                                                    	at com.google.android.ground.persistence.remote.firebase.protobuf.FirestoreToProtobufExtKt.toMessageField(FirestoreToProtobufExt.kt:78)
                                                                                                    	at com.google.android.ground.persistence.remote.firebase.protobuf.FirestoreToProtobufExtKt.copyInto(FirestoreToProtobufExt.kt:64)
                                                                                                    	at com.google.android.ground.persistence.remote.firebase.protobuf.FirestoreToProtobufExtKt.copyInto(FirestoreToProtobufExt.kt:60)
                                                                                                    	at com.google.android.ground.persistence.remote.firebase.protobuf.FirestoreToProtobufExtKt.parseFrom(FirestoreToProtobufExt.kt:49)
                                                                                                    	at com.google.android.ground.persistence.remote.firebase.schema.SurveyConverter.toSurvey(SurveyConverter.kt:35)
                                                                                                    	at com.google.android.ground.persistence.remote.firebase.schema.SurveyConverter.toSurvey$default(SurveyConverter.kt:32)
                                                                                                    	at com.google.android.ground.persistence.remote.firebase.schema.SurveysCollectionReference$getReadable$$inlined$map$1$2.emit(Emitters.kt:224)
                                                                                                    	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:108)
                                                                                                    	at android.os.Handler.handleCallback(Handler.java:873)
                                                                                                    	at android.os.Handler.dispatchMessage(Handler.java:99)
                                                                                                    	at android.os.Looper.loop(Looper.java:193)
                                                                                                    	at android.app.ActivityThread.main(ActivityThread.java:6669)
                                                                                                    	at java.lang.reflect.Method.invoke(Native Method)
                                                                                                    	at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493)
                                                                                                    	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858)

anandwana001 avatar Aug 27 '24 06:08 anandwana001

Field 7 is State state, which was added recently. A few potential problems here:

  • [ ] The deps on the shared protos need to be updated to the latest commit in ground/build.gradle.
  • [ ] Unrecognized fields should logged as warnings and ignored when deserializing from Firestore.

@anandwana001 HTH?

gino-m avatar Aug 28 '24 02:08 gino-m

Sounds Good. I will assign this to me and will keep track in future.

anandwana001 avatar Aug 28 '24 05:08 anandwana001

@anandwana001 Please check in Crashlytics and close if this is no longer recurring.

gino-m avatar Nov 13 '24 13:11 gino-m