{"action":"created","issue":{"url":"https://api.github.com/repos/angular/angular/issues/7817","repository_url":"https://api.github.com/repos/angular/angular","labels_url":"https://api.github.com/repos/angular/angular/issues/7817/labels{/name}","comments_url":"https://api.github.com/repos/angular/angular/issues/7817/comments","events_url":"https://api.github.com/repos/angular/angular/issues/7817/events","html_url":"https://github.com/angular/angular/issues/7817","id":144350184,"number":7817,"title":"\"Exception: Cannot find reflection information on TestabilityRegistry with\" with WebWorker example","user":{"login":"zoechi","id":405837,"avatar_url":"https://avatars.githubusercontent.com/u/405837?v=3","gravatar_id":"","url":"https://api.github.com/users/zoechi","html_url":"https://github.com/zoechi","followers_url":"https://api.github.com/users/zoechi/followers","following_url":"https://api.github.com/users/zoechi/following{/other_user}","gists_url":"https://api.github.com/users/zoechi/gists{/gist_id}","starred_url":"https://api.github.com/users/zoechi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zoechi/subscriptions","organizations_url":"https://api.github.com/users/zoechi/orgs","repos_url":"https://api.github.com/users/zoechi/repos","events_url":"https://api.github.com/users/zoechi/events{/privacy}","received_events_url":"https://api.github.com/users/zoechi/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-03-29T18:36:29Z","updated_at":"2016-03-30T05:10:58Z","closed_at":null,"body":"**Steps to reproduce and a minimal demo of the problem**\r\n\r\n```yaml\r\n#pubspec.yaml\r\nname: so36272590_webworker\r\ndependencies:\r\n  angular2: ^2.0.0-beta\r\n  browser: ^0.10.0\r\ndev_dependencies:\r\n  dart_to_js_script_rewriter: ^0.1.0\r\ntransformers:\r\n- angular2:\r\n    entry_points:\r\n    - web/main.dart\r\n    - web/my_worker.dart\r\n    mirror_mode: verbose\r\n    platform_pipes: 'package:angular2/common.dart#COMMON_PIPES'\r\n    gen_change_detection_debug_info: true\r\n    platform_directives: 'package:angular2/common.dart#COMMON_DIRECTIVES'\r\n- $dart2js:\r\n    minify: true\r\n    commandLineOptions:\r\n    - --dump-info\r\n    - --show-package-warnings\r\n    - --trust-type-annotations\r\n    - --trust-primitives\r\n- dart_to_js_script_rewriter\r\n```\r\n\r\n```html\r\n<!-- index.html -->\r\n<!DOCTYPE html>\r\n<html>\r\n  <head>\r\n    <script async src=\"main.dart\" type=\"application/dart\"></script>\r\n    <script async src=\"packages/browser/dart.js\"></script>\r\n  </head>\r\n  <body>\r\n    <hello-world></hello-world>\r\n  </body>\r\n</html>\r\n```\r\n\r\n```dart\r\n// main.dart\r\nimport 'package:angular2/angular2.dart' show TestabilityRegistry, platform, provide;\r\nimport 'package:angular2/platform/worker_render.dart'\r\n    show WORKER_RENDER_PLATFORM, initIsolate;\r\n\r\nvoid main() {\r\n  platform([WORKER_RENDER_PLATFORM])\r\n      .asyncApplication(initIsolate(\"my_worker.dart\"));\r\n}\r\n```\r\n\r\n```dart\r\n// my_worker.dart\r\nimport 'dart:isolate' show SendPort;\r\nimport 'package:angular2/core.dart' show Component, Provider, TestabilityRegistry, platform;\r\nimport 'package:angular2/angular2.dart' show reflector;\r\nimport 'package:angular2/platform/worker_app.dart'\r\n    show RENDER_SEND_PORT, WORKER_APP_APPLICATION, WORKER_APP_PLATFORM;\r\nimport \"package:angular2/src/core/reflection/reflection.dart\";\r\nimport \"package:angular2/src/core/reflection/reflection_capabilities.dart\" show ReflectionCapabilities;\r\n\r\n@Component(\r\n    selector: 'hello-world',\r\n    template: '<h1>Hello {{name}}</h1>'\r\n)\r\nclass HelloWorld {\r\n  String name = 'Jane';\r\n}\r\n\r\nvoid main(List<String> args, SendPort replyTo) {\r\n  reflector.reflectionCapabilities = new ReflectionCapabilities();\r\n  platform(\r\n      [WORKER_APP_PLATFORM, new Provider(RENDER_SEND_PORT, useValue: replyTo)])\r\n      .application([WORKER_APP_APPLICATION])\r\n      .bootstrap(HelloWorld);\r\n}\r\n```\r\n_What steps should we try in your demo to see the problem?_\r\nCreate an app from the files above and launch it in Dartium.\r\n\r\n**Current behavior**\r\nThrows\r\n\r\n**Other information**\r\n> Dart VM version: 1.16.0-edge.c2700473c49aecd48cb0ac2a73a37a38dfab979c (Mon Mar 28 18:00:17 2016) on \"linux_x64\"\r\n> angular2 2.0.0-beta.12\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/angular/angular/issues/comments/203250998","html_url":"https://github.com/angular/angular/issues/7817#issuecomment-203250998","issue_url":"https://api.github.com/repos/angular/angular/issues/7817","id":203250998,"user":{"login":"zoechi","id":405837,"avatar_url":"https://avatars.githubusercontent.com/u/405837?v=3","gravatar_id":"","url":"https://api.github.com/users/zoechi","html_url":"https://github.com/zoechi","followers_url":"https://api.github.com/users/zoechi/followers","following_url":"https://api.github.com/users/zoechi/following{/other_user}","gists_url":"https://api.github.com/users/zoechi/gists{/gist_id}","starred_url":"https://api.github.com/users/zoechi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zoechi/subscriptions","organizations_url":"https://api.github.com/users/zoechi/orgs","repos_url":"https://api.github.com/users/zoechi/repos","events_url":"https://api.github.com/users/zoechi/events{/privacy}","received_events_url":"https://api.github.com/users/zoechi/received_events","type":"User","site_admin":false},"created_at":"2016-03-30T05:10:58Z","updated_at":"2016-03-30T05:10:58Z","body":"The text below the code examples mentions that \r\n\r\n    reflector.reflectionCapabilities = new ReflectionCapabilities();\r\n\r\nis required in both `main() { ... }` \r\nAdding it to `main.dart` as well fixes the exception but the page keeps loading and doesn't show the component."}}