-
Notifications
You must be signed in to change notification settings - Fork 11
DefaultCheckoutEventProcessor events not being called after first checkout #195
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
Comments
Hi @mauro-poq, do you think you'd be able to provide a minimal reproduction perhaps as a GitHub link? If the issue is specific to production, it may be worth checking any production specific files (e.g. ProGuard config, environment variables/config files, prod specific gradle tasks, permissions, feature flags etc). Where possible, you can try running our sample app and plugging in your event processor to see if you observe the same behaviour. |
Hey @kiftio, thanks for your answer. I forgot to mention that all Shopify configurations stay on my BE and that we are using a Multipass URL to do the checkout, so on every checkout start, I call my BE, which will return me a URL, and I will call Regarding the Sample app, I just did the test using the SampleCheckout, which is near what I have, but I just did some changes to instead of having the products being fetched, I put a button to show the checkout and the method below into the ViewModel:
I have also changed the
As in my application on a fresh install, the first attempt will execute the events, but from the second attempt, it will not happen. I attached the Android Log Cat logs, but I'm not sure if it will help. In the first log you will be able to see the FirstAttemptWorks.txt Regarding the other points you have asked me to check, everything looks fine from my point of view, the points you mentioned are basically the same for all environments. If necessary, I can provide some checkout URLs to help with debugging. |
You may be running into a current web-pixels limitation, where pixel events are not currently emitted for Shop Pay (or more specifically for checkouts on the shop.app domain). There's some mention of that here - https://community.shopify.dev/t/shoppay-and-checkout-events/1268/12 The reason I'm saying that is that I see N.b. the other (non web pixel) events ( |
Hey @kiftio , thanks for the response! Could you clarify how I can force the Checkout Sheet Kit to use the non–Shop Pay checkout flow? As for the events—I'm using the web pixel events as a reference because they consistently fire when the checkout behaves as expected. However, starting from the second checkout attempt onwards, the It’s working fine in our lower environments, so I suspect we might be missing some configuration in the production setup. |
Could you provide a bit more information about the different environments? E.g. would that mean a different (staging) store, or is it more of a release variant, or different backend delivering multipass URLs for example? R.e. non-Shop Pay checkouts - you should remain in guest until you login to Shop Pay, so a reinstall should clear the Shop Pay preference for testing purposes. But missing checkoutCompleted events is definitely unexpected. |
Hey @kiftio , sorry about the delay in getting back to you. Regarding the environment setup — yes, we have three environments: DEV, Staging, and Production. Each environment is linked to its own Shopify instance, and my backend handles the integration and data exchange with Shopify. The Android app itself doesn’t communicate with Shopify directly. On DEV and Staging, everything works as expected: when I fetch the checkout URL from my backend and open it using the Checkout Sheet Kit, it consistently works fine. However, in Production, the first checkout goes through successfully, but on any subsequent attempts, the checkoutCompleted callback doesn’t fire. One potentially relevant detail: this issue seems to be exclusive to Android — everything works fine on iOS. Also, I don’t have visibility into the Shop Pay login process, so I’m not sure if that’s being handled on our backend. Is there any specific configuration I should ask my backend team to check for the Production environment? |
Hey @kiftio, any news about this? |
I haven't been able to reproduce it yet, I'm seeing all events being emitted on subsequent checkouts. I'll take another look today using Multipass One potential issue could be Multipass URLs being reused.. A given Multipass token can only be used once as noted here https://shopify.dev/docs/api/multipass#step-6-redirect-your-customer-to-your-shopify-store. So a new one needs to be generated before each call to It's not clear how that'd only present itself in production or only in Android though |
Hey @kiftio |
I've done some testing with multipass, and everything seems to be OK in my tests. Yeah, if you could send over some URLs, that might be helpful, if you have a screen recording that would also be useful. Thanks |
Hey @kiftio, sure, please find it below, as I said, I'm not sure about the lifetime of the URLs, but I can send more if necessary:
Let me know if you need more |
I think I got to some of these a little late. I'll grab somebody else on the team tomorrow and see if they have any more success in reproducing |
Hey @kiftio, no problems, here are more 3 in case the previous ones died:
|
OK, we tried opening these not long after you commented, but got I think maybe the best option is for us to setup a branch with lots more logging, and for you to go through the flow again on that branch to see if the logs give any more hints what's about happening. We'll set that up soon and let you know |
@mauro-poq It's still a bit of a work-in-progress, but there's a branch here. Would you be able to build and run a test against that branch with your production URLs (also important to configure debugging to be enabled)? I'll see what the team's thoughts are r.e. merging something like this into main otherwise |
Hey @kiftio I have tested the code. If I understood correctly, it was merged to the Let me know if I did something wrong and if you need more data. |
Thanks, there's nothing that looks incorrect in the android logs. I'm thinking we may need to add some additional logging in the web code. Apologies it taking a while to get to the bottom of |
Hey, no worries. I think there's some redirection happening that's pointing to outdated content. |
Hey @kiftio , any news? |
What area is the issue related to?
Checkout Sheet Kit
What version of the package are you using?
3.0.1 and 3.3.0
Reproducible sample code
I’m running into a strange issue that only occurs in the production environment—everything works perfectly in lower environments.
I’ve implemented a custom DefaultCheckoutEventProcessor, focusing mainly on the onCheckoutCompleted and onCheckoutFailed callbacks. I’ve also added onWebPixelEvent, which currently just logs the received events without handling them.
Here’s where it gets odd:
On a fresh install, when a user performs the checkout for the first time, all the expected callbacks are triggered correctly. But on subsequent checkout attempts, although the checkout flow appears to work fine on the screen, none of the callback methods are called.
I’ve traced this down to CheckoutBridge.postMessage—it’s only being triggered on the first attempt, and doesn’t fire at all from the second checkout onward.
Given that everything behaves as expected in lower environments, I suspect this could be related to some configuration or environment-specific setup in production.
Has anyone encountered something similar, or have thoughts on what might be causing this?
Steps to Reproduce
-No callback methods are triggered this time.
Expected Behavior
Callback methods are to be executed in all flows.
Actual Behavior
Callback methods are executed only on the first flow.
Screenshots/Videos/Log output
No response
Storefront domain
https://ecomodernessentials.com.au
The text was updated successfully, but these errors were encountered: