Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Polymer template attribute definition with no corresponding class attributes causes confusing exception #20544

Closed
DartBot opened this issue Aug 15, 2014 · 5 comments
Assignees
Labels
area-pkg Used for miscellaneous pkg/ packages not associated with specific area- teams.

Comments

@DartBot
Copy link

DartBot commented Aug 15, 2014

This issue was originally filed by @terrasea


What steps will reproduce the problem?

  1. Create a Polymer template definition with an attribute then create the backing class without a field to match the attribute.
    <polymer-element name="failing-element" attributes="nonexistent">
    ...
    </polymer-element>

@CustomTag('failing-element')
class FailingElement extends PolymerElement {
  //don't create a definition for nonexistent
  ...
}
2. Try and run this in Dart Editor

What is the expected output? What do you see instead?
I expect a warning that I have not created a field in the backing class for this element. What I get instead is

Breaking on exception: Unhandled exception:

Exception: Unhandled exception:
Illegal argument(s): List must contain only ints, Strings, and Symbols

­0 PropertyPath.PropertyPath (package:observe/src/path_observer.dart:128:11)

­1 PolymerDeclaration.publishAttributes (package:polymer/src/declaration.dart:222:24)

­2 PolymerDeclaration.desugar (package:polymer/src/declaration.dart:107:22)

­3 PolymerDeclaration.register (package:polymer/src/declaration.dart:89:12)

­4 _hookJsPolymer.registerDart.<anonymous closure> (package:polymer/src/loader.dart:132:75)

­5 _RootZone.run (dart:async/zone.dart:1077)

­6 _hookJsPolymer.registerDart (package:polymer/src/loader.dart:131:22) (package:polymer/src/instance.dart:1

What version of the product are you using?

Dart Editor version 1.6.0.dev_08_00 (DEV)
Dart SDK version 1.6.0-dev.8.0

On what operating system?

Gentoo Linux

What browser (if applicable)?
Dartium

Please provide any additional information below.

I did a bit of tracking using, (horror), print statements. I found that it was going to packages/observe/src/path_observer.dart, which has been given a list of attributes, and on the failing list, the symbol checked was a null pointer. I guess it's something to do with the <polymer-element ...> attributes attribute. As when I removed that nonexistent attribute from the attributes attribute, my app started working again.

@floitschG
Copy link
Contributor

Added Area-Pkg, Pkg-Polymer, Triaged labels.

@jakemac53
Copy link
Contributor

Set owner to @jakemac53.
Added Started label.

@jakemac53
Copy link
Contributor

Fixed in r39667

@jakemac53
Copy link
Contributor

Added Fixed label.

@DartBot
Copy link
Author

DartBot commented Jun 5, 2015

This issue has been moved to dart-archive/polymer-dart#270.

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-pkg Used for miscellaneous pkg/ packages not associated with specific area- teams.
Projects
None yet
Development

No branches or pull requests

4 participants