Skip to content

Crash due to contribution dao in 2.10 #2476

@maskaravivek

Description

@maskaravivek

Summary:

We have received a couple of crash reports pointing to some issue with the ContributionDao.
Steps to reproduce:

How can we reproduce the issue?

Upgrading the app from previous release versions might help in reproducing the issue.

System logs:

java.lang.RuntimeException: An error occurred while executing doInBackground()
at android.support.v4.content.ModernAsyncTask$3.done(ModernAsyncTask.java:161)
at java.util.concurrent.FutureTask.finishCompletion(FutureTask.java:383)
at java.util.concurrent.FutureTask.setException(FutureTask.java:252)
at java.util.concurrent.FutureTask.run(FutureTask.java:271)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1162)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:636)
at java.lang.Thread.run(Thread.java:764)
Caused by: android.database.sqlite.SQLiteException: no such column: wikidataEntityID (code 1): , while compiling: SELECT _id, filename, local_uri, image_url, timestamp, state, length, uploaded, transferred, source, description, creator, multiple, width, height, license, wikidataEntityID FROM contributions ORDER BY state DESC, uploaded DESC , (timestamp * state)LIMIT 100
#################################################################
Error Code : 1 (SQLITE_ERROR)
Caused By : SQL(query) error or missing database.
(no such column: wikidataEntityID (code 1): , while compiling: SELECT _id, filename, local_uri, image_url, timestamp, state, length, uploaded, transferred, source, description, creator, multiple, width, height, license, wikidataEntityID FROM contributions ORDER BY state DESC, uploaded DESC , (timestamp * state)LIMIT 100)
#################################################################
at android.database.sqlite.SQLiteConnection.nativePrepareStatement(Native Method)
at android.database.sqlite.SQLiteConnection.acquirePreparedStatement(SQLiteConnection.java:1095)
at android.database.sqlite.SQLiteConnection.prepare(SQLiteConnection.java:660)
at android.database.sqlite.SQLiteSession.prepare(SQLiteSession.java:588)
at android.database.sqlite.SQLiteProgram.<init>(SQLiteProgram.java:59)
at android.database.sqlite.SQLiteQuery.<init>(SQLiteQuery.java:37)
at android.database.sqlite.SQLiteDirectCursorDriver.query(SQLiteDirectCursorDriver.java:44)
at android.database.sqlite.SQLiteDatabase.rawQueryWithFactory(SQLiteDatabase.java:1739)
at android.database.sqlite.SQLiteQueryBuilder.query(SQLiteQueryBuilder.java:399)
at android.database.sqlite.SQLiteQueryBuilder.query(SQLiteQueryBuilder.java:294)
at fr.free.nrw.commons.contributions.ContributionsContentProvider.query(ContributionsContentProvider.java:57)
at android.content.ContentProvider.query(ContentProvider.java:1063)
at android.content.ContentProvider.query(ContentProvider.java:1155)
at android.content.ContentProvider$Transport.query(ContentProvider.java:244)
at android.content.ContentResolver.query(ContentResolver.java:760)
at android.content.ContentResolver.query(ContentResolver.java:710)
at android.support.v4.content.ContentResolverCompat.query(ContentResolverCompat.java:80)
at android.support.v4.content.CursorLoader.loadInBackground(CursorLoader.java:61)
at android.support.v4.content.CursorLoader.loadInBackground(CursorLoader.java:39)
at android.support.v4.content.AsyncTaskLoader.onLoadInBackground(AsyncTaskLoader.java:306)
at android.support.v4.content.AsyncTaskLoader$LoadTask.doInBackground(AsyncTaskLoader.java:59)
at android.support.v4.content.AsyncTaskLoader$LoadTask.doInBackground(AsyncTaskLoader.java:47)
at android.support.v4.content.ModernAsyncTask$2.call(ModernAsyncTask.java:138)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
... 3 more
android.database.sqlite.SQLiteException: no such column: wikidataEntityID (code 1): , while compiling: SELECT _id, filename, local_uri, image_url, timestamp, state, length, uploaded, transferred, source, description, creator, multiple, width, height, license, wikidataEntityID FROM contributions ORDER BY state DESC, uploaded DESC , (timestamp * state)LIMIT 100
#################################################################
Error Code : 1 (SQLITE_ERROR)
Caused By : SQL(query) error or missing database.
(no such column: wikidataEntityID (code 1): , while compiling: SELECT _id, filename, local_uri, image_url, timestamp, state, length, uploaded, transferred, source, description, creator, multiple, width, height, license, wikidataEntityID FROM contributions ORDER BY state DESC, uploaded DESC , (timestamp * state)LIMIT 100)
#################################################################
at android.database.sqlite.SQLiteConnection.nativePrepareStatement(Native Method)
at android.database.sqlite.SQLiteConnection.acquirePreparedStatement(SQLiteConnection.java:1095)
at android.database.sqlite.SQLiteConnection.prepare(SQLiteConnection.java:660)
at android.database.sqlite.SQLiteSession.prepare(SQLiteSession.java:588)
at android.database.sqlite.SQLiteProgram.<init>(SQLiteProgram.java:59)
at android.database.sqlite.SQLiteQuery.<init>(SQLiteQuery.java:37)
at android.database.sqlite.SQLiteDirectCursorDriver.query(SQLiteDirectCursorDriver.java:44)
at android.database.sqlite.SQLiteDatabase.rawQueryWithFactory(SQLiteDatabase.java:1739)
at android.database.sqlite.SQLiteQueryBuilder.query(SQLiteQueryBuilder.java:399)
at android.database.sqlite.SQLiteQueryBuilder.query(SQLiteQueryBuilder.java:294)
at fr.free.nrw.commons.contributions.ContributionsContentProvider.query(ContributionsContentProvider.java:57)
at android.content.ContentProvider.query(ContentProvider.java:1063)
at android.content.ContentProvider.query(ContentProvider.java:1155)
at android.content.ContentProvider$Transport.query(ContentProvider.java:244)
at android.content.ContentResolver.query(ContentResolver.java:760)
at android.content.ContentResolver.query(ContentResolver.java:710)
at android.support.v4.content.ContentResolverCompat.query(ContentResolverCompat.java:80)
at android.support.v4.content.CursorLoader.loadInBackground(CursorLoader.java:61)
at android.support.v4.content.CursorLoader.loadInBackground(CursorLoader.java:39)
at android.support.v4.content.AsyncTaskLoader.onLoadInBackground(AsyncTaskLoader.java:306)
at android.support.v4.content.AsyncTaskLoader$LoadTask.doInBackground(AsyncTaskLoader.java:59)
at android.support.v4.content.AsyncTaskLoader$LoadTask.doInBackground(AsyncTaskLoader.java:47)
at android.support.v4.content.ModernAsyncTask$2.call(ModernAsyncTask.java:138)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1162)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:636)
at java.lang.Thread.run(Thread.java:764)```

**Commons app version:** 

2.10.0

Metadata

Metadata

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions