Closed rickmcgeer closed 6 months ago
Some detective work in the console (attempting so save with the console open showed me the stack trace) gave this stack trace:
at Object.asSerializableExpression (__rootModule___commonjs-entry-cbff1bd1.js:53422:63)
at Object.serializeSpec (__rootModule___commonjs-entry-cbff1bd1.js:53572:44)
at __rootModule___commonjs-entry-cbff1bd1.js:53074:40
at Array.map (<anonymous>)
at Object.traverseSubmorphs (__rootModule___commonjs-entry-cbff1bd1.js:53068:60)
at Object.serializeSpec (__rootModule___commonjs-entry-cbff1bd1.js:53551:28)
at __rootModule___commonjs-entry-cbff1bd1.js:53074:40
at Array.map (<anonymous>)
at Object.traverseSubmorphs (__rootModule___commonjs-entry-cbff1bd1.js:53068:60)
at Object.serializeSpec (__rootModule___commonjs-entry-cbff1bd1.js:53551:28)
The offending line was:
masterComponentName = _aMorph$master$parent.exportedName,
_aMorph$master$parent
is undefined; it's set in the line above:
var _aMorph$master$parent = aMorph.master.parent[Symbol["for"]("lively-module-meta")]
_aMorph
is a label with name "padding indicator"
and its parent is a PolicyApplicator
. The Symbol call returns Symbol("lively-module-meta")
and that pretty much exhausts my detective skills
I'm also seeing this, when I (successfully) save GalyleoTopBar.js
Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'instantiatePromise')
at instantiate (deps.js:2614:17)
at resolveInstantiate (deps.js:2569:14)
at RegisterLoader.<computed> (deps.js:2534:12)
at deps.js:2214:41
It turns out load.linkRecord
is undefined
The changes I made, BTW, were, to address https://github.com/engageLively/galyleo-dashboard/issues/194 and revert the changes I made in error (and thanks to @merryman for pointing these out. Specifically, in
$world.execCommand("open browser", {moduleName: "studio/top-bar.cp.js", packageName: "engageLively--galyleo-dashboard", codeEntity: "publishDashboard"});
I changed the code in reportBug
and publishDashboard
back to signalling. This led to the instantiatePromise
error, which didn't prevent saves. In:
$world.execCommand("open browser", {moduleName: "studio/ui.cp.js", packageName: "engageLively--galyleo-dashboard", codeEntity: "Galyleo"});
I changed
{ model: 'top bar', signal: 'initiate bug report', handler: 'reportBug' },
{ model: 'top bar', signal: 'initiate publication', handler: 'publishDashboard' }
to
{ target: 'top bar', signal: 'initiate bug report', handler: 'reportBug' },
{ target: 'top bar', signal: 'initiate publication', handler: 'publishDashboard' }
as per @linusha's instructions in the discussion on https://github.com/LivelyKernel/lively.next/issues/809
And it turns out that the changes were saved, despite the error! Leaving this open, since this needs to be tracked.
This is a bug in the policies that happens since it tries to update the instantiate galyleo dashboard in the background. I will prepare a fix for that.
Describe the bug I understand that this is probably intended behavior, but from a user's perspective it's a nightmare. The browser refuses to save a file if it detects an error in the code, with an error message that gives the user no help at all in chasing down the error. The alert box says "TypeError: Cannot read properties of undefined (reading 'exportedName')". This string doesn't occur in the code, so presumably it refers to a Lively internal variable. The console gives me no help, presumably because the original error was caught and sent to the alert box. When I click on the "open in browser" icon in the error box, it just takes me to the first declaration in the file.
What I'm basically left doing is commenting out code until the error disappears...
To Reproduce Presumably foul up the code in a way to excite this, but I honestly don't know how to chase it down.
Screenshots
Setup
Version: Please paste the lively.next commit on which the problem occurred here (use the copy button of the Version Checker in the bottom left corner). af0c3623fbe24a48097cb69eace75feafddf0406