Sir, which version of SvelteKit you are using? It may be related to my investigation.
Sir, which version of SvelteKit you are using? It may be related to my investigation.

wrangler.json ?https://localhost:5001/api/files/vault/bf09a8c8-54b3-4fb9-9d32-3a5e9d837ecb.jpeg in postman with auth header it works correctly. But when I do 8787 one in browser it doesn't And I see correct headers just before the call to inner fetch. Do you see if I am doing something wrong? Thank you..vscode/settings.json wrangler login does not work with VPN tunnel (e.g. tailscale) - it's very slow and fragile (errors out) even in normal situation. How do I open a bug or something to please please fix this frustrating login flow? There used be a way to at least paste the login code (the docs have some curl thing that's even more fragile because wrangler errors out before I could even curl the localhost url){
"$schema": "node_modules/wrangler/config-schema.json"
}[wrangler:err] Error: internal error
at async jsonError (file:///D:/Frontend/node_modules/wrangler/templates/middleware/middleware-miniflare3-json-error.ts:22:10)
at async drainBody (file:///D:/Frontend/node_modules/wrangler/templates/middleware/middleware-ensure-req-body-drained.ts:5:10)export default {
async fetch(request, env, ctx) {
console.log('proxy intercept', request, env);
const url = new URL(request.url);
const host = env.VITE_BACKEND_HOST;
if (url.pathname.startsWith("/api")) {
// handle api
const pathname = url.pathname;
const search = url.search;
const pathWithParams = pathname + search;
const newUrl = `${host}${pathWithParams}`;
const cookies = parseAuthCookies(request.headers.get("cookie"), tabId);
const newRequest = new Request(request);
const token = cookies["Api.Token"];
if (token != null) {
newRequest.headers.set("Authorization", "Bearer " + token);
}
const response = await fetch(newUrl, newRequest); // exception
console.log("proxy response", response);
return response;
}
return fetch(url, request);
}
} "json.schemas": [
{
"fileMatch": ["wrangler.json"],
"url": "./node_modules/wrangler/config-schema.json"
}
], ~/IdeaProjects/workers-ms-render master !3 ?2 18:36:50
❯ npx wrangler dev
⛅️ wrangler 3.99.0
-------------------
Running custom build: cargo install -q worker-build && worker-build --release
╭──────────────────────────────────────────────────────────────────────────────────────────────────╮
│ [b] open a browser, [d] open devtools, [l] turn off local mode, [c] clear console, [x] to exit │
╰──────────────────────────────────────────────────────────────────────────────────────────────────╯
[INFO]: 🎯 Checking for the Wasm target...
Error: wasm32-unknown-unknown target not found in sysroot: "/opt/homebrew/Cellar/rust/1.83.0"
Used rustc from the following path: "/opt/homebrew/bin/rustc"
✘ [ERROR] Running custom build `cargo install -q worker-build && worker-build --release` failed. There are likely more logs from your build command above.
🪵 Logs were written to "/Users/alex/Library/Preferences/.wrangler/logs/wrangler-2024-12-23_17-37-02_261.log"wrangler loginbinding AI of type ai failed to generate: internal error; please try again later or contact
support [code: 10021]