cli icon indicating copy to clipboard operation
cli copied to clipboard

[Bug]: Error when deploying with CLI

Open chrolszewski opened this issue 9 months ago • 3 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?

Other

Expected behavior

When using the command shopify app deploy, the changes made to the extensions or toml file should be deployed

Actual behavior

Instead, I'm getting a 500 error with an error message that isn't all that helpful

Verbose output

D:\Projects\git\logistra-integrations\CargonizerConnect\CLIExtensions\ReactTestCargo>shopify app deploy --verbose
2025-04-25T19:34:29.294Z: Running command app deploy
2025-04-25T19:34:29.305Z: Running system process:
  · Command: C:\Program Files\nodejs\node.exe C:\Users\Christian Olszewski\AppData\Roaming\npm\node_modules\@shopify\cli\bin\run.js notifications list --ignore-errors
  · Working directory: D:/Projects/git/logistra-integrations/CargonizerConnect/CLIExtensions/ReactTestCargo

2025-04-25T19:34:29.317Z: Notifications to show: 0
2025-04-25T19:34:29.333Z: Reading cached app information for directory D:/Projects/git/logistra-integrations/CargonizerConnect/CLIExtensions/ReactTestCargo...
2025-04-25T19:34:29.334Z: Reading the content of file at shopify.app.toml...
2025-04-25T19:34:29.337Z: Reading the content of file at shopify.app.toml...
2025-04-25T19:34:29.340Z: Reading cached app information for directory D:/Projects/git/logistra-integrations/CargonizerConnect/CLIExtensions/ReactTestCargo...
2025-04-25T19:34:29.341Z: Reading the content of file at shopify.app.toml...
2025-04-25T19:34:29.342Z: Reading the content of file at shopify.app.toml...
2025-04-25T19:34:29.344Z: Ensuring that the user is authenticated with the Partners API with the following scopes:
[]

2025-04-25T19:34:29.345Z: Getting session store...
2025-04-25T19:34:29.346Z: 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",
  "https://api.shopify.com/auth/organization.store-management",
  "https://api.shopify.com/auth/organization.apps.manage"
]
For applications:
{
  "partnersApi": {
    "scopes": []
  }
}

2025-04-25T19:34:29.347Z: - Token validation -> It's expired: false
2025-04-25T19:34:29.348Z: Getting partner account info from cache
2025-04-25T19:34:29.356Z: 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.78.1
 - Keep-Alive: timeout=30
 - Sec-CH-UA-PLATFORM: win32
 - Content-Type: application/json

to https://partners.shopify.com/api/cli/graphql
2025-04-25T19:34:30.234Z: Request to https://partners.shopify.com/api/cli/graphql completed in 878 ms
With response headers:
 - cache-control: max-age=0, private, must-revalidate
 - content-type: application/json; charset=utf-8
 - etag: W/"ff5a5d0315bfba6c4e3fc68b6750a0be"
 - server-timing: processing;dur=580, socket_queue;dur=5.86, util;dur=0.5, cfRequestDuration;dur=728.999853
 - x-request-id: 0d44ba1b-0173-4582-8f7c-bf0a7e42f790-1745609670

2025-04-25T19:34:30.248Z: Sending "Partners" GraphQL request:
  query FindOrganization($id: ID!) {
    organizations(id: $id, first: 1) {
      nodes {
        id
        businessName
      }
    }
  }

With variables:
{
  "id": "1839994"
}

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

to https://partners.shopify.com/api/cli/graphql
2025-04-25T19:34:30.397Z: 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.78.1
 - Keep-Alive: timeout=30
 - Sec-CH-UA-PLATFORM: win32
 - Content-Type: application/json

to https://partners.shopify.com/api/cli/graphql
2025-04-25T19:34:30.741Z: Request to https://partners.shopify.com/api/cli/graphql completed in 343 ms
With response headers:
 - cache-control: max-age=0, private, must-revalidate
 - content-type: application/json; charset=utf-8
 - etag: W/"afc3b9b0074d419c8d1196f8df0f75f4"
 - server-timing: processing;dur=98, socket_queue;dur=2.261, util;dur=0.3, cfRequestDuration;dur=230.000019
 - x-request-id: 823532ca-6f20-4471-ad0a-1d6b4b2f8842-1745609671

2025-04-25T19:34:30.755Z: The following extension specifications were defined locally but not found in the remote specifications: payments_extension, tax_calculation
2025-04-25T19:34:30.760Z: Reading the .env file at .env
2025-04-25T19:34:30.760Z: Reading the content of file at .env...
2025-04-25T19:34:30.768Z: Reading the content of file at extensions/dev-bulk-autofulfill/shopify.extension.toml...
2025-04-25T19:34:30.768Z: Reading the content of file at extensions/dev-bulk-fulfill/shopify.extension.toml...
2025-04-25T19:34:30.768Z: Reading the content of file at extensions/dev-single-autofulfill/shopify.extension.toml...
2025-04-25T19:34:30.769Z: Reading the content of file at extensions/dev-single-fulfill/shopify.extension.toml...
2025-04-25T19:34:30.770Z: Reading the content of file at extensions/dev-bulk-autofulfill/shopify.extension.toml...
2025-04-25T19:34:30.770Z: Reading the content of file at extensions/dev-single-autofulfill/shopify.extension.toml...
2025-04-25T19:34:30.770Z: Reading the content of file at extensions/dev-bulk-fulfill/shopify.extension.toml...
2025-04-25T19:34:30.771Z: Reading the content of file at extensions/dev-single-fulfill/shopify.extension.toml...
2025-04-25T19:34:30.809Z: Reading the content of file at package.json...
2025-04-25T19:34:30.810Z: Reading the content of file at package.json...
2025-04-25T19:34:30.845Z: Running system process:
  · Command: npm prefix
  · Working directory: D:/Projects/git/logistra-integrations/CargonizerConnect/CLIExtensions/ReactTestCargo

2025-04-25T19:34:31.281Z: Obtaining the dependency manager in directory D:\Projects\git\logistra-integrations\CargonizerConnect\CLIExtensions\ReactTestCargo...
2025-04-25T19:34:31.282Z: Reading the content of file at package.json...
2025-04-25T19:34:31.283Z: Reading the content of file at .shopify/project.json...
2025-04-25T19:34:31.287Z: Notifications to show: 0
2025-04-25T19:34:31.289Z: Unable to decide project type as no web backend
2025-04-25T19:34:31.290Z: Reading cached app information for directory D:/Projects/git/logistra-integrations/CargonizerConnect/CLIExtensions/ReactTestCargo...
2025-04-25T19:34:31.291Z: Storing app information for directory D:/Projects/git/logistra-integrations/CargonizerConnect/CLIExtensions/ReactTestCargo:{
  "appId": "e5110f53deda22302da76ce59ed4c988",
  "title": "ReactTestCargo",
  "directory": "D:/Projects/git/logistra-integrations/CargonizerConnect/CLIExtensions/ReactTestCargo",
  "orgId": "1839994"
}
2025-04-25T19:34:31.303Z: Sending "Partners" GraphQL request:
  query activeAppVersion($apiKey: String!) {
    app(apiKey: $apiKey) {
      activeAppVersion {
        appModuleVersions {
          registrationId
          registrationUuid
          registrationTitle
          type
          config
          specification {
            identifier
            name
            experience
            options {
              managementExperience
            }
          }
        }
      }
    }
  }

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

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

to https://partners.shopify.com/api/cli/graphql
2025-04-25T19:34:33.151Z: Request to https://partners.shopify.com/api/cli/graphql completed in 1848 ms
With response headers:
 - cache-control: max-age=0, private, must-revalidate
 - content-type: application/json; charset=utf-8
 - etag: W/"53c6a1eb8022a8097154b7ef4dd44e31"
 - server-timing: processing;dur=593, socket_queue;dur=2.163, util;dur=0.3, cfRequestDuration;dur=731.999874
 - x-request-id: 0bff896c-8939-4ad3-a5ef-b3e2cd724cba-1745609673

╭─ info ───────────────────────────────────────────────────────────────────────╮
│                                                                              │
│  Using .env for default values:                                              │
│                                                                              │
│    • Org:             Proteria AS                                            │
│    • App:             ReactTestCargo                                         │
│    • Include config:  Yes                                                    │
│                                                                              │
│   You can pass `--reset` to your command to reset your app configuration.    │
│                                                                              │
╰──────────────────────────────────────────────────────────────────────────────╯

2025-04-25T19:34:33.189Z: 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.78.1
 - Keep-Alive: timeout=30
 - Sec-CH-UA-PLATFORM: win32
 - Content-Type: application/json

to https://partners.shopify.com/api/cli/graphql
2025-04-25T19:34:35.019Z: Request to https://partners.shopify.com/api/cli/graphql completed in 1829 ms
With response headers:
 - cache-control: max-age=0, private, must-revalidate
 - content-type: application/json; charset=utf-8
 - etag: W/"307ce8c20eb717c29fecaea0a7e9e910"
 - server-timing: processing;dur=540, socket_queue;dur=2.971, util;dur=0.3, cfRequestDuration;dur=697.999954
 - x-request-id: d7af72e4-f99c-4cd6-b7d8-d29198e43118-1745609675

╭─ error ──────────────────────────────────────────────────────────────────────╮
│                                                                              │
│                                                                              │
│  The Partners GraphQL API responded unsuccessfully with errors:              │
│                                                                              │
│  [                                                                           │
│    {                                                                         │
│      "message": "Unexpected system error",                                   │
│      "extensions": {                                                         │
│        "code": "500"                                                         │
│      }                                                                       │
│    }                                                                         │
│  ]                                                                           │
│                                                                              │
│  Request ID: d7af72e4-f99c-4cd6-b7d8-d29198e43118-1745609675                 │
│                                                                              │
│                                                                              │
│  To investigate the issue, examine this stack trace:                         │
│    at makeRequest (Users/Christian%20Olszewski/AppData/Roaming/npm/node_mod  │
│    ules/@shopify/cli/dist/chunk-HE3BDMSQ.js:27291)                           │
│    at processTicksAndRejections (node:internal/process/task_queues:105)      │
│    at performRequest [as request] (Users/Christian%20Olszewski/AppData/Roam  │
│    ing/npm/node_modules/@shopify/cli/dist/chunk-H73PDGHM.js:136558)          │
│    at async runRequestWithNetworkLevelRetry                                  │
│    (Users/Christian%20Olszewski/AppData/Roaming/npm/node_modules/@shopify/c  │
│    li/dist/chunk-HE3BDMSQ.js:27346)                                          │
│    at async makeVerboseRequest (Users/Christian%20Olszewski/AppData/Roaming  │
│    /npm/node_modules/@shopify/cli/dist/chunk-HE3BDMSQ.js:27357)              │
│    at async retryAwareRequest (Users/Christian%20Olszewski/AppData/Roaming/  │
│    npm/node_modules/@shopify/cli/dist/chunk-HE3BDMSQ.js:27444)               │
│    at (Users/Christian%20Olszewski/AppData/Roaming/npm/node_modules/@shopif  │
│    y/cli/dist/chunk-H73PDGHM.js:136563)                                      │
│    at (Users/Christian%20Olszewski/AppData/Roaming/npm/node_modules/@shopif  │
│    y/cli/dist/chunk-OAZABGFS.js:29563)                                       │
│                                                                              │
╰──────────────────────────────────────────────────────────────────────────────╯

2025-04-25T19:34:35.105Z: Running system process:
  · Command: npm prefix
  · Working directory: D:/Projects/git/logistra-integrations/CargonizerConnect/CLIExtensions/ReactTestCargo

2025-04-25T19:34:35.531Z: Obtaining the dependency manager in directory D:\Projects\git\logistra-integrations\CargonizerConnect\CLIExtensions\ReactTestCargo...
2025-04-25T19:34:36.285Z: Request to https://monorail-edge.shopifysvc.com/v1/produce completed in 293 ms
With response headers:
 - x-request-id: cedddb69-877d-4bca-b69a-2627777f8d53

2025-04-25T19:34:36.286Z: Analytics event sent: {
  "command": "app deploy",
  "time_start": 1745609669295,
  "time_end": 1745609675065,
  "total_time": 5770,
  "success": false,
  "cli_version": "3.78.1",
  "ruby_version": "",
  "node_version": "22.15.0",
  "is_employee": false,
  "uname": "windows amd64",
  "env_ci": false,
  "env_plugin_installed_any_custom": false,
  "env_plugin_installed_shopify": "[\"@shopify/cli\"]",
  "env_shell": "cmd.exe",
  "env_device_id": "ca416a15b81337c7094e46af9f30a1cf1c11606a",
  "env_cloud": "localhost",
  "env_package_manager": "npm",
  "env_is_global": true,
  "env_auth_method": "device_auth",
  "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,
  "cmd_app_all_configs_any": true,
  "cmd_app_all_configs_clients": "{\"shopify.app.toml\":\"e5110f53deda22302da76ce59ed4c988\"}",
  "cmd_app_linked_config_used": true,
  "cmd_app_linked_config_name": "shopify.app.toml",
  "cmd_app_linked_config_git_tracked": true,
  "cmd_app_linked_config_source": "cached",
  "app_extensions_any": true,
  "app_extensions_breakdown": "{\"admin_link\":4}",
  "app_extensions_count": 4,
  "app_extensions_custom_layout": false,
  "app_extensions_function_any": false,
  "app_extensions_function_count": 0,
  "app_extensions_theme_any": false,
  "app_extensions_theme_count": 0,
  "app_extensions_ui_any": false,
  "app_extensions_ui_count": 0,
  "app_name_hash": "4be9350ea96eabb632117b206ef37ca4392f95dc",
  "app_path_hash": "87ec34e41ce8288291340a28472c4b2fb5ee335a",
  "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,
  "partner_id": 1839994,
  "api_key": "****",
  "cmd_app_reset_used": false,
  "cmd_all_timing_network_ms": 4913,
  "cmd_all_timing_prompts_ms": 0,
  "cmd_all_launcher": "unknown",
  "cmd_all_topic": "app",
  "cmd_all_plugin": "@shopify/app",
  "cmd_all_force": false,
  "cmd_all_verbose": true,
  "cmd_all_path_override": true,
  "cmd_all_path_override_hash": "87ec34e41ce8288291340a28472c4b2fb5ee335a",
  "cmd_all_last_graphql_request_id": "d7af72e4-f99c-4cd6-b7d8-d29198e43118-1745609675",
  "cmd_all_timing_active_ms": 856,
  "cmd_all_exit": "unexpected_error",
  "user_id": "b077bff4-165c-497e-a899-42d1423f1b63",
  "request_ids": [
    "0d44ba1b-0173-4582-8f7c-bf0a7e42f790-1745609670",
    "823532ca-6f20-4471-ad0a-1d6b4b2f8842-1745609671",
    "0bff896c-8939-4ad3-a5ef-b3e2cd724cba-1745609673",
    "d7af72e4-f99c-4cd6-b7d8-d29198e43118-1745609675"
  ],
  "args": "--verbose",
  "error_message": "\nThe Partners GraphQL API responded unsuccessfully with errors:\n\n\u001b[33m[\n  {\n    \u001b[0m\u001b[37m\"message\":\u001b[33m \u001b[0m\u001b[32m\"Unexpected system error\"\u001b[33m,\n    \u001b[0m\u001b[37m\"extensions\":\u001b[33m {\n      \u001b[0m\u001b[37m\"code\":\u001b[33m \u001b[0m\u001b[32m\"500\"\u001b[33m\n    }\n  }\n]\u001b[0m\n      \nRequest ID: d7af72e4-f99c-4cd6-b7d8-d29198e43118-1745609675\n",
  "app_name": "CLIExtensions",
  "env_plugin_installed_all": "[\"@shopify/cli\"]",
  "metadata": "{\"extraPublic\":{},\"extraSensitive\":{}}"
}
2025-04-25T19:34:36.293Z: Reporting unhandled error to Bugsnag:
The Partners GraphQL API responded unsuccessfully with errors:

[
  {
    "message": "Unexpected system error",
    "extensions": {
      "code": "500"
    }
  }
]

Request ID: d7af72e4-f99c-4cd6-b7d8-d29198e43118-1745609675

2025-04-25T19:34:36.339Z: Running system process:
  · Command: npm prefix
  · Working directory: D:/Projects/git/logistra-integrations/CargonizerConnect/CLIExtensions/ReactTestCargo

2025-04-25T19:34:36.765Z: Obtaining the dependency manager in directory D:\Projects\git\logistra-integrations\CargonizerConnect\CLIExtensions\ReactTestCargo...

Reproduction steps

  1. navigate to folder containing app
  2. run command shopify app deploy

Operating System

Windows 11

Shopify CLI version (shopify --version)

@shopify/cli/3.78.1

Shell

ps

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

v22.15.0

What language and version are you using in your application?

react 18.2.66, net8.0

chrolszewski avatar Apr 25 '25 20:04 chrolszewski

Hi @chrolszewski, sorry for the late response, is this still happening? does it happen every time you try to deploy or is it an intermittent issue?

isaacroldan avatar May 06 '25 10:05 isaacroldan

Hi, Still not working for the app mentioned above, but all other apps now seem to work with shopify app deploy.

Do you know what the error for request id d682b3b2-c508-4d85-a2b1-03800825a886-1746627041 is? Any parameters that's wrong? Any other information than Unexpected system error in the Partners Graphql api?

chrolszewski avatar May 07 '25 14:05 chrolszewski

@chrolszewski We detected a bug on our side and are working on deploying a fix soon (hopefully this week).

isaacroldan avatar May 07 '25 14:05 isaacroldan