Skip to content

[Bug]: Migrating to App-specific Webhook Subscriptions with Legacy Install flow enabled causes deploy error #4417

Closed
@pnmcosta

Description

@pnmcosta

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?

App

Expected behavior

Running npm run deploy after migrating the toml config to App-specific Webhook Subscriptions:

[webhooks]
api_version = "2024-07"

[[webhooks.subscriptions]]
topics = [ "app_subscriptions/update", "app/uninstalled", "orders/paid", "shop/update" ]
uri = "webhooks"
compliance_topics = [ "customers/data_request", "customers/redact", "shop/redact" ]

should not produce an error if legacy install flow is enabled and the scope has always been included:

[access_scopes]
# Learn more at https://shopify.dev/docs/apps/tools/cli/configuration#access_scopes
scopes = "read_all_orders,read_customers,read_discounts,read_orders,read_price_rules,read_script_tags,write_customers,write_discounts,write_price_rules,write_script_tags"
use_legacy_install_flow = true

Actual behavior

I'm getting the following error even thought read_orders and read_all_orders are in the scopes, and have been before the migration;

│
│  Version couldn't be created.   
│
│  Missing scope for webhook topic: orders/paid (read_orders or read_marketplace_orders) 
│

Verbose output

Not really comfortable sharing the whole verbose output, but happy to for any specifics portions required.

Reproduction steps

  1. Have an app with include_config_on_deploy = true and read_orders in scope using the shop-specific webhook subscriptions
  2. Migrate to the new app-specific webhook subscriptions as per https://shopify.dev/docs/apps/build/webhooks/subscribe#app-specific-subscriptions
  3. Run npm run deploy

Operating System

Fedora 18 on WSL

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

3.66.1

Shell

zsh

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

v20.14.0

What language and version are you using in your application?

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions