-
-
Notifications
You must be signed in to change notification settings - Fork 45
PM QA 7620 #3012
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
PM QA 7620 #3012
Conversation
📝 WalkthroughWalkthroughThe changes remove the static synchronization mechanism from the Sequence Diagram(s)sequenceDiagram
participant Caller as Client
participant Util as ConnectUserDatabaseUtil
participant Helper as ConnectDatabaseHelper
Caller->>Util: forgetUser()
Util->>Util: Delete user data from database
Util->>Helper: teardown()
Util-->>Caller: Return / Handle exceptions
Possibly related PRs
Suggested reviewers
📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (1)
🧰 Additional context used🧬 Code Definitions (1)app/src/org/commcare/connect/database/ConnectUserDatabaseUtil.java (1)
🔇 Additional comments (2)
✨ Finishing Touches
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
| DatabaseConnectOpenHelper.deleteDb(context); | ||
| CommCareApplication.instance().getGlobalStorage(ConnectKeyRecord.class).removeAll(); | ||
| ConnectDatabaseHelper.dbBroken = false; | ||
| ConnectDatabaseHelper.teardown(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is this the primary fix here or removal of synchronized blocks ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the primary fix is this one lock dosent help because connectdatabse is not getting null
|
can we add the crash stacktrace here in PR description |
Product Description
Fixed the crash for the second time recovery or signup for connectid
Technical Summary
The user is getting crash when he signup or recover account every alternative time the db was not getting cleared
StackTrace
Caused by net.sqlcipher.database.SQLiteException: error code 8: attempt to write a readonly database
at net.sqlcipher.database.SQLiteStatement.native_execute(SQLiteStatement.java)
at net.sqlcipher.database.SQLiteStatement.execute(SQLiteStatement.java:61)
at net.sqlcipher.database.SQLiteDatabase.insertWithOnConflict(SQLiteDatabase.java:2227)
at net.sqlcipher.database.SQLiteDatabase.insertOrThrow(SQLiteDatabase.java:2103)
at org.commcare.models.database.SqlStorage.write(SqlStorage.java:633)
at org.commcare.connect.database.ConnectUserDatabaseUtil.storeUser(ConnectUserDatabaseUtil.java:46)
at org.commcare.fragments.connectId.ConnectIDSignupFragment$4.processSuccess(ConnectIDSignupFragment.java:380)
at org.commcare.connect.network.ApiConnectId$1.onResponse(ApiConnectId.java:261)
at retrofit2.DefaultCallAdapterFactory$ExecutorCallbackCall$1.lambda$onResponse$0(DefaultCallAdapterFactory.java:89)
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(Method.java)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:571)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1135)
Feature Flag
https://dimagi.atlassian.net/browse/QA-7620
cross-request: dimagi/commcare-core#1455
Safety Assurance
Safety story
Automated test coverage
QA Plan
Labels and Review