[Bug] no such column: `_display_name`
2.17beta6
https://ankidroid.org/acra/app/1/bug/132527/report/6eb783db-db1f-4a4d-b53c-26882c956961
android.database.sqlite.SQLiteException: no such column: _display_name (code 1 SQLITE_ERROR[1]): , while compiling: SELECT _display_name FROM ClipboardImageTable WHERE (id=894) ORDER BY _data
at android.database.DatabaseUtils.readExceptionFromParcel(DatabaseUtils.java:186)
at android.database.DatabaseUtils.readExceptionFromParcel(DatabaseUtils.java:142)
at android.content.ContentProviderProxy.query(ContentProviderNative.java:481)
at android.content.ContentResolver.query(ContentResolver.java:1226)
at android.content.ContentResolver.query(ContentResolver.java:1158)
at android.content.ContentResolver.query(ContentResolver.java:1114)
at com.ichi2.utils.ImportUtils$FileImporter.getFileNameFromContentProvider(SourceFile:25)
at com.ichi2.utils.ImportUtils$FileImporter.getFileCachedCopy(SourceFile:1)
at com.ichi2.utils.ImportUtils$FileImporter.getFileCachedCopy(SourceFile:5)
at com.ichi2.utils.ImportUtils.getFileCachedCopy(SourceFile:1)
at com.ichi2.anki.NoteEditor.onCollectionLoaded$lambda$11(SourceFile:48)
at com.ichi2.anki.NoteEditor.m(SourceFile:1)
at com.ichi2.anki.h5.onClick(SourceFile:1)
at android.view.View.performClick(View.java:7792)
at android.widget.TextView.performClick(TextView.java:16112)
at com.google.android.material.button.MaterialButton.performClick(SourceFile:12)
at android.view.View.performClickInternal(View.java:7769)
at android.view.View.access$3800(View.java:910)
at android.view.View$PerformClick.run(View.java:30218)
at android.os.Handler.handleCallback(Handler.java:938)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loopOnce(Looper.java:226)
at android.os.Looper.loop(Looper.java:313)
at android.app.ActivityThread.main(ActivityThread.java:8669)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:571)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1135)
@david-allison I would like to work on this issue, please assign me the issue
Awesome, thanks!!!
@david-allison Till now, I have setup the codebase on my local system and refer some previous similar bugs on Stack Overflow that suggests updating 'Database Version' will work and I did the same.
In ContentResolverUtilTest, I have also tested testViaMimeType() and it is passing the testcase.
How will I come to know that it is fixed, or I need to use some other way to check if it is completed or not ?
Which similar bugs did you discover on StackOverflow?
Which similar bugs did you discover on StackOverflow?
@david-allison Not 100% exactly similar, but it will help with our issue.
https://stackoverflow.com/questions/16820106/android-database-sqlite-sqliteexception-no-such-column https://github.com/android/architecture-components-samples/issues/695
Neither of those are relevant
The error message is a generic problem: a column in SQLite can't be found
Focus your Google search on the column name.
I don't believe I found anything relevant when I looked, but have a cursory check
Neither of those are relevant
The error message is a generic problem: a column in SQLite can't be found
Focus your Google search on the column name.
I don't believe I found anything relevant when I looked, but have a cursory check
https://stackoverflow.com/questions/59817509/android-database-sqlite-sqliteexception-no-such-column-bucket-display-name https://github.com/ankidroid/Anki-Android/issues/7748
The first isn't the correct column name, the second is
The fix would be to return null if an exception is thrown:
https://github.com/ankidroid/Anki-Android/blob/041f9d113ecf5046b2575ca6e72498c497a8422e/AnkiDroid/src/main/java/com/ichi2/utils/ImportUtils.kt#L248-L257
@david-allison Is it advisable to utilize a try-catch block?
yes
can i work on it?
The issue's already assigned, it'd be best to give @javaman97 some time to work on it
@david-allison I have fixed the issue, and I made the commit as well. I don't know why I am not able to push to my Repo. I am trying from past few hours.
I am trying to fix it ASAP.
What's the output of git remote -v?
remote: Permission to ankidroid/Anki-Android.git denied to javaman97. fatal: unable to access 'https://github.com/ankidroid/Anki-Android.git/': The requested URL returned error: 403
Getting this error while pushing the commit to local branch and it is asking for GitHub Login Credentials still it is connected. Apart from it, I tried some other projects as well where I am committing and pushing the changes, its working fine.
@david-allison Please have a look !
I don't think you posted the output of git remote -v
Your issue is that you cloned upstream (ankidroid/Anki-Android), rather than your fork (javaman97/Anki-Android)
@javaman97 Clone the repository using the following link: [email protected]:javaman97/Anki-Android.git