Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

v2.7.1: Crashes with beforeReload() must be called before getObject() #359

Closed
AlCalzone opened this issue Sep 8, 2022 · 3 comments
Closed
Labels
bug Something isn't working
Milestone

Comments

@AlCalzone
Copy link
Contributor

AlCalzone commented Sep 8, 2022

I'm getting the following error when starting an application that has a (probably elapsed) DO alarm:

AssertionError [ERR_ASSERTION]: beforeReload() must be called before getObject()
    at DurableObjectsPlugin.getObject (~/node_modules/@miniflare/durable-objects/src/plugin.ts:143:5)
    at AlarmStore.<anonymous> (~/node_modules/@miniflare/durable-objects/src/plugin.ts:215:32)
    at Timeout.<anonymous> (~/node_modules/@miniflare/durable-objects/src/alarms.ts:52:7)
    at listOnTimeout (node:internal/timers:559:17)
    at processTimers (node:internal/timers:502:7)

Attaching the persisted DOs for easier debugging: mf.zip

Removing .mf/durableobjects fixes this error.

@AlCalzone AlCalzone changed the title Crashes with beforeReload() must be called before getObject() v2.7.1: Crashes with beforeReload() must be called before getObject() Sep 8, 2022
@mrbbot mrbbot added the bug Something isn't working label Sep 10, 2022
@mrbbot mrbbot added this to the 2.9.0 milestone Sep 10, 2022
@mrbbot mrbbot closed this as completed in d606d68 Sep 11, 2022
@mrbbot
Copy link
Contributor

mrbbot commented Sep 11, 2022

Hey! 👋 I wasn't able to reproduce this using your persisted DOs, but I managed to reproduce the error another way, and think I've fixed it. 🙂 The fix will be in the next release. 👍

@mrbbot
Copy link
Contributor

mrbbot commented Sep 17, 2022

Hey! 👋 Miniflare 2.9.0 has just been released, which implements a fix. You can find the full changelog here.

@AlCalzone
Copy link
Contributor Author

Confirmed 👍️

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants