Skip to content

Never stop loading react-native 0.63.3 #10

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

Closed
Kladislav opened this issue Nov 6, 2020 · 27 comments · Fixed by #13
Closed

Never stop loading react-native 0.63.3 #10

Kladislav opened this issue Nov 6, 2020 · 27 comments · Fixed by #13
Assignees
Labels
bug Something isn't working question Further information is requested

Comments

@Kladislav
Copy link

No description provided.

@a-tokyo
Copy link
Owner

a-tokyo commented Nov 6, 2020

Hey @Kladislav ! Thanks for opening an issue!

The demo screenshot is indeed from RN 0.63.3 and we are currently using this version as well.

Can you check the logs and see if there's something else preventing the library from loading?
Also if you can reproduce with a demo, that'd be great!

@Kladislav
Copy link
Author

Ohh, sorry, i find whats wrong. I have this bug when switching stripe to production mode. Idk where to find any error, react-native start clear

@a-tokyo
Copy link
Owner

a-tokyo commented Nov 6, 2020

All good! @Kladislav! Let me know if you face any issues ( :

@a-tokyo a-tokyo closed this as completed Nov 6, 2020
@a-tokyo a-tokyo added the invalid This doesn't seem right label Nov 6, 2020
@a-tokyo a-tokyo self-assigned this Nov 6, 2020
@Kladislav
Copy link
Author

Kladislav commented Nov 6, 2020

Link to video: https://streamable.com/22vf8v
Code:
<StripeCheckout stripePublicKey={STRIPE_PUBLIC_KEY} checkoutSessionInput={{ sessionId: props.route.params.checkoutSessionId, }} onSuccess={onSuccess} onCancel={onCancel} /> )

When I switching back to dev mode Stripe. All good!

@a-tokyo
Copy link
Owner

a-tokyo commented Nov 6, 2020

Are you sure you're passing the correct PRODUCTION STRIPE_PUBLIC_KEY? @Kladislav

@a-tokyo a-tokyo reopened this Nov 6, 2020
@pratibhahg
Copy link

im also facing this issue when i use PRODUCTION STRIPE_PUBLIC_KEY cannot able load stripe

@Kladislav
Copy link
Author

@a-tokyo yes, its correct.

@a-tokyo
Copy link
Owner

a-tokyo commented Nov 11, 2020

Thanks for your patience guys, I have identified the issue

Live stripe integrations require https connections which is why they don't work on the simulator.
I will check if this is the case on a real device, if it's not then there's nth to be done here. If it is, then I need to figure out a way to ensure that webview is https.

Screen Shot 2020-11-11 at 2 14 16 AM

@a-tokyo a-tokyo removed the invalid This doesn't seem right label Nov 11, 2020
@a-tokyo
Copy link
Owner

a-tokyo commented Nov 11, 2020

@Kladislav @pratibhahg Does this only happen on simulators or on real devices as well?

@a-tokyo a-tokyo added bug Something isn't working question Further information is requested labels Nov 11, 2020
@Kladislav
Copy link
Author

Kladislav commented Nov 11, 2020

@a-tokyo Link to video: https://streamable.com/22vf8v its real device)

@arunim2405
Copy link

According to this thread
Inserting your backend endpoint instead of baseUrl : '' works for android. Can someone confirm? Also @Kladislav did you have an opportunity to test google pay on android using this package?

@Kladislav
Copy link
Author

@arunim2405 no, we using react native iap for ios subscription

@Kladislav
Copy link
Author

@arunim2405 i change the base url to my production api endpoint nothing changes. any ideas?

@arunim2405
Copy link

@Kladislav are you using https on your backend server?

@Kladislav
Copy link
Author

Kladislav commented Nov 15, 2020

@arunim2405 yes, wait do i need to test it only on real device?

upd. tested on emulator and real device, nothing changes, always loading(

@tkrugg
Copy link

tkrugg commented Nov 15, 2020

I can confirm this happens both on simulator and real device.
But adding baseURL works on android (even on the simulator)

I changed the library code to:

image

@arunim2405
Copy link

I can confirm this happens both on simulator and real device.
But adding baseURL works on android (even on the simulator)

I changed the library code to:

image

I wonder why is it not working for @Kladislav 🤔

@Kladislav
Copy link
Author

Kladislav commented Nov 19, 2020

@arunim2405 i use my web front end url(nuxt.js), my backend url is https://site.com/api, ok i will test it soon

@Kladislav
Copy link
Author

@arunim2405 what SSL certificate you have? do you use letsencrypt?

@Kladislav
Copy link
Author

Problem solved. Big thanks @arunim2405 @a-tokyo

@arunim2405
Copy link

Problem solved. Big thanks @arunim2405 @a-tokyo

Congratulations 🎊 what finally solved the issue?

@MehuImpero
Copy link

MehuImpero commented Nov 20, 2020

Simulator Screen Shot - iPhone 11 - 2020-11-20 at 19 24 16

Stuck in loading

@arunim2405
Copy link

Simulator Screen Shot - iPhone 11 - 2020-11-20 at 19 24 16

Stuck in loading

Test mode or production?

@NeOMakinG
Copy link

NeOMakinG commented Nov 20, 2020

Hey

Both for me, test mode and prod mode! (on iOS)

Edit: Nevermind, I forgot to enable checkout in the stripe BO :)

@a-tokyo a-tokyo closed this as completed Nov 21, 2020
@MehuImpero
Copy link

Simulator Screen Shot - iPhone 11 - 2020-11-20 at 19 24 16
Stuck in loading

Test mode or production?

testing mode

@arunim2405
Copy link

Simulator Screen Shot - iPhone 11 - 2020-11-20 at 19 24 16
Stuck in loading

Test mode or production?

testing mode

Please ensure that you've enabled stripe checkout in the dashboard and you're following proper steps to generate session id. This issue only occurred in production mode and has been now fixed

@fakeheal
Copy link

fakeheal commented Dec 2, 2020

Although, 54d9537 resolves this issue, here's a related answer on SO (there's another option of hosting the HTML on your server):
https://stackoverflow.com/questions/64702032/react-native-stripe-card-element-not-displaying-for-live-api-key

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working question Further information is requested
Projects
None yet
8 participants