question

01928-7325x2 avatar image
01928-7325x2 asked 01928-7325x2 commented

Cannot Open Order App

Sometimes the Clover order app is blank.
Found this message on logcat

W/SQLiteConnectionPool( 9828): The connection pool for database '/data/data/com.clover.engine/databases/com_clover_orders-XXXXXXXX.db' has been unable to grant a connection to thread 133 (Binder_4) with flags 0x1 for 30.001001 seconds
OrdersClover Station
9 comments
10 |2000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Jeffrey Blattman avatar image Jeffrey Blattman ♦♦ commented ·

On what device are you running?

0 Likes 0 ·
01928-7325x2 avatar image 01928-7325x2 commented ·
It's running on an emulator, Android 4.4.
After restarting the device, it works fine. But then after a couple tries, the order app won't show order details.

Code for calling orders app.
Intent order_intent = new Intent("com.clover.intent.action.START_ORDER_MANAGE");

order_intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);<br>order_intent.putExtra("com.clover.intent.extra.ORDER_ID", {ORDER_ID});

startActivity(order_intent);
0 Likes 0 ·
Jeffrey Blattman avatar image Jeffrey Blattman ♦♦ commented ·

Can you reproduce without your app installed? By just opening orders (simulating what your app is doing)?

0 Likes 0 ·
01928-7325x2 avatar image 01928-7325x2 Jeffrey Blattman ♦♦ commented ·

@Jeffrey Blattman Seems it's okay without my app.
So, is something wrong with the way I call order app? I looked on another thread, people using the same code to call order app.
I'm wondering if the order app has some changed and our code need adjustment.

0 Likes 0 ·
Jeffrey Blattman avatar image Jeffrey Blattman ♦♦ 01928-7325x2 commented ·

Your code looks fine but I can't see all of your code. Can you provide a link to the full logcat of when the problem occurs? Please use pastebin.com.

0 Likes 0 ·
Show more comments

1 Answer

01928-7325x2 avatar image
01928-7325x2 answered 01928-7325x2 commented
@Jeffrey Blattman
FYI, I found the issue.
The issue is Clover order connector was being used for doing multiple things at the same time.
That caused the order hang up because of the DB locked.
Thanks for the support!
3 comments
10 |2000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Jeffrey Blattman avatar image Jeffrey Blattman ♦♦ commented ·

OrderConnector is thread safe. It can handle multiple requests at the same time.

0 Likes 0 ·
01928-7325x2 avatar image 01928-7325x2 Jeffrey Blattman ♦♦ commented ·

Then it's strange.
After I separate the connector between task, no problem anymore.

0 Likes 0 ·
01928-7325x2 avatar image 01928-7325x2 01928-7325x2 commented ·

Or probably more about the way I created the task.
Other than separating the connector, also there was a change on the way our task created.
We already submit the new app, hopefully, our beta tester doesn't see any issue anymore.

0 Likes 0 ·

Welcome to the
Clover Developer Community