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

React native web safari compatibility #64

Open
pakaplace opened this issue May 21, 2021 · 4 comments
Open

React native web safari compatibility #64

pakaplace opened this issue May 21, 2021 · 4 comments
Labels
good first issue Good for newcomers help wanted Extra attention is needed question Further information is requested react-native-webview react-native-webview

Comments

@pakaplace
Copy link

pakaplace commented May 21, 2021

image

Hello,

First off, thank you so much for creating and maintaining this component.

I was able to get the correct sessionId and correct Stripe public key into the component, but upon render I'm getting a completely blank off-white screen. I've searched the page elements for the stripe page html, but can't find it.

Any idea why this could be? I found a closed issue regarding permanent loading, but at least those screens showed something. #10

I'm using expo start --web --https (https enabled) to test it. example url: https://localhost:4000

Thanks!

@a-tokyo
Copy link
Owner

a-tokyo commented May 24, 2021

Hey @pakaplace I am not sure why this is happening, but I have not tested the library with web.

It was only tested with react-native ios and android.

Can you check if react-native-webview works with web?
If so, can you try to use the react-native-webview component out of the box? If it loads there then the issue is likely to be with this library. If not, then the issue is either on expo, rn web, or webview's side.

@a-tokyo a-tokyo added good first issue Good for newcomers help wanted Extra attention is needed question Further information is requested labels May 24, 2021
@a-tokyo
Copy link
Owner

a-tokyo commented Jun 25, 2021

@pakaplace Any updates on this?

@pakaplace
Copy link
Author

Hi @a-tokyo , sorry for the delay. I got it working on web with react native by substituting react-native-webview with react-native-web-webview.

It did not work with react-native-webview. It could be helpful to add this to the readme or consider a forked version for web.

@pakaplace
Copy link
Author

pakaplace commented Jun 29, 2021

@a-tokyo , I got it working on Chrome by subbing react-native-webview with react-native-web-webview. react-native-webview does not support the web 😂

It's live at the site I'm developing- https://web.replyguy.app

However, I haven't figured out an eror specific to Safari.
image
More info- Stack overflow issue

It appears that Safari is complaining about the react-native-web-webview attempting to change the top-level URL. In Chrome, this same redirect to the stripe URL is allowed.

I may just be configuring webview wrong. I'm not the best with cors errors :/ Any ideas?

@pakaplace pakaplace reopened this Jun 30, 2021
@a-tokyo a-tokyo changed the title Stuck on white screen React native web safari compatibility Jun 30, 2021
@a-tokyo a-tokyo added the react-native-webview react-native-webview label Dec 14, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers help wanted Extra attention is needed question Further information is requested react-native-webview react-native-webview
Projects
None yet
Development

No branches or pull requests

2 participants