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

Broken init packages for --https."Invalid request body" for any settings #3519

Closed
ambrt opened this issue Jan 23, 2022 · 3 comments
Closed

Comments

@ambrt
Copy link

ambrt commented Jan 23, 2022

Describe the bug

Fresh skeleton and demo app are failing when --https is set for dev server.
There is only "Invalid request body" as a response in browser and no errors in terminal.

Happens in both Chrome and Firefox on Ubuntu 20

Reproduction

locally:
npm init svelte@next new-svelte-app
npm run dev -- --https

Stackblitz has error when running dev with --https but its probably related to issuing cert and not sveltekit

l is not a function
TypeError: l is not a function (...)

Logs

No logs are in terminal.
Browser error is just
"The character encoding of the plain text document was not declared. The document will render with garbled text in some browser configurations if the document contains characters from outside the US-ASCII range. The character encoding of the file needs to be declared in the transfer protocol or file needs to use a byte order mark as an encoding signature."

System Info

System:
    OS: Linux 5.4 Ubuntu 20.04.3 LTS (Focal Fossa)
    CPU: (2) x64 Intel(R) Core(TM)2 Duo CPU     E8400  @ 3.00GHz
    Memory: 167.40 MB / 7.77 GB
    Container: Yes
    Shell: 5.0.17 - /bin/bash
  Binaries:
    Node: 16.2.0 - ~/.nvm/versions/node/v16.2.0/bin/node
    Yarn: 1.22.17 - /usr/local/bin/yarn
    npm: 8.3.2 - ~/.nvm/versions/node/v16.2.0/bin/npm
    Watchman: 20201115.021953.0 - /usr/local/bin/watchman
  Browsers:
    Chrome: 91.0.4472.164
    Firefox: 96.0
  npmPackages:
    @sveltejs/adapter-auto: next => 1.0.0-next.14 
    @sveltejs/kit: next => 1.0.0-next.240 
    svelte: ^3.44.0 => 3.46.2

Severity

blocking all usage of SvelteKit

Additional Information

No response

@ambrt
Copy link
Author

ambrt commented Jan 23, 2022

It was introduced in @1.0.0-next.234 although with different error.

TypeError [ERR_INVALID_HTTP_TOKEN]: Header name must be a valid HTTP token [":method"]
    at file:///home/user/Desktop/Dev/new-svelte-3/node_modules/@sveltejs/kit/dist/install-fetch.js:5207:6
    at Array.map (<anonymous>)
    at new Headers (file:///home/user/Desktop/Dev/new-svelte-3/node_modules/@sveltejs/kit/dist/install-fetch.js:5206:12)
    at new Request (file:///home/user/Desktop/Dev/new-svelte-3/node_modules/@sveltejs/kit/dist/install-fetch.js:5934:19)
    at file:///home/user/Desktop/Dev/new-svelte-3/node_modules/@sveltejs/kit/dist/chunks/index.js:1979:8

@ambrt ambrt changed the title Broken init packages:"Invalid request body" on dev server with --https for all settings Broken init packages for --https:"Invalid request body" for any settings Jan 23, 2022
@ambrt ambrt changed the title Broken init packages for --https:"Invalid request body" for any settings Broken init packages for --https."Invalid request body" for any settings Jan 23, 2022
@Conduitry
Copy link
Member

This sounds like the same as #3479.

@benmccann
Copy link
Member

Closing as duplicate

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

3 participants