yes: ``` async fetch(request: Request) { await this.ensureMessagesInitialized(); const we
yes:
async fetch(request: Request) {
await this.ensureMessagesInitialized();
const webSocketPair = new WebSocketPair();
const [client, server] = Object.values(webSocketPair);
this.ctx.acceptWebSocket(server);
return new Response(null, {
status: 101,
webSocket: client,
});
}deleteAll():webSocketClose() in my code and I haven't had any issues with duration chargesCannot use assets and tail consumers in the same Worker. Tail Workers are not yet supported for Workers with assets)))JWTs can't easily be expunged/expiredTrue, but in your initial question you were concerned about writes to KV/DO/D1. If you validated the JWT on every request, it would still only be a a one-time write, and then reads after that, and if you wanted to expire it for some reason it would be 1 extra write.
getContext() works inside a scheduled event triggered by a cron?getContext() to get the KVNamespacecrons = ["0 */1 * * *"] deployed for a long time which was working.crons = ["* * * * *"] and deployed. The dashboard UI was still saying 0 */1 * * * was active, and it was still using that pattern.crons = ["0 */1 * * *"], and now the * * * * * pattern is the one actually running, despite the dashboard UI saying 0 */1 * * * is active.

eval(). This is probably another such example.
waitUntil?waitUntil suggests it would be useful only if Worker A had to wait until Worker B was comlplete, but for me it doesn't. Not sure if that makes sense!chrome-headless-shell... the docs for puppeteer.launch() incorrectly suggest you can pass a PuppeteerLaunchOptions param, but that only works for PuppeteerNode.launch(), not PuppeteerWorkers.launch()main file. For example: @types/node installed per chance? Or is something loading webworker or other similar types? What file openes if you browse to that erroring type?res is assigned?AssertionError [ERR_ASSERTION]: The expression evaluated to a falsy value: from the client - doesn't even hit the RPC endpoint)Uncaught (in promise) TypeError: Provided readable stream must have a known length (request/response body or readable half of FixedLengthStream)The uploaded script has no registered event handlers. [code: 10068], I don't think I've changed anything that would cause this.. any ideas how I could figure out what's going on?async webSocketClose(
ws: WebSocket,
code: number,
reason: string,
wasClean: boolean,
) {
// cleaning up storage if you want, or remove if you prefer not to delete
await this.state.storage.deleteAll();
ws.close(code, "durable object is closing websocket");
}// scheduled.ts
async function scheduled(evt, env, ctx) {
// Do some work
}
// index.ts
import { scheduled } from "./scheduled";
export default { scheduled };wrangler deploy --dry-run --outdir ./dist --minify
sentry-cli sourcemaps inject ./dist && sentry-cli sourcemaps upload ./dist
wrangler deploy --outdir ./dist --no-bundle ./dist/index.jsAssertionError [ERR_ASSERTION]: The expression evaluated to a falsy value:Uncaught (in promise) TypeError: Provided readable stream must have a known length (request/response body or readable half of FixedLengthStream)The uploaded script has no registered event handlers. [code: 10068]