Invalid Durable Object ID error crashing Miniflare when reloading with `-w`
Might be related to #86, same project. Here's the error:
[mf:inf] Build succeeded
[mf:inf] Worker reloaded! (39.49KiB)
TypeError: Invalid Durable Object ID. Durable Object IDs must be 64 hex digits.
at DurableObjectNamespace.idFromString (file:///C:/Users/tim/AppData/Local/Volta/tools/image/packages/miniflare/node_modules/miniflare/node_modules/@miniflare/durable-objects/src/namespace.ts:174:13)
at C:\Users\tim\Desktop\itty-durable-0.x\examples\reveal-nft\dist\index.mjs:5:20963
at file:///C:/Users/tim/AppData/Local/Volta/tools/image/packages/miniflare/node_modules/miniflare/node_modules/@miniflare/shared/src/event.ts:29:9
at EventTarget.<anonymous> (file:///C:/Users/tim/AppData/Local/Volta/tools/image/packages/miniflare/node_modules/miniflare/node_modules/@miniflare/shared/src/sync/gate.ts:188:11)
When I start my project, connect via WebSocket to my Durable Object, save a change that Miniflare watches and reloads, terminate my socket client with ^C, then reconnected my client I saw this error.
Hey! 👋 This error indicates that you're not passing a length-64 string comprised of just the characters A-Z, a-z or 0-9 to idFromString. Is there any chance the string you're passing is undefined?
Is there any chance the string you're passing is
undefined?
I don't think so. The only durable objects I am retrieving are via LoadBalancer.idFromName('load-balancer-event-listener') or
// ...
listenerId = env.Listener.newUniqueId().toString();
const listener = env.Listener.get(env.Listener.idFromString(listenerId));