fix: remove empty preview_image_url so the Deploy to Cloudflare button works#9
Open
tombeckenham wants to merge 1 commit into
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
The README's Deploy to Cloudflare button fails on this repo with:
Root cause
It isn't the Wrangler config. The button's template-metadata parser rejects the empty
"preview_image_url": ""inpackage.json's"cloudflare"block, and the dashboard misattributes the failure towrangler.jsonc. Filed upstream as cloudflare/workers-sdk#14831.This was isolated by bisection against
deploy.workers.cloudflare.comusing fresh subdirectory paths of a public fork (the button caches its pass/fail verdict per repo/path for 30+ minutes, ignoring new commits — so each experiment needs a fresh path):containers-template+ this repo's fullwrangler.jsonc(containers,standard-4, Dockerfile image, custom build, assets, R2, vars) → ✅ passespackage.json→ ❌ fails"cloudflare"block with onlypreview_image_urlremoved → ✅ passes; with onlyicon_urlsremoved (emptypreview_image_urlkept) → ❌ failswrangler.jsoncuntouched, only this line removed → ✅ button reaches the configure/provision step (project name, R2 bucket picker, binding descriptions all render correctly)Fix
Delete the empty
"preview_image_url": ""line (one-line diff).wrangler.jsonc— includinginstance_type: "standard-4"— needs no changes. The empty"icon_urls": []is harmless and kept.To add a real preview image later, set the field to an actual image URL; it's only the empty string that kills the flow.
Note for verifying after merge
Because of the verdict caching above, the button may keep showing the stale error on this repo's URL for a while after merging. Verify via a fresh checkout path (e.g. the repo URL once the cache expires, or immediately via a copy under a new path).