Closed 1970578978 closed 5 months ago
Can anyone please help us looking into this issue? @gliu-stripe All the problems I encountered were solved by restarting the device. Why does the card reader restart every day? I'm thinking about whether it's necessary to add an automatic restart function to the device.
facing the same issue with m2 Reader Android 11 device
Hi folks, are you able to reproduce this issue with the latest SDK and example application? We fixed a similar issue in later sdks where there was a rogue listener to the reader on discovery that was triggering an unexpected disconnect event when it should not. Also regarding automatically reconnecting, have you tried the auto-reconnect feature the sdk supports ^1, available since 2.12
^2 to help with reconnecting to the reader on reboot?
@ugochukwu-stripe Hi Thanks for your response, I have checked two sdks where this issue still persists and we constantly face this bug after every few days.
3.2.0 & 2.23.0
android 11
@basitjawaid the fix for this went into the 3.3.0
release, so let us know if you still see this issue after upgrading to 3.3.0+
@ugochukwu-stripe Sorry, I can't test the 3.3 SDK yet, because we have a large number of Android 7.0 devices.
@ugochukwu-stripe I have integrated the SDK 3.4.0 today, will share my experience here.
@ugochukwu-stripe I have integrated the SDK 3.4.0 today, will share my experience here.
Hello brother, do you still have this problem when using 3.4.0?
@ugochukwu-stripe I have integrated the SDK 3.4.0 today, will share my experience here.
Hello brother, do you still have this problem when using 3.4.0?
we have around 30 devices and we are actually testing on all the devices right now, we'll get back to you if we encounter any disconnection issue
@ugochukwu-stripe I have integrated the SDK 3.4.0 today, will share my experience here.
Hello brother, do you still have this problem when using 3.4.0?
we have around 30 devices and we are actually testing on all the devices right now, we'll get back to you if we encounter any disconnection issue
ok,thx
@basitjawaid checking in, are you still experiencing the disconnection issue with 3.4.0
?
@ugochukwu-stripe Hi We have installed our application in 8 to 10 devices (with updated SDK) and all these devices are on different locations for different clients, after the update we did not hear anything from them about disconnection, as soon as will hear anything about this issue again I will let you know here.
Hi @1970578978 Do you have any plan to upgrade your fleet of Android 7.0 devices to take advantage of the fix that went into V3.3+?
Also related - we will no longer provide support for V2.0 once it reaches its end-of-life date scheduled for October this year.
Hi @1970578978 Do you have any plan to upgrade your fleet of Android 7.0 devices to take advantage of the fix that went into V3.3+?
Also related - we will no longer provide support for V2.0 once it reaches its end-of-life date scheduled for October this year.
没有这个计划
Hi @ugochukwu-stripe Hello, I seem to have found the reason why the card reader cannot connect. In some cases, after using connectUsbReader readerCallback runs neither success nor failure callbacks. disconnectReader also doesn't work properly. I don’t know the specific triggering mechanism yet, but it seems to happen randomly now. Have you fixed this issue in 3.4?
Hi @1970578978 , can you share the serial of the reader and the logs from the sdk from when this issue occurred, the connect reader callbacks not firing seems to be a different problem from the one we caught and fixed, at the very least you should get an error from the SDK.
@ugochukwu-stripe hello I get it ` onUpdateDiscoveredReaders
I get new error msg, can you help me?
[2024-05-30 00:40:09][info]Crash Time: 2024-05-29 18:40:03
java.lang.RuntimeException: android.os.DeadSystemException at android.hardware.usb.UsbManager.getDeviceList(UsbManager.java:415) at com.stripe.core.bbpos.hardware.BbposReaderConnectionController.resolveUsbReader(BbposReaderConnectionController.kt:104) at com.stripe.core.bbpos.hardware.BbposReaderConnectionController.connectUsb(BbposReaderConnectionController.kt:70) at com.stripe.core.bbpos.hardware.BbposReaderConnectionController.connect(BbposReaderConnectionController.kt:35) at com.stripe.core.bbpos.hardware.BbposReaderController.connect(Unknown Source:7) at com.stripe.stripeterminal.internal.common.connectandupdate.ConnectHandler.onEnter(ConnectAndUpdateStates.kt:128) at com.stripe.stripeterminal.internal.common.connectandupdate.ConnectHandler.onEnter(ConnectAndUpdateStates.kt:121) at com.stripe.core.statemachine.StateMachine.transitionTo(StateMachine.kt:87) at com.stripe.core.statemachine.StateMachine$StateHandler.transitionTo(StateMachine.kt:140) at com.stripe.stripeterminal.internal.common.connectandupdate.EmptyHandler.onConnectAndUpdateApplicationDataUpdate(ConnectAndUpdateStates.kt:80) at com.stripe.stripeterminal.internal.common.connectandupdate.ConnectAndUpdateStateHandler.onUpdate(ConnectAndUpdateStates.kt:258) at com.stripe.stripeterminal.internal.common.connectandupdate.ConnectAndUpdateStateHandler.onUpdate(ConnectAndUpdateStates.kt:247) at com.stripe.core.statemachine.StateMachine.updateData(StateMachine.kt:53) at com.stripe.stripeterminal.internal.common.connectandupdate.ConnectAndUpdateStateMachine.update(ConnectAndUpdateStateMachine.kt:83) at com.stripe.stripeterminal.internal.common.adapter.BbposAdapter.update(BbposAdapter.kt:504) at com.stripe.stripeterminal.internal.common.adapter.BbposUsbAdapter$ReconnectUsbReaderOperation$execute$1$1.emit(BbposUsbAdapter.kt:220) at com.stripe.stripeterminal.internal.common.adapter.BbposUsbAdapter$ReconnectUsbReaderOperation$execute$1$1.emit(BbposUsbAdapter.kt:212) at kotlinx.coroutines.flow.internal.SafeCollectorKt$emitFun$1.invoke(SafeCollector.kt:15) at kotlinx.coroutines.flow.internal.SafeCollectorKt$emitFun$1.invoke(SafeCollector.kt:15) at kotlinx.coroutines.flow.internal.SafeCollector.emit(SafeCollector.kt:87) at kotlinx.coroutines.flow.internal.SafeCollector.emit(SafeCollector.kt:66) at com.stripe.stripeterminal.internal.common.adapter.connection.UsbReaderReconnector$attemptToReconnect$5.invokeSuspend(UsbReaderReconnector.kt:167) at com.stripe.stripeterminal.internal.common.adapter.connection.UsbReaderReconnector$attemptToReconnect$5.invoke(Unknown Source:8) at com.stripe.stripeterminal.internal.common.adapter.connection.UsbReaderReconnector$attemptToReconnect$5.invoke(Unknown Source:2) at com.stripe.core.hardware.reactive.RxJavaHelper.awaitFirstWithBlock(RxJavaHelper.kt:19) at com.stripe.stripeterminal.internal.common.adapter.connection.UsbReaderReconnector.attemptToReconnect(UsbReaderReconnector.kt:166) at com.stripe.stripeterminal.internal.common.adapter.connection.UsbReaderReconnector.access$attemptToReconnect(UsbReaderReconnector.kt:31) at com.stripe.stripeterminal.internal.common.adapter.connection.UsbReaderReconnector$reconnect$1$1.invokeSuspend(UsbReaderReconnector.kt:70) at com.stripe.stripeterminal.internal.common.adapter.connection.UsbReaderReconnector$reconnect$1$1.invoke(Unknown Source:8) at com.stripe.stripeterminal.internal.common.adapter.connection.UsbReaderReconnector$reconnect$1$1.invoke(Unknown Source:4) at kotlinx.coroutines.intrinsics.UndispatchedKt.startUndispatchedOrReturnIgnoreTimeout(Undispatched.kt:89) at kotlinx.coroutines.TimeoutKt.setupTimeout(Timeout.kt:151) at kotlinx.coroutines.TimeoutKt.withTimeoutOrNull(Timeout.kt:107) at kotlinx.coroutines.TimeoutKt.withTimeoutOrNull-KLykuaI(Timeout.kt:139) at com.stripe.stripeterminal.internal.common.adapter.connection.UsbReaderReconnector$reconnect$1.invokeSuspend(UsbReaderReconnector.kt:64)
@1970578978 the stack trace you linked above is from a different ^1 from the INVALID_FUNCTION_IN_CURRENT_CONNECTION_MODE
, can you open a new issue for it. I'm going to close this out given that we're no longer seeing the issue in 3.4
, feel free to re-open if you're still seeing this in 3.4
.
Can this be fixed in v2? We also have 30+ devices running android 7.1.1 (Sunmni t2 mini). which wont be upgraded for another 6 month.
Hi there, We have released our final SDK V2 version [0], which includes our best effort to address this issue. However, please note that this is the last release for SDK V2, and the Terminal Android SDK V2 has now reached its end of support [1]. This means it will no longer receive any necessary updates or fixes to ensure continued functionality.
To avoid any interruptions, we strongly encourage you to upgrade to SDK V3 or higher. Thank you.
[0] https://github.com/stripe/stripe-terminal-android/blob/master/CHANGELOG.md#2234---2024-10-24 [1] https://github.com/stripe/stripe-terminal-android/blob/master/SUPPORT.md#end-of-life-eol
Summary
When the card reader connection is abnormal, my program will immediately try to reconnect to the card reader. This function has been working very well and can be reconnected every time the card reader is restarted every day. But as long as my Android device is powered on for a long time and connected to the card reader, it will no longer be able to connect to the card reader. I have caught the exception. Please help me find out the specific reason. Thanks
Code to reproduce
`
`
Android version
android 7.1
Impacted devices (Android devices or readers)
SDK version
implementation "com.stripe:stripeterminal:2.23.0"
Other information