Open domchristie opened 2 years ago
This sounds related to the problem reported in #706 (see https://github.com/hotwired/turbo/issues/706#issuecomment-1235188847)
@kevinmcconnell well spotted, thanks. Yes, this looks related. I'll keep this open in case the rendering issue differs.
@domchristie thank you for opening this issue. Is the issue reproducible in https://github.com/hotwired/turbo/releases/tag/v7.2.0-rc.2? I have a hunch it could be related to https://github.com/hotwired/turbo/pull/715.
@seanpdoyle thanks! Rendering is fixed in 7.2.0-rc.2 👍 but the error is still thrown. Perhaps we can catch the cancel
rejection if the visit is cancelled by a subsequent visit?
Rendering is fixed in 7.2.0-rc.2
Mostly! I can still reproduce this occasionally, but it's intermittent, and I can't quite pin down the conditions
I can confirm that the error is still being thrown in 7.2.0-rc.2
.
In my case it has to do with visits that return a Turbo Stream. I can reproduce it in the test server:
Stream link with ?key=value
This results in the following error: Uncaught (in promise) undefined
. It doesn't seem to have any other consequence. Everything works great despite the error.
I'm not seeing the error anymore after 1ec72ac3236038af50a0010f0821e0664eeac087 👍.
This is most noticeable when pausing rendering for animations: if your click a link then tap another whilst that one is in-flight, an
Uncaught (in promise)
error is thrown, originating here:https://github.com/hotwired/turbo/blob/2332d3d0153886ff0c616198e377687a76ac5226/src/core/drive/visit.ts#L188 ~I think
this.resolvingFunctions
isundefined
~In 7.2.0-beta.2 this results in console errors. In 7.2.0-rc.1, rendering fails.
Looks like it might be something to do with: https://github.com/hotwired/turbo/pull/650? /cc @seanpdoyle