#evschu_error

1 messages Β· Page 1 of 1 (latest)

chrome adderBOT
#

πŸ‘‹ Welcome to your new thread!

⏲️ We'll be here soon! Typically we respond in a few minutes, but sometimes we might take a bit longer if the server is busy or if you have a particularly tricky question.

⏱️ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can always start a new thread if you have another question.

πŸ”— This thread will always be available, even after it's closed. You can find it again using Discord's search, or you can save this link: https://discord.com/channels/841573134531821608/1466227808987517066

πŸ“ Have more to share? Add more details, code, screenshots, videos, etc. below.

strong granite
#

hello! Taking a look, gimme a while

vague furnace
#

This has been working for months until ~11:45 am PT today.

This summary from AI seems like the likely culprit:

The error "Unable to post message to file://. Recipient has origin null" when using Stripe.js typically indicates a security restriction due to the same-origin policy. This happens when your application is loaded directly from a local file system (using a file:/// URL), which results in an origin of null. Stripe's components (which load in iframes from https://js.stripe.com) cannot communicate with an origin of null for security reasons.

Did Stripe make any backend changes to add additional checks today? Was that on purpose?

strong granite
#

Can you share the Checkout Session ID? I'm guessing that your application likely tried to retrieve the client secret almost immediately after the Checkout Session was created right?

vague furnace
#

I'll get one. One sec...

#

cs_live_a1V2ZumhaJcgUtef3oFd074X0SQp4rqNN25LkkjaairereJC7s1Elt3PpV

strong granite
#

can you also share a Checkout Session ID for which fetchClientSecret was working fine previously?

vague furnace
#

We pass a function to get the client secret into the EmbeddedCheckoutProvider react component:

const fetchClientSecret = useCallback(async (): Promise<string> => {
  return createCheckoutSession({
    membershipId: membershipId || "",
    priceId: priceId || "",
    customData: customData,
    primaryColor: config?.colors?.primary || "",
  })
    .unwrap()
    .then((data: CreateCheckoutSessionResponse) => {
      setCheckoutSessionId(data.checkout_session_id);
      return data.client_secret;
    })
    .catch((error: ApiError) => {
      console.error(error);
      setErrorMessage(
        error?.message || "An error occurred creating the checkout session"
      );
      throw error;
    });
}, [createCheckoutSession, membershipId, priceId, customData, config]);

const checkoutOptions = useMemo(
  () => ({
    fetchClientSecret,
    onComplete,
  }),
  [fetchClientSecret, onComplete]
);

....

<EmbeddedCheckoutProvider
  stripe={config?.stripePromise}
  options={checkoutOptions}
>
   <EmbeddedCheckout />
</EmbeddedCheckoutProvider>
#

Here is the last checkout session that worked: cs_live_a1Zlfb4kY5oriTBtKJ79NWzXzYYxiMvEaOH8ZOjKXpNKrfvHtZDDJ3A4ET

#

Here is what our app looks like when the EmbeddedCheckoutProvider doesn't load:

#

Here is the console when we debug our app:

strong granite
#

okay, looking into this....

vague furnace
#

much appreciated

strong granite
#

just to confirm...., you haven't made any changes right?

vague furnace
#

correct

strong granite
#

this error only occurs on iOS? or both iOS and android?

vague furnace
#

both

strong granite
#

is it possible for us to try accessing this via your app right now too? If so, can you share the link for us to download your app

vague furnace
#

one sec...

strong granite
#

thanks!

strong granite
#

@vague furnace we are trying something to see if it fixes things...I'll let you know approximately how long it'll take for the change to be deployed once I have an update

vague furnace
#

thank you!

strong granite
#

@vague furnace i think this may take a while. Would you prefer to write in via a support ticket? Once the change is deployed, we can test it using the app you shared earlier and update you through the ticket with the results.

vague furnace
#

Thanks for the update. A couple of questions:

  1. What do you mean by "a while"?
  2. Where do I submit the support ticket?
strong granite
#

i don't have a specific time frame that I can share right now, it might be an hour or more. I'll DM you a link.

chrome adderBOT
#

Hello @vague furnace, we have sent you a direct message, please check it at https://discord.com/channels/@me/1466266230477422840

  • πŸ”—The message has instructions on how to open a direct support case with our Developer Support team, in order to help you more effectively.
vague furnace
#

Sounds good. Thanks.

strong granite
#

oh hey, @vague furnace looks like it's done. We tested and it seems to be working on your app now. Can you try and let us know?

vague furnace
#

I'll test now...

#

At first glance this looks good! I am going to test a bit more.

#

Good news and bad news.
Good news: The Eureka Heights app is working for me as well.
Bad news: We are a platform that supports hundreds of clients that each have their own app. I tried a couple of other apps and this issue is still there. Was the fix specific for that app?

strong granite
#

i think cause there is likely a cache for the stripe.js in the mobile app, and it needs to be cleared/updated to reflect the changes that we just deployed

#

the fix isn't specific to any app

vague furnace
#

I quit and re-opened the stripe.js in the other apps I tested. That will clear any local cache of that file. Same thing as I did for Eureka Heights. Maybe a general caching issue for stripe.js?

strong granite
#

to be clear though, I'm not familiar with how Cordova works

vague furnace
#

OK - that time it worked in another app. I'm guessing it was a general issue with deployment timing and caching. Let me try a few more apps.

#

(THANKS FOR ALL YOUR HELP!)

strong granite
#

yay! glad that we managed to figure out the issue. Thanks for flagging this issue to us too πŸ™‡

vague furnace
#

Just curious, do you have any info about what happened on your end.

strong granite
#

hmmm, I can't give specific details, but we did make a change, and it had unintended effects i.e. what happened to your app is an example of that πŸ˜…

vague furnace
#

Gotcha. Really appreciate the quick help on this. Very amazing. I'll be singing your praises.

strong granite
#

hope you manage to get some rest, it should be pretty late on your side by now!