Closed VirusEcks closed 1 year ago
@rakudrama, perhaps you could comment on this, or suggest someone else who might recognize the situation: Does 'Uncaught TypeError: Cannot read properties of undefined' look like a code generation issue during compilation to JavaScript? Alternatively, does it ring some other bell?
@eernstg after days of testing -> recompiling prior to submitting this issue until today. our team finally found the problem (facepalm) the problem was never the reflectable package, it was the dart js compiler and partially in fault the dart-lang as well here is a simple explanation for this error in any enum declare a variable named "name" or "index" and the code will be valid in all builds except web/debug because javascript compiler uses the same names used in dart code but in web/release the compression/obfuscation avoids this issue so the generated code will be for example
order_popup_widget.OrderValue = class OrderValue extends core._Enum {
toString() {
return "OrderValue." + this[S._name];
}
static ['_#new#tearOff'](index, name, name) {
return new order_popup_widget.OrderValue.new(index, name, name);
}
};
where the second name
will be undefined
after refactoring this variable named name
the debug ran smoothly
in any enum declare a variable named "name" or "index"
Ah, yes, that's a known bug, I think the fix is on the way.
trying to run in debug causes the reflectable package to throw exception in debug only in web but it runs fine in profile and release and (debug/release/profile) on other platforms i'm using version 3.0.9 flutter 3.0.5
https://pastebin.com/A40Vxwih
that is the full html tree at the time of exception with notes to the several lines of "packages"