[Bug]: `shopify App Deploy` Removes/ignores Configuration Values.

by ADMIN 66 views

Issue Summary

When using the shopify app deploy command, the configuration values are removed or ignored, resulting in missing webhooks and access scopes in the Shopify Partner Dashboard.

Expected Behavior

The shopify app deploy command should use the settings configured in the .toml file, including webhooks and access scopes.

Actual Behavior

The deployment command detects changes, but these changes are not reflected in the Shopify Partner Dashboard. The webhooks and access scopes are missing, even though the correct config was used via the shopify app config use command.

Verbose Output

The verbose output of the shopify app deploy command is provided below:

2025-03-10T10:59:42.484Z: Running command app deploy
2025-03-10T10:59:42.489Z: Running system process in background:
  · Command: /home/org-name/.nvm/versions/node/v20.12.2/bin/node /home/org-name/.nvm/versions/node/v20.12.2/bin/shopify notifications list --ignore-errors
  · Working directory: /home/org-name/Code/app-name

2025-03-10T10:59:42.496Z: Notifications to show: 0
2025-03-10T10:59:42.506Z: Reading cached app information for directory /home/org-name/Code/app-name...
2025-03-10T10:59:42.507Z: Reading the content of file at shopify.app.toml...
2025-03-10T10:59:42.510Z: Reading the content of file at shopify.app.toml...
2025-03-10T10:59:42.512Z: Reading cached app information for directory /home/org-name/Code/app-name...
2025-03-10T10:59:42.512Z: Reading the content of file at shopify.app.toml...
2025-03-10T10:59:42.513Z: Reading the content of file at shopify.app.toml...
2025-03-10T10:59:42.514Z: Ensuring that the user is authenticated with the Partners API with the following scopes:
[]

2025-03-10T10:59:42.515Z: Getting session store...
2025-03-10T10:59:42.516Z: 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-03-10T10:59:42.516Z: - Token validation -> It's expired: false
2025-03-10T10:59:42.516Z: Getting partner account info from cache
2025-03-10T10:59:42.522Z: 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.76.2
 - Keep-Alive: timeout=30
 - Sec-CH-UA-PLATFORM: linux
 - Content-Type: application/json

to https://partners.shopify.com/api/cli/graphql
2025-03-10T10:59:43.249Z: Request to https://partners.shopify.com/api/cli/graphql completed in 726 ms
With response headers:
 - cache-control: max-age=0, private, must-revalidate
 - content-type: application/json; charset=utf-8
 - etag: W/"919850eb3258ea84a68220c1d3df4ddb"
 - server-timing: processing;dur=499, socket_queue;dur=3.521, util;dur=0.5, cfRequestDuration;dur=612.000227
 - x-request-id: ffb8d1e3-506b-4f56-afd9-1a10d24c0d3a-1741604382
    
2025-03-10T10:59:43.254Z: Sending "Partners" GraphQL request:
  query FindOrganization($id: ID!) {
    organizations(id: $id, first: 1) {
      nodes {
        id
        businessName
      }
    }
  }

With variables:
{
  "id": "3547022"
}

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

to https://partners.shopify.com/api/cli/graphql
2025-03-10T10:59:43.403Z: 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": "4490ee5ae41c28407da70a56bb7b736e"
}

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

to https://partners.shopify.com/api/cli/graphql
2025-03-10T10:59:43.414Z: The following extension specifications were defined locally but not found in the remote specifications: payments_extension, tax_calculation
2025-03-10T10:59:43.417Z: Reading the content of file at .gitignore...
2025-03-10T10:59:43.420Z: Reading the .env file at .env
2025-03-10T10:59:43.420Z: Reading the content of file at .env...
2025-03-10T10:59:43.451Z: Unused keys in app configuration: [
  "access_scopes",
  "auth"
]
2025-03-10T10:59:43.452Z: Reading the content of file at package.json...
2025-03-10T10:59:43.452Z: Reading the content of file at package.json...
2025-03-10T10:59:43.455Z: Running system process:
  · Command: npm prefix
  · Working directory: /home/org-name/Code/app-name

2025-03-10T10:59:43.607Z: Obtaining the dependency manager in directory /home/org-name/Code/app-name...
2025-03-10T10:59:43.607Z: Reading the content of file at package.json...
2025-03-10T10:59:43.607Z: Reading the content of file at .shopify/project.json...
2025-03-10T10:59:43.616Z: Reading the content of file at shopify.web.toml...
2025-03-10T10:59:43.618Z: Notifications to show: 0
2025-03-10T10:59:43.619Z: Reading cached app information for directory /home/org-name/Code/app-name...
2025-03-10T10:59:43.620Z: Storing app information for directory /home/org-name/Code/app-name:{
  "appId": "4490ee5ae41c28407da70a56bb7b736e",
  "title": "App Name",
  "directory": "/home/org-name/Code/app-name",
  "orgId": "3547022"
}
2025-03-10T10:59:43.628Z: Sending "Partners" GraphQL request:
  query activeAppVersion($apiKey: String!) {
    app(apiKey: $apiKey) {
      activeAppVersion {
        appModuleVersions {
          registrationId
          registrationUuid
          registrationTitle
          type
          config
          specification {
            identifier
            name
            experience
            options<br/>
**Q&A: `shopify app deploy` Removes/Ignores Configuration Values**
===========================================================

**Q: What is the expected behavior of the `shopify app deploy` command?**
---------------------------------------------------------

A: The `shopify app deploy` command should use the settings configured in the `.toml` file, including webhooks and access scopes.

**Q: What is the actual behavior of the `shopify app deploy` command?**
---------------------------------------------------------

A: The deployment command detects changes, but these changes are not reflected in the Shopify Partner Dashboard. The webhooks and access scopes are missing, even though the correct config was used via the `shopify app config use` command.

**Q: What are the reproduction steps to reproduce this issue?**
---------------------------------------------------------

A: To reproduce this issue, follow these steps:

1. Edit your scope in the `.toml` config file
2. Deploy via `shopify app deploy`
3. Scopes and Webhooks are now missing.

**Q: What operating system are you using?**
-----------------------------------------

A: Ubuntu 20.04.6 LTS

**Q: What version of the Shopify CLI are you using?**
----------------------------------------------

A: 3.76.2

**Q: What shell are you using?**
---------------------------

A: zsh

**Q: What version of Node are you using?**
-----------------------------------------

A: v20.12.2

**Q: What language and version are you using in your application?**
----------------------------------------------------------------

A: Shopify Remix Template

**Q: How can I troubleshoot this issue?**
-----------------------------------------

A: To troubleshoot this issue, you can try the following:

* Check the verbose output of the `shopify app deploy` command to see if there are any errors or warnings.
* Verify that the correct config file is being used by checking the `shopify app config use` command.
* Check the Shopify Partner Dashboard to see if the webhooks and access scopes are missing.

**Q: How can I report this issue to Shopify?**
--------------------------------------------

A: To report this issue to Shopify, you can follow these steps:

* Go to the Shopify CLI GitHub repository and create a new issue.
* Fill out the issue template with as much detail as possible, including the reproduction steps and any relevant error messages.
* Attach any relevant files or screenshots to the issue.
* Submit the issue and wait for a response from the Shopify team.

**Q: How can I get help with this issue?**
-----------------------------------------

A: To get help with this issue, you can try the following:

* Check the Shopify CLI documentation and GitHub repository for any relevant information or solutions.
* Reach out to the Shopify community on forums or social media for help and support.
* Contact Shopify support directly for assistance with this issue.