question

wsadiq avatar image
wsadiq asked Rohit Bhardwaj commented

com.clover.sdk.v1.BindingException: Could not bind to Android service

We have a system that reports all exceptions caught from production back to our servers. We are noticing that intermittently for some clients only we are frequently getting binding exception. The key points are that we do not always get this exception and also not for every client.

One example of this exception is as follows.

com.clover.sdk.v1.BindingException: Could not bind to Android service at com.clover.sdk.v1.ServiceConnector.waitForConnection(ServiceConnector.java:160) at com.clover.sdk.v1.ServiceConnector.execute(ServiceConnector.java:206) at com.clover.sdk.v3.inventory.InventoryConnector.getItemWithCategories(InventoryConnector.java:115) at com.customerconnect.kikkle.clover.utils.Utils.populateOrderItems(Utils.java:607) at com.customerconnect.kikkle.clover.activiites.RewardDetailActivity$1.doInBackground(RewardDetailActivity.java:111) at com.customerconnect.kikkle.clover.activiites.RewardDetailActivity$1.doInBackground(RewardDetailActivity.java:105) at android.os.AsyncTask$2.call(AsyncTask.java:287) at java.util.concurrent.FutureTask.run(FutureTask.java:234) at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:230) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1080) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:573) at java.lang.Thread.run(Thread.java:856)

Do you have any ideas? These errors are not easy to duplicate in our debugging environment but we have seen there as well, on various connectors. Sometimes stepping through the debugger produces those exceptions but to if you do "run". However, ever since we put the system of reporting exceptions in place, we are noticing them in production as well.

Any help will be appreciated.

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 ·

Per my response on user voice, can you try creating/connecting to the service outside of the thread?

0 Likes 0 ·
jawheele avatar image jawheele commented ·

Thank you for the suggestion, Jeff! Worked perfectly!

0 Likes 0 ·
Rohit Bhardwaj avatar image Rohit Bhardwaj jawheele commented ·

Hi @jawheele, how did you manage to solve this ? Can you help me out please ?

0 Likes 0 ·

0 Answers

Welcome to the
Clover Developer Community