Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
2 tasks done
pnmcosta opened this issue Sep 5, 2024 · 1 comment
Labels
Area: @shopify/app @shopify/app package issues Type: Bug Something isn't working

Comments

@pnmcosta
Copy link

pnmcosta commented Sep 5, 2024

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

@pnmcosta pnmcosta added the Type: Bug Something isn't working label Sep 5, 2024
@lucyxiang lucyxiang added the Area: @shopify/app @shopify/app package issues label Sep 6, 2024
@pnmcosta
Copy link
Author

Hi, is there an update on this? ty.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: @shopify/app @shopify/app package issues Type: Bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants