edx-app-android icon indicating copy to clipboard operation
edx-app-android copied to clipboard

org.edx.mobile.module.db.impl.DbOperationBase: java.lang.IllegalArgumentException: the bind value at index 1 is null

Open FDoubleman opened this issue 8 years ago • 3 comments

hi I'm sorry to bother again. --__--#.
i find a issue,when i use network to request some data .In my logcat have very mach err Log : like this :

05-19 16:03:26.444 21343-21343/org.edx.mobile D/org.edx.mobile.util.NetworkUtil: Wifi is connected 05-19 16:03:26.448 21343-21343/org.edx.mobile E/org.edx.mobile.module.db.impl.DbOperationBase: java.lang.IllegalArgumentException: the bind value at index 1 is null at android.database.sqlite.SQLiteProgram.bindString(SQLiteProgram.java:169) at android.database.sqlite.SQLiteProgram.bindAllArgsAsStrings(SQLiteProgram.java:205) at android.database.sqlite.SQLiteDirectCursorDriver.query(SQLiteDirectCursorDriver.java:47) at android.database.sqlite.SQLiteDatabase.rawQueryWithFactory(SQLiteDatabase.java:1344) at android.database.sqlite.SQLiteDatabase.queryWithFactory(SQLiteDatabase.java:1186) at android.database.sqlite.SQLiteDatabase.query(SQLiteDatabase.java:1057) at com.newrelic.agent.android.instrumentation.SQLiteInstrumentation.query(SQLiteInstrumentation.java:25) at org.edx.mobile.module.db.impl.DbOperationSelect.getCursor(DbOperationSelect.java:29) at org.edx.mobile.module.db.impl.DbOperationExists.execute(DbOperationExists.java:15) at org.edx.mobile.module.db.impl.DbOperationExists.execute(DbOperationExists.java:6) at org.edx.mobile.module.db.impl.DbOperationBase.requestExecute(DbOperationBase.java:25) at org.edx.mobile.module.db.impl.IDatabaseBaseImpl.execute(IDatabaseBaseImpl.java:56) at org.edx.mobile.module.db.impl.IDatabaseBaseImpl.enqueue(IDatabaseBaseImpl.java:74) at org.edx.mobile.module.db.impl.IDatabaseImpl.enqueue(IDatabaseImpl.java:21) at org.edx.mobile.module.db.impl.IDatabaseImpl.isAnyVideoDownloading(IDatabaseImpl.java:51) at org.edx.mobile.base.BaseVideosDownloadStateActivity$2.run(BaseVideosDownloadStateActivity.java:42) at android.os.Handler.handleCallback(Handler.java:743) at android.os.Handler.dispatchMessage(Handler.java:95) at android.os.Looper.loop(Looper.java:150) at android.app.ActivityThread.main(ActivityThread.java:5546) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:794) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:684) 05-19 16:03:26.452 21343-21343/org.edx.mobile D/org.edx.mobile.util.NetworkUtil: Wifi is connected image

FDoubleman avatar May 19 '16 08:05 FDoubleman

This log is also often appear: org.edx.mobile D/NSD: curPkgName is not in list Can you give me some methods to solve these problems(let "curPkgName is not in list" not show in my logcat )? Forgive me my english is poor. thanks

image

FDoubleman avatar May 19 '16 08:05 FDoubleman

Do you have any reproduction steps?

BenjiLee avatar Aug 15 '16 19:08 BenjiLee

Good catch @FDoubleman, I had been seeing those exceptions too.

Upon investigation here are the steps for reproduction:

  1. Login using valid credentials.
  2. Logout and you'll see the exception twice.
  3. If you open up the Login Screen, the exception keeps on coming like crazy.

Exception's reason: We are querying if a video is downloading using a recurring callback mechanism, which requires a logged in user's username. Consequently, passing null to where clause of the query, since we've logged out causing this exception.

I've created a ticket for this issue on our JIRA board, hopefully it'll get fixed soon: https://openedx.atlassian.net/browse/MA-2738

miankhalid avatar Aug 16 '16 09:08 miankhalid