Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Entity property "_id" crashes the app after refreshing the list of blank forms #6486

Closed
dbemke opened this issue Oct 30, 2024 · 4 comments · Fixed by #6495
Closed

Entity property "_id" crashes the app after refreshing the list of blank forms #6486

dbemke opened this issue Oct 30, 2024 · 4 comments · Fixed by #6495
Assignees

Comments

@dbemke
Copy link

dbemke commented Oct 30, 2024

ODK Collect version

the master version c7c4719

Android version

10, 14

Device used

Redmi 9T, Pixel 7a

Problem description

Refreshing the list of blank forms with a form (update or follow-up) using a dataset with a property "_id” crashes the app.
idproperty

Steps to reproduce the problem

  1. Download Collect.
  2. Scan "trees” QR code https://test.getodk.cloud/#/projects/575/app-users
  3. Go to "Start new form” and tap the arrow to download forms.

Expected behavior

The app shouldn't crash.

@lognaturel
Copy link
Member

😬😬😬 Oh yes, that is definitely a problem. _id is required to use ContentProviders and other Android features.

We could possibly release this and see how common it is in Crashlytics. We should probably give another round of thought to how we go from CSV column name to db column names.

@dbemke
Copy link
Author

dbemke commented Oct 31, 2024

If a user adds "_id" property, it isn't possible to download forms using that dataset (they don't appear in "Start new form") to Collect. Additionally, it isn't possible to remove the property on Central so the user needs to create a new project (add forms without the property).

@seadowg seadowg moved this from not ready to inbox in ODK Collect Oct 31, 2024
@seadowg seadowg moved this from inbox to not ready in ODK Collect Oct 31, 2024
@seadowg
Copy link
Member

seadowg commented Oct 31, 2024

I think we can probably fix this by using a prefix for property columns in the entities DB (like prop_<property>). That should protect us from clashes.

@lognaturel
Copy link
Member

That would be wise. @seadowg and I briefly chatted about this and I realized that there's also a conflict potential with version which is very likely to come up.

@seadowg seadowg self-assigned this Nov 5, 2024
@github-project-automation github-project-automation bot moved this from in progress to done in ODK Collect Nov 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: done
Development

Successfully merging a pull request may close this issue.

3 participants