Collect v1.4.16, Android v4.4.2, device used Samsung Galaxy Tab 7.0 (SM-T231)
When using geotrace or geoshape or image (with appearance of signature) the app fails to finalize the interview. Tried to make separated form sample to see where was the problem but it persists.
Separated the parts into different forms to see the behaviour of the questions types.
The ODK collect stop working when it comes to finish the interview. Finalize screen don't show up.
geotrace.xlsx
images_signature.xlsx
Things you tried, stack traces, related issues, suggestions on how to fix it...
Stacktrace seems to be class cast exception on the form:
FATAL EXCEPTION: main
Process: org.odk.collect.android, PID: 10115
java.lang.RuntimeException: Unable to resume activity {org.odk.collect.android/org.odk.collect.android.activities.FormEntryActivity}: java.lang.ClassCastException: org.javarosa.core.model.data.IntegerData cannot be cast to org.javarosa.core.model.data.StringData
at android.app.ActivityThread.performResumeActivity(ActivityThread.java:3121)
at android.app.ActivityThread.handleResumeActivity(ActivityThread.java:3152)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1398)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:148)
at android.app.ActivityThread.main(ActivityThread.java:5443)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:728)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:618)
Caused by: java.lang.ClassCastException: org.javarosa.core.model.data.IntegerData cannot be cast to org.javarosa.core.model.data.StringData
at org.odk.collect.android.logic.FormController.getSubmissionMetadata(FormController.java:1178)
at org.odk.collect.android.activities.FormEntryActivity.createView(FormEntryActivity.java:1108)
at org.odk.collect.android.activities.FormEntryActivity.refreshCurrentView(FormEntryActivity.java:822)
at org.odk.collect.android.activities.FormEntryActivity.onResume(FormEntryActivity.java:2314)
at android.app.Instrumentation.callActivityOnResume(Instrumentation.java:1281)
at android.app.Activity.performResume(Activity.java:6320)
at android.app.ActivityThread.performResumeActivity(ActivityThread.java:3110)
at android.app.ActivityThread.handleResumeActivity(ActivityThread.java:3152)聽
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1398)聽
at android.os.Handler.dispatchMessage(Handler.java:102)聽
at android.os.Looper.loop(Looper.java:148)聽
at android.app.ActivityThread.main(ActivityThread.java:5443)聽
at java.lang.reflect.Method.invoke(Native Method)聽
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:728)聽
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:618)
@rcovane I think the issue is with the form's settings section. If you use concat(${id}) instead of ${id}, then it should work just fine. The later is inferring the instance name as an IntegerData, with concat I think it will convert it to StringData.
Give it a try and let us know here.
Thank you @nribeka. I tried it and worked. I even used all (trace, shape, signature and sketch) in one form and it worked just fine.
Most helpful comment
@rcovane I think the issue is with the form's settings section. If you use
concat(${id})instead of${id}, then it should work just fine. The later is inferring the instance name as an IntegerData, with concat I think it will convert it to StringData.Give it a try and let us know here.