Desynchronisation while collaborating

Hello!

We have been working many hours on Kinopio, it is so much a great tool!

We have desynchronization issue while collaborating (we are two people working at the same time).

Here is the javascript console when my collaborator selected everything (CTRL+A) and moved everything. Boxes moved properly I think, but links between boxes stayed still without moving.

[Error] WebSocket connection to 'wss://kinopio-server.herokuapp.com/' failed: The operation couldn’t be completed. (kNWErrorDomainPOSIX error 54 - Connection reset by peer)

[Error] TypeError: undefined is not an object (evaluating 'e.cards[t.id][s]=t[s]')
    (anonymous function) (index.efb43cd1.js:1:677817)
    forEach
    update (index.efb43cd1.js:1:677798)
    (anonymous function) (vendor.dea34c2e.js:6:1744)
    (anonymous function) (vendor.dea34c2e.js:6:9467)
    forEach
    (anonymous function) (vendor.dea34c2e.js:6:9452)
    (anonymous function) (vendor.dea34c2e.js:6:11273)
    (anonymous function) (vendor.dea34c2e.js:6:9430)
    (anonymous function) (index.efb43cd1.js:1:730224)
[Log] :first_quarter_moon_with_face: received – {message: "updateRemoteUserResizingCards", updates: {type: "updateRemoteUserResizingCards", userId: "B5UZlK4EnuO6JWLivxTn9", cardIds: ["LaDm56o4tfoWQuV8_swnT"]}, clientId: "vN2viBYVBxkRFUIkpOdwa", …} (index.efb43cd1.js, line 1)
{message: "updateRemoteUserResizingCards", updates: {type: "updateRemoteUserResizingCards", userId: "B5UZlK4EnuO6JWLivxTn9", cardIds: ["LaDm56o4tfoWQuV8_swnT"]}, clientId: "vN2viBYVBxkRFUIkpOdwa", space: {id: "tBWlV7pMtYXK7hCdhteNU", name: "Spart Q1 2022", privacy: "private"}, type: "store"}Object
[Log] :first_quarter_moon_with_face: received – {message: "updateCard", handler: "currentCards/update", updates: {type: "updateCard", id: "LaDm56o4tfoWQuV8_swnT", resizeWidth: 322}, …} (index.efb43cd1.js, line 1)
{message: "updateCard", handler: "currentCards/update", updates: {type: "updateCard", id: "LaDm56o4tfoWQuV8_swnT", resizeWidth: 322}, clientId: "vN2viBYVBxkRFUIkpOdwa", space: {id: "tBWlV7pMtYXK7hCdhteNU", name: "Spart Q1 2022", privacy: "private"}}Object
[Error] TypeError: undefined is not an object (evaluating 'e.cards[t.id][s]=t[s]')
    (anonymous function) (index.efb43cd1.js:1:677817)
    forEach
    update (index.efb43cd1.js:1:677798)
    (anonymous function) (vendor.dea34c2e.js:6:1744)
    (anonymous function) (vendor.dea34c2e.js:6:9467)
    forEach
    (anonymous function) (vendor.dea34c2e.js:6:9452)
    (anonymous function) (vendor.dea34c2e.js:6:11273)
    (anonymous function) (vendor.dea34c2e.js:6:9430)
    (anonymous function) (index.efb43cd1.js:1:730224)
[Log] :first_quarter_moon_with_face: received – {message: "resizeCard", handler: "currentCards/update", updates: {type: "resizeCard", id: "LaDm56o4tfoWQuV8_swnT", resizeWidth: 322}, …} (index.efb43cd1.js, line 1)
{message: "resizeCard", handler: "currentCards/update", updates: {type: "resizeCard", id: "LaDm56o4tfoWQuV8_swnT", resizeWidth: 322}, clientId: "vN2viBYVBxkRFUIkpOdwa", space: {id: "tBWlV7pMtYXK7hCdhteNU", name: "Spart Q1 2022", privacy: "private"}}Object
[Error] TypeError: undefined is not an object (evaluating 'e.cards[t.id][s]=t[s]')
    (anonymous function) (index.efb43cd1.js:1:677817)
    forEach
    update (index.efb43cd1.js:1:677798)
    (anonymous function) (vendor.dea34c2e.js:6:1744)
    (anonymous function) (vendor.dea34c2e.js:6:9467)
    forEach
    (anonymous function) (vendor.dea34c2e.js:6:9452)
    (anonymous function) (vendor.dea34c2e.js:6:11273)
    (anonymous function) (vendor.dea34c2e.js:6:9430)
    (anonymous function) (index.efb43cd1.js:1:730224)
[Log] :first_quarter_moon_with_face: received – {message: "updateCard", handler: "currentCards/update", updates: Object, …} (index.efb43cd1.js, line 1)
{message: "updateCard", handler: "currentCards/update", updates: Object, clientId: "vN2viBYVBxkRFUIkpOdwa", space: {id: "tBWlV7pMtYXK7hCdhteNU", name: "Spart Q1 2022", privacy: "private"}}Object

As you can see, the first error is websocket disconnection. I have a bad wifi here, it is possible this is the cause.

These errors appeared after the desynchronization. At first, it desynchronized without any error. Maybe the errors are because of the websocket disconnection and the desynchronisation is another problem.

4 Likes

Thanks mhammerc, that’s super useful. I’ll look into this in the next week or so :slight_smile:

3 Likes

Salut @mhammerc thanks for posting. Here is the space we shared while troubleshooting some of these problems at an earlier session:

There were some other console errors we observed then:

A few other notes:

  • I shared the space URL and Martin connected and made changes. I did not see any of Martin’s activity in the space until I reloaded the browser.
  • When I uploaded screenshots, they got duplicated in the space.
2 Likes

Thanks!

If you need anything, do not hesitate to ask. I am available for further debug/testing/research!

2 Likes

I appreciate all this! thanks again

1 Like

working on this soon, lmk if there are other syncing issue reports as well (I couldn’t find any)

2 Likes

This might be a separate root cause, but this came up in my recent multiplayer session:

Uncaught TypeError: Cannot set property 'type' of undefined
index.1d632e5d.js:1 
    at index.1d632e5d.js:1
    at Array.forEach (<anonymous>)
    at il.update (index.1d632e5d.js:1)
    at vendor.01da123f.js:6
    at vendor.01da123f.js:6
    at Array.forEach (<anonymous>)
    at vendor.01da123f.js:6
    at il._withCommit (vendor.01da123f.js:6)
    at il.commit (vendor.01da123f.js:6)
    at il.commit (vendor.01da123f.js:6)
(anonymous) @ index.1d632e5d.js:1
update @ index.1d632e5d.js:1
(anonymous) @ vendor.01da123f.js:6
(anonymous) @ vendor.01da123f.js:6
(anonymous) @ vendor.01da123f.js:6
il._withCommit @ vendor.01da123f.js:6
il.commit @ vendor.01da123f.js:6
commit @ vendor.01da123f.js:6
DD.onmessage @ index.1d632e5d.js:1
Uncaught TypeError: Cannot read property 'id' of undefined
index.1d632e5d.js:1 
    at index.1d632e5d.js:1
    at Proxy.filter (<anonymous>)
    at il.remove (index.1d632e5d.js:1)
    at vendor.01da123f.js:6
    at vendor.01da123f.js:6
    at Array.forEach (<anonymous>)
    at vendor.01da123f.js:6
    at il._withCommit (vendor.01da123f.js:6)
    at il.commit (vendor.01da123f.js:6)
    at il.commit (vendor.01da123f.js:6)
1 Like