freshworks / mobihelp-android

MIT License
15 stars 13 forks source link

java.lang.IllegalStateException from SDK code #3

Closed mmcmahon-jana closed 10 years ago

mmcmahon-jana commented 10 years ago

I have integrated the Mobihelp SDK and have gotten this exception a couple times:

java.lang.RuntimeException: An error occured while executing doInBackground()
       at android.support.v4.content.ModernAsyncTask$3.done(ModernAsyncTask.java:137)
       at java.util.concurrent.FutureTask.finishCompletion(FutureTask.java:355)
       at java.util.concurrent.FutureTask.setException(FutureTask.java:222)
       at java.util.concurrent.FutureTask.run(FutureTask.java:242)
       at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
       at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
       at java.lang.Thread.run(Thread.java:841)
Caused by: java.lang.IllegalStateException: Cannot perform this operation because the connection pool has been closed.
       at android.database.sqlite.SQLiteConnectionPool.throwIfClosedLocked(SQLiteConnectionPool.java:962)
       at android.database.sqlite.SQLiteConnectionPool.waitForConnection(SQLiteConnectionPool.java:599)
       at android.database.sqlite.SQLiteConnectionPool.acquireConnection(SQLiteConnectionPool.java:348)
       at android.database.sqlite.SQLiteSession.acquireConnection(SQLiteSession.java:894)
       at android.database.sqlite.SQLiteSession.executeForCursorWindow(SQLiteSession.java:834)
       at android.database.sqlite.SQLiteQuery.fillWindow(SQLiteQuery.java:62)
       at android.database.sqlite.SQLiteCursor.fillWindow(SQLiteCursor.java:144)
       at android.database.sqlite.SQLiteCursor.getCount(SQLiteCursor.java:133)
       at com.freshdesk.mobihelp.e.f.a()
       at com.freshdesk.mobihelp.e.f.loadInBackground()
       at android.support.v4.content.AsyncTaskLoader.onLoadInBackground(AsyncTaskLoader.java:242)
       at android.support.v4.content.AsyncTaskLoader$LoadTask.doInBackground(AsyncTaskLoader.java:51)
       at android.support.v4.content.AsyncTaskLoader$LoadTask.doInBackground(AsyncTaskLoader.java:40)
       at android.support.v4.content.ModernAsyncTask$2.call(ModernAsyncTask.java:123)
       at java.util.concurrent.FutureTask.run(FutureTask.java:237)
       at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
       at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
       at java.lang.Thread.run(Thread.java:841)

Devices were: Motorola XT1022 with Android 4.4.2 Samsung GT-S7262 with Android 4.1.2

hrishikesh-p commented 10 years ago

Can you try using the SDK version 1.0.1 beta available on this Repo? This problem should be fixed now.

mmcmahon-jana commented 10 years ago

I have upgrading the SDK version as suggested and have not seen the exception since. Thanks.