fix: add missing shopify.web.toml — root cause of dev preview never loading
Some checks failed
CI / Lint, Unit & Integration Tests (push) Has been cancelled
Some checks failed
CI / Lint, Unit & Integration Tests (push) Has been cancelled
shopify.web.toml never existed at the repo root. Without it, `shopify app dev` runs the theme/UI-extension/Function dev servers fine but never starts the actual Remix app, and has no local dev-server port to build a tunnel URL from for the embedded admin app — so Admin always showed the generic "Find this app in the pages where you work" fallback, regardless of which app record was linked, cache state, or CLI version. Root-caused via `shopify app dev --verbose`, which showed the CLI's own reverse proxy had a route for /extensions but none for /. Also updates shopify.app.toml's client_id to a freshly linked app (the previous one, and two accidental duplicates created while chasing this bug via `dev --reset`/`config link`, were deleted from the Dev Dashboard), resets application_url/redirect_urls to placeholders now that dev's auto-update actually works, restores checkout-datetime's network_access capability (briefly disabled to test an unrelated theory — confirmed not the real cause), and widens the dev-log gitignore pattern. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
parent
3f77c658d3
commit
4a1d4e323f
2
.gitignore
vendored
2
.gitignore
vendored
@ -28,4 +28,4 @@ dump.rdb
|
|||||||
.shopify.lock
|
.shopify.lock
|
||||||
|
|
||||||
# Local debug output (can contain bearer tokens from --verbose CLI runs)
|
# Local debug output (can contain bearer tokens from --verbose CLI runs)
|
||||||
dev-log.txt
|
dev-log*.txt
|
||||||
|
|||||||
10
README.md
10
README.md
@ -23,6 +23,16 @@ Dev uses Postgres, same as prod, since the schema relies on Prisma enums and
|
|||||||
(from Phase 5 on) array fields that SQLite can't express. `npm run worker`
|
(from Phase 5 on) array fields that SQLite can't express. `npm run worker`
|
||||||
runs the BullMQ worker (jobs/worker.ts) once Phase 4 makes it do anything.
|
runs the BullMQ worker (jobs/worker.ts) once Phase 4 makes it do anything.
|
||||||
|
|
||||||
|
**`shopify.web.toml` at the repo root is required** — it tells `shopify app
|
||||||
|
dev` how to run this project's Remix app (`[commands] dev = "npm exec remix
|
||||||
|
vite:dev"`) and lets the CLI wire that local dev server into its reverse
|
||||||
|
proxy/tunnel. Without it, `dev` still runs the extensions fine but never
|
||||||
|
starts the actual admin app, and the embedded app will show Shopify's
|
||||||
|
generic "Find this app in the pages where you work" fallback with no
|
||||||
|
useful error — `application_url`/`redirect_urls` in `shopify.app.toml` are
|
||||||
|
placeholders that `dev` overwrites live on Shopify's servers each session
|
||||||
|
once this file exists; don't hand-edit them.
|
||||||
|
|
||||||
## Commands
|
## Commands
|
||||||
|
|
||||||
| Command | Purpose |
|
| Command | Purpose |
|
||||||
|
|||||||
@ -39,5 +39,11 @@ api_access = true
|
|||||||
# Gives your extension access to make external network calls, using the
|
# Gives your extension access to make external network calls, using the
|
||||||
# JavaScript `fetch()` API. Required — this extension calls our own
|
# JavaScript `fetch()` API. Required — this extension calls our own
|
||||||
# backend (checkout.scheduling.availability/hold) to share the same
|
# backend (checkout.scheduling.availability/hold) to share the same
|
||||||
# capacity pool as every other surface.
|
# capacity pool as every other surface. Shopify requires this capability
|
||||||
|
# to be reviewed/approved before a version using it can be RELEASED (not
|
||||||
|
# just created) — deploys will show "created, but not released" until
|
||||||
|
# that approval is granted, which is fine for local dev/testing; it only
|
||||||
|
# matters before public launch. (The embedded admin app failing to load
|
||||||
|
# was a red herring here — the real cause was a missing shopify.web.toml,
|
||||||
|
# see that file's comment.)
|
||||||
network_access = true
|
network_access = true
|
||||||
|
|||||||
@ -1,8 +1,16 @@
|
|||||||
# Learn more about configuring your app at https://shopify.dev/docs/apps/tools/cli/configuration
|
# Learn more about configuring your app at https://shopify.dev/docs/apps/tools/cli/configuration
|
||||||
|
|
||||||
client_id = "890f611da9f31c1a8e3183b5300b2f53"
|
client_id = "fd503f515942a32aa8b811c1ab8c89d0"
|
||||||
name = "Metatron-delivery"
|
name = "Metatron-delivery"
|
||||||
application_url = "https://shopify.dev/apps/default-app-home"
|
# Placeholder — `shopify app dev` overwrites this on Shopify's live app
|
||||||
|
# record automatically each session (via automatically_update_urls_on_dev
|
||||||
|
# below), it does NOT rewrite this file. That auto-update only works
|
||||||
|
# because shopify.web.toml exists at the repo root telling the CLI how to
|
||||||
|
# run this project's Remix app; without it, the CLI has no local dev-server
|
||||||
|
# port to build a tunnel URL from and silently keeps using whatever's here
|
||||||
|
# — which is exactly what caused the embedded admin app to never load
|
||||||
|
# during initial setup (see shopify.web.toml's own comment).
|
||||||
|
application_url = "https://replace-with-your-tunnel-url.example.com"
|
||||||
embedded = true
|
embedded = true
|
||||||
|
|
||||||
[access_scopes]
|
[access_scopes]
|
||||||
@ -17,7 +25,7 @@ embedded = true
|
|||||||
scopes = "read_locales,read_locations,read_markets,read_metaobjects,read_orders,read_products,write_cart_transforms,write_delivery_customizations,write_metaobjects,write_orders,write_payment_customizations"
|
scopes = "read_locales,read_locations,read_markets,read_metaobjects,read_orders,read_products,write_cart_transforms,write_delivery_customizations,write_metaobjects,write_orders,write_payment_customizations"
|
||||||
|
|
||||||
[auth]
|
[auth]
|
||||||
redirect_urls = [ "https://shopify.dev/apps/default-app-home/api/auth" ]
|
redirect_urls = [ "https://replace-with-your-tunnel-url.example.com/auth/callback" ]
|
||||||
|
|
||||||
[webhooks]
|
[webhooks]
|
||||||
api_version = "2025-01"
|
api_version = "2025-01"
|
||||||
@ -110,5 +118,4 @@ subpath = "scheduling"
|
|||||||
prefix = "apps"
|
prefix = "apps"
|
||||||
|
|
||||||
[build]
|
[build]
|
||||||
include_config_on_deploy = true
|
|
||||||
automatically_update_urls_on_dev = true
|
automatically_update_urls_on_dev = true
|
||||||
|
|||||||
8
shopify.web.toml
Normal file
8
shopify.web.toml
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
# Tells `shopify app dev` how to run this project's web/admin app (the
|
||||||
|
# Remix server everything in app/ belongs to) and lets it wire its local
|
||||||
|
# dev server into the CLI's reverse proxy + tunnel. Without this file,
|
||||||
|
# `shopify app dev` never starts the Remix app at all — it only runs the
|
||||||
|
# theme/function/UI-extension dev servers — which is why the embedded
|
||||||
|
# admin app home never loaded no matter what URL configuration was tried.
|
||||||
|
[commands]
|
||||||
|
dev = "npm exec remix vite:dev"
|
||||||
Loading…
x
Reference in New Issue
Block a user