iZettle / sdk-android

Add card payments from Zettle to your own app
https://developer.zettle.com/docs/android-sdk
24 stars 20 forks source link

Fatal error: DatecsReaderV2.onTransactionCompleted #81

Closed jonassimonaitis closed 4 months ago

jonassimonaitis commented 1 year ago

Expected Behavior

Make a payment with a Zettle device via Zettle activity

Current Behavior

Shows white (empty) zettle activity after calling startActivityForResult

Steps to Reproduce

Just call startActivityForResult

Context

Please provide any relevant information about your setup. This is important in case the issue is not reproducible except for under certain conditions.

Failure Logs

Please include any relevant log snippets or files here.

Fatal Exception: com.izettle.payments.android.readers.vendors.datecs.DatecsReaderV2$UnexpectedResponseForState
Command 0x000482180006CA04000000095F is not expected in state ConfigurationStarting

com.izettle.payments.android.readers.vendors.datecs.DatecsReaderV2.onTransactionCompleted (SourceFile:22)
com.izettle.payments.android.readers.vendors.datecs.DatecsReaderV2.reduce (SourceFile:234)
com.izettle.payments.android.readers.vendors.datecs.DatecsReaderV2.reduce$zettle_payments_sdk (SourceFile:7)
com.izettle.payments.android.readers.vendors.datecs.DatecsReaderV2$action$1.invoke (SourceFile:2)
com.izettle.payments.android.readers.vendors.datecs.DatecsReaderV2$action$1.invoke (SourceFile:1)
com.izettle.android.commons.state.StateImpl.update (SourceFile:7)
com.izettle.payments.android.readers.vendors.datecs.DatecsReaderV2.action (SourceFile:1)
com.izettle.payments.android.readers.vendors.datecs.DatecsReaderV2.access$action (SourceFile:1)
com.izettle.payments.android.readers.vendors.datecs.DatecsReaderV2$special$$inlined$stateObserver$1.onNext (SourceFile:113)
com.izettle.android.commons.state.StateImpl$update$1$1$1.invoke (SourceFile:2)
com.izettle.android.commons.state.StateImpl$update$1$1$1.invoke (SourceFile:1)
com.izettle.android.commons.thread.EventsLoopImpl.post$lambda-0 (SourceFile:1)
com.izettle.android.commons.thread.EventsLoopImpl.$r8$lambda$mZVdYF44n2YPjtMTBWGOxEmF25c
com.izettle.android.commons.thread.EventsLoopImpl$$ExternalSyntheticLambda1.run (Unknown Source:2)
android.os.Handler.handleCallback (Handler.java:883)
android.os.HandlerThread.run (HandlerThread.java:67)
CheZhongSdk commented 1 year ago

Hi Jonas,

Thank you for reaching out! @jonassimonaitis

We have not been able to reproduce this issue in our end. To further troubleshoot we need more additional information:

  1. While the SDK shows "white (empty) zettle activity", what text display on the Card Reader screen?
  2. Did the Card payment work for you before? When did you start to see this issue? Does it happen all the time?
  3. I saw you are in a old SDK version, maybe you can try to update to the latest SDK and try again?
  4. Did you see SDK upgrade progress bar notification in the Status bar?

In addition, we may need specific information to your account. Please raise a ticket here: Developer Support - SDK payments and refunds

Thank you.

jonassimonaitis commented 1 year ago

Thanks for a quick response!

Just want to specify that this issue happens only in the USA.

  1. Unfortunately at the moment I don't have this information. Here is the screen shot of an empty activity. EMPTY-ACTIVITY
  2. It worked a day before as expected. It happens randomly. Usually works after the whole system reboot and re-pairing the device via Android bluetooth settings.
  3. I have upgraded to the latest SDK (yesterday)
  4. No.

Also there is another issue coming from the zettle which could help with the investigation:

Fatal Exception: com.izettle.payments.android.readers.vendors.datecs.ReaderV2TransportImpl$UnsupportedAction: Action Ready is not supported in state ConnectedToPw
       at com.izettle.payments.android.readers.vendors.datecs.ReaderV2TransportImpl.reduce(SourceFile:241)
       at com.izettle.payments.android.readers.vendors.datecs.ReaderV2TransportImpl.reduce$zettle_payments_sdk(SourceFile:9)
       at com.izettle.payments.android.readers.vendors.datecs.ReaderV2TransportImpl$action$1.invoke(SourceFile:2)
       at com.izettle.payments.android.readers.vendors.datecs.ReaderV2TransportImpl$action$1.invoke(SourceFile:1)
       at com.izettle.android.commons.state.StateImpl.update(SourceFile:7)
       at com.izettle.payments.android.readers.vendors.datecs.ReaderV2TransportImpl.action(SourceFile:1)
       at com.izettle.payments.android.readers.vendors.datecs.ReaderV2TransportImpl.access$action(SourceFile:1)
       at com.izettle.payments.android.readers.vendors.datecs.ReaderV2TransportImpl$post$1.invoke(SourceFile:2)
       at com.izettle.payments.android.readers.vendors.datecs.ReaderV2TransportImpl$post$1.invoke(SourceFile:1)
       at com.izettle.android.commons.thread.EventsLoopImpl.post$lambda-0(SourceFile:1)
       at com.izettle.android.commons.thread.EventsLoopImpl.$r8$lambda$mZVdYF44n2YPjtMTBWGOxEmF25c()
       at com.izettle.android.commons.thread.EventsLoopImpl$$ExternalSyntheticLambda1.run(: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.os.HandlerThread.run(HandlerThread.java:65)

Fatal Exception: com.izettle.payments.android.readers.vendors.datecs.ReaderV2TransportImpl$UnsupportedAction: Action Request(2049, true) is not supported in state ConnectingToRx
       at com.izettle.payments.android.readers.vendors.datecs.ReaderV2TransportImpl.reduce(SourceFile:88)
       at com.izettle.payments.android.readers.vendors.datecs.ReaderV2TransportImpl.reduce$zettle_payments_sdk(SourceFile:7)
       at com.izettle.payments.android.readers.vendors.datecs.ReaderV2TransportImpl$action$1.invoke(SourceFile:2)
       at com.izettle.payments.android.readers.vendors.datecs.ReaderV2TransportImpl$action$1.invoke(SourceFile:1)
       at com.izettle.android.commons.state.StateImpl.update(SourceFile:7)
       at com.izettle.payments.android.readers.vendors.datecs.ReaderV2TransportImpl.action(SourceFile:1)
       at com.izettle.payments.android.readers.vendors.datecs.ReaderV2TransportImpl.access$action(SourceFile:1)
       at com.izettle.payments.android.readers.vendors.datecs.ReaderV2TransportImpl$post$1.invoke(SourceFile:2)
       at com.izettle.payments.android.readers.vendors.datecs.ReaderV2TransportImpl$post$1.invoke(SourceFile:1)
       at com.izettle.android.commons.thread.EventsLoopImpl.post$lambda-0(SourceFile:1)
       at com.izettle.android.commons.thread.EventsLoopImpl.$r8$lambda$mZVdYF44n2YPjtMTBWGOxEmF25c()
       at com.izettle.android.commons.thread.EventsLoopImpl$$ExternalSyntheticLambda1.run(: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.os.HandlerThread.run(HandlerThread.java:65)
CheZhongSdk commented 1 year ago

Thanks for the additional information and logs! It will be great if you could also provide us your org uuid in Developer Support - SDK payments and refunds Thank you.

jonassimonaitis commented 1 year ago

Unfortunately even after the SDK upgrade an issue still persists, thus I have filled the form.

alexdpayne commented 10 months ago

@jonassimonaitis Please see https://github.com/iZettle/sdk-android/issues/73 we had similar issues, but they we're "mostly" fixed in 1.36.8.

I say mostly as we still see the odd one a month.

CheZhongSdk commented 4 months ago

Please try the latest SDK version, the issue should be fixed there. Let us know if you still see the same issue.