You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on May 25, 2021. It is now read-only.
Description of issue:
When component provider uses string as an injection token, Augury throws " FOO_TOKEN is not an object!" error and Augury component tree doesn't render.
Steps to reproduce:
Use string injection token for component provider.
Open Augury in inspector.
Additional details:
The issue happens because Description.prototype.getProviderDescription calls Reflect.getMetadata over provider token without checking it's type, so Reflect.getMetadata throws, since it expects an object. As a consequence, the component tree in Augury does not render. For example, this happens with @uirouter/angular-hybrid, which uses such a technique. I noticed that resolveTokenIdMetaData in parse-modules.ts checks for this, while getProviderDescription does not.
Augury version: 1.22.0
Angular version: 7.2.2
Date: 01.02.2019
OS: Windows 10
Demo test application:
https://angular-ofbttw.stackblitz.io
https://stackblitz.com/edit/angular-ofbttw?file=src%2Fapp%2Fapp.component.ts
Description of issue:
When component provider uses string as an injection token, Augury throws " FOO_TOKEN is not an object!" error and Augury component tree doesn't render.
Steps to reproduce:
Additional details:
The issue happens because Description.prototype.getProviderDescription calls Reflect.getMetadata over provider token without checking it's type, so Reflect.getMetadata throws, since it expects an object. As a consequence, the component tree in Augury does not render. For example, this happens with @uirouter/angular-hybrid, which uses such a technique. I noticed that resolveTokenIdMetaData in parse-modules.ts checks for this, while getProviderDescription does not.
#1311 looks related.
The text was updated successfully, but these errors were encountered: