-
Notifications
You must be signed in to change notification settings - Fork 49
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
Reader Issue (3.9.2) #502
Comments
Hello again, i tried your simple example code , using the version 2.20.0, eveything is working good, but when i try the same code on my version 3.9.0 or 3.9.1 or 3.9.2 , when i call the init terminal from myh Application, then i try to getReaders, the app crashes sometimes, and the result of the get readers is -> getReader | onFailure: Cannot get readers 11: com.stripe.stripeterminal.external.models.TerminalException: Contactless transaction failed com.stripe.core.aidlrpc.AidlRpcException: Service never connected. |
Hi Mahdi, can you share a full stack trace and any other logcat error output for this crash? It would also help to know what target SDK version you're using for this build and the model of device you're using. |
Also, are you using desugaring? |
Hello Again, Yes am using desugaring : Note : I’ve tried the following versions : 3.9.0/3.9.1/3.9.2/3.9.3 -> same problem These are the steps that causes the crash : This is the full logcat: 09:22:33.765 application | onCreate: start And one more thing, there is no stacktrace from the terminal sdk itself, I discovered this crash by following my logs only |
Hi Mahdi, another user found that this issue was resolved by updating the desugaring library: #504 (comment) can you try this and let us know if it resolves the issue? |
Hello Sidhant, i was following your discussion, i tried the update, didnt work, i tried to remove the disugaring, nothing helped, my logcat is so obvious, my application crashes twice after calling getREader, and that's because the terminal initialization takes the application as parameter, something happened in the sdk, in old versions this problem is not exist, but i cant downgrade because the company project is up to date and can't be downgraded, a lot of features will be unavailable |
What device are you testing this on? Does this crash occur on all devices you've tested with? Also, are you using targetSdk 35 by any chance? |
i tried on google pixel 6, samsung s22 ultra, same issue on both, i tried target sdk 34 and 35, also same problem |
Sorry for this but is this issue happend on your side ? |
Hello Again, Any Update please ? we are blocked here |
Hi Mahdi, I took a look at your logs and I saw this:
It looks like you're attempting to use a non-simulated reader in a debug build. If you build in release, this should work. |
Hello , here i was trying on the emulator, but the real problem exists on real device |
Hi Mahdi, The issue is not that this is an emulated device, rather it's happening because your app is debuggable. We do not permit debuggable apps to get access to a non-simulated reader. You will have to build a release apk, which you can do by clicking Build -> Generate signed app bundle/apk and then selecting the release build variant. You will also need to make sure that your app is not debuggable. Please try these steps and let me know if it works for you. |
Hello , |
Hi Mahdi, The fact that a new Application is created when using the Tap to Pay SDK in release mode is expected. The Tap to Pay service runs in a separate process for your application, which does cause your Application's If you are performing some initialization in your Application class that should only be performed in the main app process, you can use some code like the one in described in issue #323 to skip this initialization when the Tap to Pay process starts. |
Hello, Thank you for your help, i did exactly what you mentioned above, but am still getting this : onFailure: Cannot get readers 11: com.stripe.stripeterminal.external.models.TerminalException: Contactless transaction failed com.stripe.core.aidlrpc.AidlRpcException: Service never connected. |
Hi Mahdi, can you confirm that the UUID of the device you're experiencing this on is |
Hello, |
when i try to connect to a reader in live mode, and after 1 minute of waiting i got this failure error :
getReader | onFailure: Cannot get readers 11: com.stripe.stripeterminal.external.models.TerminalException: Contactless transaction failed com.stripe.core.aidlrpc.AidlRpcException: Service never connected.
My code is :
fun initTerminal(app: Application) {
get Reader :
suspendCancellableCoroutine { continuation ->
Log.d(TAG, "getReader: start")
val config = DiscoveryConfiguration.LocalMobileDiscoveryConfiguration(
isSimulated = BuildConfig.DEBUG,
)
try {
discoveryCancelable = Terminal.getInstance().discoverReaders(
config,
object : DiscoveryListener {
override fun onUpdateDiscoveredReaders(readers: List) {
if (readers.isEmpty()) {
disconnectReader()
_state.update { it.copy(isLoading = false, errorMessage = "Reader not found") }
Log.d(TAG, "onUpdateDiscoveredReaders: No Readers found")
continuation.resume(Unit)
} else {
Log.d(TAG, "onUpdateDiscoveredReaders: readers : $readers")
val locationConfig =
ConnectionConfiguration.LocalMobileConnectionConfiguration(
locationID
)
Terminal.getInstance()
.connectLocalMobileReader(
readers[0],
locationConfig,
object :
ReaderCallback {
override fun onSuccess(reader: Reader) {
deviceReader = reader
Log.d(
TAG,
"getReader | onSuccess: reader Set : ${reader}"
)
continuation.resume(Unit)
}
The text was updated successfully, but these errors were encountered: