Re: Moving a mutated block gives error

219 views
Skip to first unread message

Beka Westberg

unread,
Nov 30, 2020, 6:43:21 PM11/30/20
to blo...@googlegroups.com
Hello,

Thank you for providing the full text of your error! That is always really helpful for debugging :D

I found a match for your issue here, and it seems that there problem was that their mutation wasn't properly round-tripping through XML. Meaning their domToMutation function wasn't properly creating all of the fields/inputs of the original block.

If you need more help debugging from there, could you provide the full text of your block (including the mutation code)? If people here can pull your code and play with it, I'm sure someone can figure it out!

Best wishes,
Beka

On Sun, Nov 29, 2020 at 10:57 PM Arbaz Sheikh <arbaz....@kratinsolutions.com> wrote:
I have created a mutated block. But when i drag the block after selecting, it gives following errors

core.js:6241 ERROR TypeError: Cannot read property 'fieldRow' of undefined
    at Blockly.InsertionMarkerManager.createMarkerBlock_ (blockly_compressed.js:304)
    at new Blockly.InsertionMarkerManager (blockly_compressed.js:299)
    at new Blockly.BlockDragger (blockly_compressed.js:318)
    at Blockly.TouchGesture.Blockly.Gesture.startDraggingBlock_ (blockly_compressed.js:443)
    at Blockly.TouchGesture.Blockly.Gesture.updateIsDraggingBlock_ (blockly_compressed.js:440)
    at Blockly.TouchGesture.Blockly.Gesture.updateIsDragging_ (blockly_compressed.js:442)
    at Blockly.TouchGesture.Blockly.Gesture.updateFromEvent_ (blockly_compressed.js:437)
    at Blockly.TouchGesture.Blockly.Gesture.handleMove (blockly_compressed.js:448)
    at Blockly.TouchGesture.handleMove (blockly_compressed.js:658)
    at HTMLDocument.h (blockly_compressed.js:795)
defaultErrorLogger @ core.js:6241
handleError @ core.js:6294
next @ core.js:42627
schedulerFn @ core.js:37132
__tryOrUnsub @ Subscriber.js:183
next @ Subscriber.js:122
_next @ Subscriber.js:72
next @ Subscriber.js:49
next @ Subject.js:39
emit @ core.js:37092
(anonymous) @ core.js:41707
invoke @ zone-evergreen.js:364
run @ zone-evergreen.js:123
runOutsideAngular @ core.js:41501
onHandleError @ core.js:41704
handleError @ zone-evergreen.js:368
runTask @ zone-evergreen.js:170
invokeTask @ zone-evergreen.js:480
invokeTask @ zone-evergreen.js:1621
globalZoneAwareCallback @ zone-evergreen.js:1647
3core.js:6241

 ERROR TypeError: Cannot read property 'dragBlock' of null
    at Blockly.TouchGesture.Blockly.Gesture.handleMove (blockly_compressed.js:448)
    at Blockly.TouchGesture.handleMove (blockly_compressed.js:658)
    at HTMLDocument.h (blockly_compressed.js:795)
    at ZoneDelegate.invokeTask (zone-evergreen.js:399)
    at Object.onInvokeTask (core.js:41645)
    at ZoneDelegate.invokeTask (zone-evergreen.js:398)
    at Zone.runTask (zone-evergreen.js:167)
    at ZoneTask.invokeTask [as invoke] (zone-evergreen.js:480)
    at invokeTask (zone-evergreen.js:1621)
    at HTMLDocument.globalZoneAwareCallback (zone-evergreen.js:1647)
defaultErrorLogger @ core.js:6241
handleError @ core.js:6294
next @ core.js:42627
schedulerFn @ core.js:37132
__tryOrUnsub @ Subscriber.js:183
next @ Subscriber.js:122
_next @ Subscriber.js:72
next @ Subscriber.js:49
next @ Subject.js:39
emit @ core.js:37092
(anonymous) @ core.js:41707
invoke @ zone-evergreen.js:364
run @ zone-evergreen.js:123
runOutsideAngular @ core.js:41501
onHandleError @ core.js:41704
handleError @ zone-evergreen.js:368
runTask @ zone-evergreen.js:170
invokeTask @ zone-evergreen.js:480
invokeTask @ zone-evergreen.js:1621
globalZoneAwareCallback @ zone-evergreen.js:1647
core.js:6241

 ERROR TypeError: Cannot read property 'endBlockDrag' of null
    at Blockly.TouchGesture.Blockly.Gesture.handleUp (blockly_compressed.js:449)
    at Blockly.TouchGesture.handleUp (blockly_compressed.js:659)
    at HTMLDocument.h (blockly_compressed.js:795)
    at ZoneDelegate.invokeTask (zone-evergreen.js:399)
    at Object.onInvokeTask (core.js:41645)
    at ZoneDelegate.invokeTask (zone-evergreen.js:398)
    at Zone.runTask (zone-evergreen.js:167)
    at ZoneTask.invokeTask [as invoke] (zone-evergreen.js:480)
    at invokeTask (zone-evergreen.js:1621)
    at HTMLDocument.globalZoneAwareCallback (zone-evergreen.js:1658)


I have attached the image of console for better understanding.

Can anyone help me to understand the cause and how to solve this issue

Screenshot from 2020-11-30 12-21-36.png

--
You received this message because you are subscribed to the Google Groups "Blockly" group.
To unsubscribe from this group and stop receiving emails from it, send an email to blockly+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/blockly/96bdb268-fddf-4d47-8286-b70a9e4a6e1fn%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages