Cloudflare Developers

CD

Cloudflare Developers

Welcome to the official Cloudflare Developers server. Here you can ask for help and stay updated with the latest news

Join
TThaidikar5/6/2024

HTTP Header size limit

How do I change the max http header size for miniflare? The node configuration flag does not appear to work (node 20.11.1). Is there another option needed? A little digging showed that undici could potentially be causing issues but I wasn’t sure if that mattered within workerd or not
TTravisFrank4/26/2024

@MrBBot I'm trying to use a WASM binary

@MrBBot I'm trying to use a WASM binary with the Miniflare API but running into one major issue. I'm using esbuild to bundle each worker so I can watch for changes and run 17 workers from a single process. The trouble is esbuild is getting to the './foo.wasm' import first, which is resulting in the CompileError: WebAssembly.instantiate(): Wasm code generation disallowed by embedder (I think that's because the WASM plugin is shoving it into a namespace rather than allowing Miniflare t...
VVlady2/20/2024

Thanks Adam! I got to try it out this

Thanks Adam! I got to try it out this morning after sending that message and it felt really good. I wrote a thing using Miniflare 3, Prisma and Vitest https://github.com/vladinator1000/prisma-vitest-miniflare
Sstibbs11/29/2023

Applying D1 migrations in tests

I don't know how to get this working. ```ts import { Miniflare } from 'miniflare'; import { afterAll, beforeAll, describe } from 'vitest'; import { spawn } from 'child_process';...
MMrBBot11/20/2023

Gave this a go here, https://github.com/

Gave this a go here, https://github.com/mrbbot/miniflare-browser-worker-test, currently seeing ProtocolError: Protocol error (Browser.getVersion): Target closed. 😦 I don't have any more time to keep hacking on this today, but I'll leave it here if you wanted to take a look. Let me know if you get anywhere with it! 🙂
Bbajosi10/3/2023

hey any update on triggering scheduled

hey, any update on triggering scheduled events?
AHalex (he/him)9/28/2023

Help setting up tests for Durable

Help setting up tests for Durable Objects. reference: https://github.com/withastro/astro/pull/8654
AAdam8/21/2023

does anyone know why the jest

does anyone know why the jest environment for miniflare would have changed the functioning of global so that I now have to use globalThis? starting in version 3 I think
MMatt7/4/2023

Unable to get local issuer certificate

hi again 🙂 I'm getting this error workerd/jsg/util.c++:276: error: e = kj/compat/tls.c++:215: failed: TLS peer's certificate is not trusted; reason = unable to get local issuer certificate it only appears when I use service bindings like this: ``` serviceBindings[bindingName] = req => {...
TTravisFrank7/3/2023

MrBBot Any idea what s going on here

@mrbbot Any idea what's going on here? Will keep digging ```shell Error: write EPIPE at afterWriteDispatched (node:internal/stream_base_commons:160:15)...
MMrBBot6/30/2023

Those API options should enable

Those API options should enable workerd's logging. Wrangler actually uses the DevTools inspector protocol for logging instead.
Vvvo6/27/2023

Hey there I found a behavior difference

Hey there, I found a behavior difference between miniflare (via wrangler latest version) and a deployed worker: when using env.R2_BUCKET.put(key, request.body) you will get an error like "Provided readable stream must have a known length (request/response body or readable half of FixedLengthStream)". 1. It's working when deployed on Cloudflare workers 2. It's a request.body...
Yyeehow6/11/2023

Any idea for when there will be

Any idea for when there will be analytics engine support with miniflare?
Ssathoro6/1/2023

Cache deserialization error

CacheError [ERR_DESERIALIZATION]: Unable to deserialize stored cached data due to missing metadata.
The cached data storage format changed in Miniflare 2. You cannot load cached data created with Miniflare 1 and must delete it.
CacheError [ERR_DESERIALIZATION]: Unable to deserialize stored cached data due to missing metadata.
The cached data storage format changed in Miniflare 2. You cannot load cached data created with Miniflare 1 and must delete it.
...
BBen-xD5/27/2023

Is wrangler3 miniflare3 planning to add

Is wrangler3/miniflare3 planning to add support for breakpoints/debugging? 🙏
Vvvo5/4/2023

I was gonna use miniflare jest to test

I was gonna use miniflare-jest to test my worker by making fetch requests to it, as seen in https://miniflare.dev/testing/jest#writing-and-running-tests. I guess we could call theses "integration tests". Can you confirm this is the right way (I guess so, given the doc).
Vvas4/13/2023

🔌 Multiple Workers · Miniflare

Hi, I have a main worker which has service bindings to two other workers. I would like to create jest integration test for the main worker. I have the directory structure similar to the one in https://miniflare.dev/core/mount and the main worker wrangler.toml has [miniflare.mounts] [build.upload]. I am creating a miniflare instance in the jest test file with a script path
`describe('bluegreen routing', () => { const mf = new Miniflare({ envPath: true,...
Eesdee4/5/2023

Continuing into my testing for workers

Continuing into my testing for workers, miniflare, d1 I found this repo https://www.npmjs.com/package/@miniflare/d1. However the first import import { BetaDatabase } from "@miniflare/d1"; fails with the error Module '"@miniflare/d1"' has no exported member 'BetaDatabase' - anyone seen this before?
TTravisFrank4/5/2023

MrBBot 4470 I m writing tests `vitest

@mrbbot I'm writing tests (vitest-environment-miniflare) for a worker that binds another worker. The other worker has a DO, and I've bound that DO to the original worker as well. I want to seed an instance of the DO for tests, but I'm running into trouble because constructing that DO requires the other worker's env (to fetch another bound worker). Is there a way to get the other env, or a different pattern I should be using to seed the DO?
Eesdee4/4/2023

I m trying to test some worker code

I'm trying to test some worker code using this guide https://miniflare.dev/testing/jest. I was able to test KV use, does anyone know what I need to add to my jest.config.js to test D1 use?
Next