Skip to content
This repository was archived by the owner on Dec 19, 2017. It is now read-only.

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

Closed
DartBot opened this issue Jun 5, 2015 · 2 comments
Labels

Comments

@DartBot
Copy link

DartBot commented Jun 5, 2015

<img src="https://avatars.githubusercontent.com/u/5405376?v=3" align="left" width="96" height="96"hspace="10"> Issue by jolleekin
Originally opened as dart-lang/sdk#19207


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.

@DartBot
Copy link
Author

DartBot commented Jun 5, 2015

<img src="https://avatars.githubusercontent.com/u/2049220?v=3" align="left" width="48" height="48"hspace="10"> Comment by sigmundch


Thanks for the report!

Part of the problem is also that pub is not detecting changes in your pubspec. I opened issue dart-lang/pub#1003 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 #400), 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.

@DartBot
Copy link
Author

DartBot commented Jun 5, 2015

<img src="https://avatars.githubusercontent.com/u/2049220?v=3" align="left" width="48" height="48"hspace="10"> Comment by sigmundch


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.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Development

No branches or pull requests

1 participant