-
Notifications
You must be signed in to change notification settings - Fork 33
Uncaught TypeError: Cannot read property '__dartClass__' of undefined #711
Comments
Please can you provide more context? Pubspec.yaml to begin with and snippets of code could help diagnose the problem. |
Here's the pubspec.yaml: |
The error only occurs when I add Some code snippets:
|
From slack. |
I believe that solves it. Thanks for your response in slack. Totally couldn't make that up from the error message though. Can that be fixed? |
Great. I haven't seen that warnings for this could be activated, maybe there are some option in js polymer. |
Sorry, I checked superficially. Adding subroute to the dart file does not solve it. The error message is thrown in:
|
Here's with the debugger variables. I do have an event "signedIn" elsewhere in my code.
|
It gets into the same trouble when path = "route.__queryParams". |
@pjjjv The |
Try initializing fields bounded to |
@jonboj correct |
@dam0vm3nt Indeed, I debugged the propertyChanged function. After I uncommented the signedIn parts from my code, the only remaining variable that it stumbles over is "subroute". If I remove this, then finally, my pageChanged method is triggered. But the reason the javascript code stumbles over subroute is that it does not find it on AppAkepot. Your solution of setting "subroute ={};" for initialization solves that, and this works too. Thanks @dam0vm3nt. Now, the standard app-route element seems to be easily high on difficult data bindings involving structured data and leads to observing path changes internally in Polymer.dart. Is this necessary initialization documented somewhere? Does it apply to most polymer elements? |
@pjjjv Just looking in the code at branch
Polymer does a lot of instrumentation of the binded properties, since Update |
This is a bug on polymer_interop imho. This bug is triggered by those componente because they notify null values that usually doesn't happen. The code in polymer_interop doesn't check for null and this leads the error. I'm going to send a patch to polymer_interop but don't know if it gets accepted soon because at the moment the maintainer seams to be away |
hi, can you try adding the following overrides to you yaml and see if the problem is gone ? polymer:
version: "^1.0.0-rc.18.exp.6"
hosted:
name: polymer
url: http://pub.drafintech.it:5001
polymer_interop:
version: "^1.0.0-rc.10.exp.8"
hosted:
name: polymer
url: http://pub.drafintech.it:5001
This is a |
@dam0vm3nt These PRs solve it as far as I can tell. The error is gone. (I had trouble reproducing for a while so the circumstance might be slightly different). |
fixed by dart-archive/polymer_interop#47 |
Having trouble registering a propertyChanged observer in Polymer.dart (dart 1.18.1). The method pageChanged is never called when I run pub serve and surf to http://localhost:......web/index.html#/home. I suspect it is not registered in the first place.
Error:
See pjjjv/Akepot@dbf85b3 file app_akepot.dart.
The text was updated successfully, but these errors were encountered: