Open abhijitCN opened 6 months ago
@abhijitCN I am also experiencing a similar issue, I'm testing out a Production build on Android and am getting an error back from stripe when attempting to connect using connectLocalMobileReader
.. The message I'm seeing in the error object is No such location: <locationId>
. However the location exists. Are you getting a similar message?
@mikrich Thanks for the response,
In our project, location is coming from the backend API I passed the location ID in Stripe. after that I call connectLocalMobileReader() function, and in throw the error the reader is not connecting.
Below Code where I getting error.
async function connectMobileReader() { const {reader, error} = await connectLocalMobileReader({ reader: discoveredReader locationId: stripeLocation?.data?.id, }); if (error) { console.log('connectLocalMobileReader error:', error); Alert.alert('Reader not connected'); return; } }
what message do you see when you log out console.log('connectLocalMobileReader error:', error);
If you are testing on a device you will need to print it out in the alert for example Alert.alert(JSON.strigify(error))
I have attached a screenshot of my error. Have you Faced this !!
I was facing a different issue No such location: <locationId>
however it turns out the request for the token (on our backend) had been set up incorrectly which has now been fixed and it's working. I've not seem the issue you are experiencing.
@mikrich Which Stripe Terminal React Native SDK version are you using?
@abhijitCN the latest v0.0.1-beta.18
@mikrich can you please look into this and assist me.
@abhijitCN this message will show if you don't provide a locationId
:
https://docs.stripe.com/terminal/payments/connect-reader?terminal-sdk-platform=react-native&reader-type=tap-to-pay#connect-reader
Hi, @mikrich I have a query that my Screen Short Error and your error are the same?
I'm getting the same error (in test mode), and I know that:
(1) I'm the location id from the correct Stripe account/dashboard that is connected in test mode (2) The location id is valid and entered correctly
Android stripe-terminal sdk v2.19.0
Logcat shows this:
class=TerminalSession
com.stripe.stripeterminal.external.models.TerminalException: No such location: 'tml_xxxxxxxxxxx'
@dshalaby are you using the Android SDK directly? the repo for that is https://github.com/stripe/stripe-terminal-android/issues
I was facing a different issue
No such location: <locationId>
however it turns out the request for the token (on our backend) had been set up incorrectly which has now been fixed and it's working. I've not seem the issue you are experiencing.
Im running into this same issue, any chance you could share how you have your connection token endpoint set up in your backend?
@nazli-stripe Yes I was thank you, sorry for the late reply.
@CarlMenke My connection token endpoint was working fine in so far as the Stripe SDK. Our issue was something internal in our application rather than anything on the Stripe side. In our case this error was coming about because of a conflict in the initial Connect OAUTH token grant and our connection token endpoint.
When we use the simulated true option, both Android and iOS work perfectly. However, when we set it to false, the reader does not connect. Calling connectLocalMobileReader() returns an error.
Below I have added my code, please review it once.
Screenshot
Stripe Terminal React Native SDK version
I have used the below listed devices
Additional context
{YOUR BACKEND URL}/connection_token
using this ConnectionToken in index.jsCall initialize in app.js
@nazli-stripe @billfinn-stripe can you please look into this and assist me.