toeverything / AFFiNE

There can be more than Notion and Miro. AFFiNE(pronounced [ə‘fain]) is a next-gen knowledge base that brings planning, sorting and creating all together. Privacy first, open-source, customizable and ready to use.
https://affine.pro
Other
39.34k stars 2.54k forks source link

​Connector tool not working on a specific document. #7460

Open nathan-de-pachtere opened 1 month ago

nathan-de-pachtere commented 1 month ago

What happened?

The connector tool (--> ) is broken in one document.

Connectors that were in place in the document disappear after a save, and I can't draw new ones. The following error is raised in the web console: "TypeError: Cannot read properties of undefined (reading 'id')" with details in the log.

When creating a new document, the connector tool works. In the new document, I don't encounter the "TypeError: Cannot read properties of undefined (reading 'id')" error in the web console.

Distribution version

Web (app.affine.pro)

What browsers are you seeing the problem on if you're using web version?

Chrome

Are you self-hosting?

Relevant log output

use-block-suite-workspace-page.ts:13 

TypeError: Cannot read properties of undefined (reading 'id')
    at i (surface-model.ts:473:64)
    at surface-model.ts:481:41
    at Array.forEach (<anonymous>)
    at y._watchConnectorRelationChange (surface-model.ts:481:24)
    at y._init (surface-model.ts:250:10)
    at surface-model.ts:244:34
    at slot.ts:92:7
    at slot.ts:128:9
    at Array.forEach (<anonymous>)
    at a.emit (slot.ts:126:21)
    at ej._onBlockAdded (doc.ts:294:27)
    at doc.ts:221:14
    at yjs.mjs:6086:9
    at Map.forEach (<anonymous>)
    at rc.forEach (yjs.mjs:6084:15)
    at new ej (doc.ts:219:19)
    at te.getDoc (block-collection.ts:227:17)
    at e7.getDoc (collection.ts:127:24)
    at use-block-suite-workspace-page.ts:13:28
    at F (use-block-suite-workspace-page.ts:54:1)
    at af (react-dom.production.min.js:160:137)
    at i (react-dom.production.min.js:289:337)
    at oF (react-dom.production.min.js:279:389)
    at react-dom.production.min.js:279:320
    at oM (react-dom.production.min.js:279:325)
    at o_ (react-dom.production.min.js:272:245)
    at r4 (react-dom.production.min.js:127:105)
    at react-dom.production.min.js:266:273

Uncaught (in promise) TypeError: this._getSelector is not a function
    at l._renderModel (frame-preview.ts:356:27)
    at l.render (generic-block.ts:71:16)
    at l.update (lit-element.js:6:235)
    at l.performUpdate (reactive-element.js:6:4891)
    at l.scheduleUpdate (reactive-element.js:6:4427)
    at l._$ET (reactive-element.js:6:4335)
_renderModel @ frame-preview.ts:356
render @ generic-block.ts:71
update @ lit-element.js:6
performUpdate @ reactive-element.js:6
scheduleUpdate @ reactive-element.js:6
_$ET @ reactive-element.js:6
await in _$ET (async)
requestUpdate @ reactive-element.js:6
_$Ev @ reactive-element.js:6
w @ reactive-element.js:6
s @ lit-element.js:6
J @ shadowless-element.ts:4
(anonymous) @ npm-blocksuite-91929c20.js:1
l @ npm-blocksuite-91929c20.js:4195
u @ lit-html.js:6
$ @ lit-html.js:6
_$AI @ lit-html.js:6
k @ lit-html.js:6
_$AI @ lit-html.js:6
p @ lit-html.js:6
$ @ lit-html.js:6
_$AI @ lit-html.js:6
H @ lit-html.js:6
update @ lit-element.js:6
performUpdate @ reactive-element.js:6
scheduleUpdate @ reactive-element.js:6
_$ET @ reactive-element.js:6
await in _$ET (async)
requestUpdate @ reactive-element.js:6
_$Ev @ reactive-element.js:6
w @ reactive-element.js:6
s @ lit-element.js:6
J @ shadowless-element.ts:4
(anonymous) @ npm-blocksuite-91929c20.js:1
(anonymous) @ npm-blocksuite-91929c20.js:4195
u @ lit-html.js:6
$ @ lit-html.js:6
_$AI @ lit-html.js:6
p @ lit-html.js:6
$ @ lit-html.js:6
_$AI @ lit-html.js:6
H @ lit-html.js:6
update @ lit-element.js:6
performUpdate @ reactive-element.js:6
scheduleUpdate @ reactive-element.js:6
_$ET @ reactive-element.js:6
await in _$ET (async)
requestUpdate @ reactive-element.js:6
_$Ev @ reactive-element.js:6
w @ reactive-element.js:6
s @ lit-element.js:6
J @ shadowless-element.ts:4
(anonymous) @ npm-blocksuite-91929c20.js:1
(anonymous) @ npm-blocksuite-91929c20.js:30654
u @ lit-html.js:6
$ @ lit-html.js:6
_$AI @ lit-html.js:6
p @ lit-html.js:6
$ @ lit-html.js:6
_$AI @ lit-html.js:6
H @ lit-html.js:6
update @ lit-element.js:6
performUpdate @ reactive-element.js:6
scheduleUpdate @ reactive-element.js:6
_$ET @ reactive-element.js:6
await in _$ET (async)
requestUpdate @ reactive-element.js:6
_$Ev @ reactive-element.js:6
w @ reactive-element.js:6
s @ lit-element.js:6
J @ shadowless-element.ts:4
(anonymous) @ npm-blocksuite-91929c20.js:1
(anonymous) @ npm-blocksuite-91929c20.js:34956
u @ lit-html.js:6
$ @ lit-html.js:6
_$AI @ lit-html.js:6
k @ lit-html.js:6
_$AI @ lit-html.js:6
p @ lit-html.js:6
$ @ lit-html.js:6
_$AI @ lit-html.js:6
p @ lit-html.js:6
$ @ lit-html.js:6
_$AI @ lit-html.js:6
p @ lit-html.js:6
$ @ lit-html.js:6
_$AI @ lit-html.js:6
H @ lit-html.js:6
update @ lit-element.js:6
performUpdate @ reactive-element.js:6
scheduleUpdate @ reactive-element.js:6
_$ET @ reactive-element.js:6
await in _$ET (async)
requestUpdate @ reactive-element.js:6
_$Ev @ reactive-element.js:6
w @ reactive-element.js:6
s @ lit-element.js:6
J @ shadowless-element.ts:4
(anonymous) @ npm-blocksuite-91929c20.js:1
(anonymous) @ npm-blocksuite-91929c20.js:35023
u @ lit-html.js:6
$ @ lit-html.js:6
_$AI @ lit-html.js:6
H @ lit-html.js:6
update @ lit-element.js:6
performUpdate @ reactive-element.js:6
scheduleUpdate @ reactive-element.js:6
_$ET @ reactive-element.js:6
await in _$ET (async)
requestUpdate @ reactive-element.js:6
_$Ev @ reactive-element.js:6
w @ reactive-element.js:6
s @ lit-element.js:6
J @ shadowless-element.ts:4
(anonymous) @ npm-blocksuite-91929c20.js:1
(anonymous) @ npm-blocksuite-91929c20.js:35107
Component @ frame.tsx:25
af @ react-dom.production.min.js:160
i @ react-dom.production.min.js:289
oF @ react-dom.production.min.js:279
(anonymous) @ react-dom.production.min.js:279
oM @ react-dom.production.min.js:279
ow @ react-dom.production.min.js:267
E @ scheduler.production.min.js:13
T @ scheduler.production.min.js:14
(anonymous) @ jszip.min.js:13
d @ jszip.min.js:13
f @ jszip.min.js:13
postMessage (async)
r @ jszip.min.js:13
c.setImmediate @ jszip.min.js:13
u @ scheduler.production.min.js:14
M @ scheduler.production.min.js:14
n.unstable_scheduleCallback @ scheduler.production.min.js:18
(anonymous) @ react-dom.production.min.js:296
oD @ react-dom.production.min.js:282
o_ @ react-dom.production.min.js:272
r4 @ react-dom.production.min.js:127
(anonymous) @ react-dom.production.min.js:266
Show 119 more frames
Show less

Anything else?

No response

affine-issue-bot[bot] commented 1 month ago

Issue Status: 🆕 *Untriaged

*🆕 Untriaged**

The team has not yet reviewed the issue. We usually do it within one business day. Docs: https://github.com/toeverything/AFFiNE/blob/canary/docs/issue-triaging.md

This is an automatic reply by the bot.