tldraw / tldraw-v1

A tiny little drawing app. This is the original 2021-2022 version, released under MIT.
https://old.tldraw.com
MIT License
60 stars 36 forks source link

[Bug]: Could not find a binding to match the start handle's bindingId #574

Closed AlexSapple closed 7 months ago

AlexSapple commented 1 year ago

What happened?

Hi guys,

we use TLdraw in a multiplayer with persistence way and I've got a few examples where bindings seem to be causing some grief. Now I need to start by saying that we are a bit out of date - we are running 1.19.1 so I know... need to get our house in order!

but I'm looking at what options I have for recovering a board that has got itself in to this state (obviously would like to prevent it from ever getting in to the state - but one step at a time). I'm looking at the backend data we have stored for the board in question and trying to figure out how I can go about finding the offending binding. It's a board with lots of arrows connecting to lots of stuff. I have the raw data available but.. well it's a relatively big chunk to try and pick through manually.

I guess if nothing else, would be cool if the error message could include whichever binding Id it does have (i.e. if it has the start but not the end etc)

Error: Could not find a binding to match the start handle's bindingId
  at ti.updateArrowBindings (069bf194.b8eff31aea16c952438c.js:1:85100)
  at 069bf194.b8eff31aea16c952438c.js:1:167804
  at Array.forEach (<anonymous>)
  at 069bf194.b8eff31aea16c952438c.js:1:167710
  at Function.r [as setState] (670.6aa20258563b22b5d300.js:1:214272)
  at Bi.replacePageContent (069bf194.b8eff31aea16c952438c.js:1:166643)
  at 858.6939bda6827c46397817.js:1:3707
  at Ii (framework-2339148210586117d177.js:1:105610)
  at t.unstable_runWithPriority (framework-2339148210586117d177.js:1:123640)
  at Wl (framework-2339148210586117d177.js:1:45781)

How can we reproduce the bug?

related to arrow bindings, but I don't have exact steps.

What browsers are you seeing the problem on?

Firefox, Chrome, Safari, Microsoft Edge

Contact Details

alex.sapple@laduma.com

Code of Conduct

steveruizok commented 1 year ago

Moving over to v1! Though I believe I've seen this one before and was never able to find the actual cause. If you do manage to isolate it that would be a huge help; otherwise, we may have to just put a guard around that part of the code to prevent the crash.

AlexSapple commented 1 year ago

I'll keep trying to spot it - I can only say that in the case I had the other day, I had lots of arrows connecting to lots of objects and the only noteworthy thing was that in many cases the objects had been grouped and maybe subsequently ungrouped (not sure..)

steveruizok commented 7 months ago

If you can reproduce this, please share!