#ismailelric
1 messages · Page 1 of 1 (latest)
Hello! We'll be with you shortly. 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.
- ismail-RN-terminalReader, 14 hours ago, 30 messages
- ismailelric, 1 day ago, 8 messages
Hello there
The locationId here should be a location object (https://stripe.com/docs/api/terminal/locations). See: https://stripe.com/docs/terminal/payments/connect-reader?terminal-sdk-platform=react-native&reader-type=bluetooth#connect-reader
It suffices to add the id alone?
{
id: myId
}
?
I see, the location is already created. I passed the locationId I received, and still got that error
Can you hard code in the location ID and then run the test again?
It was hard coded
Code snippet:
const { reader, error } = await connectBluetoothReader({
// Since the simulated reader is not associated with a real location, we recommend
// specifying its existing mock location.
reader: cardReader,
locationId: "tml_Ik....",
autoReconnectOnUnexpectedDisconnect: true,
});
Okay and what is the error exactly?
When conecting to a reader I get:
Invalid param: register_to_location, found tml_Ik...
Well then the above isn't the relevant code for that error
I thought it may be since the code mentioned is used there.
You aren't passing register_to_location at all in that code
Have you added logs to your code yet?
To see exactly where the error is triggered?
The error I get is from the bluetoothConnection Reader method
const { reader, error } = await connectBluetoothReader({
// Since the simulated reader is not associated with a real location, we recommend
// specifying its existing mock location.
reader: cardReader,
locationId: DEFAULT_LOCATION_ID,
autoReconnectOnUnexpectedDisconnect: true,
});
if (error) {
setBluetoothConnectionStatus("error");
Toast.show({
type: "error",
text1: `Failed Connecting to ${cardReader.label ?? cardReader.deviceType}`,
text2: error.message,
});
// Error copied
throw new Error(error.message);
}
Can you show me the exact error that you get when you have the reader ID and Location ID hard coded?
I don't have the error Code.
But the error message is exactly the one shared
- Connect via bluetooth
- Error: Invalid param: register_to_location, found tml_Ik
Okay well we are basically going around in circles then. The code that you have shared does not contain register_to_location anywhere so I can't really help you. Perhaps try clearing your cache and restarting your server?
I don't know where the register_to_location comes from since the method only requires 3 arguments, and honestly the error isn't helping
You are using a M2, here?
Yes
What version of the Terminal React Native SDK are you using?
0.0.1-beta.13
Alright well I'd try clearing your cache as I mentioned, but the next step if that doesn't help would be for us to reproduce what you are seeing on our side to see if there is a bug in the SDK.
So for that to happen you would want to contact our Support team via https://support.stripe.com/contact/login with the full details and your code.