Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

App crashing when using discoverReaders method. #751

Open
ankitharitus opened this issue Jul 6, 2024 · 6 comments
Open

App crashing when using discoverReaders method. #751

ankitharitus opened this issue Jul 6, 2024 · 6 comments

Comments

@ankitharitus
Copy link

Describe the bug
My native app is crashing when i am calling discoverReaders method.

To Reproduce
Steps to reproduce the behavior:

const {error} = await discoverReaders({
discoveryMethod: 'localMobile',
});

Expected behavior
it should either give some error or in success callback

Screenshots
If applicable, add screenshots to help explain your problem.

Stripe Terminal React Native SDK version

  • "@stripe/stripe-terminal-react-native": "^0.0.1-beta.19",

Smartphone (please complete the following information):

  • Browser Chrome

Additional context
Add any other context about the problem here.

@nabilfreeman
Copy link

nabilfreeman commented Jul 8, 2024

Stripe Terminal is not supported in browser. The provider should not be embedded at all on Web (we did this by wrapping it in our own context with conditional rendering)

@ankitharitus
Copy link
Author

@nabilfreeman i am checking in xcode simulator not on web browser.

@DaviddStewarttCT
Copy link

DaviddStewarttCT commented Jul 19, 2024

Im getting the same issue on IOS. Im using the function:

const { error } = await discoverReaders({
      discoveryMethod: 'bluetoothScan',
    })

and it completely crashes my application

@zameschua
Copy link

@ankitharitus @DaviddStewarttCT the discoverReaders() method doesn't work on simulator, unless you pass in the simulated: true flag

@nazli-stripe
Copy link
Collaborator

@ankitharitus are you still running into issues with discovery?

@brunoambr
Copy link

brunoambr commented Aug 30, 2024

@ankitharitus, @nazli-stripe It was also happening with me (trying to integrate with Stripe M2 Reader). I was using ^0.0.1-beta.20 with iOS 17.6.1. Other options like "localMobile" worked correctly.

The problem was related to bluetooth-central permissions in Info.plist.

After adding it, it started working.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants