Open GeorgiKeranov opened 5 days ago
I was able to resolve the issue in 3 steps but I still think that it is a bug:
shopify.app.relevaai.toml
after the first error.Edit the shopify.app.relevaai.toml
, this part:
[webhooks]
api_version = "2023-10"
[[webhooks.subscriptions]]
uri = "webhooks/customers/data_request"
compliance_topics = [ "customers/data_request" ]
[[webhooks.subscriptions]]
uri = "webhooks/customers/redact"
compliance_topics = [ "customers/redact" ]
[[webhooks.subscriptions]]
uri = "webhooks/shops/redact"
compliance_topics = [ "shop/redact" ]
Like that:
[webhooks]
api_version = "2023-10"
[[webhooks.subscriptions]]
uri = "https://shop.releva.ai/webhooks/customers/data_request"
compliance_topics = [ "customers/data_request" ]
[[webhooks.subscriptions]]
uri = "https://shop.releva.ai/webhooks/customers/redact"
compliance_topics = [ "customers/redact" ]
[[webhooks.subscriptions]]
uri = "https://shop.releva.ai/webhooks/shops/redact"
compliance_topics = [ "shop/redact" ]
shopify app delpoy
instead of shopify app deploy --reset
.The custom webhooks are correctly set up in the shopify admin panel:
While this bug is fixed if you don't want your file to be changed on each deployment I suggest adding this to your shopify.app.[app-name].toml
:
In each webhook add your full URL:
[webhooks]
api_version = "2024-07"
[[webhooks.subscriptions]]
- uri = "webhooks/customers/data_request"
+ uri = "https://shop.releva.ai/webhooks/customers/data_request"
compliance_topics = [ "customers/data_request" ]
[[webhooks.subscriptions]]
- uri = "webhooks/customers/redact"
+ uri = "https://shop.releva.ai/webhooks/customers/redact"
compliance_topics = [ "customers/redact" ]
Then add to the file this:
[build]
include_config_on_deploy = true
Run the deploy with this command shopify app delpoy
Hi! Relative URLs must start with a slash, like uri = "/webhooks/customers/data_request"
. Could you try that?
I'll improve that error message to mention that.
Please confirm that you have:
In which of these areas are you experiencing a problem?
App
Expected behavior
It should delpoy the new version of our application in shopify
Actual behavior
It is not delpoying it and constantly gives the same error, even if I remove the created
shopify.app.relevaai.toml
Verbose output
Reproduction steps
shopify.app.relevaai.toml
npm run deploy -- --reset
.? Create this project as a new app on Shopify? ✔ No, connect it to an existing app
? Which existing app is this for? ✔ Releva.ai
? Configuration file name: ✔ Releva.ai
╭─ success ────────────────────────────────────────────────────────────────────────────────────────────────╮ │ │ │ shopify.app.relevaai.toml is now linked to "Releva.ai" on Shopify │ │ │ │ Using shopify.app.relevaai.toml as your default config. │ │ │ │ Next steps │ │ • Make updates to shopify.app.relevaai.toml in your local project │ │ • To upload your config, run
npm run shopify app deploy
│ │ │ │ Reference │ │ • App configuration │ │ │ ╰──────────────────────────────────────────────────────────────────────────────────────────────────────────╯╭─ error ──────────────────────────────────────────────────────────────────────────────────────────────────╮ │ │ │ │ │ Validation errors in shopify.app.relevaai.toml: │ │ │ │ • [webhooks.subscriptions.0.uri]: URI isn't correct URI format of https://, │ │ pubsub://{project-id}:{topic-id} or Eventbridge ARN │ │ │ │ │ ╰──────────────────────────────────────────────────────────────────────────────────────────────────────────╯
Learn more about configuring your app at https://shopify.dev/docs/apps/tools/cli/configuration
client_id = "5cb5d36559789f53ca88a2f6f453740d" name = "Releva.ai" handle = "releva-ai-1" application_url = "https://shop.releva.ai/" embedded = false
[build] include_config_on_deploy = true
[auth] redirect_urls = [ "https://shop.releva.ai/auth/callback", "https://shop.releva.ai/auth/shopify/callback", "https://shop.releva.ai/api/auth/callback" ]
[webhooks] api_version = "2023-10"
[[webhooks.subscriptions]] uri = "webhooks/customers/data_request" compliance_topics = [ "customers/data_request" ]
[[webhooks.subscriptions]] uri = "webhooks/customers/redact" compliance_topics = [ "customers/redact" ]
[[webhooks.subscriptions]] uri = "webhooks/shops/redact" compliance_topics = [ "shop/redact" ]
[pos] embedded = false
[app_preferences] url = "https://releva.ai/admin"