Skip to content

[pages] "Response with null body status cannot have body" #35

Closed

Description

@datapolitical

When hosting my Jekyll site using npx wrangler dev _site (after building it using bundle exec Jekyll build) I get this:

chris@Chriss-MacBook chrisfnicholson % npx wrangler pages dev ./_site                 
Serving ./_site...
Sleeping 5 seconds to allow proxy process to start before attempting to automatically determine port...
To skip, specify the proxy port with --proxy.
[proxy]: INFO: Accepting connections at http://localhost:65385

Automatically determined the proxy port to be 65385.
Compiling worker to "/var/folders/hk/hdqzrwq512s50gxkng07_62w0000gn/T/functionsWorker.js"
Finished in 87ms.
[HPM] Proxy created: /  -> http://127.0.0.1:65414
[HPM] Proxy created: /  -> http://127.0.0.1:65385
Serving at http://127.0.0.1:8788/

/Users/chris/Documents/GitHub/chrisfnicholson/node_modules/wrangler/wrangler-dist/index_node.js:27064
            throw ex;
            ^
TypeError: Response with null body status cannot have body
    at new Response (/Users/chris/Documents/GitHub/chrisfnicholson/node_modules/undici/lib/fetch/response.js:160:15)
    at new Response (file:///Users/chris/Documents/GitHub/chrisfnicholson/node_modules/@miniflare/core/dist/src/index.js:678:13)
    at Object.construct (file:///Users/chris/Documents/GitHub/chrisfnicholson/node_modules/@miniflare/core/dist/src/index.js:1150:29)
    at next (/var/folders/hk/hdqzrwq512s50gxkng07_62w0000gn/T/functionsWorker.js:426:16)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
    at async EventTarget.[kDispatchFetch] (file:///Users/chris/Documents/GitHub/chrisfnicholson/node_modules/@miniflare/core/dist/src/index.js:1018:13)
    at async Server.<anonymous> (file:///Users/chris/Documents/GitHub/chrisfnicholson/node_modules/@miniflare/http-server/dist/src/index.js:430:20)

I get that error when I try to load the homepage.

I tried to follow the directions exactly (I'm doing this so I can debug a function that's not working properly) but I don't have the first clue what's going wrong.

Activity

  1. GregBrimble commented on Nov 20, 2021

    @GregBrimble
    Contributor

    Hi,

    Thanks for the report. We've identified the bug here and already have written a fix. It'll be going out in a release on Monday.

    In the meantime, if you turn off your browser caching, that might help. Sorry for the inconvenience!

    Greg

  2. added
    product:pages
    on Nov 20, 2021
  3. changed the title [-]"Response with null body status cannot have body"[/-] [+][pages] "Response with null body status cannot have body"[/+] on Nov 21, 2021
  4. GregBrimble commented on Nov 22, 2021

    @GregBrimble
    Contributor

    This should be fixed in the latest alpha! Try it out with nom install wrangler@alpha :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    product:pages

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions