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

PayPal - c.FUNDING undefined is not an object #2385

Open
y-a-v-a opened this issue Oct 23, 2023 · 12 comments
Open

PayPal - c.FUNDING undefined is not an object #2385

y-a-v-a opened this issue Oct 23, 2023 · 12 comments
Labels
Bug report v6 Included in the next major release

Comments

@y-a-v-a
Copy link

y-a-v-a commented Oct 23, 2023

Describe the bug

In our JavaScript error reporting tooling we see a recurring error reported which in short is formulated as follows:

TypeError: undefined is not an object (evaluating 'c.FUNDING')

The only reference I could find in your codebase is here:

const { PAYPAL, CREDIT, PAYLATER, VENMO } = paypalRef.FUNDING;

To Reproduce

I do not know how to reproduce this.

Expected behavior

The error is not thrown or reported.

Screenshots

Screenshot 2023-10-23 at 13 25 57 copy

Desktop (please complete the following information):
The error is evenly spread among Device, OS or Browser

Smartphone (please complete the following information):
The error is evenly spread among Device, OS or Browser

@ribeiroguilherme
Copy link
Contributor

Hi @y-a-v-a ,

What is the library version that you are using?

@y-a-v-a
Copy link
Author

y-a-v-a commented Oct 23, 2023

Hi @ribeiroguilherme , we're on "@adyen/adyen-web": "5.51.0",

@ribeiroguilherme
Copy link
Contributor

@y-a-v-a Can you reproduce this in your testing environment? Do you have any insights about network connection speed and devices that caught this problem? This data could help bring some insights.

This problem is caused because PayPal SDK didn't fully load in the window object. So the UI component attempts to render the Button, although the SDK isn't loaded yet. We have proper mechanisms in place to render the button only when the PayPal SDK is fully loaded, but seems like we will need to iterate on this further.

@ribeiroguilherme ribeiroguilherme changed the title c.FUNDING undefined is not an object PayPal - c.FUNDING undefined is not an object Oct 24, 2023
@y-a-v-a
Copy link
Author

y-a-v-a commented Oct 24, 2023

@ribeiroguilherme I passed your comment on to a developer, we'll get back to you if we have additional info.

@y-a-v-a
Copy link
Author

y-a-v-a commented Oct 24, 2023

@ribeiroguilherme so far we can see that we have registered this same issue about 1.5 years ago under Adyen ticket #2768747 and was supposedly fixed in #1837
At the moment we have no clue how to proceed, but I will try to find additional info with regard to the client's context.

@y-a-v-a
Copy link
Author

y-a-v-a commented Oct 24, 2023

Screenshot 2023-10-24 at 14 48 20

Screenshot 2023-10-24 at 14 51 46

@ribeiroguilherme
Copy link
Contributor

Is the error above related to the first screenshot that you shared? Do you have the device type and iOS version by any chance? So we could try to reproduce it here..

Are you guys using Drop-in or standalone Components?

Regardless, I found this which could be related.

@y-a-v-a
Copy link
Author

y-a-v-a commented Dec 4, 2023

We're using Drop-in.

@ribeiroguilherme
Copy link
Contributor

@y-a-v-a do you have more insights if this issue happens mainly on Safari browser?

@ribeiroguilherme ribeiroguilherme added v6 Included in the next major release and removed To be investigated labels Feb 27, 2024
@TayyabSalmanMRM1996
Copy link

TayyabSalmanMRM1996 commented Mar 20, 2024

ribeiroguilherme do we have any updates on this issue?

The following are replication steps:

  1. Go to the checkout page and click on the PayPal checkbox to display PayPal buttons (Pay Later, PayPal, Venmo)
  2. Place an order with any payment method (Credit Card, GPay, PayPal).
  3. From the order confirmation page, GOTO the PDP by any means (except refreshing the page).
  4. Now add a product to the cart and go to the checkout page, click on the PayPal checkbox.
  5. By doing step 4, Pay Later, PayPal and Venmo buttons will not be displayed and an error (PayPal - c.FUNDING undefined is not an object #2385) will come on the console tab

I'm using Chrome on macOS

@ribeiroguilherme
Copy link
Contributor

Hi @TayyabSalmanMRM1996 ,

Can you replicate this on https://www.mystoredemo.io/ and let us know? That can help us to debug the problem.

@TayyabSalmanMRM1996
Copy link

@ribeiroguilherme I cannot replicate this here (https://www.mystoredemo.io/ ). But I can replicate this here https://adyen-salesforce-pwa-demo.mobify-storefront.com/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug report v6 Included in the next major release
Projects
None yet
Development

No branches or pull requests

3 participants