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

using google-map Polymer JS element within a Polymer Dart element causes entire element to fail #19591

Closed
DartBot opened this issue Jun 21, 2014 · 14 comments
Assignees
Labels
area-pkg Used for miscellaneous pkg/ packages not associated with specific area- teams. closed-duplicate Closed in favor of an existing report P1 A high priority bug; for example, a single project is unusable or has many test failures

Comments

@DartBot
Copy link

DartBot commented Jun 21, 2014

This issue was originally filed by @terrasea


What steps will reproduce the problem?

After creating a Polymer Dar project

  1. use bower to install polymerlabs/google-map
  2. Create a polymer dart element and include the google-map element
  3. include this element in the index.html page
  4. run build build without any arguments
  5. run a server which serves the files from the created build/web directory

What is the expected output? What do you see instead?

I should see the Polymer Dart element created, displayed in the browser, rendering a google map.

What I see is a blank page with no Polymer Element loaded and I get an error

Uncaught TypeError: Cannot read property 'element' of undefined

with the stack trace of

f.findTypeExtensionprototype.js:205
f.findTypeExtensionprototype.js:206
f.registerPrototypeprototype.js:190
f.registerprototype.js:26
JsFunction.apply$2$thisArgindex.html_bootstrap.dart.js:12848
_hookJsPolymer_registerDart.call$3index.html_bootstrap.dart.js:16605
Primitives_applyFunctionindex.html_bootstrap.dart.js:2553
_callDartFunctionindex.html_bootstrap.dart.js:12709
(anonymous function)index.html_bootstrap.dart.js:12698
d._registerpolymer-element.js:64
e.flushqueue.js:100
e.readyqueue.js:105
e.checkqueue.js:80
(anonymous function)queue.js:162
cHTMLImports.js:220
hHTMLImports.js:237
(anonymous function)HTMLImports.js:186
gHTMLImports.js:210
c

What version of the product are you using? On what operating system?

Dart Editor version 1.5.0.dev_04_15 (DEV)
Dart SDK version 1.5.0-dev.4.15

Gentoo Linux

Using Polymer >=0.11.0-dev.2 <0.12.0

Please provide any additional information below.

It seems the pub build removed any reference to google-maps from the produced entry page. I've attached a copy of a test project as a tar archive, that should give some more info.


Attachment:
test_polymer.tar.gz (1.17 MB)

@DartBot
Copy link
Author

DartBot commented Jun 21, 2014

This comment was originally written by @terrasea


Sorry got mixed up. The problem of it not working still remains, but it doesn't stip the definition from the outputted file. I'm attaching the real project which actually uses the google-map element. It includes the build output.


Attachment:
test_polymer.tar.gz (1.59 MB)

@lrhn
Copy link
Member

lrhn commented Jun 21, 2014

Added Pkg-Polymer, Triaged labels.

@sigmundch
Copy link
Member

Added this to the 1.6 milestone.
Removed Priority-Unassigned label.
Added Priority-High, area-pkg labels.

@sigmundch
Copy link
Member

Removed this from the 1.6 milestone.
Added Polymer-P-1 label.

@sigmundch
Copy link
Member

Removed Polymer-P-1 label.
Added Polymer-Milestone-Next label.

@sigmundch
Copy link
Member

Added PolymerMilestone-Next label.

@sigmundch
Copy link
Member

Removed Polymer-Milestone-Next label.

@kasperl
Copy link

kasperl commented Jul 10, 2014

Added this to the 1.6 milestone.

@sigmundch
Copy link
Member

Removed this from the 1.6 milestone.

@jakemac53
Copy link
Contributor

Set owner to @jakemac53.

@jakemac53
Copy link
Contributor

I tried running your example and it worked for me, so I assume this has been fixed. If you can still reproduce it then feel free to re-open this ticket and I can take another look into it.


Added AssumedStale label.

@DartBot
Copy link
Author

DartBot commented Aug 3, 2014

This comment was originally written by [email protected]


I encountered the same issue on a different project. Reported on github here https://github.com/Polymer/polymer-dev/issues/65. Attached is a simple workaround.


Attachment:
prototype.js.patch (416 Bytes)

@sigmundch
Copy link
Member

@vikraman.choudhury - I believe this is the result of a bug in dart2js + dart:js.

Others were running into this too, and I submitted a fix on friday. The fix will be in the next Dart SDK release (1.6.0-dev.7.0).

You can find more details in issue #20280 and issue #20305.


Added Duplicate label.
Marked as being merged into #20305.

@DartBot DartBot added Type-Defect P1 A high priority bug; for example, a single project is unusable or has many test failures area-pkg Used for miscellaneous pkg/ packages not associated with specific area- teams. closed-duplicate Closed in favor of an existing report labels Aug 4, 2014
@DartBot
Copy link
Author

DartBot commented Jun 5, 2015

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

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. closed-duplicate Closed in favor of an existing report P1 A high priority bug; for example, a single project is unusable or has many test failures
Projects
None yet
Development

No branches or pull requests

5 participants