Please, Error saving polygons in the app

Make a template to save the coordinates of the properties with the option polygons, but in some devices an error is presented Java.lang.Double canonot be cast to java.lang.integer

Thanks for posting the error screenshot!

Do you use a repeat with a repeat count by any chance? We know that exception is possible if the repeat count is not a whole number. Maybe it's a user-provided value of type decimal?

If that's not right, it would be helpful to know what the data collector was doing right before the crash.

1 Like

If of course I have begin repeat in the form, I kindly share the file
geojson_ch (3).xlsx (92.2 KB)

Hi Daniel,
I tested your file in Enketo (from Central 2023.3.1) and Collect (2023.2.2), creating geoshapes for ${geoshape}, ${geoshape2}, ${geoshape3}, and they all submitted with no errors and the uploaded submissions contained your calculated geojson strings.

I have previously had the same error and wrapped my repeat count in an int() to avoid it.

How would the change be repeat count in an int()

Currently you have your repeat count as ${numpoints}, the change is to int(${numpoints}).

The calculation output should be an integer, but this forces it.

Are you on the same version as I am and getting the error? I uploaded your form with zero changes, i.e. no int()

I will perform the test with this function int() and make the change in the form and I will test with the field technicians, that this same error is not visualized