cli icon indicating copy to clipboard operation
cli copied to clipboard

[Bug]: Truncated extension handles not correctly linking to existing Flow trigger extensions

Open jenniferwills opened this issue 1 year ago • 0 comments

Please confirm that you have:

  • [X] Searched existing issues to see if your issue is a duplicate. (If you’ve found a duplicate issue, feel free to add additional information in a comment on it.)
  • [X] Reproduced the issue in the latest CLI version.

In which of these areas are you experiencing a problem?

Extension

Expected behavior

  1. Create a flow trigger extension in the partners dashboard using a title greater than 30 characters
  2. in the CLI create an app and try to migrate the newly create trigger extension shopify app import-extensions
  3. try to deploy the app

The CLI prompts to match the extension with an incorrect trigger extension on the same app image

Actual behavior

It should work the same as triggers with smaller titles and prompt to migrate the extension image

Verbose output

2024-08-07T19:47:11.482Z: Running command app deploy
2024-08-07T19:47:11.490Z: Reading cached app information for directory /Users/jen/amortizable-marketplace-app...
2024-08-07T19:47:11.490Z: Reading the content of file at shopify.app.toml...
2024-08-07T19:47:11.492Z: Reading the content of file at shopify.app.toml...
2024-08-07T19:47:11.551Z: Reading the .env file at .env
2024-08-07T19:47:11.551Z: Reading the content of file at .env...
2024-08-07T19:47:11.554Z: Reading the content of file at extensions/foo-bar/shopify.extension.toml...
2024-08-07T19:47:11.554Z: Reading the content of file at extensions/foo-bar-sdflsdkfjskadjfkasjdflkjaslkfja/shopify.extension.toml...
2024-08-07T19:47:11.554Z: Reading the content of file at extensions/short-name/shopify.extension.toml...
2024-08-07T19:47:11.555Z: Reading the content of file at extensions/foo-bar/shopify.extension.toml...
2024-08-07T19:47:11.555Z: Reading the content of file at extensions/foo-bar-sdflsdkfjskadjfkasjdflkjaslkfja/shopify.extension.toml...
2024-08-07T19:47:11.555Z: Reading the content of file at extensions/short-name/shopify.extension.toml...
2024-08-07T19:47:11.556Z: Reading the content of file at package.json...
2024-08-07T19:47:11.556Z: Reading the content of file at package.json...
2024-08-07T19:47:11.558Z:
Running system process:
  · Command: npm prefix
  · Working directory: /Users/jen/amortizable-marketplace-app

2024-08-07T19:47:11.629Z: Obtaining the dependency manager in directory /Users/jen/amortizable-marketplace-app...
2024-08-07T19:47:11.701Z: Reading the content of file at shopify.web.toml...
2024-08-07T19:47:11.702Z: Reading the content of file at package.json...
2024-08-07T19:47:11.704Z: Reading cached app information for directory /Users/jen/amortizable-marketplace-app...
2024-08-07T19:47:11.704Z: Ensuring that the user is authenticated with the Partners API with the following scopes:
[]

2024-08-07T19:47:11.704Z: Getting session store...
2024-08-07T19:47:11.705Z: Validating existing session against the scopes:
[
  "openid",
  "https://api.shopify.com/auth/shop.admin.graphql",
  "https://api.shopify.com/auth/shop.admin.themes",
  "https://api.shopify.com/auth/partners.collaborator-relationships.readonly",
  "https://api.shopify.com/auth/shop.storefront-renderer.devtools",
  "https://api.shopify.com/auth/partners.app.cli.access",
  "https://api.shopify.com/auth/destinations.readonly"
]
For applications:
{
  "partnersApi": {
    "scopes": []
  }
}

2024-08-07T19:47:11.705Z: Sending Identity Introspection request to URL: https://accounts.shopify.com/oauth/introspection
2024-08-07T19:47:11.705Z: Sending POST request to URL https://accounts.shopify.com/oauth/introspection
With request headers:
 - User-Agent: Shopify CLI; v=3.65.1
 - Keep-Alive: timeout=30
 - Sec-CH-UA-PLATFORM: darwin
 - Content-Type: application/json

2024-08-07T19:47:11.965Z: Request to https://accounts.shopify.com/oauth/introspection completed in 255 ms
With response headers:
 - cache-control: no-cache, no-store, private, must-revalidate, max-age=0
 - content-type: application/json; charset=utf-8
 - etag: W/"38a6a639776ef22ff1d36f0f5d522bd6"
 - x-request-id: 9faf6e44-07e7-446d-8978-4035f5701578-1723060031

2024-08-07T19:47:11.969Z: The identity token is valid: true
2024-08-07T19:47:11.969Z:
The validation of the token for application/identity completed with the following results:
- It's expired: false
- It's invalid in identity: false

2024-08-07T19:47:11.970Z: Verifying that the user has a Partner organization
2024-08-07T19:47:11.978Z: Sending "Partners" GraphQL request:
  {
    organizations(first: 1) {
      nodes {
        id
      }
    }
  }

With request headers:
 - User-Agent: Shopify CLI; v=3.65.1
 - Keep-Alive: timeout=30
 - Sec-CH-UA-PLATFORM: darwin
 - Content-Type: application/json

2024-08-07T19:47:12.153Z: Request to https://partners.shopify.com/api/cli/graphql completed in 149 ms
With response headers:
 - cache-control: max-age=0, private, must-revalidate
 - content-type: application/json; charset=utf-8
 - etag: W/"08ef5e5cb8152a243dd57f12571ec7bf"
 - x-request-id: 7c150a45-5e10-4b42-8962-2457dd746511-1723060032

2024-08-07T19:47:12.160Z: Sending "Partners" GraphQL request:
  query currentAccountInfo {
    currentAccountInfo {
      __typename
      ... on ServiceAccount {
        orgName
      }
      ... on UserAccount {
        email
      }
    }
  }

With request headers:
 - User-Agent: Shopify CLI; v=3.65.1
 - Keep-Alive: timeout=30
 - Sec-CH-UA-PLATFORM: darwin
 - Content-Type: application/json

2024-08-07T19:47:12.321Z: Request to https://partners.shopify.com/api/cli/graphql completed in 157 ms
With response headers:
 - cache-control: max-age=0, private, must-revalidate
 - content-type: application/json; charset=utf-8
 - etag: W/"cf6e68b5c84bbb9b006b095aff87b3b0"
 - x-request-id: e9b975ed-2169-46ec-893e-084369abec09-1723060032

2024-08-07T19:47:12.327Z: Sending "Partners" GraphQL request:
  query FindApp($apiKey: String!) {
    app(apiKey: $apiKey) {
      id
      title
      apiKey
      organizationId
      apiSecretKeys {
        secret
      }
      appType
      grantedScopes
      applicationUrl
      redirectUrlWhitelist
      requestedAccessScopes
      webhookApiVersion
      embedded
      posEmbedded
      preferencesUrl
      gdprWebhooks {
        customerDeletionUrl
        customerDataRequestUrl
        shopDeletionUrl
      }
      appProxy {
        subPath
        subPathPrefix
        url
      }
      developmentStorePreviewEnabled
      disabledFlags
    }
  }

With variables:
{
  "apiKey": "*****"
}

With request headers:
 - User-Agent: Shopify CLI; v=3.65.1
 - Keep-Alive: timeout=30
 - Sec-CH-UA-PLATFORM: darwin
 - Content-Type: application/json

2024-08-07T19:47:12.901Z: Request to https://partners.shopify.com/api/cli/graphql completed in 571 ms
With response headers:
 - cache-control: max-age=0, private, must-revalidate
 - content-type: application/json; charset=utf-8
 - etag: W/"0b7de2eccc1ebc6bbee330616792aa0f"
 - x-request-id: 458068b6-75e9-4da4-adb9-42a98bc1b6cf-1723060032

2024-08-07T19:47:12.909Z: Sending "Partners" GraphQL request:
  query fetchSpecifications($api_key: String!) {
    extensionSpecifications(apiKey: $api_key) {
      name
      externalName
      externalIdentifier
      identifier
      gated
      experience
      options {
        managementExperience
        registrationLimit
      }
      features {
        argo {
          surface
        }
      }
      validationSchema {
        jsonSchema
      }
    }
  }

With variables:
{
  "api_key": "*****"
}

With request headers:
 - User-Agent: Shopify CLI; v=3.65.1
 - Keep-Alive: timeout=30
 - Sec-CH-UA-PLATFORM: darwin
 - Content-Type: application/json

2024-08-07T19:47:13.339Z: Request to https://partners.shopify.com/api/cli/graphql completed in 427 ms
With response headers:
 - cache-control: max-age=0, private, must-revalidate
 - content-type: application/json; charset=utf-8
 - etag: W/"6ac79f8126e4cc1739e558469e73428c"
 - x-request-id: 1674b176-1bf3-4ff9-a5d9-60617bc700ec-1723060033

2024-08-07T19:47:13.344Z: The following extension specifications were defined locally but not found in the remote specifications: data, payments_extension, tax_calculation
2024-08-07T19:47:13.344Z: The following extension specifications were found in the remote specifications but not defined locally: cloud_terminal_management
2024-08-07T19:47:13.347Z: Reading cached app information for directory /Users/jen/amortizable-marketplace-app...
2024-08-07T19:47:13.348Z: Reading the content of file at shopify.app.toml...
2024-08-07T19:47:13.349Z: Reading the content of file at shopify.app.toml...
2024-08-07T19:47:13.421Z: Reading the .env file at .env
2024-08-07T19:47:13.422Z: Reading the content of file at .env...
2024-08-07T19:47:13.429Z: Reading the content of file at extensions/foo-bar/shopify.extension.toml...
2024-08-07T19:47:13.429Z: Reading the content of file at extensions/foo-bar-sdflsdkfjskadjfkasjdflkjaslkfja/shopify.extension.toml...
2024-08-07T19:47:13.429Z: Reading the content of file at extensions/short-name/shopify.extension.toml...
2024-08-07T19:47:13.431Z: Reading the content of file at extensions/foo-bar/shopify.extension.toml...
2024-08-07T19:47:13.431Z: Reading the content of file at extensions/foo-bar-sdflsdkfjskadjfkasjdflkjaslkfja/shopify.extension.toml...
2024-08-07T19:47:13.431Z: Reading the content of file at extensions/short-name/shopify.extension.toml...
2024-08-07T19:47:13.433Z: Reading the content of file at package.json...
2024-08-07T19:47:13.434Z: Reading the content of file at package.json...
2024-08-07T19:47:13.439Z:
Running system process:
  · Command: npm prefix
  · Working directory: /Users/jen/amortizable-marketplace-app

2024-08-07T19:47:13.544Z: Obtaining the dependency manager in directory /Users/jen/amortizable-marketplace-app...
2024-08-07T19:47:13.545Z: Reading the content of file at shopify.web.toml...
2024-08-07T19:47:13.545Z: Reading the content of file at package.json...
2024-08-07T19:47:13.548Z: Sending "Partners" GraphQL request:
  query FindOrganization($id: ID!) {
    organizations(id: $id, first: 1) {
      nodes {
        id
        businessName
      }
    }
  }

With variables:
{
  "id": "*****"
}

With request headers:
 - User-Agent: Shopify CLI; v=3.65.1
 - Keep-Alive: timeout=30
 - Sec-CH-UA-PLATFORM: darwin
 - Content-Type: application/json

2024-08-07T19:47:13.677Z: Request to https://partners.shopify.com/api/cli/graphql completed in 128 ms
With response headers:
 - cache-control: max-age=0, private, must-revalidate
 - content-type: application/json; charset=utf-8
 - etag: W/"9295976484b4b89b8be23c3bee862196"
 - x-request-id: 00e02c16-2a67-40ba-b04f-03f4f1091960-1723060033

╭─ info ────────────────────────────────────────────────────────────────────────────────────────────╮
│                                                                                                   │
│  Using .env:                                                                                      │
│                                                                                                   │
│    • Org:             instruphants                                                                │
│    • App:             synergistic-duplication-app                                                 │
│    • Include config:  Yes                                                                         │
│                                                                                                   │
│   You can pass `--reset` to your command to reset your app configuration.                         │
│                                                                                                   │
╰───────────────────────────────────────────────────────────────────────────────────────────────────╯

2024-08-07T19:47:13.708Z: Sending "Partners" GraphQL request:
  query allAppExtensionRegistrations($apiKey: String!) {
    app(apiKey: $apiKey) {
      extensionRegistrations {
        id
        uuid
        title
        type
        draftVersion {
          config
          context
        }
        activeVersion {
          config
          context
        }
      }
      configurationRegistrations {
        id
        uuid
        title
        type
        draftVersion {
          config
          context
        }
        activeVersion {
          config
          context
        }
      }
      dashboardManagedExtensionRegistrations {
        id
        uuid
        title
        type
        activeVersion {
          config
          context
        }
        draftVersion {
          config
          context
        }
      }
    }
  }

With variables:
{
  "apiKey": "*****"
}

With request headers:
 - User-Agent: Shopify CLI; v=3.65.1
 - Keep-Alive: timeout=30
 - Sec-CH-UA-PLATFORM: darwin
 - Content-Type: application/json

2024-08-07T19:47:14.976Z: Request to https://partners.shopify.com/api/cli/graphql completed in 1266 ms
With response headers:
 - cache-control: max-age=0, private, must-revalidate
 - content-type: application/json; charset=utf-8
 - etag: W/"41090cae0de7680e8adc2e43e9319c59"
 - x-request-id: 8de2a2bb-ef14-452c-a0f2-698d0c83d03d-1723060033

?  Match foo-bar-sdflsdkfjskadjfkasjdfl (local name) with flow-trigger (name on Shopify Partners, ID: 27436875777)?

>  (y) Yes, match to existing extension
   (n) No, create as a new extension

   Press ↑↓ arrows to select, enter or a shortcut to confirm.

Reproduction steps

  1. Create a flow trigger extension in the partners dashboard using a title greater than 30 characters
  2. in the CLI create an app and try to migrate the newly create trigger extension shopify app import-extensions
  3. try to deploy the app

Operating System

Mac OS Sonoma

Shopify CLI version (check your project's package.json if you're not sure)

3.65.1

Shell

iterm2

Node version (run node -v if you're not sure)

v22.3.0

What language and version are you using in your application?

Node 22.3.0

jenniferwills avatar Aug 07 '24 19:08 jenniferwills