Recently I started getting the cannot resume dead coroutine
error. It doesn’t seem to influence my code, but it’s very annoying. There’s an existing post with some other people mentioning this issue, but it doesn’t look like it got much traction: Cannot resume dead coroutine despite it being a new coroutine
In my case, here’s the code that triggers this error:
local jumpPromise = Promise.new(function(resolve)
repeat
local _, new = self.humanoid.StateChanged:Wait()
until new == Enum.HumanoidStateType.Jumping
resolve()
end)
local finishPromise = Promise.new(function(resolve)
task.wait(0.1)
resolve()
end)
local statePromise = Promise.any({jumpPromise, finishPromise}):andThen(function()
self:evaluate()
end)
I tried to get a minimal repro working, but I couldn’t manage to do that.
This error appears both in studio and in-game
Expected behavior
The error should be gone. Not sure what effect it has since my code still seems to function correctly.
A private message is associated with this bug report