post-robot
post-robot copied to clipboard
React Native webview
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: https://github.com/react-native-webview/react-native-webview/issues/1928
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.
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.
Btw: I used the production clientId and URL and still get the same error
@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.
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¤cy=USD&components=buttons:2:90101
https://www.paypal.com/sdk/js?client-id=ARp1YeVEY0G6b7ZMvEzaxaPzZw-I0sZ5LGJLcM53pd69putwa2DWYpDeFyKcphkyFmGvgVubRtPoY7DH¤cy=USD&components=buttons:2:84206
https://www.paypal.com/sdk/js?client-id=ARp1YeVEY0G6b7ZMvEzaxaPzZw-I0sZ5LGJLcM53pd69putwa2DWYpDeFyKcphkyFmGvgVubRtPoY7DH¤cy=USD&components=buttons:2:16634
https://www.paypal.com/sdk/js?client-id=ARp1YeVEY0G6b7ZMvEzaxaPzZw-I0sZ5LGJLcM53pd69putwa2DWYpDeFyKcphkyFmGvgVubRtPoY7DH¤cy=USD&components=buttons:2:15698
A@https://www.paypal.com/sdk/js?client-id=ARp1YeVEY0G6b7ZMvEzaxaPzZw-I0sZ5LGJLcM53pd69putwa2DWYpDeFyKcphkyFmGvgVubRtPoY7DH¤cy=USD&components=buttons:2:14954
_@https://www.paypal.com/sdk/js?client-id=ARp1YeVEY0G6b7ZMvEzaxaPzZw-I0sZ5LGJLcM53pd69putwa2DWYpDeFyKcphkyFmGvgVubRtPoY7DH¤cy=USD&components=buttons:2:14995
https://www.paypal.com/sdk/js?client-id=ARp1YeVEY0G6b7ZMvEzaxaPzZw-I0sZ5LGJLcM53pd69putwa2DWYpDeFyKcphkyFmGvgVubRtPoY7DH¤cy=USD&components=buttons:2:19293
init@https://www.paypal.com/sdk/js?client-id=ARp1YeVEY0G6b7ZMvEzaxaPzZw-I0sZ5LGJLcM53pd69putwa2DWYpDeFyKcphkyFmGvgVubRtPoY7DH¤cy=USD&components=buttons:2:128726
https://www.paypal.com/sdk/js?client-id=ARp1YeVEY0G6b7ZMvEzaxaPzZw-I0sZ5LGJLcM53pd69putwa2DWYpDeFyKcphkyFmGvgVubRtPoY7DH¤cy=USD&components=buttons:2:130006
anonymous::memoized@https://www.paypal.com/sdk/js?client-id=ARp1YeVEY0G6b7ZMvEzaxaPzZw-I0sZ5LGJLcM53pd69putwa2DWYpDeFyKcphkyFmGvgVubRtPoY7DH¤cy=USD&components=buttons:2:30780
Qo@https://www.paypal.com/sdk/js?client-id=ARp1YeVEY0G6b7ZMvEzaxaPzZw-I0sZ5LGJLcM53pd69putwa2DWYpDeFyKcphkyFmGvgVubRtPoY7DH¤cy=USD&components=buttons:2:131836
ei@https://www.paypal.com/sdk/js?client-id=ARp1YeVEY0G6b7ZMvEzaxaPzZw-I0sZ5LGJLcM53pd69putwa2DWYpDeFyKcphkyFmGvgVubRtPoY7DH¤cy=USD&components=buttons:2:132622
anonymous::memoized@https://www.paypal.com/sdk/js?client-id=ARp1YeVEY0G6b7ZMvEzaxaPzZw-I0sZ5LGJLcM53pd69putwa2DWYpDeFyKcphkyFmGvgVubRtPoY7DH¤cy=USD&components=buttons:2:30780
jl@https://www.paypal.com/sdk/js?client-id=ARp1YeVEY0G6b7ZMvEzaxaPzZw-I0sZ5LGJLcM53pd69putwa2DWYpDeFyKcphkyFmGvgVubRtPoY7DH¤cy=USD&components=buttons:2:322135
o@https://www.paypal.com/sdk/js?client-id=ARp1YeVEY0G6b7ZMvEzaxaPzZw-I0sZ5LGJLcM53pd69putwa2DWYpDeFyKcphkyFmGvgVubRtPoY7DH¤cy=USD&components=buttons:2:324539
https://www.paypal.com/sdk/js?client-id=ARp1YeVEY0G6b7ZMvEzaxaPzZw-I0sZ5LGJLcM53pd69putwa2DWYpDeFyKcphkyFmGvgVubRtPoY7DH¤cy=USD&components=buttons:2:324821
https://www.paypal.com/sdk/js?client-id=ARp1YeVEY0G6b7ZMvEzaxaPzZw-I0sZ5LGJLcM53pd69putwa2DWYpDeFyKcphkyFmGvgVubRtPoY7DH¤cy=USD&components=buttons:2:325050
t@https://www.paypal.com/sdk/js?client-id=ARp1YeVEY0G6b7ZMvEzaxaPzZw-I0sZ5LGJLcM53pd69putwa2DWYpDeFyKcphkyFmGvgVubRtPoY7DH¤cy=USD&components=buttons:2:161
https://www.paypal.com/sdk/js?client-id=ARp1YeVEY0G6b7ZMvEzaxaPzZw-I0sZ5LGJLcM53pd69putwa2DWYpDeFyKcphkyFmGvgVubRtPoY7DH¤cy=USD&components=buttons:2:942
global code@https://www.paypal.com/sdk/js?client-id=ARp1YeVEY0G6b7ZMvEzaxaPzZw-I0sZ5LGJLcM53pd69putwa2DWYpDeFyKcphkyFmGvgVubRtPoY7DH¤cy=USD&components=buttons:2:951
1. Global messaging not needed for browser
https://www.paypal.com/sdk/js?client-id=ARp1YeVEY0G6b7ZMvEzaxaPzZw-I0sZ5LGJLcM53pd69putwa2DWYpDeFyKcphkyFmGvgVubRtPoY7DH¤cy=USD&components=buttons:2:90296
https://www.paypal.com/sdk/js?client-id=ARp1YeVEY0G6b7ZMvEzaxaPzZw-I0sZ5LGJLcM53pd69putwa2DWYpDeFyKcphkyFmGvgVubRtPoY7DH¤cy=USD&components=buttons:2:84206
https://www.paypal.com/sdk/js?client-id=ARp1YeVEY0G6b7ZMvEzaxaPzZw-I0sZ5LGJLcM53pd69putwa2DWYpDeFyKcphkyFmGvgVubRtPoY7DH¤cy=USD&components=buttons:2:16634
https://www.paypal.com/sdk/js?client-id=ARp1YeVEY0G6b7ZMvEzaxaPzZw-I0sZ5LGJLcM53pd69putwa2DWYpDeFyKcphkyFmGvgVubRtPoY7DH¤cy=USD&components=buttons:2:15698
A@https://www.paypal.com/sdk/js?client-id=ARp1YeVEY0G6b7ZMvEzaxaPzZw-I0sZ5LGJLcM53pd69putwa2DWYpDeFyKcphkyFmGvgVubRtPoY7DH¤cy=USD&components=buttons:2:14954
_@https://www.paypal.com/sdk/js?client-id=ARp1YeVEY0G6b7ZMvEzaxaPzZw-I0sZ5LGJLcM53pd69putwa2DWYpDeFyKcphkyFmGvgVubRtPoY7DH¤cy=USD&components=buttons:2:14995
https://www.paypal.com/sdk/js?client-id=ARp1YeVEY0G6b7ZMvEzaxaPzZw-I0sZ5LGJLcM53pd69putwa2DWYpDeFyKcphkyFmGvgVubRtPoY7DH¤cy=USD&components=buttons:2:19293
init@https://www.paypal.com/sdk/js?client-id=ARp1YeVEY0G6b7ZMvEzaxaPzZw-I0sZ5LGJLcM53pd69putwa2DWYpDeFyKcphkyFmGvgVubRtPoY7DH¤cy=USD&components=buttons:2:128726
https://www.paypal.com/sdk/js?client-id=ARp1YeVEY0G6b7ZMvEzaxaPzZw-I0sZ5LGJLcM53pd69putwa2DWYpDeFyKcphkyFmGvgVubRtPoY7DH¤cy=USD&components=buttons:2:130006
anonymous::memoized@https://www.paypal.com/sdk/js?client-id=ARp1YeVEY0G6b7ZMvEzaxaPzZw-I0sZ5LGJLcM53pd69putwa2DWYpDeFyKcphkyFmGvgVubRtPoY7DH¤cy=USD&components=buttons:2:30780
Qo@https://www.paypal.com/sdk/js?client-id=ARp1YeVEY0G6b7ZMvEzaxaPzZw-I0sZ5LGJLcM53pd69putwa2DWYpDeFyKcphkyFmGvgVubRtPoY7DH¤cy=USD&components=buttons:2:131836
ei@https://www.paypal.com/sdk/js?client-id=ARp1YeVEY0G6b7ZMvEzaxaPzZw-I0sZ5LGJLcM53pd69putwa2DWYpDeFyKcphkyFmGvgVubRtPoY7DH¤cy=USD&components=buttons:2:132622
anonymous::memoized@https://www.paypal.com/sdk/js?client-id=ARp1YeVEY0G6b7ZMvEzaxaPzZw-I0sZ5LGJLcM53pd69putwa2DWYpDeFyKcphkyFmGvgVubRtPoY7DH¤cy=USD&components=buttons:2:30780
jl@https://www.paypal.com/sdk/js?client-id=ARp1YeVEY0G6b7ZMvEzaxaPzZw-I0sZ5LGJLcM53pd69putwa2DWYpDeFyKcphkyFmGvgVubRtPoY7DH¤cy=USD&components=buttons:2:322135
o@https://www.paypal.com/sdk/js?client-id=ARp1YeVEY0G6b7ZMvEzaxaPzZw-I0sZ5LGJLcM53pd69putwa2DWYpDeFyKcphkyFmGvgVubRtPoY7DH¤cy=USD&components=buttons:2:324539
https://www.paypal.com/sdk/js?client-id=ARp1YeVEY0G6b7ZMvEzaxaPzZw-I0sZ5LGJLcM53pd69putwa2DWYpDeFyKcphkyFmGvgVubRtPoY7DH¤cy=USD&components=buttons:2:324821
https://www.paypal.com/sdk/js?client-id=ARp1YeVEY0G6b7ZMvEzaxaPzZw-I0sZ5LGJLcM53pd69putwa2DWYpDeFyKcphkyFmGvgVubRtPoY7DH¤cy=USD&components=buttons:2:325050
t@https://www.paypal.com/sdk/js?client-id=ARp1YeVEY0G6b7ZMvEzaxaPzZw-I0sZ5LGJLcM53pd69putwa2DWYpDeFyKcphkyFmGvgVubRtPoY7DH¤cy=USD&components=buttons:2:161
https://www.paypal.com/sdk/js?client-id=ARp1YeVEY0G6b7ZMvEzaxaPzZw-I0sZ5LGJLcM53pd69putwa2DWYpDeFyKcphkyFmGvgVubRtPoY7DH¤cy=USD&components=buttons:2:942
global code@https://www.paypal.com/sdk/js?client-id=ARp1YeVEY0G6b7ZMvEzaxaPzZw-I0sZ5LGJLcM53pd69putwa2DWYpDeFyKcphkyFmGvgVubRtPoY7DH¤cy=USD&components=buttons:2:951
https://www.paypal.com/sdk/js?client-id=ARp1YeVEY0G6b7ZMvEzaxaPzZw-I0sZ5LGJLcM53pd69putwa2DWYpDeFyKcphkyFmGvgVubRtPoY7DH¤cy=USD&components=buttons:2:84272
https://www.paypal.com/sdk/js?client-id=ARp1YeVEY0G6b7ZMvEzaxaPzZw-I0sZ5LGJLcM53pd69putwa2DWYpDeFyKcphkyFmGvgVubRtPoY7DH¤cy=USD&components=buttons:2:16634
https://www.paypal.com/sdk/js?client-id=ARp1YeVEY0G6b7ZMvEzaxaPzZw-I0sZ5LGJLcM53pd69putwa2DWYpDeFyKcphkyFmGvgVubRtPoY7DH¤cy=USD&components=buttons:2:15698
A@https://www.paypal.com/sdk/js?client-id=ARp1YeVEY0G6b7ZMvEzaxaPzZw-I0sZ5LGJLcM53pd69putwa2DWYpDeFyKcphkyFmGvgVubRtPoY7DH¤cy=USD&components=buttons:2:14954
_@https://www.paypal.com/sdk/js?client-id=ARp1YeVEY0G6b7ZMvEzaxaPzZw-I0sZ5LGJLcM53pd69putwa2DWYpDeFyKcphkyFmGvgVubRtPoY7DH¤cy=USD&components=buttons:2:14995
https://www.paypal.com/sdk/js?client-id=ARp1YeVEY0G6b7ZMvEzaxaPzZw-I0sZ5LGJLcM53pd69putwa2DWYpDeFyKcphkyFmGvgVubRtPoY7DH¤cy=USD&components=buttons:2:19293
init@https://www.paypal.com/sdk/js?client-id=ARp1YeVEY0G6b7ZMvEzaxaPzZw-I0sZ5LGJLcM53pd69putwa2DWYpDeFyKcphkyFmGvgVubRtPoY7DH¤cy=USD&components=buttons:2:128726
https://www.paypal.com/sdk/js?client-id=ARp1YeVEY0G6b7ZMvEzaxaPzZw-I0sZ5LGJLcM53pd69putwa2DWYpDeFyKcphkyFmGvgVubRtPoY7DH¤cy=USD&components=buttons:2:130006
anonymous::memoized@https://www.paypal.com/sdk/js?client-id=ARp1YeVEY0G6b7ZMvEzaxaPzZw-I0sZ5LGJLcM53pd69putwa2DWYpDeFyKcphkyFmGvgVubRtPoY7DH¤cy=USD&components=buttons:2:30780
Qo@https://www.paypal.com/sdk/js?client-id=ARp1YeVEY0G6b7ZMvEzaxaPzZw-I0sZ5LGJLcM53pd69putwa2DWYpDeFyKcphkyFmGvgVubRtPoY7DH¤cy=USD&components=buttons:2:131836
ei@https://www.paypal.com/sdk/js?client-id=ARp1YeVEY0G6b7ZMvEzaxaPzZw-I0sZ5LGJLcM53pd69putwa2DWYpDeFyKcphkyFmGvgVubRtPoY7DH¤cy=USD&components=buttons:2:132622
anonymous::memoized@https://www.paypal.com/sdk/js?client-id=ARp1YeVEY0G6b7ZMvEzaxaPzZw-I0sZ5LGJLcM53pd69putwa2DWYpDeFyKcphkyFmGvgVubRtPoY7DH¤cy=USD&components=buttons:2:30780
jl@https://www.paypal.com/sdk/js?client-id=ARp1YeVEY0G6b7ZMvEzaxaPzZw-I0sZ5LGJLcM53pd69putwa2DWYpDeFyKcphkyFmGvgVubRtPoY7DH¤cy=USD&components=buttons:2:322135
o@https://www.paypal.com/sdk/js?client-id=ARp1YeVEY0G6b7ZMvEzaxaPzZw-I0sZ5LGJLcM53pd69putwa2DWYpDeFyKcphkyFmGvgVubRtPoY7DH¤cy=USD&components=buttons:2:324539
https://www.paypal.com/sdk/js?client-id=ARp1YeVEY0G6b7ZMvEzaxaPzZw-I0sZ5LGJLcM53pd69putwa2DWYpDeFyKcphkyFmGvgVubRtPoY7DH¤cy=USD&components=buttons:2:324821
https://www.paypal.com/sdk/js?client-id=ARp1YeVEY0G6b7ZMvEzaxaPzZw-I0sZ5LGJLcM53pd69putwa2DWYpDeFyKcphkyFmGvgVubRtPoY7DH¤cy=USD&components=buttons:2:325050
t@https://www.paypal.com/sdk/js?client-id=ARp1YeVEY0G6b7ZMvEzaxaPzZw-I0sZ5LGJLcM53pd69putwa2DWYpDeFyKcphkyFmGvgVubRtPoY7DH¤cy=USD&components=buttons:2:161
https://www.paypal.com/sdk/js?client-id=ARp1YeVEY0G6b7ZMvEzaxaPzZw-I0sZ5LGJLcM53pd69putwa2DWYpDeFyKcphkyFmGvgVubRtPoY7DH¤cy=USD&components=buttons:2:942
global code@https://www.paypal.com/sdk/js?client-id=ARp1YeVEY0G6b7ZMvEzaxaPzZw-I0sZ5LGJLcM53pd69putwa2DWYpDeFyKcphkyFmGvgVubRtPoY7DH¤cy=USD&components=buttons:2:951
(anonymous function) (js:2:16168)
```