"[Error: Network connection lost.]"

I have a KV - which I will be used for keeping track of domains, I have assigned it to the Worker, and pasted the toml from the site into my wrangler.toml - everything works fine after I deploy it, and test it there, however, when running locally, I get this:
[Error: Network connection lost.]
[Error: Network connection lost.]
Code:
await req.env.DOMAINS.put(body.domain, "-1");
await req.env.DOMAINS.put(body.domain, "-1");
wrangler.toml:
[[kv_namespaces]]
binding = "DOMAINS"
id = ""
preview_id = ""
[[kv_namespaces]]
binding = "DOMAINS"
id = ""
preview_id = ""
Everything works fine once deployed, but when using wrangler dev, it's throwing the error above
1 Reply
niche internet micro celebrity
Update: Seems to be fixd by downgrading to Wrangler 3.18.0 - there's an open Git issue regarding the problem I was facing after running wrangler dev --remote (which fixes the issue with the KV nampsace https://github.com/cloudflare/workers-sdk/issues/4562
GitHub
🐛 BUG: "[ERROR] Error in ProxyController: Error inside ProxyWorker"...
Which Cloudflare product(s) does this pertain to? Wrangler core, Miniflare What version(s) of the tool(s) are you using? 3.19.0 [Wrangler] What version of Node are you using? 20.10.0 What operating...