stripe / stripe-terminal-ios

Stripe Terminal iOS SDK
https://stripe.com/docs/terminal/sdk/ios
Other
104 stars 64 forks source link

M2 not prompting for a pairing code #208

Closed mathewgrabau closed 1 year ago

mathewgrabau commented 1 year ago

Summary

Two different M2 devices are not prompting for the PIN on a pairing request. It happens specifically on two different iPads. One is a 5th generation mini and one is 6th generation mini. We have tried uninstalling and reinstalling the app (currently distributed from Test Flight).

The users have tried removing the app from their Bluetooth device listings (in the iPad Settings). I can see the calls in the Stripe Dashboard API logs to the discover readers endpoint, and I also see a call to the locations endpoint from the same endpoint.

I am at a loss to determine what is happening to these two particular iPads.

Code to reproduce

I don't have a precise reproduction at this time.

iOS version

16

Installation method

Binding to it with Xamarin.Forms. I am using the XCode frameworks functionality to get the framework.

SDK version

2.15

Other information

I would like

roshan-stripe commented 1 year ago

@mathewgrabau the bluetooth pairing cycle for Stripe Reader M2 should be managed through your app and the Terminal SDK and not through iPad Bluetooth settings.

Are you able to successfully call discoverReaders and connectReader from the SDK? Can you share any logs from your app if you're seeing any errors during those steps?

In the meantime you can also try running the example application on one of those devices to verify that works as expected.

mathewgrabau commented 1 year ago

Thanks for the response @roshan-stripe

I can successfully call discoverReaders and connectReader from the SDK. In this instance, I have displayed the list of found readers, and then called connectReader - which triggered the pairing request. I do understand that pairing is meant to be done in the app, and that is what we are doing. I am in app when the phenomenon I described happens. I only mentioned the settings menu as a frame of reference.

App is managing the experience - I merely used that as a frame of reference. I don't have access to the iPads in question, but I am working on obtaining better logs from there.

From what I can tell it's not a permissions issue, as the user verified the permissions are granted.

bric-stripe commented 1 year ago

@mathewgrabau if you could provide the serial number for the reader we can check for some logging on our side to see if anything stands out.

Also wanted to clarify, when you mention: "prompting for a pairing code" - you just mean the pairing prompt, right? There were some very early beta versions of the M2 that did prompt for a six digit code, but the production models shouldn't be prompting for a code just the pair/cancel prompt. Just want to clarify that to make sure these aren't beta readers.

mathewgrabau commented 1 year ago

Hi @bric-stripe certainly. Reader serials are STRM26142036023 and STRM26142035503.

I must have been testing with a beta unit - mine always asks me for a pin (pairing prompt through iOS). The user is seeing the behavior that you mention (just asking for the pair/cancel prompt). Would that behave differently?

bric-stripe commented 1 year ago

The user is seeing the behavior that you mention (just asking for the pair/cancel prompt). Would that behave differently?

No, it shouldn't act differently. The dialog you enter the 6 digit code in to is the same thing. It's just for production readers it's a simpler dialog without the need to enter a code, just need to tap the pair button.

I looked through some logs and the Bluetooth connection to the readers is working OK, but it seems like something during connectReader is causing a hang or crash. I see events showing it's connected to the reader and was able to get the initial device info and then the SDK is checking firmware/config versions but then that's the last thing reported. There are hints that the application is crashing or being force quit. Are you able to check in App Store Connect or anywhere you may have crash reporting to see if any crashes or hangs that correspond to these readers? And can you confirm with the user that the application is crashing or if its hanging and needs to be force quit or anything? the SDK doesn't have crash reporting as we don't want to interfere with host application crash reporting so we're somewhat limited. I'm not aware of any known crashes in the SDK but if you do find stack traces please report them and we'll dig in.

Also: other readers are working OK? Could you provide a serial for a reader that is working as expected? I can compare some of the logs. I don't think anything will jump out at me but worth a shot.

mathewgrabau commented 1 year ago

Thanks @bric-stripe - other readers are working fine, that's what's bizarre. It's on two specific iPads. I'm thinking it's back to an application level issue. I'll check it out and report back. I'm going to reissue a build with more crashing reporting. The crash log for App Store Connect is not pointing at anything obvious, but I will review it again for insights.

One reader that might be working better is: STRM26142036005

bric-stripe commented 1 year ago

Hi, cleaning up stale issues but please re-open if any new information here to investigate.