Skip to content
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

Terminal getting stuck with bluetooth connection #57

Open
nuvoPoint opened this issue Jul 26, 2018 · 17 comments
Open

Terminal getting stuck with bluetooth connection #57

nuvoPoint opened this issue Jul 26, 2018 · 17 comments

Comments

@nuvoPoint
Copy link

We are having issues with the terminal getting stuck with the bluetooth connection.
We think the issue might be that when calling checkout your SDK goes in forground and stops the main activity (our app) and therefore the thread will be dead and can't get notified.

Even your sample app has the same issue.

07-24 11:10:06.426 4023-12130/com.nuvopoint.tillty E/SumUp: (SourceFile:150)@BtSmart-Receiver | onTransportError() PinPlusReaderError{Name = NOT_ALLOWED mErrorCode=3}
07-24 11:10:07.267 4023-12130/com.nuvopoint.tillty E/SumUp: (SourceFile:150)@BtSmart-Receiver | onTransportError() PinPlusReaderError{Name = NOT_ALLOWED mErrorCode=3}
07-24 11:10:07.272 4023-4023/com.nuvopoint.tillty E/SumUp: (SourceFile:759)@main | Reader error received: PinPlusReaderError{Name = NOT_ALLOWED mErrorCode=3}
07-24 11:10:07.347 4023-8335/com.nuvopoint.tillty W/MessageQueue: Handler (android.os.Handler) {a8ce003} sending message to a Handler on a dead thread
    java.lang.IllegalStateException: Handler (android.os.Handler) {a8ce003} sending message to a Handler on a dead thread
        at android.os.MessageQueue.enqueueMessage(MessageQueue.java:545)
        at android.os.Handler.enqueueMessage(Handler.java:661)
        at android.os.Handler.sendMessageAtTime(Handler.java:630)
        at android.os.Handler.sendMessageDelayed(Handler.java:600)
        at android.os.Handler.sendMessage(Handler.java:537)
        at android.os.Message.sendToTarget(Message.java:418)
        at com.sumup.readerlib.pinplus.transport.BtSmartReceiver.onConnectionStateChange(SourceFile:66)
        at android.bluetooth.BluetoothGatt$1$4.run(BluetoothGatt.java:268)
        at android.bluetooth.BluetoothGatt.runOrQueueCallback(BluetoothGatt.java:789)
        at android.bluetooth.BluetoothGatt.-wrap0(Unknown Source:0)
        at android.bluetooth.BluetoothGatt$1.onClientConnectionState(BluetoothGatt.java:264)
        at android.bluetooth.IBluetoothGattCallback$Stub.onTransact(IBluetoothGattCallback.java:70)
        at android.os.Binder.execTransact(Binder.java:682)

This stackoverflow question outlines the problem, along with a potential answer:
https://stackoverflow.com/questions/8040280/how-to-handle-handler-messages-when-activity-fragment-is-paused

@vfoixcable
Copy link
Contributor

Thanks for the feedback.

The warning is not the issue here. Still, we agree it is unnecessary noise and it will be fixed in the next sdk version.

Regarding the issue, we identified it internally. It will be part of the next SDK release as well.

@nuvoPoint
Copy link
Author

Thank you for the update!

So the main issue regarding the terminal getting stuck will be fixed in the upcoming version of the SDK?
When can we expect this update?

@vfoixcable
Copy link
Contributor

Yep!
We aim at releasing a next version of the SDK by end of Q3

@nuvoPoint
Copy link
Author

nuvoPoint commented Aug 1, 2018

And what can we do for our clients in the meantime?
Any ideas to somehow avoid the issue (workaround) will be welcome!

@vfoixcable
Copy link
Contributor

The issue typically happens if the app is killed in the middle of a transaction. (e.g. while entering the pin, or landing on the signature screen).

To recover from this issue, switching off and back on the reader will be the workaround.

@nuvoPoint
Copy link
Author

It's not getting killed, but the since the SDK pushes itself on top of the main activity, the activity gets stopped. This is most likely also related to the 'sending message to a Handler on a dead thread' issue.

Is there any state in your SDK that we can check to see if this has happend so that we can reset?

@vfoixcable
Copy link
Contributor

The warning is there because the bt got disconnected. This is a side effect but not the source of the issue.

Unfortunately, we dont provide any callback to check on that in the current implementation.

@nuvoPoint
Copy link
Author

Ok, but then tell me if you need any help from us with the update so we can speed up the process.

@FilipMatys
Copy link

Having the same issue (exception). We are working on an integration and yesterday everything worked fine.

Today, the first payment worked. The second got stuck on "Checking card reader" and the terminal Bluetooth icon kept flashing. Worked after resetting terminal, but only once.

The official SumUp application works fine.

Any help regarding a workaround would be greatly appreciated, as this is a blocker for us.

@vfoixcable
Copy link
Contributor

We aim at releasing a next version of the SDK solving this issue programmatically by end of Q3.

For the moment, switching off and back on the card reader will be the workaround.

@vladaman
Copy link

vladaman commented Aug 26, 2018

Great, will wait for next version. Can you think of a use case, where SumUp will be used at self-service environments please!

  • No error messages, possibility to skip Error Screen
  • Should not get stuck and should always return back to the original software
  • Should timeout accordingly

This would be a huge win!

@jahenry
Copy link

jahenry commented Aug 27, 2018

@vladaman appreciate your feedback however unfortunately we do not support self-service (eg. vending machine) setups today.

@nuvoPoint
Copy link
Author

Hey @vfoixcable any news on the update?

@vfoixcable
Copy link
Contributor

Hi @nuvoPoint , still aiming at end of Q3. So far, we are on track! It could happen end of next week or beginning of the one after.

@FilipMatys
Copy link

Latest version 3.1.0 seems to be working properly now.

@vfoixcable
Copy link
Contributor

Thanks for the update, and sorry for the delay in that thread.
Indeed, SDK 3.1.0 was released end of last week, aiming at solving the issue.

@larssn
Copy link

larssn commented May 28, 2019

Are we the only ones still seeing this issue? Many of our clients experience having to reset the SumUp terminal daily.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants