#heartthrob-rob_code
1 messages ยท Page 1 of 1 (latest)
๐ 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/1358883800683384995
๐ Have more to share? Add more details, code, screenshots, videos, etc. below.
Hello
Can you share the exact code you're working with? Where's this updateReader error originating from?
Are you seeing that when you call connectReader ?
yes when I call connect reader
seems to be coming from a stripe module in the logcat - "StripeTerminal"
What are you passing as your SimulatorConfiguration?
I was setting discoveryconfig to (isSimulated= true), but haven't passed a specific simulator config
Hmm I meant when you call connectReader, what are you passing in as the second parameter?
The issue seems to be with Connection and not Discovery
fun connectToReader(
reader: Reader,
locationId: String = DEFAULT_LOCATION_ID,
onSuccess: (Reader) -> Unit,
onFailure: (TerminalException) -> Unit
) {
try {
// Check if already connected to this reader
if (currentReader != null && currentReader?.id == reader.id) {
// Already connected to this reader, just call the success callback
onSuccess(currentReader!!)
return
}
// Not connected or connected to a different reader
val config = createConnectionConfig(locationId)
terminal?.connectReader(
reader,
config,
createReaderCallback(onSuccess, onFailure)
)
} catch (e: Exception) {
handleConnectionError(e, onFailure)
}
}
private fun createConnectionConfig(locationId: String): ConnectionConfiguration {
return ConnectionConfiguration.TapToPayConnectionConfiguration(
locationId = locationId,
autoReconnectOnUnexpectedDisconnect = true,
tapToPayReaderListener = createTapToPayListener()
)
}
It's createConnectionConfig isn't it?!
Yup
Hmm I don't see anything that might trigger an update on the simulated reader ๐ค
Are you on the latest version of the SDK?
I'll have to check, haven't updated for a while
Gotcha. Can you try using the latest SDK if you don't currently have that set up yet?
Also, just to confirm -- there arent' any other places where your code calls Terminal.getInstance().simulatorConfiguration or anything similar -- correct?
- Just moving from 4.1 to 4.3
- Yes you're right no other places that call simulatorConfiguration
Hmm I don't have a way to reproduce this error at the moment. Are you able to test this on an actual device to see if you're able to test with non-simulated device?