chargebee / chargebee-js-wrappers

25 stars 10 forks source link

Chargebee iFrame not loading during Cypress test (Uncaught (in promise) Error: No message target specified) #152

Open TedisAgolli opened 10 months ago

TedisAgolli commented 10 months ago

Hello!

I am trying to run a Cypress test which loads a page and fills in the Chargebee information. The Chargebee iFrame with the payment information fails to load with an error Uncaught (in promise) Error: No message target specified image

This is what I'm trying to load.

       <CardComponent
          ref={cardRef}
          className='w-100'
        >
          <CardNumber placeholder='4111 1111 1111 1111' className='field empty' />
          <CardExpiry placeholder='MM / YY' className='field empty' />
          <CardCVV placeholder='CVV' className='field empty' />
        </CardComponent>

The page loads correctly in both dev and prod mode, when running outside of Cypress. I can verify that Chargebee.getInstance() returns a valid instance, even inside the Cypress runner. The iFrame is present on the page, but it's body is empty.

I tried chasing the error down in this file but was not able to understand what it means.

Any guidance is appreciated.

Thank you in advance!

Brandons404 commented 8 months ago

Were you able to find a solution to this? The error message itself is less than helpful.

TedisAgolli commented 8 months ago

Nope. We've also opened up a support ticket and still haven't been able to figure it out.

rainkinz commented 3 months ago

Same issue. Very annoyingly useless message.

cb-dinesh commented 3 months ago

Hi, Sorry for the delay in addressing this. Let me look into it and get back.

rainkinz commented 3 months ago

Thanks, it's probably some setup issue, but very hard to figure out. I tried my setup with the example app and it works fine, with my app, which is a nextjs app (and I tried remix), it is not working. Do these wrappers actually work with React 18?

dbrad311 commented 2 months ago

Any update on this issue?

rainkinz commented 1 month ago

Any update?