This website uses cookies. By clicking Accept, you consent to the use of cookies. Click Here to learn more about how we use cookies.
Accept
Reject
  • RSA.com
  • Home
  • Advisories
    • SecurID
    • SecurID Governance & Lifecycle
  • Documentation
    • SecurID
      • Authentication Agents
        • API / SDK
        • Apache Web Server
        • Citrix StoreFront
        • IIS Web Server
        • MFA Agent for macOS
        • MFA Agent for Windows
        • Microsoft AD FS
        • Microsoft Windows
        • PAM
      • Authentication Engine
      • Authentication Manager
      • Cloud Authentication Service
      • Hardware Appliance
        Component Updates
      • Hardware Tokens
      • Integrations
      • SecurID App
      • SecurID Authenticator for macOS
      • SecurID SDK
      • Software Tokens
        • Android
        • iOS
        • macOS
        • Token Converter
        • Windows
    • SecurID Governance & Lifecycle
    • Technology Partners
  • Downloads
    • SecurID
      • Authentication Agents
        • API / SDK
        • Apache Web Server
        • Citrix StoreFront
        • IIS Web Server
        • MFA Agent for macOS
        • MFA Agent for Windows
        • Microsoft AD FS
        • Microsoft Windows
        • PAM
      • Authentication Engine
      • Authentication Manager
      • Cloud Authentication Service
      • Hardware Appliance
        Component Updates
      • Hardware Tokens
      • Integrations
      • SecurID Authenticator for macOS
      • Software Tokens
        • Android
        • iOS
        • macOS
        • Token Converter
        • Windows
    • SecurID Governance & Lifecycle
  • Community
    • SecurID
      • Blog
      • Discussions
      • Events
      • Idea Exchange
      • Knowledge Base
    • SecurID Governance & Lifecycle
      • Blog
      • Discussions
      • Events
      • Idea Exchange
      • Knowledge Base
  • Support
    • Case Portal
      • Create New Case
      • View My Cases
      • View My Team's Cases
    • Community Support
      • Getting Started
      • News & Announcements
      • Ideas & Suggestions
      • Community Support Articles
      • Community Support Forum
    • Product Life Cycle
    • Support Information
    • General Security Advisories
  • Education
    • Blog
    • Browse Courses
      • SecurID
      • SecurID Governance & Lifecycle
    • Certification Program
    • New Product Readiness
    • Student Resources
Sign In Register Now
cancel
Turn on suggestions
Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
Showing results for 
Search instead for 
Did you mean: 
Announcements

SecurID® Discussions

Browse the SecurID discussion board to get product help and collaborate with other SecurID users.
  • SecurID Community
  • :
  • Products
  • :
  • SecurID
  • :
  • Discussions
  • :
  • Android: Getting 'IllegalStateException: attempt to re-open an already-closed object: SQLiteDatabase...
  • Options
    • Subscribe to RSS Feed
    • Mark Topic as New
    • Mark Topic as Read
    • Float this Topic for Current User
    • Bookmark
    • Subscribe
    • Mute
    • Printer Friendly Page
SergioDias
Contributor SergioDias Contributor
Contributor
‎2019-01-03 12:02 PM
  • Mark as New
  • Bookmark
  • Subscribe
  • Mute
  • Subscribe to RSS Feed
  • Permalink
  • Print
  • Email to a Friend
  • Report Inappropriate Content

Android: Getting 'IllegalStateException: attempt to re-open an already-closed object: SQLiteDatabase: path/securidDB'

Customer has updated the RSA SecurID SDK to 2.6.0 for Android. After that, his application started crashing randomly when the 'getOtp' method is called from his code. These crashes happen sporadically from different devices such as Samsung and Huawei devices running on Android 7.x and 8.x versions. He does not have a way to reproduce these two crashes.

He was not having these two crashes running an older RSA SDK version ( He believes version 1.x ).

 

Caused by java.lang.IllegalStateException: attempt to re-open an already-closed object: SQLiteDatabase:
/data/user/0/com.company/databases/securidDB
at
android.database.sqlite.SQLiteClosable.acquireReference(SQLiteClosable.java:55)
at
android.database.sqlite.SQLiteDatabase.queryWithFactory(SQLiteDatabase.java:1234)
at
android.database.sqlite.SQLiteDatabase.query(SQLiteDatabase.java:1110)
at
android.database.sqlite.SQLiteDatabase.query(SQLiteDatabase.java:1278)
at com.rsa.securidlib.android.x.jj.n.h(Unknown Source)
at com.rsa.securidlib.android.x.jj.e.g(Unknown Source)
at com.rsa.securidlib.android.g.e.m(Unknown Source)
at com.rsa.securidlib.android.g.e.zz(Unknown Source)
at com.rsa.securidlib.android.g.e.m(Unknown Source)
at com.rsa.securidlib.android.AndroidSecurIDLib.m(Unknown Source)
at com.rsa.securidlib.android.AndroidSecurIDLib.getOtp(Unknown
Source)
at
com.company.authentication.f.h(RsaTokenHelper.java:72)
at
com.company.authentication.f.e(RsaTokenHelper.java:91)
at
com.company.login.a.v(BaseLoginFragment.java:549)
at com.company.login.u.run(Unknown Source)
at android.os.Handler.handleCallback(Handler.java:761)
at android.os.Handler.dispatchMessage(Handler.java:98)
at android.os.Looper.loop(Looper.java:156)
at android.app.ActivityThread.main(ActivityThread.java:6523)
at java.lang.reflect.Method.invoke(Method.java)
at
com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:942)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:832)

 


Caused by java.lang.IllegalStateException: Cannot perform this operation because the connection pool has been closed.
at
android.database.sqlite.SQLiteConnectionPool.throwIfClosedLocked(SQLiteConnectionPool.java:1290)
at
android.database.sqlite.SQLiteConnectionPool.waitForConnection(SQLiteConnectionPool.java:882)
at
android.database.sqlite.SQLiteConnectionPool.acquireConnection(SQLiteConnectionPool.java:575)
at
android.database.sqlite.SQLiteSession.acquireConnection(SQLiteSession.java:904)
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:152)
at
android.database.sqlite.SQLiteCursor.getCount(SQLiteCursor.java:141)
at com.rsa.securidlib.android.g.t.r(Unknown Source:106)
at com.rsa.securidlib.n.g(Unknown Source:8)
at com.rsa.securidlib.n.m(Unknown Source:14)
at com.rsa.securidlib.android.AndroidSecurIDLib.m(Unknown Source:101)
at com.rsa.securidlib.android.AndroidSecurIDLib.getOtp(Unknown
Source:1)
at
com.company.authentication.f.h(RsaTokenHelper.java:72)
at
com.company.authentication.f.e(RsaTokenHelper.java:91)
at
com.company.login.a.v(BaseLoginFragment.java:549)
at com.company.login.u.run(Unknown Source:2)
at android.os.Handler.handleCallback(Handler.java:790)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:164)
at android.app.ActivityThread.main(ActivityThread.java:7002)
at java.lang.reflect.Method.invoke(Method.java)
at
com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:441)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1408)

  • Tags:
  • Android
  • Authentication SDK
  • crash
  • Mobile Authentication SDK
  • Mobile SDK
  • RSA SecurID
  • RSA SecurID Access
  • SDK
  • SecurID
0 Likes
Share
Reply
  • All forum topics
  • Previous Topic
  • Next Topic
2 Replies
JimWard
Employee JimWard
Employee
‎2019-01-07 11:04 AM
  • Mark as New
  • Bookmark
  • Subscribe
  • Mute
  • Subscribe to RSS Feed
  • Permalink
  • Print
  • Email to a Friend
  • Report Inappropriate Content

We suspect there may be a classical race condition problem here. Trying to access the getOtp method from two parallel threads from the same object will cause this issue. A possible fix is to synchronize calls to RSA SDK and making usage of RSA SDK API thread safe mechanism.

0 Likes
Share
Reply
AmithRamachandr
AmithRamachandr Contributor
Contributor
In response to JimWard
‎2019-01-07 11:56 AM
  • Mark as New
  • Bookmark
  • Subscribe
  • Mute
  • Subscribe to RSS Feed
  • Permalink
  • Print
  • Email to a Friend
  • Report Inappropriate Content

I doubt thats the case. We use a 'newSingleThreadScheduledExecutor' to get and display the otp and the time remaining.  So I don't see a chance of parallel threads or am I missing something?

0 Likes
Share
Reply
Powered by Khoros
  • Blog
  • Events
  • Discussions
  • Idea Exchange
  • Knowledge Base
  • Case Portal
  • Community Support
  • Product Life Cycle
  • Support Information
  • Customer Success
  • About the Community
  • Terms & Conditions
  • Privacy Statement
  • Provide Feedback
  • Employee Login
© 2022 RSA Security LLC or its affiliates. All rights reserved.