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

Issues initialising remix app & webhooks #916

Closed
Discountrobot opened this issue Dec 23, 2024 · 2 comments
Closed

Issues initialising remix app & webhooks #916

Discountrobot opened this issue Dec 23, 2024 · 2 comments

Comments

@Discountrobot
Copy link

Discountrobot commented Dec 23, 2024

We're getting started migrating from the now deprecated node-js / react setup onto the Remix setup.

Following the setup https://shopify.dev/docs/apps/build/scaffold-app, we immediately run into issues the scaffolding setup with a fresh app

│  App configuration is not valid                                                                                                                                                                               
│  Validation errors in shopify.app.toml:                                                                                                                                                                  
│                                                                                                                                                                                                             
│  • []: Unrecognized key(s) in object: 'webhooks'   

Removing the shopify.app.toml and starting the dev server will fix the setup, however trying to reinsert the webhooks subscriptions will result in another error

 App configuration is not valid
   Validation errors in shopify.app.toml:                                                                                                                                                                                                         
      • [webhooks.subscriptions.0.uri]: URI isn't correct URI format of https://, pubsub://{project}:topic or Eventbridge ARN
  # Handled by: /app/routes/webhooks.app.uninstalled.tsx
  [[webhooks.subscriptions]]
  uri = "/webhooks/app/uninstalled"
  topics = ["app/uninstalled"]

Adding the ngrok prefix seems to make dev server start, but the routes are not updated the toml config, and no webhooks are received.

the README references this file, which has been removed
https://github.com/Shopify/shopify-app-template-remix/blob/main/app/routes/webhooks.tsx

The documentation page does still reference this file however
https://shopify.dev/docs/api/shopify-app-remix/v1/guide-webhooks

What is the correct way of registering webhooks, at this time?

@lizkenyon
Copy link
Contributor

Hi there 👋

I was not able to reproduce your error using the latest version of the Shopify CLI and App template.

What version of the CLI are you using? (shopify --version). You may need to update to the latest version (npm install -g @shopify/cli@latest)

@Discountrobot
Copy link
Author

We where running on @shopify/cli/3.61.2 - updating to @shopify/cli/3.73.0 seems to have resolved the issue with recognising the webhooks toml changes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants