Discussing Shopify Functions development, deployment, and usage in Shopify apps.
HI Basilkhan,
Are you only seeing this issue for merchants who uninstall/reinstall your app? When a merchant uninstalls your app, the cart transforms created by the app should be automatically removed by Shopify.
Liam | Developer Advocate @ Shopify
- Was my reply helpful? Click Like to let me know!
- Was your question answered? Mark it as an Accepted Solution
- To learn more visit Shopify.dev or the Shopify Web Design and Development Blog
Hi @Liam,
I believe this is only for merchants who uninstall/reinstall our app.
> When a merchant uninstalls your app, the cart transforms created by the app should be automatically removed by Shopify.
Doesn't seem like it's true because during the re-install, when we try to register the cart transform function (cartTransformCreate) we receive "Could not enable cart transform because it is already registered" as a userError and when we try to query the cart transform function it returns no results. Maybe it does automatically remove but the API doesn't register that for some reason. 🤔
There should be a fix live for this now.
Nick Wesselman | Shopify
- Was my reply helpful? Click Like to let me know!
- Was your question answered? Mark it as an Accepted Solution
- To learn more visit the Shopify Help Center or the Shopify Blog
Thanks @Nick_Wesselman! I might have missed the initial detail that this was specifically with merchants who have reinstalled the app. @Liam mentions that the cart transform function should be removed after uninstall, but we are seeing the user error "Could not enable cart transform because it is already registered" on re-install with cartTransformCreate and query returns empty results.
Our merchants who re-installed are still running into this bug even after the fix and not able to enable the cart transform function.
I am still able to reproduce the issue.
After reinstalling the app, there was no cart transforms, which was expected since the app had just been installed.
"cartTransforms"=>{"nodes"=>[]}
However, the cartTransformCreate mutation is giving an error message that says:
"cartTransformCreate"=>{"cartTransform"=>nil, "userErrors"=>[{"field"=>["functionId"], "message"=>"Could not enable cart transform because it is already registered"}]}
Basically when a store reinstalls the app, they can't use it anymore.
Confirming the issue is still present for me too with these exact results.
Also, the cart transform being removed on app uninstall isn't the occurring.
Can y'all confirm now (again) whether this has been resolved for you?
Nick Wesselman | Shopify
- Was my reply helpful? Click Like to let me know!
- Was your question answered? Mark it as an Accepted Solution
- To learn more visit the Shopify Help Center or the Shopify Blog
This issue has been resolved for us. Many thanks to Nick and the rest of the team!
Confirmed working as expected for us to. Thanks a heap!
Bumping this thread.
@Nick_Wesselman I am also seeing the same problem as @basilkhan where the same cartTransform query returns an empty array. In my case the cart transform function is actually installed and working in the store, but the query still returns nothing.
I'm testing on a development store, if that matters.
I am also facing the same issue. Is there any way to get functionId of already registered cartTransform Function??
Double bump.
There is an accepted solution to this thread, but I still have the problem and apparently so do others. Can we un-accept and get someone to look into it? @Shopify
Can you provide more details and/or open a new thread on this? Is it after app uninstall? Can you provide any repro steps?
Nick Wesselman | Shopify
- Was my reply helpful? Click Like to let me know!
- Was your question answered? Mark it as an Accepted Solution
- To learn more visit the Shopify Help Center or the Shopify Blog
This is not after app uninstall. This is at any point on multiple stores, even immediately after a fresh install. I just installed a cart transform function on a store this week, and then ran this query which returned an empty array.
query {
cartTransforms(first: 25) {
nodes {
id
functionId
}
}
}
The cart transform function is installed and working, but the query returns nothing. My solution so far has been to save the cart transform ID that gets returned when I first install, but it would be nice to be able to pull that ID later rather than just write it down and hope I don't lose it. There are still several others in this thread that are reporting the same issue, so it's not just me.
Having the same issue. Just using the GraphQL API explorer app to manually install a cartTransform, now unable to fetch the ID to delete it. The query always returns an empty array.
I am also getting no cart transforms back when I try to query cartTransforms. I know I had created 2 cart transforms. Without knowing the cartTransform ID, I cannot delete them now.
Same here
test env. Still have this issue.
Hello. I'm experiencing the same problem right now. I uninstalled the app, and after reinstalling it I cannot create a cart transform because it says it's already created. However, running the cartTransforms query returns empty array of nodes. As a result, I cannot delete the old cart transform without knowing its ID
Hi! This is fixed now. GraphiQL app should be able to query and delete any cart transform records. Hope this helps.
Thank you!