JS builds for Polymer.dart work, but don't run

139 views
Skip to first unread message

montyr75

unread,
Apr 19, 2014, 9:44:02 PM4/19/14
to w...@dartlang.org
I'm on the bleeding edge here, so there are bound to be problems, but I would like to know if others are having similar issues to mine.

Versions:
  Dart SDK version 1.4.0-dev.2.2
  polymer: 0.10.0-pre.9
  polymer_elements: 0.2.0-pre.5

Everything runs perfectly in Dartium, when run from the Editor.

None of my projects will run from a Pub Build, though, not even in Dartium. None of my projects will run as JS with this setup, either. Not with the Run as JavaScript command and not in Chrome after a Pub Build. Chrome comes up blank and the console shows this:

Resource interpreted as Script but transferred with MIME type application/vnd.dart: "http://localhost/example_project/build/web/index.html_bootstrap.dart"

Please tell me I'm not the only one seeing this, and that someone is even now fixing this up for Polymer's next stable release. Or even better, tell me I'm an idiot and I'm doing something wrong that can be easily fixed.

montyr75

unread,
Apr 19, 2014, 9:56:36 PM4/19/14
to w...@dartlang.org
Anyone who cares to check out the code for a whole project with this problem can do so here: https://github.com/montyr75/remember_me

Carl Mosca

unread,
Apr 19, 2014, 10:13:35 PM4/19/14
to w...@dartlang.org
I have not done a lot with dart lately but I did pull down your project (which looks nice in dartium BTW) and I encounter the same problem.

Carl


--
You received this message because you are subscribed to the Google Groups "Dart Web Development" group.
To unsubscribe from this group and stop receiving emails from it, send an email to web+uns...@dartlang.org.
Visit this group at http://groups.google.com/a/dartlang.org/group/web/.
To view this discussion on the web visit https://groups.google.com/a/dartlang.org/d/msgid/web/3d783887-3da0-417d-b359-66bcb22aebfb%40dartlang.org.



--
Carl J. Mosca

James Hurford

unread,
Apr 19, 2014, 11:59:25 PM4/19/14
to w...@dartlang.org
It doesn't work for me either, and I suspect, but am not sure, that it has something to do with this warning

platform.js is not the first script on the page. See http://www.polymer-project.org/docs/start/platform.html#setup for details.

James





--
James Hurford
terr...@gmail.com

There are two ways of constructing a software design: one way is to
make it so simple that there are obviously no deficiencies; the other is
to make it so complicated that there are no obvious deficiencies.
                                                       -- C.A.R. Hoare

Günter Zöchbauer

unread,
Apr 21, 2014, 12:22:08 PM4/21/14
to w...@dartlang.org
I think the error is because the script tag 'dart.js' (https://github.com/montyr75/remember_me/blob/master/web/index.html#L18) is redundant when 'packages/polymer/polymer.html' is imported.
I don't know if this prevents the app to run.

John Messerly

unread,
Apr 21, 2014, 2:39:05 PM4/21/14
to w...@dartlang.org
filed https://code.google.com/p/dart/issues/detail?id=18339 about the warning. It looks harmless though. Still investigating why the app isn't starting.


John Messerly

unread,
Apr 21, 2014, 3:41:17 PM4/21/14
to w...@dartlang.org
seems to be a bug in the deploy tool: https://code.google.com/p/dart/issues/detail?id=18340
however, it's probably a good idea to keep <link rel=import> outside of the <polymer-element> generally (unlike link rel=stylesheet). 

I also sent https://github.com/montyr75/remember_me/pull/1 with the workaround.

Thanks for catching this!
- John

montyr75

unread,
Apr 21, 2014, 7:27:17 PM4/21/14
to w...@dartlang.org
Whoa! Very nice! Thanks, John, for taking the time to look at this and getting me up and running again. I knew my faith in you guys was well placed.  :)

I run a local Dart meetup (http://www.meetup.com/Utah-Valley-Dartisans-Dart-Programming-Meetup/), and I'll be sure to emphasize to my members that the fantastic support from the Dart devs and the Dart community is another great reason to start using Dart.
Reply all
Reply to author
Forward
0 new messages