cli: [Bug]: Cannot deploy theme app extension with SHOPIFY_CLI_PARTNERS_TOKEN

Please confirm that you have:

  • 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.)
  • Reproduced the issue in the latest CLI version.

In which of these areas are you experiencing a problem?

Extension

Expected behavior

I am trying to deploy my theme app extension that’s using simplified deployment. I have a SHOPIFY_CLI_PARTNERS_TOKEN token issued that our CD pipeline uses to run yarn shopify app deploy -f. Unfortunately, what I get is described below. I managed to push locally but by logging in with the interactive mode and without a SHOPIFY_CLI_PARTNERS_TOKEN. Unfortunately, I cannot get things to work with the partners SHOPIFY_CLI_PARTNERS_TOKEN.

Another (more serious) problem I’m facing is that even though my app extension is successfully deployed and released, I still do not see it in the app embeds. Do I need to wait for some time for it to be visible there? It’s been a few hours already. I can live with deploying my extension manually until this is resolved, but not seeing the theme app extension in the admin is a dealbreaker as we cannot test before going live.

Actual behavior

The theme app extension is not pushed and I get this error:

│                                                                                                                                                                                                                │
│  No Organization found                                                                                                                                                                                         │
│                                                                                                                                                                                                                │
│  Next steps                                                                                                                                                                                                    │
│    • Have you created a Shopify Partners organization [1]?                                                                                                                                                     │
│    • Have you confirmed your accounts from the emails you received?                                                                                                                                            │
│    • Need to connect to a different App or organization? Run the command again with `--reset`                                                                                                                  │
│    • Do you have access to the right Shopify Partners organization? The CLI is loading this organization [2]                                                                                                   │
│                                                                                                                       
[1] https://partners.shopify.com/signup
[2] https://partner.shopify.com/2836834

It’s worth noting that [2] is the correct organization that corresponds to the CLI token.

Verbose output

2023-07-28T14:39:14.328Z: Running command app deploy
2023-07-28T14:39:14.368Z: Reading cached app information for directory /Users/dpeev/work/wizpop...
2023-07-28T14:39:14.368Z: Reading the content of file at shopify.app.toml...
2023-07-28T14:39:14.369Z: Reading the content of file at shopify.app.toml...
2023-07-28T14:39:14.371Z: Reading the content of file at shopify.app.toml...
2023-07-28T14:39:14.372Z: Reading the .env file at .env
2023-07-28T14:39:14.373Z: Reading the content of file at .env...
2023-07-28T14:39:14.374Z: Reading the content of file at extensions/wizpop-storefront-javascript/shopify.theme.extension.toml...
2023-07-28T14:39:14.375Z: Reading the content of file at package.json...
2023-07-28T14:39:14.376Z: Reading the content of file at package.json...
2023-07-28T14:39:14.376Z: Obtaining the dependency manager in directory /Users/dpeev/work/wizpop...
2023-07-28T14:39:14.406Z: Reading the content of file at package.json...
2023-07-28T14:39:14.407Z: Unable to decide project type as no web backend
2023-07-28T14:39:14.407Z: Ensuring that the user is authenticated with the Partners API with the following scopes:
[]

2023-07-28T14:39:14.408Z: Sending POST request to URL https://accounts.shopify.com/oauth/token?grant_type=urn%3Aietf%3Aparams%3Aoauth%3Agrant-type%3Atoken-exchange&requested_token_type=urn%3Aietf%3Aparams%3Aoauth%3Atoken-type%3Aaccess_token&subject_token_type=urn%3Aietf%3Aparams%3Aoauth%3Atoken-type%3Aaccess_token&client_id=fbdb2649-e327-4907-8f67-908d24cfd7e3&audience=271e16d403dfa18082ffb3d197bd2b5f4479c3fc32736d69296829cbb28d41a6&scope=https%3A%2F%2Fapi.shopify.com%2Fauth%2Fpartners.app.cli.access&subject_token=redacted
With request headers:
 - User-Agent: Shopify CLI; v=3.48.0
 - Keep-Alive: timeout=30
 - Sec-CH-UA-PLATFORM: darwin
 - Content-Type: application/json

2023-07-28T14:39:14.865Z: Request to https://accounts.shopify.com/oauth/token?grant_type=urn%3Aietf%3Aparams%3Aoauth%3Agrant-type%3Atoken-exchange&requested_token_type=urn%3Aietf%3Aparams%3Aoauth%3Atoken-type%3Aaccess_token&subject_token_type=urn%3Aietf%3Aparams%3Aoauth%3Atoken-type%3Aaccess_token&client_id=fbdb2649-e327-4907-8f67-908d24cfd7e3&audience=271e16d403dfa18082ffb3d197bd2b5f4479c3fc32736d69296829cbb28d41a6&scope=https%3A%2F%2Fapi.shopify.com%2Fauth%2Fpartners.app.cli.access&subject_token=redacted completed in 453 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/"9c2d69c131fc65b7aeaa9f9979f2b44e"
 - x-request-id: 2e84760c-bc17-4456-8cda-3e3e6f9956d3
    
2023-07-28T14:39:14.868Z: Sending "Partners" GraphQL request:
  query FindApp($apiKey: String!) {
    app(apiKey: $apiKey) {
      id
      title
      apiKey
      organizationId
      apiSecretKeys {
        secret
      }
      appType
      grantedScopes
      betas {
        unifiedAppDeployment
        unifiedAppDeploymentOptIn
      }
      applicationUrl
      redirectUrlWhitelist
      requestedAccessScopes
      webhookApiVersion
      embedded
      posEmbedded
      preferencesUrl
      gdprWebhooks {
        customerDeletionUrl
        customerDataRequestUrl
        shopDeletionUrl
      }
      appProxy {
        subPath
        subPathPrefix
        url
      }
    }
  }

With variables:
{
  "apiKey": "redacted"
}

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

2023-07-28T14:39:16.008Z: Request to https://partners.shopify.com/api/cli/graphql completed in 1137 ms
With response headers:
 - cache-control: max-age=0, private, must-revalidate
 - content-type: application/json; charset=utf-8
 - etag: W/"c15f5b0f90e8ce7ced6a2b8437ac7d8b"
 - x-request-id: 783f734e-aae2-432e-b226-71feb340f73d
    
2023-07-28T14:39:16.008Z: Sending "Partners" GraphQL request:
  query FindOrganization($id: ID!) {
    organizations(id: $id, first: 1) {
      nodes {
        id
        businessName
        website
      }
    }
  }

With variables:
{
  "id": "2836834"
}

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

2023-07-28T14:39:16.295Z: Request to https://partners.shopify.com/api/cli/graphql completed in 286 ms
With response headers:
 - cache-control: max-age=0, private, must-revalidate
 - content-type: application/json; charset=utf-8
 - etag: W/"d984c4fd2e64e933dc657c6f3ef428c1"
 - x-request-id: 8701c2b3-2efe-44ca-baba-cdb6f4110147
    
╭─ error ────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮
│                                                                                                                                                                                                                │
│  No Organization found                                                                                                                                                                                         │
│                                                                                                                                                                                                                │
│  Next steps                                                                                                                                                                                                    │
│    • Have you created a Shopify Partners organization [1]?                                                                                                                                                     │
│    • Have you confirmed your accounts from the emails you received?                                                                                                                                            │
│    • Need to connect to a different App or organization? Run the command again with `--reset`                                                                                                                  │
│    • Do you have access to the right Shopify Partners organization? The CLI is loading this organization [2]                                                                                                   │
│                                                                                                                                                                                                                │
╰────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
[1] https://partners.shopify.com/signup
[2] https://partner.shopify.com/2836834

2023-07-28T14:39:16.323Z: Obtaining the dependency manager in directory /Users/dpeev/work/wizpop...
2023-07-28T14:39:16.329Z: 
Running system process:
  · Command: ruby -v
  · Working directory: /Users/dpeev/work/wizpop

2023-07-28T14:39:16.333Z: Obtaining the dependency manager in directory /Users/dpeev/work/wizpop...
2023-07-28T14:39:16.337Z: 
Running system process:
  · Command: ruby -v
  · Working directory: /Users/dpeev/work/wizpop

2023-07-28T14:39:16.524Z: Request to https://monorail-edge.shopifysvc.com/v1/produce completed in 179 ms
With response headers:
 - x-request-id: edb0aa9e-8c56-47a7-908c-c4a0339625d6
    
2023-07-28T14:39:16.525Z: Analytics event sent: {
  "command": "app deploy",
  "time_start": 1690555154329,
  "time_end": 1690555156331,
  "total_time": 2002,
  "success": true,
  "cli_version": "3.48.0",
  "ruby_version": "3.2.2",
  "node_version": "16.18.1",
  "is_employee": false,
  "uname": "darwin arm64",
  "env_ci": false,
  "env_plugin_installed_any_custom": false,
  "env_plugin_installed_shopify": "[\"@shopify/app\",\"@shopify/cli\",\"@shopify/plugin-cloudflare\",\"@shopify/plugin-did-you-mean\"]",
  "env_shell": "zsh",
  "env_device_id": "70d0b6d3c251f7a00ab9b02367a9a3874c0a0111",
  "env_cloud": "localhost",
  "env_package_manager": "yarn",
  "cmd_app_warning_api_key_deprecation_displayed": false,
  "cmd_deploy_flag_message_used": false,
  "cmd_deploy_flag_version_used": false,
  "cmd_deploy_flag_source_url_used": false,
  "app_extensions_any": true,
  "app_extensions_breakdown": "{\"theme\":1}",
  "app_extensions_count": 1,
  "app_extensions_custom_layout": false,
  "app_extensions_function_any": false,
  "app_extensions_function_count": 0,
  "app_extensions_theme_any": true,
  "app_extensions_theme_count": 1,
  "app_extensions_ui_any": false,
  "app_extensions_ui_count": 0,
  "app_name_hash": "66ff22b87bda79f278c7a96f4082f1953f3a88e1",
  "app_path_hash": "9ebff5c11a818e28ceca3e70dc43ad618ee413a9",
  "app_scopes": "[]",
  "app_web_backend_any": false,
  "app_web_backend_count": 0,
  "app_web_custom_layout": false,
  "app_web_frontend_any": false,
  "app_web_frontend_count": 0,
  "env_package_manager_workspaces": true,
  "cmd_app_all_configs_any": false,
  "cmd_app_all_configs_clients": "{}",
  "cmd_app_linked_config_used": false,
  "cmd_all_launcher": "yarn",
  "cmd_all_topic": "app",
  "cmd_all_plugin": "@shopify/app",
  "cmd_all_verbose": true,
  "cmd_all_path_override": true,
  "cmd_all_path_override_hash": "9ebff5c11a818e28ceca3e70dc43ad618ee413a9",
  "cmd_app_reset_used": false,
  "args": "--verbose",
  "app_name": "wizpop-root",
  "env_plugin_installed_all": "[\"@shopify/app\",\"@shopify/cli\",\"@shopify/plugin-cloudflare\",\"@shopify/plugin-did-you-mean\"]",
  "metadata": "{\"extraPublic\":{},\"extraSensitive\":{}}"
}
2023-07-28T14:39:16.525Z: Completed command app deploy
2023-07-28T14:39:16.985Z: Request to https://monorail-edge.shopifysvc.com/v1/produce completed in 644 ms
With response headers:
 - x-request-id: c341fe46-a54d-4533-8746-52573f7aad32
    
2023-07-28T14:39:16.985Z: Analytics event sent: {
  "command": "app deploy",
  "time_start": 1690555154329,
  "time_end": 1690555156318,
  "total_time": 1989,
  "success": false,
  "cli_version": "3.48.0",
  "ruby_version": "3.2.2",
  "node_version": "16.18.1",
  "is_employee": false,
  "uname": "darwin arm64",
  "env_ci": false,
  "env_plugin_installed_any_custom": false,
  "env_plugin_installed_shopify": "[\"@shopify/app\",\"@shopify/cli\",\"@shopify/plugin-cloudflare\",\"@shopify/plugin-did-you-mean\"]",
  "env_shell": "zsh",
  "env_device_id": "70d0b6d3c251f7a00ab9b02367a9a3874c0a0111",
  "env_cloud": "localhost",
  "env_package_manager": "yarn",
  "cmd_app_warning_api_key_deprecation_displayed": false,
  "cmd_deploy_flag_message_used": false,
  "cmd_deploy_flag_version_used": false,
  "cmd_deploy_flag_source_url_used": false,
  "app_extensions_any": true,
  "app_extensions_breakdown": "{\"theme\":1}",
  "app_extensions_count": 1,
  "app_extensions_custom_layout": false,
  "app_extensions_function_any": false,
  "app_extensions_function_count": 0,
  "app_extensions_theme_any": true,
  "app_extensions_theme_count": 1,
  "app_extensions_ui_any": false,
  "app_extensions_ui_count": 0,
  "app_name_hash": "66ff22b87bda79f278c7a96f4082f1953f3a88e1",
  "app_path_hash": "9ebff5c11a818e28ceca3e70dc43ad618ee413a9",
  "app_scopes": "[]",
  "app_web_backend_any": false,
  "app_web_backend_count": 0,
  "app_web_custom_layout": false,
  "app_web_frontend_any": false,
  "app_web_frontend_count": 0,
  "env_package_manager_workspaces": true,
  "cmd_app_all_configs_any": false,
  "cmd_app_all_configs_clients": "{}",
  "cmd_app_linked_config_used": false,
  "cmd_all_launcher": "yarn",
  "cmd_all_topic": "app",
  "cmd_all_plugin": "@shopify/app",
  "cmd_all_verbose": true,
  "cmd_all_path_override": true,
  "cmd_all_path_override_hash": "9ebff5c11a818e28ceca3e70dc43ad618ee413a9",
  "cmd_app_reset_used": false,
  "args": "--verbose",
  "error_message": "No Organization found",
  "app_name": "wizpop-root",
  "env_plugin_installed_all": "[\"@shopify/app\",\"@shopify/cli\",\"@shopify/plugin-cloudflare\",\"@shopify/plugin-did-you-mean\"]",
  "metadata": "{\"extraPublic\":{},\"extraSensitive\":{}}"
}

Reproduction steps

  1. export a SHOPIFY_CLI_PARTNERS_TOKEN
  2. Run shopify app deploy -f

It doesn’t matter if it is a first-time theme app extension deployment or a secondary one.

Operating System

macOS

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

3.48.0

Shell

No response

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

v16.18.1

What language and version are you using in your application?

No response

About this issue

  • Original URL
  • State: closed
  • Created a year ago
  • Comments: 33 (17 by maintainers)

Most upvoted comments

Thanks for the help, Ju!

Yup, thanks for reporting!