#felipe_code

1 messages · Page 1 of 1 (latest)

sterile lichenBOT
#

👋 Welcome to your new thread!

⏲️ We'll be here soon! Typically we respond in a few minutes, but sometimes we might take a bit longer if the server is busy or if you have a particularly tricky question.

⏱️ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can always start a new thread if you have another question.

🔗 This thread will always be available, even after it's closed. You can find it again using Discord's search, or you can save this link: https://discord.com/channels/841573134531821608/1288505899186655283

📝 Have more to share? Add more details, code, screenshots, videos, etc. below.

Below are links to other discussions we've had with you in the past week in case you want to review that information. If your question is related to one of these previous discussions, please provide a comprehensive summary of the current state and what you need help with now. We help many users simultaneously, so a summary allows us to resolve your issue as soon as possible.

pale knot
#

Hello, can you provide more of your code for how you are setting terminal up before calling discoverReaders?

patent basalt
#

sure

#

val config: DiscoveryConfiguration =
DiscoveryConfiguration.LocalMobileDiscoveryConfiguration(isApplicationDebuggable)

    discoveryCancelable =
        Terminal.getInstance().discoverReaders(config, discoveryListener = object :
            DiscoveryListener {
            override fun onUpdateDiscoveredReaders(readers: List<Reader>) {
                readers.filter { it.networkStatus != Reader.NetworkStatus.OFFLINE }

                val reader = readers[0]
                val result =
                    Terminal.getInstance().supportsReadersOfType(reader.deviceType, config)
                if (result.isSupported) {

                    val config2 =
                        ConnectionConfiguration.LocalMobileConnectionConfiguration(
                            location?.gatewayLocationId ?: "",
                            autoReconnectOnUnexpectedDisconnect = true
                        )

                    Terminal.getInstance().connectLocalMobileReader(
                        reader,
                        config2,
                        object : ReaderCallback {
                            override fun onFailure(e: TerminalException) {
                                mView.isToShowProgressDialog(false)
                                mView.showTerminalNotSupportedToast()
                                Timber.e(e)
                            }

                            override fun onSuccess(reader: Reader) {
                                createPrepareTransaction(ticket!!.id, totalToCharge)
                                Timber.d("onReaderReconnectSucceeded")
                            }
                        }
                    )
pale knot
#

Thank you, and is there any other info that is included in the exception that is thrown, like a message string?

patent basalt
#

This is the full stacktrace

pale knot
#

It looks like that exception should be thrown with an error code that will tell us more. Can you try catching that exception and checking what its error code is?

patent basalt
#

I can't access the code that you share

#

How could I catch this error code?

pale knot
patent basalt
#

I'm getting the same exception, without any error code

#

I added a try catch block

pale knot
patent basalt
#

I only can reproduce the expception using a release version, so I can't debug

#

I will try to add another try catch block

#

I tried on multiple parts of the code, still getting the same

#

I'm suspecting there is no error code

#

I was wondering why that exception mentioned firebase remote config?

indigo zenith
#

Hi there 👋 helping taking a look here. I'm not sure why Firebase is mentioned there, are you using Firebase for your app somehow? (We don't know much about firebase since we don't have first-party support for it) I wouldn't expect our sdk to throw an error related to Firebase.

patent basalt
#

It seems an issue between stripe/firebase sdk

indigo zenith
#

Gotcha, glad to hear you were able to get to the bottom of it!

sterile lichenBOT
patent basalt
#

So, is there a fix for that in progress for the next releases of the stripe sdk?

pale knot
#

I don't see any active issues about that. It could be worth raising a new one on that repo if you think this is something that should be fixed on our side