Skip to content
This repository has been archived by the owner on Feb 22, 2018. It is now read-only.

Error in running chapter01 tutorial of angular Dart available on GitHub #629

Closed
savantmohan opened this issue Feb 26, 2014 · 11 comments
Closed
Milestone

Comments

@savantmohan
Copy link

Hi,
I am trying to run the angular dart tutorials available on gitHub. I am running the chapter 01 code .I am running the code on windows 7,32 bit.
But i am getting the following error.

'dart:mirrors-patch/mirrors_impl.dart': Failed assertion: line 1267: '_source != null'    is not true.

 STACKTRACE:
#0      _LocalMethodMirror.source (dart:mirrors-patch/mirrors_impl.dart:1267)
#1      _source (package:angular/core/scope.dart:1032:34)
#2      _source (package:angular/core/scope.dart:1033:9)
#3      Scope.$watch.<anonymous closure> (package:angular/core/scope.dart:261:27)
#4      Scope.$watch (package:angular/core/scope.dart:263:9)
#5      BlockFactory._instantiateDirectives.<anonymous closure> (package:angular/core_dom/block_factory.dart:207:39)
#6      BlockFactory._instantiateDirectives.<anonymous closure> (package:angular/core_dom/block_factory.dart:216:9)
#7      BlockFactory._instantiateDirectives.<anonymous closure> (package:angular/core_dom/block_factory.dart:216:9)
#8      List.forEach (dart:core-patch/growable_array.dart:240)
#9      BlockFactory._instantiateDirectives (package:angular/core_dom/block_factory.dart:187:26)
#10     BlockFactory._link (package:angular/core_dom/block_factory.dart:78:51)
#11     BlockFactory._link (package:angular/core_dom/block_factory.dart:89:9)
#12     BlockFactory._link (package:angular/core_dom/block_factory.dart:89:9)
#13     BlockFactory._link (package:angular/core_dom/block_factory.dart:82:16)
#14     BlockFactory._link (package:angular/core_dom/block_factory.dart:89:9)
#15     BlockFactory._link (package:angular/core_dom/block_factory.dart:89:9)
#16     BlockFactory._link (package:angular/core_dom/block_factory.dart:82:16)
#17     BlockFactory._link (package:angular/core_dom/block_factory.dart:89:9)
#18     BlockFactory._link (package:angular/core_dom/block_factory.dart:89:9)
#19     BlockFactory.call (package:angular/core_dom/block_factory.dart:47:12)
#20     BlockFactory.call (package:angular/core_dom/block_factory.dart:49:7)
#21     BlockFactory.call (package:angular/core_dom/block_factory.dart:49:7)
#22     ngBootstrap.<anonymous closure> (package:angular/bootstrap.dart:93:9)
#23     _rootRun (dart:async/zone.dart:688)
#24     _rootRun (dart:async/zone.dart:689)
#25     _rootRun (dart:async/zone.dart:689)
#26     _ZoneDelegate.run (dart:async/zone.dart:417)
#27     _onRun.<anonymous closure> (package:angular/core/zone.dart:61:56)
#28     NgZone._onRunBase (package:angular/core/zone.dart:49:16)
#29     _onRun (package:angular/core/zone.dart:61:15)
#30     _ZoneDelegate.run (dart:async/zone.dart:417)
#31     _CustomizedZone.run (dart:async/zone.dart:627)
#32     NgZone.run (package:angular/core/zone.dart:143:27)
#33     ngBootstrap (package:angular/bootstrap.dart:89:18)
#34     main (http://127.0.0.1:3030/angular.dart.tutorial-master/Chapter_01/web/main.dart:7:22)

'dart:mirrors-patch/mirrors_impl.dart': Failed assertion: line 1267: '_source != null' is not true.

STACKTRACE:
#0      _LocalMethodMirror.source (dart:mirrors-patch/mirrors_impl.dart:1267)
#1      _source (package:angular/core/scope.dart:1032:34)
#2      _source (package:angular/core/scope.dart:1033:9)
#3      Scope._digestHandleQueue (package:angular/core/scope.dart:540:62)
#4      Scope._digestWhileDirtyLoop (package:angular/core/scope.dart:485:23)
#5      Scope.$digest (package:angular/core/scope.dart:475:28)
#6      _autoDigestOnTurnDone (package:angular/core/scope.dart:153:14)
#7      _rootRun (dart:async/zone.dart:688)
#8      _ZoneDelegate.run (dart:async/zone.dart:417)
#9      NgZone._finishTurn (package:angular/core/zone.dart:91:21)
#10     NgZone._onRunBase (package:angular/core/zone.dart:56:43)
#11     _onRun (package:angular/core/zone.dart:61:15)
#12     _ZoneDelegate.run (dart:async/zone.dart:417)
#13     _CustomizedZone.run (dart:async/zone.dart:627)
#14     NgZone.run (package:angular/core/zone.dart:143:27)
#15     ngBootstrap (package:angular/bootstrap.dart:89:18)
#16     main (http://127.0.0.1:3030/angular.dart.tutorial-master/Chapter_01/web/main.dart:7:22)

Exception: 'dart:mirrors-patch/mirrors_impl.dart': Failed assertion: line 1267: '_source != null' is not true.
  _source@0x2cdf48df (package:angular/core/scope.dart:1032:34)
  _source@0x2cdf48df (package:angular/core/scope.dart:1033:9)
  Scope.<anonymous closure> (package:angular/core/scope.dart:261:27)
  Scope.$watch (package:angular/core/scope.dart:263:9)
  BlockFactory.<anonymous closure> (package:angular/core_dom/block_factory.dart:207:39)
  BlockFactory.<anonymous closure> (package:angular/core_dom/block_factory.dart:216:9)
  BlockFactory.<anonymous closure> (package:angular/core_dom/block_factory.dart:216:9)
  BlockFactory._instantiateDirectives@0x3e6e71c5 (package:angular/core_dom/block_factory.dart:187:26)
  BlockFactory._link@0x3e6e71c5 (package:angular/core_dom/block_factory.dart:78:51)
  BlockFactory._link@0x3e6e71c5 (package:angular/core_dom/block_factory.dart:89:9)
  BlockFactory._link@0x3e6e71c5 (package:angular/core_dom/block_factory.dart:89:9)
  BlockFactory._link@0x3e6e71c5 (package:angular/core_dom/block_factory.dart:82:16)
  BlockFactory._link@0x3e6e71c5 (package:angular/core_dom/block_factory.dart:89:9)
  BlockFactory._link@0x3e6e71c5 (package:angular/core_dom/block_factory.dart:89:9)
  BlockFactory._link@0x3e6e71c5 (package:angular/core_dom/block_factory.dart:82:16)
  BlockFactory._link@0x3e6e71c5 (package:angular/core_dom/block_factory.dart:89:9)
  BlockFactory._link@0x3e6e71c5 (package:angular/core_dom/block_factory.dart:89:9)
  BlockFactory.call (package:angular/core_dom/block_factory.dart:47:12)
  BlockFactory.call (package:angular/core_dom/block_factory.dart:49:7)
  BlockFactory.call (package:angular/core_dom/block_factory.dart:49:7)
  <anonymous closure> (package:angular/bootstrap.dart:93:9)
  NgZone.<anonymous closure> (package:angular/core/zone.dart:61:56)
  NgZone._onRunBase@0x2cdf48df (package:angular/core/zone.dart:49:16)
  NgZone._onRunBase@0x2cdf48df (package:angular/core/zone.dart:53:7)
  NgZone._onRunBase@0x2cdf48df (package:angular/core/zone.dart:50:7)
  NgZone._onRun@0x2cdf48df (package:angular/core/zone.dart:61:15)
  NgZone.run (package:angular/core/zone.dart:143:27)
  ngBootstrap (package:angular/bootstrap.dart:89:18)
  main (http://127.0.0.1:3030/angular.dart.tutorial-    master/Chapter_01/web/main.dart:7:22)

My pubspec.Lock is as follows,

 # Generated by pub
 # See http://pub.dartlang.org/doc/glossary.html#lockfile
packages:
  analyzer:
    description: analyzer
    source: hosted
    version: "0.10.5"
  angular:
    description: angular
    source: hosted
    version: "0.9.8"
  args:
    description: args
    source: hosted
    version: "0.9.0"
  browser:
    description: browser
    source: hosted
    version: "0.9.1"
  collection:
    description: collection
    source: hosted
    version: "0.9.1"
  di:
    description: di
    source: hosted
    version: "0.0.32"
  html5lib:
    description: html5lib
    source: hosted
    version: "0.9.1"
  intl:
    description: intl
    source: hosted
    version: "0.9.1"
  logging:
    description: logging
    source: hosted
    version: "0.9.1+1"
  path:
    description: path
    source: hosted
    version: "1.0.0"
  perf_api:
    description: perf_api
    source: hosted
    version: "0.0.8"
  route_hierarchical:
    description: route_hierarchical
    source: hosted
    version: "0.4.14"
  shadow_dom:
    description: shadow_dom
    source: hosted
    version: "0.9.1"
  source_maps:
    description: source_maps
    source: hosted
    version: "0.9.0"
  stack_trace:
    description: stack_trace
    source: hosted
    version: "0.9.1"
  unittest:
    description: unittest
    source: hosted
    version: "0.10.0"
  unmodifiable_collection:
    description: unmodifiable_collection
    source: hosted
    version: "0.9.2+1"
  utf:
    description: utf
    source: hosted
    version: "0.9.0"

I am getting this error on all the examples.Kindly advise me to solve the issues.
Thanks in advance.

Regards,
Mohan Savant

@vicb
Copy link
Contributor

vicb commented Feb 26, 2014

Closing this at it should be opened in the tutorial repo, you can follow dart-archive/angular.dart.tutorial#87 for updates.

@vicb vicb closed this as completed Feb 26, 2014
@bgourlie
Copy link
Contributor

This is actually an issue in the DI project. I ran into this once before (bug here, fix here). There are probably more places in the code that need to be fixed.

The gist of it is, there are a couple of places in the di project that attempt to print some source locations gathered via reflection, which triggers an assertion in the mirrors package that fails.

Anyway, instead of filing this bug in angular.dart.tutorial, it needs to be filed in the di project.

@vicb
Copy link
Contributor

vicb commented Feb 26, 2014

it needs to be filed in the di project.

The fix seem to have been merged 2 months ago ?

@bgourlie
Copy link
Contributor

That PR fixed just one instance of the problem. There seems to be other places in the code that trigger the same assertion.

@pavelgj
Copy link
Contributor

pavelgj commented Feb 26, 2014

@bgourlie It's not a DI issue, but in the Scope:
https://github.com/angular/angular.dart/blob/951fa1783afa65f410a2b82249850eed458ed294/lib/core/scope.dart#L1032

Scope was rewritten, so it likely will be fixed with 0.9.9 release.

@bgourlie
Copy link
Contributor

Ah, that makes sense. In that case, this issue should probably be reopened.

@vicb vicb reopened this Feb 26, 2014
@vicb
Copy link
Contributor

vicb commented Feb 26, 2014

As @pavelgj said the scope was re-written, this issue is no more applicable as is.

@vicb vicb closed this as completed Feb 26, 2014
@pavelgj pavelgj self-assigned this Feb 26, 2014
@pavelgj pavelgj added this to the v0.9.9 milestone Feb 26, 2014
@pavelgj
Copy link
Contributor

pavelgj commented Feb 26, 2014

As I said, Scope was rewritten and no longer uses that mirrors API. I grepped code for uses of source -- none exist. I'll close the issue and we can reopen if the problem persists after 0.9.9 release.

@savantmohan
Copy link
Author

@vicb I ran the code today and i was able to get the output.

Thanks 👍

@vicb
Copy link
Contributor

vicb commented Feb 27, 2014

@savantmohan for each working chapter you have, it would be great to submit a PR to the tutorial repo with your pubspec.lock so that others can run the examples w/o any problem. Thanks.
/cc @kwalrath

@kwalrath
Copy link
Contributor

@savantmohan: Yes, that'd be great if you could submit a PR with the pubspec.lock(s). Thanks, @vicb, for suggesting it.

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

No branches or pull requests

5 participants