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

Renaming the entry point to be different from the application's name throws NoSuchMethodError #19207

Closed
DartBot opened this issue Jun 4, 2014 · 3 comments
Labels
area-pkg Used for miscellaneous pkg/ packages not associated with specific area- teams.

Comments

@DartBot
Copy link

DartBot commented Jun 4, 2014

This issue was originally filed by @jolleekin


What steps will reproduce the problem?

  1. Create a new sample web application with Polymer named xyz
  2. Add <link rel="import" href="packages/polymer/polymer.html"> to web/xyz.html
  3. Rename web/xyz.html to web/abc.html
  4. Change "entry_points: web/zyz.html" to "entry_points: web/abc.html" in pubspec.yaml
  5. Run web/abc.html

What is the expected output? What do you see instead?
Expected: App runs normally

Actual: NoSuchMethodError was thrown as loader.initializers is null.

Zone initPolymer() {
  if (loader.deployMode) {
    startPolymer(loader.initializers, loader.deployMode);
    return Zone.current;
  }
  return dirtyCheckZone()..run(
      () => startPolymer(loader.initializers, loader.deployMode));
}

What version of the product are you using? On what operating system?
Dart Editor 1.5.0.dev_03_04
Windows 7 64bit

Please provide any additional information below.

@sigmundch
Copy link
Member

Thanks for the report!

Part of the problem is also that pub is not detecting changes in your pubspec. I opened issue #19214 for that. Meanwhile, I believe that if you manually restart the pub-serve process, the error will go away.

I'll look into making initPolymer more robust in this case and at least provide a better error message. I'm also planning to change how our transformers are run (see issue #19168), at that point we will not need to look at the value of 'entry_points' when you are running pub-serve and loading the code in Dartium.


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

@sigmundch
Copy link
Member

I just released a fix to avoid getting a NoSuchMethodError and published it in polymer 0.10.0+1.

Since the remaining action items are tracked in the other bugs, I'm closing this one.


Added Fixed label.

@DartBot
Copy link
Author

DartBot commented Jun 5, 2015

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

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

3 participants