question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Error rendering route: Adapters should call app.render({ url, method, headers, rawBody })

See original GitHub issue

Describe the bug

Locally dev and preview works fine, it even build fine for Cloudlfare Pages. However, when attempting to access the page, the following error is displayed, with status code 500: Error rendering route: Adapters should call app.render({ url, method, headers, rawBody })

Im not sure if I was able to pinpoint where the issue lies, but when going back from next (1.0.0-next.8) to 1.0.0-next.7 would make accessing properly again.

Reproduction

I had the following svelte.config.js

import cloudflare from '@sveltejs/adapter-cloudflare';
import preprocess from 'svelte-preprocess';

export default {
	preprocess: preprocess(),
	kit: {
		target: '#svelte',
		adapter: cloudflare({
			// any esbuild options
		})
	}
};

Building for version next (1.0.0-next.8) on Cloudflare Pages and deploying it, would result in the non-functional site.

Logs

`Error rendering route: Adapters should call app.render({ url, method, headers, rawBody })`

System Info

npx: installed 1 in 2.476s

  System:
    OS: Windows 10 10.0.19042
    CPU: (8) x64 Intel(R) Core(TM) i7-4770K CPU @ 3.50GHz
    Memory: 12.00 GB / 31.94 GB
  Binaries:
    Node: 14.17.3 - C:\Program Files\nodejs\node.EXE
    Yarn: 1.22.10 - ~\AppData\Roaming\npm\yarn.CMD
  Browsers:
    Chrome: 96.0.4664.110
    Edge: Spartan (44.19041.1266.0), Chromium (97.0.1072.62)
    Internet Explorer: 11.0.19041.1202
  npmPackages:
    @sveltejs/adapter-cloudflare: 1.0.0-next.7 => 1.0.0-next.7
    @sveltejs/kit: next => 1.0.0-next.232
    svelte: ^3.44.0 => 3.46.2

Severity

serious, but I can work around it

Additional Information

No response

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

3reactions
CrzyMancommented, Jan 21, 2022

I was also experiencing this error. I was able to resolve it by updating “@sveltejs/kit” to “^1.0.0-next.239”, “@sveltejs/adapter-cloudflare” to “^1.0.0-next.8”, and Node to v16.13.2

2reactions
jordanfulcommented, Jan 31, 2022

I ran into the same issue deploying to Netlify and downgrading Sveltekit to "^1.0.0-next.239" fixed the issue. Thank you.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Static adapter throwing "Using @sveltejs ... - Stack Overflow
The problem was that the hook.ts file scaffolded by a previous version of svelte kit was not compatible with the new version. Long...
Read more >
Bottle - Read the Docs
The route() decorator binds a piece of code to an URL path. ... strings and returned to the browser with the Content-Type header...
Read more >
next js unhandled runtime error - You.com | The AI Search ...
I have encountered this error before when using Next JS, and it happened to me when I was trying to display an object...
Read more >
Express.js Guide - Pepa
Removing Deprecated Methods from Express.js 4 Apps . . ... This will download and link $ express terminal command to the proper path...
Read more >
Read Aura Framework v2 | Leanpub
We are going to install aura/framework-project , so we can show command line examples also. ... To create a route, call the add()...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found