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 webview #93

Open
codingedgar opened this issue Mar 20, 2021 · 5 comments
Open

React Native webview #93

codingedgar opened this issue Mar 20, 2021 · 5 comments

Comments

@codingedgar
Copy link

Hi there!

It seems PayPal is using this library (or react-native web view), I integrated successfully PayPal Smart Payment Buttons in old versions of React Native Webview, but it fails in newer versions with the following error:

Error: Send request message failed for onInit() in https://www.sandbox.paypal.com

All post-robot messaging strategies failed:

0. The string did not match the expected pattern.
postMessage@[native code]
postrobot_post_message@

Do you guys have any idea what could be causing this in a webview?

Related: react-native-webview/react-native-webview#1928

@gregjopa
Copy link

Hi @codingedgar, does this problem also happen in production? Or is it only happening when using a sandbox client-id?

We recently turned on this namespace feature with the paypal js sdk in sandbox only a few days ago which may be related.

@codingedgar
Copy link
Author

I've only tried it with the sandbox.

Should I do something with the namespace? What does it mean?

Also, it works fine in the older versions of react native webview, just not the latest.

@codingedgar
Copy link
Author

Btw: I used the production clientId and URL and still get the same error

@onurio
Copy link

onurio commented Jul 20, 2022

@codingedgar were you able to make the WebView work? Currently trying to make an app using zoid render inside a WebView, having issues with the postMessage.

@ericyliu
Copy link

ericyliu commented Jan 30, 2023

i am having the same error:

[Error] Error: Send request message failed for Be() in https://www.paypal.com

All post-robot messaging strategies failed:

0. The string did not match the expected pattern.
postMessage@[native code]
https://www.paypal.com/sdk/js?client-id=ARp1YeVEY0G6b7ZMvEzaxaPzZw-I0sZ5LGJLcM53pd69putwa2DWYpDeFyKcphkyFmGvgVubRtPoY7DH&currency=USD&components=buttons:2:90101
https://www.paypal.com/sdk/js?client-id=ARp1YeVEY0G6b7ZMvEzaxaPzZw-I0sZ5LGJLcM53pd69putwa2DWYpDeFyKcphkyFmGvgVubRtPoY7DH&currency=USD&components=buttons:2:84206
https://www.paypal.com/sdk/js?client-id=ARp1YeVEY0G6b7ZMvEzaxaPzZw-I0sZ5LGJLcM53pd69putwa2DWYpDeFyKcphkyFmGvgVubRtPoY7DH&currency=USD&components=buttons:2:16634
https://www.paypal.com/sdk/js?client-id=ARp1YeVEY0G6b7ZMvEzaxaPzZw-I0sZ5LGJLcM53pd69putwa2DWYpDeFyKcphkyFmGvgVubRtPoY7DH&currency=USD&components=buttons:2:15698
A@https://www.paypal.com/sdk/js?client-id=ARp1YeVEY0G6b7ZMvEzaxaPzZw-I0sZ5LGJLcM53pd69putwa2DWYpDeFyKcphkyFmGvgVubRtPoY7DH&currency=USD&components=buttons:2:14954
_@https://www.paypal.com/sdk/js?client-id=ARp1YeVEY0G6b7ZMvEzaxaPzZw-I0sZ5LGJLcM53pd69putwa2DWYpDeFyKcphkyFmGvgVubRtPoY7DH&currency=USD&components=buttons:2:14995
https://www.paypal.com/sdk/js?client-id=ARp1YeVEY0G6b7ZMvEzaxaPzZw-I0sZ5LGJLcM53pd69putwa2DWYpDeFyKcphkyFmGvgVubRtPoY7DH&currency=USD&components=buttons:2:19293
init@https://www.paypal.com/sdk/js?client-id=ARp1YeVEY0G6b7ZMvEzaxaPzZw-I0sZ5LGJLcM53pd69putwa2DWYpDeFyKcphkyFmGvgVubRtPoY7DH&currency=USD&components=buttons:2:128726
https://www.paypal.com/sdk/js?client-id=ARp1YeVEY0G6b7ZMvEzaxaPzZw-I0sZ5LGJLcM53pd69putwa2DWYpDeFyKcphkyFmGvgVubRtPoY7DH&currency=USD&components=buttons:2:130006
anonymous::memoized@https://www.paypal.com/sdk/js?client-id=ARp1YeVEY0G6b7ZMvEzaxaPzZw-I0sZ5LGJLcM53pd69putwa2DWYpDeFyKcphkyFmGvgVubRtPoY7DH&currency=USD&components=buttons:2:30780
Qo@https://www.paypal.com/sdk/js?client-id=ARp1YeVEY0G6b7ZMvEzaxaPzZw-I0sZ5LGJLcM53pd69putwa2DWYpDeFyKcphkyFmGvgVubRtPoY7DH&currency=USD&components=buttons:2:131836
ei@https://www.paypal.com/sdk/js?client-id=ARp1YeVEY0G6b7ZMvEzaxaPzZw-I0sZ5LGJLcM53pd69putwa2DWYpDeFyKcphkyFmGvgVubRtPoY7DH&currency=USD&components=buttons:2:132622
anonymous::memoized@https://www.paypal.com/sdk/js?client-id=ARp1YeVEY0G6b7ZMvEzaxaPzZw-I0sZ5LGJLcM53pd69putwa2DWYpDeFyKcphkyFmGvgVubRtPoY7DH&currency=USD&components=buttons:2:30780
jl@https://www.paypal.com/sdk/js?client-id=ARp1YeVEY0G6b7ZMvEzaxaPzZw-I0sZ5LGJLcM53pd69putwa2DWYpDeFyKcphkyFmGvgVubRtPoY7DH&currency=USD&components=buttons:2:322135
o@https://www.paypal.com/sdk/js?client-id=ARp1YeVEY0G6b7ZMvEzaxaPzZw-I0sZ5LGJLcM53pd69putwa2DWYpDeFyKcphkyFmGvgVubRtPoY7DH&currency=USD&components=buttons:2:324539
https://www.paypal.com/sdk/js?client-id=ARp1YeVEY0G6b7ZMvEzaxaPzZw-I0sZ5LGJLcM53pd69putwa2DWYpDeFyKcphkyFmGvgVubRtPoY7DH&currency=USD&components=buttons:2:324821
https://www.paypal.com/sdk/js?client-id=ARp1YeVEY0G6b7ZMvEzaxaPzZw-I0sZ5LGJLcM53pd69putwa2DWYpDeFyKcphkyFmGvgVubRtPoY7DH&currency=USD&components=buttons:2:325050
t@https://www.paypal.com/sdk/js?client-id=ARp1YeVEY0G6b7ZMvEzaxaPzZw-I0sZ5LGJLcM53pd69putwa2DWYpDeFyKcphkyFmGvgVubRtPoY7DH&currency=USD&components=buttons:2:161
https://www.paypal.com/sdk/js?client-id=ARp1YeVEY0G6b7ZMvEzaxaPzZw-I0sZ5LGJLcM53pd69putwa2DWYpDeFyKcphkyFmGvgVubRtPoY7DH&currency=USD&components=buttons:2:942
global code@https://www.paypal.com/sdk/js?client-id=ARp1YeVEY0G6b7ZMvEzaxaPzZw-I0sZ5LGJLcM53pd69putwa2DWYpDeFyKcphkyFmGvgVubRtPoY7DH&currency=USD&components=buttons:2:951

1. Global messaging not needed for browser
https://www.paypal.com/sdk/js?client-id=ARp1YeVEY0G6b7ZMvEzaxaPzZw-I0sZ5LGJLcM53pd69putwa2DWYpDeFyKcphkyFmGvgVubRtPoY7DH&currency=USD&components=buttons:2:90296
https://www.paypal.com/sdk/js?client-id=ARp1YeVEY0G6b7ZMvEzaxaPzZw-I0sZ5LGJLcM53pd69putwa2DWYpDeFyKcphkyFmGvgVubRtPoY7DH&currency=USD&components=buttons:2:84206
https://www.paypal.com/sdk/js?client-id=ARp1YeVEY0G6b7ZMvEzaxaPzZw-I0sZ5LGJLcM53pd69putwa2DWYpDeFyKcphkyFmGvgVubRtPoY7DH&currency=USD&components=buttons:2:16634
https://www.paypal.com/sdk/js?client-id=ARp1YeVEY0G6b7ZMvEzaxaPzZw-I0sZ5LGJLcM53pd69putwa2DWYpDeFyKcphkyFmGvgVubRtPoY7DH&currency=USD&components=buttons:2:15698
A@https://www.paypal.com/sdk/js?client-id=ARp1YeVEY0G6b7ZMvEzaxaPzZw-I0sZ5LGJLcM53pd69putwa2DWYpDeFyKcphkyFmGvgVubRtPoY7DH&currency=USD&components=buttons:2:14954
_@https://www.paypal.com/sdk/js?client-id=ARp1YeVEY0G6b7ZMvEzaxaPzZw-I0sZ5LGJLcM53pd69putwa2DWYpDeFyKcphkyFmGvgVubRtPoY7DH&currency=USD&components=buttons:2:14995
https://www.paypal.com/sdk/js?client-id=ARp1YeVEY0G6b7ZMvEzaxaPzZw-I0sZ5LGJLcM53pd69putwa2DWYpDeFyKcphkyFmGvgVubRtPoY7DH&currency=USD&components=buttons:2:19293
init@https://www.paypal.com/sdk/js?client-id=ARp1YeVEY0G6b7ZMvEzaxaPzZw-I0sZ5LGJLcM53pd69putwa2DWYpDeFyKcphkyFmGvgVubRtPoY7DH&currency=USD&components=buttons:2:128726
https://www.paypal.com/sdk/js?client-id=ARp1YeVEY0G6b7ZMvEzaxaPzZw-I0sZ5LGJLcM53pd69putwa2DWYpDeFyKcphkyFmGvgVubRtPoY7DH&currency=USD&components=buttons:2:130006
anonymous::memoized@https://www.paypal.com/sdk/js?client-id=ARp1YeVEY0G6b7ZMvEzaxaPzZw-I0sZ5LGJLcM53pd69putwa2DWYpDeFyKcphkyFmGvgVubRtPoY7DH&currency=USD&components=buttons:2:30780
Qo@https://www.paypal.com/sdk/js?client-id=ARp1YeVEY0G6b7ZMvEzaxaPzZw-I0sZ5LGJLcM53pd69putwa2DWYpDeFyKcphkyFmGvgVubRtPoY7DH&currency=USD&components=buttons:2:131836
ei@https://www.paypal.com/sdk/js?client-id=ARp1YeVEY0G6b7ZMvEzaxaPzZw-I0sZ5LGJLcM53pd69putwa2DWYpDeFyKcphkyFmGvgVubRtPoY7DH&currency=USD&components=buttons:2:132622
anonymous::memoized@https://www.paypal.com/sdk/js?client-id=ARp1YeVEY0G6b7ZMvEzaxaPzZw-I0sZ5LGJLcM53pd69putwa2DWYpDeFyKcphkyFmGvgVubRtPoY7DH&currency=USD&components=buttons:2:30780
jl@https://www.paypal.com/sdk/js?client-id=ARp1YeVEY0G6b7ZMvEzaxaPzZw-I0sZ5LGJLcM53pd69putwa2DWYpDeFyKcphkyFmGvgVubRtPoY7DH&currency=USD&components=buttons:2:322135
o@https://www.paypal.com/sdk/js?client-id=ARp1YeVEY0G6b7ZMvEzaxaPzZw-I0sZ5LGJLcM53pd69putwa2DWYpDeFyKcphkyFmGvgVubRtPoY7DH&currency=USD&components=buttons:2:324539
https://www.paypal.com/sdk/js?client-id=ARp1YeVEY0G6b7ZMvEzaxaPzZw-I0sZ5LGJLcM53pd69putwa2DWYpDeFyKcphkyFmGvgVubRtPoY7DH&currency=USD&components=buttons:2:324821
https://www.paypal.com/sdk/js?client-id=ARp1YeVEY0G6b7ZMvEzaxaPzZw-I0sZ5LGJLcM53pd69putwa2DWYpDeFyKcphkyFmGvgVubRtPoY7DH&currency=USD&components=buttons:2:325050
t@https://www.paypal.com/sdk/js?client-id=ARp1YeVEY0G6b7ZMvEzaxaPzZw-I0sZ5LGJLcM53pd69putwa2DWYpDeFyKcphkyFmGvgVubRtPoY7DH&currency=USD&components=buttons:2:161
https://www.paypal.com/sdk/js?client-id=ARp1YeVEY0G6b7ZMvEzaxaPzZw-I0sZ5LGJLcM53pd69putwa2DWYpDeFyKcphkyFmGvgVubRtPoY7DH&currency=USD&components=buttons:2:942
global code@https://www.paypal.com/sdk/js?client-id=ARp1YeVEY0G6b7ZMvEzaxaPzZw-I0sZ5LGJLcM53pd69putwa2DWYpDeFyKcphkyFmGvgVubRtPoY7DH&currency=USD&components=buttons:2:951
https://www.paypal.com/sdk/js?client-id=ARp1YeVEY0G6b7ZMvEzaxaPzZw-I0sZ5LGJLcM53pd69putwa2DWYpDeFyKcphkyFmGvgVubRtPoY7DH&currency=USD&components=buttons:2:84272
https://www.paypal.com/sdk/js?client-id=ARp1YeVEY0G6b7ZMvEzaxaPzZw-I0sZ5LGJLcM53pd69putwa2DWYpDeFyKcphkyFmGvgVubRtPoY7DH&currency=USD&components=buttons:2:16634
https://www.paypal.com/sdk/js?client-id=ARp1YeVEY0G6b7ZMvEzaxaPzZw-I0sZ5LGJLcM53pd69putwa2DWYpDeFyKcphkyFmGvgVubRtPoY7DH&currency=USD&components=buttons:2:15698
A@https://www.paypal.com/sdk/js?client-id=ARp1YeVEY0G6b7ZMvEzaxaPzZw-I0sZ5LGJLcM53pd69putwa2DWYpDeFyKcphkyFmGvgVubRtPoY7DH&currency=USD&components=buttons:2:14954
_@https://www.paypal.com/sdk/js?client-id=ARp1YeVEY0G6b7ZMvEzaxaPzZw-I0sZ5LGJLcM53pd69putwa2DWYpDeFyKcphkyFmGvgVubRtPoY7DH&currency=USD&components=buttons:2:14995
https://www.paypal.com/sdk/js?client-id=ARp1YeVEY0G6b7ZMvEzaxaPzZw-I0sZ5LGJLcM53pd69putwa2DWYpDeFyKcphkyFmGvgVubRtPoY7DH&currency=USD&components=buttons:2:19293
init@https://www.paypal.com/sdk/js?client-id=ARp1YeVEY0G6b7ZMvEzaxaPzZw-I0sZ5LGJLcM53pd69putwa2DWYpDeFyKcphkyFmGvgVubRtPoY7DH&currency=USD&components=buttons:2:128726
https://www.paypal.com/sdk/js?client-id=ARp1YeVEY0G6b7ZMvEzaxaPzZw-I0sZ5LGJLcM53pd69putwa2DWYpDeFyKcphkyFmGvgVubRtPoY7DH&currency=USD&components=buttons:2:130006
anonymous::memoized@https://www.paypal.com/sdk/js?client-id=ARp1YeVEY0G6b7ZMvEzaxaPzZw-I0sZ5LGJLcM53pd69putwa2DWYpDeFyKcphkyFmGvgVubRtPoY7DH&currency=USD&components=buttons:2:30780
Qo@https://www.paypal.com/sdk/js?client-id=ARp1YeVEY0G6b7ZMvEzaxaPzZw-I0sZ5LGJLcM53pd69putwa2DWYpDeFyKcphkyFmGvgVubRtPoY7DH&currency=USD&components=buttons:2:131836
ei@https://www.paypal.com/sdk/js?client-id=ARp1YeVEY0G6b7ZMvEzaxaPzZw-I0sZ5LGJLcM53pd69putwa2DWYpDeFyKcphkyFmGvgVubRtPoY7DH&currency=USD&components=buttons:2:132622
anonymous::memoized@https://www.paypal.com/sdk/js?client-id=ARp1YeVEY0G6b7ZMvEzaxaPzZw-I0sZ5LGJLcM53pd69putwa2DWYpDeFyKcphkyFmGvgVubRtPoY7DH&currency=USD&components=buttons:2:30780
jl@https://www.paypal.com/sdk/js?client-id=ARp1YeVEY0G6b7ZMvEzaxaPzZw-I0sZ5LGJLcM53pd69putwa2DWYpDeFyKcphkyFmGvgVubRtPoY7DH&currency=USD&components=buttons:2:322135
o@https://www.paypal.com/sdk/js?client-id=ARp1YeVEY0G6b7ZMvEzaxaPzZw-I0sZ5LGJLcM53pd69putwa2DWYpDeFyKcphkyFmGvgVubRtPoY7DH&currency=USD&components=buttons:2:324539
https://www.paypal.com/sdk/js?client-id=ARp1YeVEY0G6b7ZMvEzaxaPzZw-I0sZ5LGJLcM53pd69putwa2DWYpDeFyKcphkyFmGvgVubRtPoY7DH&currency=USD&components=buttons:2:324821
https://www.paypal.com/sdk/js?client-id=ARp1YeVEY0G6b7ZMvEzaxaPzZw-I0sZ5LGJLcM53pd69putwa2DWYpDeFyKcphkyFmGvgVubRtPoY7DH&currency=USD&components=buttons:2:325050
t@https://www.paypal.com/sdk/js?client-id=ARp1YeVEY0G6b7ZMvEzaxaPzZw-I0sZ5LGJLcM53pd69putwa2DWYpDeFyKcphkyFmGvgVubRtPoY7DH&currency=USD&components=buttons:2:161
https://www.paypal.com/sdk/js?client-id=ARp1YeVEY0G6b7ZMvEzaxaPzZw-I0sZ5LGJLcM53pd69putwa2DWYpDeFyKcphkyFmGvgVubRtPoY7DH&currency=USD&components=buttons:2:942
global code@https://www.paypal.com/sdk/js?client-id=ARp1YeVEY0G6b7ZMvEzaxaPzZw-I0sZ5LGJLcM53pd69putwa2DWYpDeFyKcphkyFmGvgVubRtPoY7DH&currency=USD&components=buttons:2:951
	(anonymous function) (js:2:16168)
	```

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

4 participants