You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We recently updated our Nexjs project from v12.2 to v14.2.4 and encountered this error
This error appears every time we start the dev server and only when using the messages component in the provider options. When refreshing the page, the error no longer appears.
🔬 Minimal Reproduction
npx create-next-app@latest (Would you like to use App Router -> NO)
I noticed that when launching dev mode, the SDK downloads the paypal script 2 times, apparently this causes an error. When refreshing the page, the error no longer appears, apparently because the __paypal_storage__ key has been added to Local Storage. If the key is deleted, the error will occur again. In production, the script is also loaded 2 times, but no error occurs.
🤔 Expected Behavior
No error in the console
🌍 Environment
Node.js: 20.11.0
OS: Windows 10
Browser: Chrome
@paypal/react-paypal-js: 8.5.0
next: 14.2.4
react: 18.3.1
react-dom: 18.3.1
The text was updated successfully, but these errors were encountered:
I have a similar problem:
With the NextJS app router if you go from 1 page to another that both have a PayPalMessages component, the second one renders, but the pop-up doesn't work.
I can "fix" this by doing a dispatch with RESET_OPTIONS upon mounting the PayPalMessages to re-trigger both the script loading and the component rendering. The pop-up then works, but I also get this annoying error every time.
Library used
react-paypal-js
🐞 Describe the Bug
We recently updated our Nexjs project from v12.2 to v14.2.4 and encountered this error
This error appears every time we start the dev server and only when using the messages component in the provider options. When refreshing the page, the error no longer appears.
🔬 Minimal Reproduction
npx create-next-app@latest
(Would you like to use App Router -> NO)
cd my-app
yarn add @paypal/react-paypal-js
Modify
src/pages/_app.tsx
yarn dev
Check console
😕 Actual Behavior
I noticed that when launching dev mode, the SDK downloads the paypal script 2 times, apparently this causes an error. When refreshing the page, the error no longer appears, apparently because the
__paypal_storage__
key has been added to Local Storage. If the key is deleted, the error will occur again. In production, the script is also loaded 2 times, but no error occurs.🤔 Expected Behavior
No error in the console
🌍 Environment
The text was updated successfully, but these errors were encountered: