Cannot create cart transform after reinstalling the app. Says' it's already registered.

Cannot create cart transform after reinstalling the app. Says' it's already registered.

seymur_crsp
Shopify Partner
67 4 10

Hello. I have created a cart transform function and created a cart transform using it's ID. Then I uninstalled and reinstalled the app. But when I wanted to create the cart transform again, I get this error: "Could not enable cart transform because it is already registered". I run the cartTransforms query which returns an empty array. So I cannot retrieve the ID of the cart transform to remove it to be able to create a new one. Btw, old one that Shopify claims is there isn't event working.

Any solutions ?

@Shopify 

Reply 1 (1)

niclasfernandez
Shopify Partner
1 0 0

Hey @seymur_crsp , I was having a similar issue. In my case, I am trying to create a staging environment for my shopify app. Once I created the app manually in shopify admin, I deployed all theme-extensions and shopify functions from my local environment using shopify app dev (It always guide you throught Shopify CLI). My issue was that I created another shopify app and then I changed Key and Secret for pointing to the other one. I found that function or cart ID is unique in each app and you cant swap/switch it. Maybe you did something similar. I hopw it helps you!

2024-02-14 17:11:21 Session {
2024-02-14 17:11:21 id: 'XXXXXXXXXXXXXXXX.myshopify.com',
2024-02-14 17:11:21 shop: 'XXXXXXXXXXXXXl.myshopify.com',
2024-02-14 17:11:21 state: 'XXXXXXXXXXXXXXX',
2024-02-14 17:11:21 isOnline: false,
2024-02-14 17:11:21 accessToken: 'XXXXXXXXXXXXXXXXXXXXXXXXXXXX',
2024-02-14 17:11:21 scope: 'write_products,read_fulfillments,read_themes,write_cart_transforms'
2024-02-14 17:11:21 }
2024-02-14 17:11:21 {
2024-02-14 17:11:21 nodes: [
2024-02-14 17:11:21 {
2024-02-14 17:11:21 id: 'gid://shopify/CartTransform/XXXXXXX',
2024-02-14 17:11:21 functionId: 'xxxxxx-xxxxxx-xxxxxx-xxxxx-xxxx'
2024-02-14 17:11:21 }
2024-02-14 17:11:21 ]
2024-02-14 17:11:21 }
2024-02-14 17:11:22 {
2024-02-14 17:11:22 cartTransform: null,
2024-02-14 17:11:22 userErrors: [
2024-02-14 17:11:22 {
2024-02-14 17:11:22 field: [Array],
2024-02-14 17:11:22 message: 'Could not enable cart transform because it is already registered'
2024-02-14 17:11:22 }
2024-02-14 17:11:22 ]
2024-02-14 17:11:22 }